[Mplayer-cvslog] CVS: main cfg-mplayer.h,1.173,1.174 mplayer.c,1.599,1.600
Tobias Diedrich CVS
ranma at mplayerhq.hu
Wed Oct 23 17:48:57 CEST 2002
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv17956
Modified Files:
cfg-mplayer.h mplayer.c
Log Message:
add -identify switch
Index: cfg-mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -r1.173 -r1.174
--- cfg-mplayer.h 9 Oct 2002 01:13:40 -0000 1.173
+++ cfg-mplayer.h 23 Oct 2002 15:48:39 -0000 1.174
@@ -378,6 +378,7 @@
#include "cfg-common.h"
#undef MAIN_CONF
+ {"identify", &identify, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"quiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"noquiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 100, NULL},
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.599
retrieving revision 1.600
diff -u -r1.599 -r1.600
--- mplayer.c 22 Oct 2002 22:45:25 -0000 1.599
+++ mplayer.c 23 Oct 2002 15:48:39 -0000 1.600
@@ -67,6 +67,7 @@
int slave_mode=0;
int verbose=0;
+int identify=0;
static int quiet=0;
#define ABS(x) (((x)>=0)?(x):(-(x)))
@@ -1146,6 +1147,35 @@
} else
inited_flags|=INITED_ACODEC;
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
+}
+
+if(identify) {
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_FILENAME=%s\n", filename);
+ if (sh_video) {
+ /* Assume FOURCC if all bytes >= 0x20 (' ') */
+ if (sh_video->format >= 0x20202020)
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FORMAT=%.4s\n", &sh_video->format);
+ else
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FORMAT=%d\n", sh_video->format);
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_BITRATE=%d\n", sh_video->i_bps*8);
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_WIDTH=%d\n", sh_video->disp_w);
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_HEIGHT=%d\n", sh_video->disp_h);
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FPS=%5.3f\n", sh_video->fps);
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_ASPECT=%1.2f\n", sh_video->aspect);
+ }
+ if (sh_audio) {
+ if (sh_audio->codec)
+ mp_msg(MSGT_GLOBAL,MSGL_INFO, "ID_AUDIO_CODEC=%s\n", sh_audio->codec->name);
+ /* Assume FOURCC if all bytes >= 0x20 (' ') */
+ if (sh_audio->format >= 0x20202020)
+ mp_msg(MSGT_GLOBAL,MSGL_INFO, "ID_AUDIO_FORMAT=%.4s\n", &sh_audio->format);
+ else
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_FORMAT=%d\n", sh_audio->format);
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_BITRATE=%d\n", sh_audio->i_bps*8);
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_RATE=%d\n", sh_audio->samplerate);
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_NCH=%d\n", sh_audio->channels);
+ }
+ goto goto_next_file;
}
if(!sh_video) goto main; // audio-only
More information about the MPlayer-cvslog
mailing list