Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
db708260
Commit
db708260
authored
Mar 15, 2005
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/stream_out/switcher.c: Added --sout-switcher-aspect-ratio option.
parent
2e762050
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
modules/stream_out/switcher.c
modules/stream_out/switcher.c
+36
-2
No files found.
modules/stream_out/switcher.c
View file @
db708260
...
@@ -84,6 +84,9 @@ static block_t *AudioGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -84,6 +84,9 @@ static block_t *AudioGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
#define SIZES_TEXT N_("Sizes")
#define SIZES_TEXT N_("Sizes")
#define SIZES_LONGTEXT N_( \
#define SIZES_LONGTEXT N_( \
"List of sizes separated by colons (720x576:480x576)." )
"List of sizes separated by colons (720x576:480x576)." )
#define RATIO_TEXT N_("Aspect ratio")
#define RATIO_LONGTEXT N_( \
"Aspect ratio (4:3, 16:9)." )
#define PORT_TEXT N_("Command UDP port")
#define PORT_TEXT N_("Command UDP port")
#define PORT_LONGTEXT N_( \
#define PORT_LONGTEXT N_( \
"UDP port to listen to for commands." )
"UDP port to listen to for commands." )
...
@@ -95,7 +98,7 @@ static block_t *AudioGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -95,7 +98,7 @@ static block_t *AudioGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
"Number of P frames between two I frames." )
"Number of P frames between two I frames." )
#define QSCALE_TEXT N_("Quantizer scale")
#define QSCALE_TEXT N_("Quantizer scale")
#define QSCALE_LONGTEXT N_( \
#define QSCALE_LONGTEXT N_( \
"
Quantizer scal
e." )
"
Fixed quantizer scale to us
e." )
vlc_module_begin
();
vlc_module_begin
();
set_description
(
_
(
"MPEG2 video switcher stream output"
)
);
set_description
(
_
(
"MPEG2 video switcher stream output"
)
);
...
@@ -107,6 +110,8 @@ vlc_module_begin();
...
@@ -107,6 +110,8 @@ vlc_module_begin();
FILES_LONGTEXT
,
VLC_FALSE
);
FILES_LONGTEXT
,
VLC_FALSE
);
add_string
(
SOUT_CFG_PREFIX
"sizes"
,
""
,
NULL
,
SIZES_TEXT
,
add_string
(
SOUT_CFG_PREFIX
"sizes"
,
""
,
NULL
,
SIZES_TEXT
,
SIZES_LONGTEXT
,
VLC_FALSE
);
SIZES_LONGTEXT
,
VLC_FALSE
);
add_string
(
SOUT_CFG_PREFIX
"aspect-ratio"
,
"4:3"
,
NULL
,
RATIO_TEXT
,
RATIO_LONGTEXT
,
VLC_FALSE
);
add_integer
(
SOUT_CFG_PREFIX
"port"
,
5001
,
NULL
,
add_integer
(
SOUT_CFG_PREFIX
"port"
,
5001
,
NULL
,
PORT_TEXT
,
PORT_LONGTEXT
,
VLC_TRUE
);
PORT_TEXT
,
PORT_LONGTEXT
,
VLC_TRUE
);
add_integer
(
SOUT_CFG_PREFIX
"command"
,
0
,
NULL
,
add_integer
(
SOUT_CFG_PREFIX
"command"
,
0
,
NULL
,
...
@@ -118,7 +123,7 @@ vlc_module_begin();
...
@@ -118,7 +123,7 @@ vlc_module_begin();
vlc_module_end
();
vlc_module_end
();
static
const
char
*
ppsz_sout_options
[]
=
{
static
const
char
*
ppsz_sout_options
[]
=
{
"files"
,
"sizes"
,
"port"
,
"command"
,
"gop"
,
"qscale"
,
NULL
"files"
,
"sizes"
,
"
aspect-ratio"
,
"
port"
,
"command"
,
"gop"
,
"qscale"
,
NULL
};
};
struct
sout_stream_sys_t
struct
sout_stream_sys_t
...
@@ -126,6 +131,7 @@ struct sout_stream_sys_t
...
@@ -126,6 +131,7 @@ struct sout_stream_sys_t
sout_stream_t
*
p_out
;
sout_stream_t
*
p_out
;
int
i_gop
;
int
i_gop
;
int
i_qscale
;
int
i_qscale
;
AVRational
sample_aspect_ratio
;
sout_stream_id_t
*
pp_audio_ids
[
MAX_AUDIO
];
sout_stream_id_t
*
pp_audio_ids
[
MAX_AUDIO
];
/* Pictures */
/* Pictures */
...
@@ -219,6 +225,32 @@ static int Open( vlc_object_t *p_this )
...
@@ -219,6 +225,32 @@ static int Open( vlc_object_t *p_this )
p_sys
->
i_nb_pictures
++
;
p_sys
->
i_nb_pictures
++
;
}
}
var_Get
(
p_stream
,
SOUT_CFG_PREFIX
"aspect-ratio"
,
&
val
);
if
(
val
.
psz_string
)
{
char
*
psz_parser
=
strchr
(
val
.
psz_string
,
':'
);
if
(
psz_parser
)
{
*
psz_parser
++
=
'\0'
;
p_sys
->
sample_aspect_ratio
.
num
=
atoi
(
val
.
psz_string
);
p_sys
->
sample_aspect_ratio
.
den
=
atoi
(
psz_parser
);
}
else
{
msg_Warn
(
p_stream
,
"bad aspect ratio %s"
,
val
.
psz_string
);
p_sys
->
sample_aspect_ratio
.
num
=
4
;
p_sys
->
sample_aspect_ratio
.
den
=
3
;
}
free
(
val
.
psz_string
);
}
else
{
p_sys
->
sample_aspect_ratio
.
num
=
4
;
p_sys
->
sample_aspect_ratio
.
den
=
3
;
}
var_Get
(
p_stream
,
SOUT_CFG_PREFIX
"port"
,
&
val
);
var_Get
(
p_stream
,
SOUT_CFG_PREFIX
"port"
,
&
val
);
p_sys
->
i_fd
=
net_OpenUDP
(
p_stream
,
NULL
,
val
.
i_int
,
NULL
,
0
);
p_sys
->
i_fd
=
net_OpenUDP
(
p_stream
,
NULL
,
val
.
i_int
,
NULL
,
0
);
if
(
p_sys
->
i_fd
<
0
)
if
(
p_sys
->
i_fd
<
0
)
...
@@ -703,6 +735,8 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id )
...
@@ -703,6 +735,8 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id )
id
->
ff_enc_c
->
frame_rate
=
25
;
/* FIXME */
id
->
ff_enc_c
->
frame_rate
=
25
;
/* FIXME */
id
->
ff_enc_c
->
frame_rate_base
=
1
;
id
->
ff_enc_c
->
frame_rate_base
=
1
;
memcpy
(
&
id
->
ff_enc_c
->
sample_aspect_ratio
,
&
p_sys
->
sample_aspect_ratio
,
sizeof
(
AVRational
)
);
id
->
ff_enc_c
->
gop_size
=
200
;
id
->
ff_enc_c
->
gop_size
=
200
;
id
->
ff_enc_c
->
max_b_frames
=
0
;
id
->
ff_enc_c
->
max_b_frames
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment