[MPlayer-cvslog] CVS: main cfg-common.h, 1.160, 1.161 cfg-mplayer.h, 1.262, 1.263 m_option.c, 1.48, 1.49 mencoder.c, 1.349, 1.350 mp_msg.c, 1.40, 1.41 mp_msg.h, 1.41, 1.42 mplayer.c, 1.938, 1.939 vobsub.c, 1.41, 1.42
Reynaldo H. Verdejo CVS
syncmail at mplayerhq.hu
Mon Apr 24 09:20:36 CEST 2006
CVS change done by Reynaldo H. Verdejo CVS
Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv7108
Modified Files:
cfg-common.h cfg-mplayer.h m_option.c mencoder.c mp_msg.c
mp_msg.h mplayer.c vobsub.c
Log Message:
Get ride of the several if(identify) messy lines and rearangment of some of the output, both patches by Kiriuja mplayer-patches AT en-directo_net, his changes are barely unrelated, nevertheless Im commiting them thogeter just for the sake of my mental healt, I had both patches already applied on my local three
Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -r1.160 -r1.161
--- cfg-common.h 18 Apr 2006 11:06:35 -0000 1.160
+++ cfg-common.h 24 Apr 2006 07:20:32 -0000 1.161
@@ -543,6 +543,7 @@
{ "netst", &mp_msg_levels[MSGT_NETST], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
{ "muxer", &mp_msg_levels[MSGT_MUXER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
{ "osd-menu", &mp_msg_levels[MSGT_OSD_MENU], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+ { "identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
{"help", "Available msg modules:\n"
" global - common player errors/information\n"
" cplayer - console player (mplayer.c)\n"
@@ -585,6 +586,7 @@
" afilter - Audio filter messages\n"
" netst - Netstream\n"
" muxer - muxer layer\n"
+ " identify - identify output\n"
"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
};
Index: cfg-mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
retrieving revision 1.262
retrieving revision 1.263
diff -u -r1.262 -r1.263
--- cfg-mplayer.h 18 Apr 2006 11:06:35 -0000 1.262
+++ cfg-mplayer.h 24 Apr 2006 07:20:32 -0000 1.263
@@ -383,7 +383,7 @@
#undef MAIN_CONF
{"list-properties", &list_properties, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
- {"identify", &identify, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+ {"identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_FLAG, CONF_GLOBAL, 0, MSGL_INFO, NULL},
{"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
{"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
{"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
Index: m_option.c
===================================================================
RCS file: /cvsroot/mplayer/main/m_option.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- m_option.c 15 Mar 2006 17:16:13 -0000 1.48
+++ m_option.c 24 Apr 2006 07:20:32 -0000 1.49
@@ -1584,8 +1584,7 @@
if(!strcmp(param,"help")) {
m_obj_list_t* ol = opt->priv;
mp_msg(MSGT_VFILTER,MSGL_INFO,"Available video filters:\n");
- if (identify)
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_VIDEO_FILTERS\n");
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_FILTERS\n");
for(n = 0 ; ol->list[n] ; n++)
mp_msg(MSGT_VFILTER,MSGL_INFO," %-15s: %s\n",
M_ST_MB(char*,ol->list[n],ol->name_off),
Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.349
retrieving revision 1.350
diff -u -r1.349 -r1.350
--- mencoder.c 23 Apr 2006 23:26:12 -0000 1.349
+++ mencoder.c 24 Apr 2006 07:20:32 -0000 1.350
@@ -130,7 +130,6 @@
//void resync_audio_stream(sh_audio_t *sh_audio){}
extern int verbose; // must be global!
-int identify=0;
int quiet=0;
double video_time_usage=0;
double vout_time_usage=0;
Index: mp_msg.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- mp_msg.c 30 Mar 2006 22:28:32 -0000 1.40
+++ mp_msg.c 24 Apr 2006 07:20:32 -0000 1.41
@@ -44,6 +44,7 @@
if (env)
verbose = atoi(env);
for(i=0;i<MSGT_MAX;i++) mp_msg_levels[i] = -2;
+ mp_msg_levels[MSGT_IDENTIFY] = -1; // no -identify output by default
#ifdef USE_ICONV
mp_msg_charset = getenv("MPLAYER_CHARSET");
#ifdef USE_LANGINFO
Index: mp_msg.h
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- mp_msg.h 30 Mar 2006 22:28:32 -0000 1.41
+++ mp_msg.h 24 Apr 2006 07:20:32 -0000 1.42
@@ -4,7 +4,6 @@
// defined in mplayer.c and mencoder.c
extern int verbose;
-extern int identify;
// verbosity elevel:
@@ -96,6 +95,8 @@
#define MSGT_OSD_MENU 40
+#define MSGT_IDENTIFY 41 // -identify output
+
#define MSGT_MAX 64
void mp_msg_init(void);
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.938
retrieving revision 1.939
diff -u -r1.938 -r1.939
--- mplayer.c 23 Apr 2006 23:26:12 -0000 1.938
+++ mplayer.c 24 Apr 2006 07:20:32 -0000 1.939
@@ -88,7 +88,6 @@
int slave_mode=0;
int player_idle_mode=0;
extern int verbose;
-int identify=0;
int quiet=0;
#ifdef WIN32
@@ -588,8 +587,7 @@
mp_msg(MSGT_CPLAYER,MSGL_FATAL,"\n" MSGTR_IntBySignal,x,
current_module?current_module:"unknown"
);
- if (identify)
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_SIGNAL=%d\n", x);
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SIGNAL=%d\n", x);
if(sig_count<=1)
switch(x){
case SIGINT:
@@ -804,11 +802,8 @@
mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_CantLoadSub, filename);
if (subd == NULL || set_of_sub_size >= MAX_SUBTITLE_FILES) return;
set_of_subtitles[set_of_sub_size] = subd;
- if (identify)
- {
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_FILE_SUB_ID=%d\n", set_of_sub_size);
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_FILE_SUB_FILENAME=%s\n", filename);
- }
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_FILE_SUB_ID=%d\n", set_of_sub_size);
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_FILE_SUB_FILENAME=%s\n", filename);
++set_of_sub_size;
mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AddedSubtitleFile, set_of_sub_size, filename);
}
@@ -2450,16 +2445,14 @@
#endif
if(audio_codec_list && strcmp(audio_codec_list[0],"help")==0){
mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableAudioCodecs);
- if (identify)
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_AUDIO_CODECS\n");
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_CODECS\n");
list_codecs(1);
mp_msg(MSGT_FIXME, MSGL_FIXME, "\n");
opt_exit = 1;
}
if(video_codec_list && strcmp(video_codec_list[0],"help")==0){
mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableVideoCodecs);
- if (identify)
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_VIDEO_CODECS\n");
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_CODECS\n");
list_codecs(0);
mp_msg(MSGT_FIXME, MSGL_FIXME, "\n");
opt_exit = 1;
@@ -3284,35 +3277,33 @@
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
}
-if(identify) {
- mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_FILENAME=%s\n", filename);
- mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_DEMUXER=%s\n", demuxer->desc->name);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_FILENAME=%s\n", filename);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_DEMUXER=%s\n", demuxer->desc->name);
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", (char *)&sh_video->format);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_VIDEO_FORMAT=%.4s\n", (char *)&sh_video->format);
else
- mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FORMAT=0x%08X\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.4f\n", sh_video->aspect);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_VIDEO_FORMAT=0x%08X\n", sh_video->format);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_VIDEO_BITRATE=%d\n", sh_video->i_bps*8);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_VIDEO_WIDTH=%d\n", sh_video->disp_w);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_VIDEO_HEIGHT=%d\n", sh_video->disp_h);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_VIDEO_FPS=%5.3f\n", sh_video->fps);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_VIDEO_ASPECT=%1.4f\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);
+ mp_msg(MSGT_IDENTIFY,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", (char *)&sh_audio->format);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO, "ID_AUDIO_FORMAT=%.4s\n", (char *)&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);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_AUDIO_FORMAT=%d\n", sh_audio->format);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_AUDIO_BITRATE=%d\n", sh_audio->i_bps*8);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_AUDIO_RATE=%d\n", sh_audio->samplerate);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_AUDIO_NCH=%d\n", sh_audio->channels);
}
- mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_LENGTH=%.2lf\n", demuxer_get_time_length(demuxer));
-}
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_LENGTH=%.2lf\n", demuxer_get_time_length(demuxer));
if(!sh_video) goto main; // audio-only
@@ -3365,8 +3356,8 @@
inited_flags|=INITED_VCODEC;
-if (identify && sh_video->codec)
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_VIDEO_CODEC=%s\n", sh_video->codec->name);
+if (sh_video->codec)
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_CODEC=%s\n", sh_video->codec->name);
if(auto_quality>0){
// Auto quality option enabled
@@ -4000,8 +3991,7 @@
update_osd_msg();
} else
mp_msg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_Paused);
- if (identify)
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_PAUSED\n");
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_PAUSED\n");
fflush(stdout);
}
#ifdef HAVE_NEW_GUI
@@ -4538,8 +4528,7 @@
} break;
case MP_CMD_SWITCH_AUDIO : {
int v = demuxer_switch_audio(demuxer, cmd->args[0].v.i);
- if (identify)
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_AUDIO_TRACK=%d\n", v);
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_TRACK=%d\n", v);
} break;
case MP_CMD_RUN : {
#ifndef __MINGW32__
Index: vobsub.c
===================================================================
RCS file: /cvsroot/mplayer/main/vobsub.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- vobsub.c 2 Feb 2006 12:01:40 -0000 1.41
+++ vobsub.c 24 Apr 2006 07:20:33 -0000 1.42
@@ -656,12 +656,9 @@
memcpy(vob->spu_streams[index].id, id, idlen);
}
vob->spu_streams_current = index;
- if (identify)
- {
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_VOBSUB_ID=%d\n", index);
- if (id && idlen)
- mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_VSID_%d_LANG=%s\n", index, vob->spu_streams[index].id);
- }
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VOBSUB_ID=%d\n", index);
+ if (id && idlen)
+ mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VSID_%d_LANG=%s\n", index, vob->spu_streams[index].id);
mp_msg(MSGT_VOBSUB,MSGL_V,"[vobsub] subtitle (vobsubid): %d language %s\n",
index, vob->spu_streams[index].id);
return 0;
More information about the MPlayer-cvslog
mailing list