[MPlayer-dev-eng] [PATCH] MSGT_IDENTIFY (was: option to skip slow -identify output)
Diego Biurrun
diego at biurrun.de
Sat Apr 22 14:57:04 CEST 2006
On Sat, Apr 22, 2006 at 08:44:32AM -0400, kiriuja wrote:
> On Saturday 22 April 2006 07:55 Diego Biurrun wrote:
> > On Thu, Apr 20, 2006 at 06:13:21PM -0400, kiriuja wrote:
> > > - 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);
> >
> > Indentation is messed up here.
>
> How exactly? It preserves the existing indentation.
Never mind.
> > > + 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);
> >
> > The indentation of this block also looks wrong.
>
> Again, how exactly? It uses the exact same indentation as the surrounding
> code (notice a memcpy a few lines above?).
Never mind, again :)
> > > --- libaf/af.c 13 Apr 2006 10:36:17 -0000 1.53
> > > +++ libaf/af.c 20 Apr 2006 18:06:41 -0000
> > > @@ -698,8 +698,7 @@ void af_frac_mul(frac_t *out, const frac
> > > void af_help (void) {
> > > int i = 0;
> > > af_msg(AF_MSG_INFO, "Available audio filters:\n");
> > > - if (identify)
> > > - af_msg(AF_MSG_INFO, "ID_AUDIO_FILTERS\n");
> > > + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_FILTERS\n");
> >
> > This is wrong, libaf uses af_msg, not mp_msg.
>
> af_msg is nothing but #define for mp_msg(MSGT_AFILTER, ...), so if I want
> to pass another MSGT, I have to use mp_msg directly.
I'm aware of this. Nevertheless Alex has always insisted we keep mp_msg
out of libaf/ ... Maybe it's time to rediscuss this.
> > > --- libmpdemux/stream_dvd.c 14 Apr 2006 13:03:05 -0000 1.15
> > > +++ libmpdemux/stream_dvd.c 20 Apr 2006 18:06:46 -0000
> > > @@ -569,17 +569,20 @@ static int open_s(stream_t *stream,int m
> > > return STREAM_UNSUPORTED;
> > > }
> > > tt_srpt = vmg_file->tt_srpt;
> > > - if (identify)
> > > + if (mp_msg_test(MSGT_IDENTIFY, MSGL_INFO))
> > > {
> > > - unsigned char discid [16]; ///< disk ID, a 128 bit MD5 sum
> > > - int vts_no; ///< video title set number
> > > int title_no; ///< title number
> > > - mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_DVD_TITLES=%d\n", tt_srpt->nr_of_srpts);
> > > + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_DVD_TITLES=%d\n", tt_srpt->nr_of_srpts);
> > > for (title_no = 0; title_no < tt_srpt->nr_of_srpts; title_no++)
> > > {
> > > - mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_DVD_TITLE_%d_CHAPTERS=%d\n", title_no + 1, tt_srpt->title[title_no].nr_of_ptts);
> > > - mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_DVD_TITLE_%d_ANGLES=%d\n", title_no + 1, tt_srpt->title[title_no].nr_of_angles);
> > > + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_DVD_TITLE_%d_CHAPTERS=%d\n", title_no + 1, tt_srpt->title[title_no].nr_of_ptts);
> > > + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_DVD_TITLE_%d_ANGLES=%d\n", title_no + 1, tt_srpt->title[title_no].nr_of_angles);
> > > }
> > > + }
> > > + if (mp_msg_test(MSGT_IDENTIFY, MSGL_V))
> > > + {
> > > + unsigned char discid [16]; ///< disk ID, a 128 bit MD5 sum
> > > + int vts_no; ///< video title set number
> >
> > Hmm, is it necessary to move these lines around? This is an unrelated
> > change IMO, you're moving some output to verbose mode.
>
> Yes, it is necessary, as discussed previously. This is the whole point
> of the patch.
Let me be a little bit more precise. There are two unrelated changes in
this patch:
- getting rid of if(identify)
- changing some of MPlayer's output
These changes have to go in separate patches.
Diego
More information about the MPlayer-dev-eng
mailing list