Mercurial > mplayer.hg
comparison mplayer.c @ 7864:dacc35bc92c7
add -identify switch
author | ranma |
---|---|
date | Wed, 23 Oct 2002 15:48:56 +0000 |
parents | d6c29d863f15 |
children | 3dc0b71630ff |
comparison
equal
deleted
inserted
replaced
7863:45d64e3fa09a | 7864:dacc35bc92c7 |
---|---|
65 | 65 |
66 #include "input/input.h" | 66 #include "input/input.h" |
67 | 67 |
68 int slave_mode=0; | 68 int slave_mode=0; |
69 int verbose=0; | 69 int verbose=0; |
70 int identify=0; | |
70 static int quiet=0; | 71 static int quiet=0; |
71 | 72 |
72 #define ABS(x) (((x)>=0)?(x):(-(x))) | 73 #define ABS(x) (((x)>=0)?(x):(-(x))) |
73 | 74 |
74 #ifdef HAVE_RTC | 75 #ifdef HAVE_RTC |
1144 if(!init_best_audio_codec(sh_audio,audio_codec_list,audio_fm_list)){ | 1145 if(!init_best_audio_codec(sh_audio,audio_codec_list,audio_fm_list)){ |
1145 sh_audio=d_audio->sh=NULL; // failed to init :( | 1146 sh_audio=d_audio->sh=NULL; // failed to init :( |
1146 } else | 1147 } else |
1147 inited_flags|=INITED_ACODEC; | 1148 inited_flags|=INITED_ACODEC; |
1148 mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); | 1149 mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); |
1150 } | |
1151 | |
1152 if(identify) { | |
1153 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_FILENAME=%s\n", filename); | |
1154 if (sh_video) { | |
1155 /* Assume FOURCC if all bytes >= 0x20 (' ') */ | |
1156 if (sh_video->format >= 0x20202020) | |
1157 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FORMAT=%.4s\n", &sh_video->format); | |
1158 else | |
1159 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FORMAT=%d\n", sh_video->format); | |
1160 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_BITRATE=%d\n", sh_video->i_bps*8); | |
1161 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_WIDTH=%d\n", sh_video->disp_w); | |
1162 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_HEIGHT=%d\n", sh_video->disp_h); | |
1163 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FPS=%5.3f\n", sh_video->fps); | |
1164 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_ASPECT=%1.2f\n", sh_video->aspect); | |
1165 } | |
1166 if (sh_audio) { | |
1167 if (sh_audio->codec) | |
1168 mp_msg(MSGT_GLOBAL,MSGL_INFO, "ID_AUDIO_CODEC=%s\n", sh_audio->codec->name); | |
1169 /* Assume FOURCC if all bytes >= 0x20 (' ') */ | |
1170 if (sh_audio->format >= 0x20202020) | |
1171 mp_msg(MSGT_GLOBAL,MSGL_INFO, "ID_AUDIO_FORMAT=%.4s\n", &sh_audio->format); | |
1172 else | |
1173 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_FORMAT=%d\n", sh_audio->format); | |
1174 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_BITRATE=%d\n", sh_audio->i_bps*8); | |
1175 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_RATE=%d\n", sh_audio->samplerate); | |
1176 mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_NCH=%d\n", sh_audio->channels); | |
1177 } | |
1178 goto goto_next_file; | |
1149 } | 1179 } |
1150 | 1180 |
1151 if(!sh_video) goto main; // audio-only | 1181 if(!sh_video) goto main; // audio-only |
1152 | 1182 |
1153 //================== Init VIDEO (codec & libvo) ========================== | 1183 //================== Init VIDEO (codec & libvo) ========================== |