Mercurial > mplayer.hg
changeset 626:550ea1eba1a1
-nodshow/-dshow added, -afm is working again
author | arpi_esp |
---|---|
date | Tue, 24 Apr 2001 22:51:05 +0000 |
parents | 2f321fe55bdb |
children | f03f9ae6303a |
files | cfg-mplayer.h mplayer.c |
diffstat | 2 files changed, 25 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/cfg-mplayer.h Tue Apr 24 21:52:10 2001 +0000 +++ b/cfg-mplayer.h Tue Apr 24 22:51:05 2001 +0000 @@ -75,6 +75,8 @@ {"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},
--- a/mplayer.c Tue Apr 24 21:52:10 2001 +0000 +++ b/mplayer.c Tue Apr 24 22:51:05 2001 +0000 @@ -380,6 +380,11 @@ //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 @@ //================== 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 @@ //================== 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;