mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 01:36:25 +01:00
-nodshow/-dshow added, -afm is working again
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@627 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4764786f48
commit
1182749144
@ -75,6 +75,8 @@ struct config conf[]={
|
||||
{"mc", &default_max_pts_correction, CONF_TYPE_FLOAT, CONF_RANGE, 0, 10},
|
||||
{"fps", &force_fps, CONF_TYPE_FLOAT, CONF_MIN, 0, 0},
|
||||
{"afm", &audio_format, CONF_TYPE_INT, CONF_RANGE, 1, 6},
|
||||
{"dshow", &allow_dshow, CONF_TYPE_FLAG, 0, 0, 1},
|
||||
{"nodshow", &allow_dshow, CONF_TYPE_FLAG, 0, 1, 0},
|
||||
{"vcd", &vcd_track, CONF_TYPE_INT, CONF_RANGE, 1, 99},
|
||||
{"divxq", "Option -divxq has been renamed to -pp (postprocessing), use -pp !\n",
|
||||
CONF_TYPE_PRINT, 0, 0, 0},
|
||||
|
31
mplayer.c
31
mplayer.c
@ -380,6 +380,11 @@ int has_audio=1;
|
||||
//int has_video=1;
|
||||
//
|
||||
int audio_format=0; // override
|
||||
#ifdef USE_DIRECTSHOW
|
||||
int allow_dshow=1;
|
||||
#else
|
||||
int allow_dshow=0;
|
||||
#endif
|
||||
#ifdef ALSA_TIMER
|
||||
int alsa=1;
|
||||
#else
|
||||
@ -890,13 +895,18 @@ if(stream_dump_type){
|
||||
//================== Init AUDIO (codec) ==========================
|
||||
if(has_audio){
|
||||
// Go through the codec.conf and find the best codec...
|
||||
sh_audio->codec=find_codec(sh_audio->format,NULL,NULL,1);
|
||||
if(!sh_audio->codec){
|
||||
printf("Can't find codec for audio format 0x%X !\n",sh_audio->format);
|
||||
has_audio=0;
|
||||
} else {
|
||||
sh_audio->codec=NULL;
|
||||
while(1){
|
||||
sh_audio->codec=find_codec(sh_audio->format,NULL,sh_audio->codec,1);
|
||||
if(!sh_audio->codec){
|
||||
printf("Can't find codec for audio format 0x%X !\n",sh_audio->format);
|
||||
has_audio=0;
|
||||
break;
|
||||
}
|
||||
if(audio_format>0 && sh_audio->codec->driver!=audio_format) continue;
|
||||
printf("Found audio codec: [%s] drv:%d (%s)\n",sh_audio->codec->name,sh_audio->codec->driver,sh_audio->codec->info);
|
||||
//has_audio=sh_audio->codec->driver;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -913,11 +923,16 @@ if(has_audio){
|
||||
//================== Init VIDEO (codec & libvo) ==========================
|
||||
|
||||
// Go through the codec.conf and find the best codec...
|
||||
sh_video->codec=find_codec(sh_video->format,
|
||||
sh_video->bih?((unsigned int*) &sh_video->bih->biCompression):NULL,NULL,0);
|
||||
if(!sh_video->codec){
|
||||
sh_video->codec=NULL;
|
||||
while(1){
|
||||
sh_video->codec=find_codec(sh_video->format,
|
||||
sh_video->bih?((unsigned int*) &sh_video->bih->biCompression):NULL,sh_video->codec,0);
|
||||
if(!sh_video->codec){
|
||||
printf("Can't find codec for video format 0x%X !\n",sh_video->format);
|
||||
exit(1);
|
||||
}
|
||||
if(!allow_dshow && sh_video->codec->driver==4) continue; // skip DShow
|
||||
break;
|
||||
}
|
||||
//has_video=sh_video->codec->driver;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user