mirror of
https://github.com/mpv-player/mpv
synced 2025-01-22 07:33:14 +00:00
-ac help / -vc help
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1984 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
70af221074
commit
85623cf7b6
24
codec-cfg.c
24
codec-cfg.c
@ -644,6 +644,30 @@ codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void list_codecs(int audioflag){
|
||||
int i, j;
|
||||
codecs_t *c;
|
||||
|
||||
if (audioflag) {
|
||||
i = nr_acodecs;
|
||||
c = audio_codecs;
|
||||
} else {
|
||||
i = nr_vcodecs;
|
||||
c = video_codecs;
|
||||
}
|
||||
if(!i) return NULL;
|
||||
for (/* NOTHING */; i--; c++) {
|
||||
if(c->dll)
|
||||
printf("%-10s %2d %s [%s]\n",c->name,c->driver,c->info,c->dll);
|
||||
else
|
||||
printf("%-10s %2d %s\n",c->name,c->driver,c->info);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef CODECS2HTML
|
||||
|
||||
void wrapline(FILE *f2,char *s){
|
||||
|
@ -71,5 +71,6 @@ codecs_t** parse_codec_cfg(char *cfgfile);
|
||||
codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start);
|
||||
codecs_t* find_audio_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start);
|
||||
codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,codecs_t *start,int audioflag);
|
||||
void list_codecs(int audioflag);
|
||||
|
||||
#endif
|
||||
|
35
mplayer.c
35
mplayer.c
@ -430,11 +430,7 @@ if ((conffile = get_path("")) == NULL) {
|
||||
}
|
||||
}
|
||||
|
||||
//ifndef HAVE_GUI
|
||||
int main(int argc,char* argv[], char *envp[]){
|
||||
//else
|
||||
// int mplayer(int argc,char* argv[], char *envp[]){
|
||||
//endif
|
||||
int main(int argc,char* argv[], char *envp[]){
|
||||
|
||||
#ifdef USE_SUB
|
||||
static subtitle* subtitles=NULL;
|
||||
@ -530,6 +526,28 @@ int gui_no_filename=0;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// check codec.conf
|
||||
if(!parse_codec_cfg(get_path("codecs.conf"))){
|
||||
if(!parse_codec_cfg(DATADIR"/codecs.conf")){
|
||||
mp_msg(MSGT_CPLAYER,MSGL_HINT,MSGTR_CopyCodecsConf);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if(audio_codec && strcmp(audio_codec,"help")==0){
|
||||
printf("Available audio codecs:\n");
|
||||
list_codecs(1);
|
||||
printf("\n");
|
||||
exit(0);
|
||||
}
|
||||
if(video_codec && strcmp(video_codec,"help")==0){
|
||||
printf("Available video codecs:\n");
|
||||
list_codecs(0);
|
||||
printf("\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
if(!num_filenames && !vcd_track && !dvd_title){
|
||||
if(!use_gui){
|
||||
// no file/vcd/dvd -> show HELP:
|
||||
@ -550,13 +568,6 @@ int gui_no_filename=0;
|
||||
|
||||
//------ load global data first ------
|
||||
|
||||
// check codec.conf
|
||||
if(!parse_codec_cfg(get_path("codecs.conf"))){
|
||||
if(!parse_codec_cfg(DATADIR"/codecs.conf")){
|
||||
mp_msg(MSGT_CPLAYER,MSGL_HINT,MSGTR_CopyCodecsConf);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// check font
|
||||
#ifdef USE_OSD
|
||||
|
Loading…
Reference in New Issue
Block a user