[MPlayer-cvslog] r31655 - in trunk/libmpcodecs: ae_lavc.c ve_lavc.c

reimar subversion at mplayerhq.hu
Sat Jul 10 09:25:44 CEST 2010


Author: reimar
Date: Sat Jul 10 09:25:44 2010
New Revision: 31655

Log:
Make it possible to set all options for lavc audio encoder.

Modified:
   trunk/libmpcodecs/ae_lavc.c
   trunk/libmpcodecs/ve_lavc.c

Modified: trunk/libmpcodecs/ae_lavc.c
==============================================================================
--- trunk/libmpcodecs/ae_lavc.c	Sat Jul 10 04:25:07 2010	(r31654)
+++ trunk/libmpcodecs/ae_lavc.c	Sat Jul 10 09:25:44 2010	(r31655)
@@ -31,6 +31,7 @@
 #include "libmpdemux/muxer.h"
 #include "ae_lavc.h"
 #include "help_mp.h"
+#include "av_opts.h"
 #include "libaf/af_format.h"
 #include "libaf/reorder_ch.h"
 #include "libavcodec/avcodec.h"
@@ -42,6 +43,7 @@ extern char *lavc_param_acodec;
 extern int  lavc_param_abitrate;
 extern int  lavc_param_atag;
 extern int  lavc_param_audio_global_header;
+extern char *lavc_param_audio_avopt;
 extern int  avcodec_initialized;
 static int compressed_frame_size = 0;
 #ifdef CONFIG_LIBAVFORMAT
@@ -232,6 +234,12 @@ int mpae_init_lavc(audio_encoder_t *enco
                 lavc_actx->bit_rate = encoder->params.bitrate = lavc_param_abitrate * 1000;
         else
                 lavc_actx->bit_rate = encoder->params.bitrate = lavc_param_abitrate;
+        if(lavc_param_audio_avopt){
+            if(parse_avopts(lavc_actx, lavc_param_audio_avopt) < 0){
+                mp_msg(MSGT_MENCODER,MSGL_ERR, "Your options /%s/ look like gibberish to me pal\n", lavc_param_audio_avopt);
+                return 0;
+            }
+        }
 
 
 	/*

Modified: trunk/libmpcodecs/ve_lavc.c
==============================================================================
--- trunk/libmpcodecs/ve_lavc.c	Sat Jul 10 04:25:07 2010	(r31654)
+++ trunk/libmpcodecs/ve_lavc.c	Sat Jul 10 09:25:44 2010	(r31655)
@@ -180,6 +180,7 @@ int lavc_param_atag = 0;
 int lavc_param_abitrate = 224;
 int lavc_param_audio_global_header= 0;
 static char *lavc_param_avopt = NULL;
+char *lavc_param_audio_avopt = NULL;
 
 #include "m_option.h"
 
@@ -328,6 +329,7 @@ const m_option_t lavcopts_conf[]={
         {"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},
+        {"audio_o", &lavc_param_audio_avopt, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 


More information about the MPlayer-cvslog mailing list