[MPlayer-dev-eng] [PATCH] move DVD track information into non-verbose mode
Diego Biurrun
diego at biurrun.de
Thu Aug 17 02:22:58 CEST 2006
On Thu, Aug 17, 2006 at 02:21:52AM +0200, Diego Biurrun wrote:
> Hey, a patch that makes MPlayer output more, not less on the console,
> Ivan is gonna be so proud...
>
> This slightly cleans up the info we output when playing a DVD. Useless
> status messages are moved to verbose mode and useful track information
> is output in normal mode.
>
> before:
>
> Playing dvd://.
> Reading disc structure, please wait...
> There are 15 titles on this DVD.
> There are 28 chapters in this DVD title.
> There are 1 angles in this DVD title.
> DVD successfully opened.
> MPEG-PS file format detected.
>
> after:
>
> Playing dvd://.
> There are 15 titles on this DVD.
> There are 28 chapters in this DVD title.
> There are 1 angles in this DVD title.
> [open] audio stream: 0 audio format: ac3 (5.1) language: en aid: 128
> [open] audio stream: 1 audio format: ac3 (stereo) language: en aid: 129
> [open] audio stream: 2 audio format: ac3 (stereo) language: en aid: 130
> [open] number of audio channels on disk: 3.
> [open] subtitle ( sid ): 0 language: en
> [open] subtitle ( sid ): 1 language: es
> [open] subtitle ( sid ): 2 language: fr
> [open] number of subtitles on disk: 3
> MPEG-PS file format detected.
>
> This should be uncontroversial. I'll commit over the weekend unless
> there are objections.
/* no comment */
Diego
-------------- next part --------------
Index: stream/stream_dvd.c
===================================================================
--- stream/stream_dvd.c (revision 19421)
+++ stream/stream_dvd.c (working copy)
@@ -556,7 +556,7 @@
}
}
- mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_DVDwait);
+ mp_msg(MSGT_OPEN,MSGL_V,MSGTR_DVDwait);
/**
* Load the video manager to find out the information about the titles on
@@ -598,7 +598,7 @@
/**
* Make sure our title number is valid.
*/
- mp_msg(MSGT_OPEN,MSGL_INFO, MSGTR_DVDnumTitles, tt_srpt->nr_of_srpts );
+ mp_msg(MSGT_OPEN,MSGL_STATUS, MSGTR_DVDnumTitles, tt_srpt->nr_of_srpts );
if(dvd_title < 1 || dvd_title > tt_srpt->nr_of_srpts) {
mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDinvalidTitle, dvd_title);
ifoClose( vmg_file );
@@ -610,7 +610,7 @@
/**
* Make sure the chapter number is valid for this title.
*/
- mp_msg(MSGT_OPEN,MSGL_INFO, MSGTR_DVDnumChapters, tt_srpt->title[dvd_title].nr_of_ptts);
+ mp_msg(MSGT_OPEN,MSGL_STATUS, MSGTR_DVDnumChapters, tt_srpt->title[dvd_title].nr_of_ptts);
if(dvd_chapter<1 || dvd_chapter>tt_srpt->title[dvd_title].nr_of_ptts) {
mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDinvalidChapter, dvd_chapter);
ifoClose( vmg_file );
@@ -632,7 +632,7 @@
/**
* Make sure the angle number is valid for this title.
*/
- mp_msg(MSGT_OPEN,MSGL_INFO, MSGTR_DVDnumAngles, tt_srpt->title[dvd_title].nr_of_angles);
+ mp_msg(MSGT_OPEN,MSGL_STATUS, MSGTR_DVDnumAngles, tt_srpt->title[dvd_title].nr_of_angles);
if(dvd_angle<1 || dvd_angle>tt_srpt->title[dvd_title].nr_of_angles) {
mp_msg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDinvalidAngle, dvd_angle);
ifoClose( vmg_file );
@@ -667,7 +667,7 @@
return STREAM_UNSUPORTED;
}
- mp_msg(MSGT_OPEN,MSGL_INFO, MSGTR_DVDopenOk);
+ mp_msg(MSGT_OPEN,MSGL_V, MSGTR_DVDopenOk);
// store data
d=malloc(sizeof(dvd_priv_t)); memset(d,0,sizeof(dvd_priv_t));
d->dvd=dvd;
@@ -728,7 +728,7 @@
// 1 - stereo
// 5 - 5.1
d->audio_streams[d->nr_of_channels].channels=audio->channels;
- mp_msg(MSGT_OPEN,MSGL_V,"[open] audio stream: %d audio format: %s (%s) language: %s aid: %d\n",
+ mp_msg(MSGT_OPEN,MSGL_STATUS,"[open] audio stream: %d audio format: %s (%s) language: %s aid: %d\n",
d->nr_of_channels,
dvd_audio_stream_types[ audio->audio_format ],
dvd_audio_stream_channels[ audio->channels ],
@@ -742,7 +742,7 @@
d->nr_of_channels++;
}
}
- mp_msg(MSGT_OPEN,MSGL_V,"[open] number of audio channels on disk: %d.\n",d->nr_of_channels );
+ mp_msg(MSGT_OPEN,MSGL_STATUS,"[open] number of audio channels on disk: %d.\n",d->nr_of_channels );
}
/**
@@ -785,13 +785,13 @@
d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] >> 8 & 31;
#endif
- mp_msg(MSGT_OPEN,MSGL_V,"[open] subtitle ( sid ): %d language: %s\n", d->nr_of_subtitles, tmp);
+ mp_msg(MSGT_OPEN,MSGL_STATUS,"[open] subtitle ( sid ): %d language: %s\n", d->nr_of_subtitles, tmp);
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", d->subtitles[d->nr_of_subtitles].id);
if(language && tmp[0])
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", d->nr_of_subtitles, tmp);
d->nr_of_subtitles++;
}
- mp_msg(MSGT_OPEN,MSGL_V,"[open] number of subtitles on disk: %d\n",d->nr_of_subtitles );
+ mp_msg(MSGT_OPEN,MSGL_STATUS,"[open] number of subtitles on disk: %d\n",d->nr_of_subtitles );
}
/**
More information about the MPlayer-dev-eng
mailing list