changeset 2661:11f4c2b2b70f

-oac/-ovc (fake:))
author arpi
date Sat, 03 Nov 2001 23:01:17 +0000
parents b082c01f6cec
children 994b95f443f2
files cfg-mencoder.h mencoder.c
diffstat 2 files changed, 27 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-mencoder.h	Sat Nov 03 22:15:42 2001 +0000
+++ b/cfg-mencoder.h	Sat Nov 03 23:01:17 2001 +0000
@@ -32,6 +32,22 @@
 	{"padding", &lame_param_padding, CONF_TYPE_INT, CONF_RANGE, 0, PAD_MAX_INDICATOR},
 	{"br", &lame_param_br, CONF_TYPE_INT, CONF_RANGE, 0, 1024},
 	{"ratio", &lame_param_ratio, CONF_TYPE_INT, CONF_RANGE, 0, 100},
+	{"help", "TODO: lameopts help!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
+	{NULL, NULL, 0, 0, 0, 0}
+};
+
+struct config ovc_conf[]={
+	{"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, 0},
+	{"divx4", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_DIVX4},
+	{"help", "\nAvailable codecs:\n   copy\n   divx4\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
+	{NULL, NULL, 0, 0, 0, 0}
+};
+
+struct config oac_conf[]={
+	{"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, 0},
+	{"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM},
+	{"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3},
+	{"help", "\nAvailable codecs:\n   copy\n   pcm\n   mp3lame\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
 	{NULL, NULL, 0, 0, 0, 0}
 };
 
@@ -45,8 +61,10 @@
 	{"mp3file", &mp3_filename, CONF_TYPE_STRING, 0, 0, 0},
 	{"ac3file", &ac3_filename, CONF_TYPE_STRING, 0, 0, 0},
 
-	{"oac", &out_audio_codec, CONF_TYPE_STRING, 0, 0, 0},
-	{"ovc", &out_video_codec, CONF_TYPE_STRING, 0, 0, 0},
+//	{"oac", &out_audio_codec, CONF_TYPE_STRING, 0, 0, 0},
+//	{"ovc", &out_video_codec, CONF_TYPE_STRING, 0, 0, 0},
+	{"oac", oac_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0},
+	{"ovc", ovc_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0},
 
 	{"pass", &pass, CONF_TYPE_INT, CONF_RANGE,0,2},
 	
--- a/mencoder.c	Sat Nov 03 22:15:42 2001 +0000
+++ b/mencoder.c	Sat Nov 03 23:01:17 2001 +0000
@@ -50,6 +50,9 @@
 int audio_family=-1;     // override audio codec family 
 int video_family=-1;     // override video codec family 
 
+int out_audio_codec=ACODEC_VBRMP3;
+int out_video_codec=VCODEC_DIVX4;
+
 // audio stream skip/resync functions requires only for seeking.
 // (they should be implemented in the audio codec layer)
 //void skip_audio_frame(sh_audio_t *sh_audio){}
@@ -83,8 +86,8 @@
 
 static int play_n_frames=-1;
 
-char *out_audio_codec=NULL; // override audio codec
-char *out_video_codec=NULL; // override video codec
+//char *out_audio_codec=NULL; // override audio codec
+//char *out_video_codec=NULL; // override video codec
 
 //#include "libmpeg2/mpeg2.h"
 //#include "libmpeg2/mpeg2_internal.h"
@@ -419,7 +422,7 @@
 mux_v->h.dwScale=10000;
 mux_v->h.dwRate=mux_v->h.dwScale*(force_ofps?force_ofps:sh_video->fps);
 
-mux_v->codec=VCODEC_DIVX4; // 0=streamcopy
+mux_v->codec=out_video_codec;
 
 switch(mux_v->codec){
 case 0:
@@ -447,8 +450,7 @@
 
 mux_a->source=sh_audio;
 
-//mux_a->codec=ACODEC_PCM; // 0=streamcopy
-mux_a->codec=ACODEC_VBRMP3; // 0=streamcopy
+mux_a->codec=out_audio_codec;
 
 switch(mux_a->codec){
 case 0: