summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-24 22:51:05 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-24 22:51:05 +0000
commit11827491448cffc84519ec24e1d95f250a855698 (patch)
tree4d7495c24ad93ed94a9ef723f41ee9fd76f51a13 /mplayer.c
parent4764786f481582ac130bf97f0f42275b0d970d32 (diff)
downloadmpv-11827491448cffc84519ec24e1d95f250a855698.tar.bz2
mpv-11827491448cffc84519ec24e1d95f250a855698.tar.xz
-nodshow/-dshow added, -afm is working again
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@627 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/mplayer.c b/mplayer.c
index fe9429f2df..044e3c593d 100644
--- a/mplayer.c
+++ b/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;