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
03029647
Commit
03029647
authored
Apr 16, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x264: support setting any option
parent
ab907e10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
modules/codec/x264.c
modules/codec/x264.c
+30
-1
No files found.
modules/codec/x264.c
View file @
03029647
...
@@ -407,6 +407,9 @@ static void x264_log( void *, int i_level, const char *psz, va_list );
...
@@ -407,6 +407,9 @@ static void x264_log( void *, int i_level, const char *psz, va_list );
#define TUNE_TEXT N_("Default tune setting used" )
#define TUNE_TEXT N_("Default tune setting used" )
#define PRESET_TEXT N_("Default preset setting used" )
#define PRESET_TEXT N_("Default preset setting used" )
#define X264_OPTIONS_TEXT N_("x264 advanced options.")
#define X264_OPTIONS_LONGTEXT N_("x264 advanced options, in the form {opt=val,op2=val2} .")
static
const
char
*
const
enc_me_list
[]
=
static
const
char
*
const
enc_me_list
[]
=
{
"dia"
,
"hex"
,
"umh"
,
"esa"
,
"tesa"
};
{
"dia"
,
"hex"
,
"umh"
,
"esa"
,
"tesa"
};
static
const
char
*
const
enc_me_list_text
[]
=
static
const
char
*
const
enc_me_list_text
[]
=
...
@@ -721,6 +724,9 @@ vlc_module_begin ()
...
@@ -721,6 +724,9 @@ vlc_module_begin ()
add_string
(
SOUT_CFG_PREFIX
"tune"
,
NULL
,
TUNE_TEXT
,
TUNE_TEXT
,
false
)
add_string
(
SOUT_CFG_PREFIX
"tune"
,
NULL
,
TUNE_TEXT
,
TUNE_TEXT
,
false
)
change_string_list
(
x264_tune_names
,
x264_tune_names
,
0
);
change_string_list
(
x264_tune_names
,
x264_tune_names
,
0
);
add_string
(
SOUT_CFG_PREFIX
"options"
,
NULL
,
X264_OPTIONS_TEXT
,
X264_OPTIONS_LONGTEXT
,
true
)
vlc_module_end
()
vlc_module_end
()
/*****************************************************************************
/*****************************************************************************
...
@@ -740,7 +746,8 @@ static const char *const ppsz_sout_options[] = {
...
@@ -740,7 +746,8 @@ static const char *const ppsz_sout_options[] = {
"verbose"
,
"vbv-bufsize"
,
"vbv-init"
,
"vbv-maxrate"
,
"weightb"
,
"weightp"
,
"verbose"
,
"vbv-bufsize"
,
"vbv-init"
,
"vbv-maxrate"
,
"weightb"
,
"weightp"
,
"aq-mode"
,
"aq-strength"
,
"psy-rd"
,
"psy"
,
"profile"
,
"lookahead"
,
"slices"
,
"aq-mode"
,
"aq-strength"
,
"psy-rd"
,
"psy"
,
"profile"
,
"lookahead"
,
"slices"
,
"slice-max-size"
,
"slice-max-mbs"
,
"intra-refresh"
,
"mbtree"
,
"hrd"
,
"slice-max-size"
,
"slice-max-mbs"
,
"intra-refresh"
,
"mbtree"
,
"hrd"
,
"tune"
,
"preset"
,
"opengop"
,
"bluray-compat"
,
"frame-packing"
,
NULL
"tune"
,
"preset"
,
"opengop"
,
"bluray-compat"
,
"frame-packing"
,
"options"
,
NULL
};
};
static
block_t
*
Encode
(
encoder_t
*
,
picture_t
*
);
static
block_t
*
Encode
(
encoder_t
*
,
picture_t
*
);
...
@@ -1324,6 +1331,28 @@ static int Open ( vlc_object_t *p_this )
...
@@ -1324,6 +1331,28 @@ static int Open ( vlc_object_t *p_this )
/* We don't want repeated headers, we repeat p_extra ourself if needed */
/* We don't want repeated headers, we repeat p_extra ourself if needed */
p_sys
->
param
.
b_repeat_headers
=
0
;
p_sys
->
param
.
b_repeat_headers
=
0
;
char
*
psz_opts
=
var_InheritString
(
p_enc
,
SOUT_CFG_PREFIX
"options"
);
if
(
psz_opts
&&
*
psz_opts
)
{
config_chain_t
*
cfg
=
NULL
;
config_ChainParseOptions
(
&
cfg
,
psz_opts
);
while
(
cfg
)
{
config_chain_t
*
next
=
cfg
->
p_next
;
char
*
name
=
cfg
->
psz_name
;
char
*
value
=
cfg
->
psz_value
;
int
ret
=
x264_param_parse
(
&
p_sys
->
param
,
name
,
value
);
if
(
ret
==
X264_PARAM_BAD_NAME
)
{
msg_Err
(
p_enc
,
"Unknown option
\"
%s
\"
"
,
name
);
}
else
if
(
ret
==
X264_PARAM_BAD_VALUE
)
{
msg_Err
(
p_enc
,
"Bad value
\"
%s
\"
for option
\"
%s
\"
"
,
value
,
name
);
}
free
(
name
);
free
(
value
);
free
(
cfg
);
cfg
=
next
;
}
}
free
(
psz_opts
);
/* Open the encoder */
/* Open the encoder */
p_sys
->
h
=
x264_encoder_open
(
&
p_sys
->
param
);
p_sys
->
h
=
x264_encoder_open
(
&
p_sys
->
param
);
...
...
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