mirror of
https://github.com/mpv-player/mpv
synced 2025-02-19 22:36:55 +00:00
-oac/-ovc (fake:))
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2662 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b01ec90b28
commit
88f3691ded
@ -32,6 +32,22 @@ struct config lameopts_conf[]={
|
|||||||
{"padding", &lame_param_padding, CONF_TYPE_INT, CONF_RANGE, 0, PAD_MAX_INDICATOR},
|
{"padding", &lame_param_padding, CONF_TYPE_INT, CONF_RANGE, 0, PAD_MAX_INDICATOR},
|
||||||
{"br", &lame_param_br, CONF_TYPE_INT, CONF_RANGE, 0, 1024},
|
{"br", &lame_param_br, CONF_TYPE_INT, CONF_RANGE, 0, 1024},
|
||||||
{"ratio", &lame_param_ratio, CONF_TYPE_INT, CONF_RANGE, 0, 100},
|
{"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}
|
{NULL, NULL, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -45,8 +61,10 @@ struct config conf[]={
|
|||||||
{"mp3file", &mp3_filename, CONF_TYPE_STRING, 0, 0, 0},
|
{"mp3file", &mp3_filename, CONF_TYPE_STRING, 0, 0, 0},
|
||||||
{"ac3file", &ac3_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},
|
// {"oac", &out_audio_codec, CONF_TYPE_STRING, 0, 0, 0},
|
||||||
{"ovc", &out_video_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},
|
{"pass", &pass, CONF_TYPE_INT, CONF_RANGE,0,2},
|
||||||
|
|
||||||
|
12
mencoder.c
12
mencoder.c
@ -50,6 +50,9 @@ char *video_codec=NULL; // override video codec
|
|||||||
int audio_family=-1; // override audio codec family
|
int audio_family=-1; // override audio codec family
|
||||||
int video_family=-1; // override video 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.
|
// audio stream skip/resync functions requires only for seeking.
|
||||||
// (they should be implemented in the audio codec layer)
|
// (they should be implemented in the audio codec layer)
|
||||||
//void skip_audio_frame(sh_audio_t *sh_audio){}
|
//void skip_audio_frame(sh_audio_t *sh_audio){}
|
||||||
@ -83,8 +86,8 @@ static char* passtmpfile="divx2pass.log";
|
|||||||
|
|
||||||
static int play_n_frames=-1;
|
static int play_n_frames=-1;
|
||||||
|
|
||||||
char *out_audio_codec=NULL; // override audio codec
|
//char *out_audio_codec=NULL; // override audio codec
|
||||||
char *out_video_codec=NULL; // override video codec
|
//char *out_video_codec=NULL; // override video codec
|
||||||
|
|
||||||
//#include "libmpeg2/mpeg2.h"
|
//#include "libmpeg2/mpeg2.h"
|
||||||
//#include "libmpeg2/mpeg2_internal.h"
|
//#include "libmpeg2/mpeg2_internal.h"
|
||||||
@ -419,7 +422,7 @@ mux_v->h.dwSampleSize=0; // VBR
|
|||||||
mux_v->h.dwScale=10000;
|
mux_v->h.dwScale=10000;
|
||||||
mux_v->h.dwRate=mux_v->h.dwScale*(force_ofps?force_ofps:sh_video->fps);
|
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){
|
switch(mux_v->codec){
|
||||||
case 0:
|
case 0:
|
||||||
@ -447,8 +450,7 @@ mux_a->buffer=malloc(mux_a->buffer_size);
|
|||||||
|
|
||||||
mux_a->source=sh_audio;
|
mux_a->source=sh_audio;
|
||||||
|
|
||||||
//mux_a->codec=ACODEC_PCM; // 0=streamcopy
|
mux_a->codec=out_audio_codec;
|
||||||
mux_a->codec=ACODEC_VBRMP3; // 0=streamcopy
|
|
||||||
|
|
||||||
switch(mux_a->codec){
|
switch(mux_a->codec){
|
||||||
case 0:
|
case 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user