Mercurial > mplayer.hg
changeset 26695:1af41774481b
AVOptions support for lavf muxing.
author | michael |
---|---|
date | Sat, 10 May 2008 19:22:41 +0000 |
parents | 75ec8833185c |
children | 53b6cf6b971d |
files | libmpdemux/muxer_lavf.c |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/muxer_lavf.c Sat May 10 19:15:57 2008 +0000 +++ b/libmpdemux/muxer_lavf.c Sat May 10 19:22:41 2008 +0000 @@ -10,6 +10,7 @@ #include "aviheader.h" #include "ms_hdr.h" +#include "av_opts.h" #include "stream/stream.h" #include "muxer.h" @@ -50,6 +51,7 @@ static int mux_packet_size= 0; static float mux_preload= 0.5; static float mux_max_delay= 0.7; +static char *mux_avopt = NULL; m_option_t lavfopts_conf[] = { {"format", &(conf_format), CONF_TYPE_STRING, 0, 0, 0, NULL}, @@ -57,6 +59,7 @@ {"packetsize", &mux_packet_size, CONF_TYPE_INT, CONF_RANGE, 0, INT_MAX, NULL}, {"preload", &mux_preload, CONF_TYPE_FLOAT, CONF_RANGE, 0, INT_MAX, NULL}, {"delay", &mux_max_delay, CONF_TYPE_FLOAT, CONF_RANGE, 0, INT_MAX, NULL}, + {"o", &mux_avopt, CONF_TYPE_STRING, 0, 0, 0, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; @@ -392,6 +395,14 @@ av_strlcpy(priv->oc->copyright, info_copyright, sizeof(priv->oc->copyright)); if (info_comment) av_strlcpy(priv->oc->comment , info_comment, sizeof(priv->oc->comment )); + + if(mux_avopt){ + if(parse_avopts(priv->oc, mux_avopt) < 0){ + mp_msg(MSGT_MUXER,MSGL_ERR, "Your options /%s/ look like gibberish to me pal\n", mux_avopt); + goto fail; + } + } + register_protocol(&mp_protocol); priv_data= muxer;