Mercurial > mplayer.hg
changeset 26693:64bb979316d3
AVOption support for video encoders.
author | michael |
---|---|
date | Sat, 10 May 2008 19:07:26 +0000 |
parents | 0e325c1957f1 |
children | 75ec8833185c |
files | libmpcodecs/ve_lavc.c |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ve_lavc.c Sat May 10 18:55:31 2008 +0000 +++ b/libmpcodecs/ve_lavc.c Sat May 10 19:07:26 2008 +0000 @@ -14,6 +14,7 @@ #include "mp_msg.h" #include "help_mp.h" +#include "av_opts.h" #include "codec-cfg.h" #include "stream/stream.h" @@ -157,6 +158,7 @@ int lavc_param_atag = 0; int lavc_param_abitrate = 224; int lavc_param_audio_global_header= 0; +static char *lavc_param_avopt = NULL; #include "m_option.h" @@ -302,6 +304,7 @@ {"refs", &lavc_param_refs, CONF_TYPE_INT, CONF_RANGE, 1, 16, NULL}, {"b_sensitivity", &lavc_param_b_sensitivity, CONF_TYPE_INT, CONF_RANGE, 1, INT_MAX, NULL}, {"level", &lavc_param_level, CONF_TYPE_INT, CONF_RANGE, INT_MIN, INT_MAX, NULL}, + {"o", &lavc_param_avopt, CONF_TYPE_STRING, 0, 0, 0, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; #endif @@ -578,6 +581,13 @@ lavc_venc_context->b_sensitivity = lavc_param_b_sensitivity; lavc_venc_context->level = lavc_param_level; + if(lavc_param_avopt){ + if(parse_avopts(lavc_venc_context, lavc_param_avopt) < 0){ + mp_msg(MSGT_MENCODER,MSGL_ERR, "Your options /%s/ look like gibberish to me pal\n", lavc_param_avopt); + return 0; + } + } + mux_v->imgfmt = lavc_param_format; switch(lavc_param_format) {