summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorlgb <lgb@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-03 00:24:49 +0000
committerlgb <lgb@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-03 00:24:49 +0000
commit7ebd301178d9c3cb7d9bfc3de54895686a490ffa (patch)
tree770ed8241004f1be68999e957ccb67ce2d6d5c67 /mplayer.c
parentc5c6862d8fb8f7201a9740bc0c94052d645a7827 (diff)
downloadmpv-7ebd301178d9c3cb7d9bfc3de54895686a490ffa.tar.bz2
mpv-7ebd301178d9c3cb7d9bfc3de54895686a490ffa.tar.xz
'-ao' switch (including '-ao help'), fixing Arpi's bug (short name 'null' for both of oss and null driver ;)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@957 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c32
1 files changed, 29 insertions, 3 deletions
diff --git a/mplayer.c b/mplayer.c
index e09b168cdc..e8d6198d7d 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -434,6 +434,7 @@ int frame_dropping=0; // option 0=no drop 1= drop vo 2= drop decode
char* title="MPlayer";
// screen info:
char* video_driver=NULL; //"mga"; // default
+char* audio_driver=NULL;
int fullscreen=0;
int vidmode=0;
int softzoom=0;
@@ -521,7 +522,17 @@ if ((conffile = get_path("")) == NULL) {
}
printf("\n");
exit(0);
- }
+ }
+ if(audio_driver && strcmp(audio_driver,"help")==0){
+ printf("Available audio output drivers:\n");
+ i=0;
+ while (audio_out_drivers[i]) {
+ const ao_info_t *info = audio_out_drivers[i++]->info;
+ printf("\t%s\t%s\n", info->short_name, info->name);
+ }
+ printf("\n");
+ exit(0);
+ }
#ifdef HAVE_GUI
}
#endif
@@ -544,12 +555,27 @@ if(!filename){
}
}
if(!video_out){
- printf("Invalid video output driver name: %s\n",video_driver);
+ printf("Invalid video output driver name: %s\nUse '-vo help' to get a list of available video drivers.\n",video_driver);
+ return 0;
+ }
+
+// check audio_out driver name:
+ if(!audio_driver)
+ audio_out=audio_out_drivers[0];
+ else
+ for (i=0; audio_out_drivers[i] != NULL; i++){
+ const ao_info_t *info = audio_out_drivers[i]->info;
+ if(strcmp(info->short_name,audio_driver) == 0){
+ audio_out = audio_out_drivers[i];break;
+ }
+ }
+ if (!audio_out){
+ printf("Invalid audio output driver name: %s\nUse '-ao help' to get a list of available audio drivers.\n",audio_driver);
return 0;
}
// check audio_out
-audio_out=audio_out_drivers[0];
+//audio_out=audio_out_drivers[0];
// check codec.conf
if(!parse_codec_cfg(get_path("codecs.conf"))){