diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-03 23:01:17 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-03 23:01:17 +0000 |
commit | 88f3691ded6e2111aa94009ad9af86f116002c84 (patch) | |
tree | bdbf0a9c79d57bc310340b511927cc1893187f4b | |
parent | b01ec90b2869f9bb89916f371129b6ca5ebf59db (diff) | |
download | mpv-88f3691ded6e2111aa94009ad9af86f116002c84.tar.bz2 mpv-88f3691ded6e2111aa94009ad9af86f116002c84.tar.xz |
-oac/-ovc (fake:))
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2662 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | cfg-mencoder.h | 22 | ||||
-rw-r--r-- | mencoder.c | 12 |
2 files changed, 27 insertions, 7 deletions
diff --git a/cfg-mencoder.h b/cfg-mencoder.h index 9abc9b7042..0c8a9de8cb 100644 --- a/cfg-mencoder.h +++ b/cfg-mencoder.h @@ -32,6 +32,22 @@ struct config lameopts_conf[]={ {"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 @@ struct config conf[]={ {"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}, diff --git a/mencoder.c b/mencoder.c index 2bc0006670..f9e0a023ed 100644 --- a/mencoder.c +++ b/mencoder.c @@ -50,6 +50,9 @@ char *video_codec=NULL; // override video codec 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 char* passtmpfile="divx2pass.log"; 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.dwSampleSize=0; // VBR 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->buffer=malloc(mux_a->buffer_size); 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: |