[PATCH] Re: [MPlayer-dev-eng] MSGTR messages for vid/aid in non-verbose output?

Nico Sabbi nicola_sabbi at fastwebnet.it
Sun Feb 11 11:51:12 CET 2007


Andrew Savchenko wrote:
> Hi,
> 
> On 12 Dec 2006 03:16 mail at kraymer.de wrote:
> 
>>>On 4 Dec 2006 11:54, Diego Biurrun wrote:
> 
> [...]
> 
>>>2nd) Change behavior of dvd stream demuxer, this requieres
>>>changes  in help_mp* files since number of mp_msg arguments
>>>was changed. Thus I separate this patch. Also it figured out
>>>that I have no plain dvds (all was converted to mpeg4/x264) so
>>>I can't test dvd stream demuxer output behavior. Should work
>>>fine, but please, test with some dvds.
>>
>>I noticed a problem with that. Detection and displaying language
>>tracks gets mixed up, for my test dvd it was:
>>Audio-Stream: 0 Format: ac3 (5.1) Sprache: en.
>>Audio-Stream: 1 Format: dts (5.1) Sprache: en.
>>Anzahl der Audiokanäle auf der Disc: 2.
>>[..]
>>[demux] Video stream detected, -vid 0
>>[demux] Audio stream detected, -aid 137
>>[demux] Audio stream detected, -aid 128
>>
>>(it's part German but you'll get the meaning)
>>Problem is, audio stream 0 does not match -aid 137. mplayer -aid
>>128 plays the ac3 stream, which is correct, according to demuxer
>>init and lsdvd: Title: 01, blabla
>>        Audio: 1, Language: en - English, Format: ac3, ...
>>Stream id: 0x80 Audio: 2, Language: en - English, Format: dts,
>>... Stream id: 0x89
>>
>>I didn't dig the source so I don't know if only the order is
>>wrong or if the issue goes deeper. Maybe it's something you
>>changed? Hope that helps,
> 
> 
> It is not my change in the code. DVD stream demuxer process streams 
> in different order than demux_ps demuxer. It depends on default 
> track id (it processed firstly in the demux_ps), and perhaps other 
> factors are involved. 
> 
> In any case it seems DVD streams need special handling, as their 
> tracks are demuxed on their own at stream/stream_dvd.c. So I add 
> this and only this special casing into demuxer.c. dvdnav doesn't 
> need such handling, because it doesn't provide its own non-verbose 
> track information.
> 
> Please review attached patch.
> 
> 
> ------------------------------------------------------------------------
> 

> diff -Naur mplayer/libmpdemux/demuxer.c mplayer_work/libmpdemux/demuxer.c
> --- mplayer/libmpdemux/demuxer.c	2007-02-09 23:08:31.000000000 +0300
> +++ mplayer_work/libmpdemux/demuxer.c	2007-02-11 04:54:36.000000000 +0300
> @@ -218,6 +218,8 @@
>      demuxer->s_streams[id] = sh;
>      sh->sid = sid;
>      mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", sid);
> +    if (demuxer->stream->type != STREAMTYPE_DVD)
> +      mp_msg(MSGT_DEMUXER, MSGL_INFO, MSGTR_SubtitleID, sid);
>    }
>    return demuxer->s_streams[id];
>  }
> @@ -242,6 +244,8 @@
>          sh->audio_out_minsize=8192;/* default size, maybe not enough for Win32/ACM*/
>          sh->pts=MP_NOPTS_VALUE;
>            mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_ID=%d\n", aid);
> +          if (demuxer->stream->type != STREAMTYPE_DVD)
> +  	    mp_msg(MSGT_DEMUXER, MSGL_INFO, MSGTR_AudioID, aid);
>      }
>      ((sh_audio_t *)demuxer->a_streams[id])->aid = aid;
>      return demuxer->a_streams[id];
> @@ -268,6 +272,8 @@
>          mp_msg(MSGT_DEMUXER,MSGL_V,MSGTR_FoundVideoStream,id);
>          demuxer->v_streams[id]=calloc(1, sizeof(sh_video_t));
>            mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_ID=%d\n", vid);
> +          if (demuxer->stream->type != STREAMTYPE_DVD)
> +            mp_msg(MSGT_DEMUXER, MSGL_INFO, MSGTR_VideoID, vid);
>      }
>      ((sh_video_t *)demuxer->v_streams[id])->vid = vid;
>      return demuxer->v_streams[id];

rejected. We don't need more special case handling

-- 
"Without a frontend, mplayer is useless" - someone in mplayer-users




More information about the MPlayer-dev-eng mailing list