Mercurial > mplayer.hg
comparison mplayer.c @ 626:550ea1eba1a1
-nodshow/-dshow added, -afm is working again
author | arpi_esp |
---|---|
date | Tue, 24 Apr 2001 22:51:05 +0000 |
parents | 0b1f9eda1ea6 |
children | db92248b5e78 |
comparison
equal
deleted
inserted
replaced
625:2f321fe55bdb | 626:550ea1eba1a1 |
---|---|
378 int file_format=DEMUXER_TYPE_UNKNOWN; | 378 int file_format=DEMUXER_TYPE_UNKNOWN; |
379 int has_audio=1; | 379 int has_audio=1; |
380 //int has_video=1; | 380 //int has_video=1; |
381 // | 381 // |
382 int audio_format=0; // override | 382 int audio_format=0; // override |
383 #ifdef USE_DIRECTSHOW | |
384 int allow_dshow=1; | |
385 #else | |
386 int allow_dshow=0; | |
387 #endif | |
383 #ifdef ALSA_TIMER | 388 #ifdef ALSA_TIMER |
384 int alsa=1; | 389 int alsa=1; |
385 #else | 390 #else |
386 int alsa=0; | 391 int alsa=0; |
387 #endif | 392 #endif |
888 } | 893 } |
889 | 894 |
890 //================== Init AUDIO (codec) ========================== | 895 //================== Init AUDIO (codec) ========================== |
891 if(has_audio){ | 896 if(has_audio){ |
892 // Go through the codec.conf and find the best codec... | 897 // Go through the codec.conf and find the best codec... |
893 sh_audio->codec=find_codec(sh_audio->format,NULL,NULL,1); | 898 sh_audio->codec=NULL; |
894 if(!sh_audio->codec){ | 899 while(1){ |
895 printf("Can't find codec for audio format 0x%X !\n",sh_audio->format); | 900 sh_audio->codec=find_codec(sh_audio->format,NULL,sh_audio->codec,1); |
896 has_audio=0; | 901 if(!sh_audio->codec){ |
897 } else { | 902 printf("Can't find codec for audio format 0x%X !\n",sh_audio->format); |
903 has_audio=0; | |
904 break; | |
905 } | |
906 if(audio_format>0 && sh_audio->codec->driver!=audio_format) continue; | |
898 printf("Found audio codec: [%s] drv:%d (%s)\n",sh_audio->codec->name,sh_audio->codec->driver,sh_audio->codec->info); | 907 printf("Found audio codec: [%s] drv:%d (%s)\n",sh_audio->codec->name,sh_audio->codec->driver,sh_audio->codec->info); |
899 //has_audio=sh_audio->codec->driver; | 908 //has_audio=sh_audio->codec->driver; |
909 break; | |
900 } | 910 } |
901 } | 911 } |
902 | 912 |
903 if(has_audio){ | 913 if(has_audio){ |
904 if(verbose) printf("Initializing audio codec...\n"); | 914 if(verbose) printf("Initializing audio codec...\n"); |
911 } | 921 } |
912 | 922 |
913 //================== Init VIDEO (codec & libvo) ========================== | 923 //================== Init VIDEO (codec & libvo) ========================== |
914 | 924 |
915 // Go through the codec.conf and find the best codec... | 925 // Go through the codec.conf and find the best codec... |
916 sh_video->codec=find_codec(sh_video->format, | 926 sh_video->codec=NULL; |
917 sh_video->bih?((unsigned int*) &sh_video->bih->biCompression):NULL,NULL,0); | 927 while(1){ |
918 if(!sh_video->codec){ | 928 sh_video->codec=find_codec(sh_video->format, |
929 sh_video->bih?((unsigned int*) &sh_video->bih->biCompression):NULL,sh_video->codec,0); | |
930 if(!sh_video->codec){ | |
919 printf("Can't find codec for video format 0x%X !\n",sh_video->format); | 931 printf("Can't find codec for video format 0x%X !\n",sh_video->format); |
920 exit(1); | 932 exit(1); |
933 } | |
934 if(!allow_dshow && sh_video->codec->driver==4) continue; // skip DShow | |
935 break; | |
921 } | 936 } |
922 //has_video=sh_video->codec->driver; | 937 //has_video=sh_video->codec->driver; |
923 | 938 |
924 printf("Found video codec: [%s] drv:%d (%s)\n",sh_video->codec->name,sh_video->codec->driver,sh_video->codec->info); | 939 printf("Found video codec: [%s] drv:%d (%s)\n",sh_video->codec->name,sh_video->codec->driver,sh_video->codec->info); |
925 | 940 |