[MPlayer-dev-eng] [PATCH] dvdnav - partial REVIEW

Ötvös Attila oattila at chello.hu
Tue May 23 22:12:24 CEST 2006


2006. május 23. 15.30 dátummal elupus ezt írta:
> > dvdnav_get_audio_attr()
> > dvdnav_get_spu_attr()
> > These sherve to the mplayer can query the audio, spu language code and
> > the audio type (stereo, 5.1, dolby digital, etc.).
> >
>
> I'm not sure if you already found this out, but something that took me a
> while to figure out, is that the physical audio/spu stream does have a
> direct connection to the mpeg stream id without the need to figure out type
> from libdvdnav.
>
> If you use the lower 5 bits (3 for audio), of the mpeg stream id (128 &
> 0x07 = 0 for ac3...) you get a direct one to one connection. You don't need
> to get the type of stream from the navigator. There is never one stream
> with id 128 (ac3) and then one 160 (lpcm), always 128, then 161..
>
> I'm not sure this is valid for non dvd mpeg's, but I have a feeling it
> still is. So it might even be worth using that mask directly in the
> demuxer.

The mplayer needs on 4 parameters:
language code
physical stream id
audio format
channels number

I think from these the libdvdnav can give 2:
language code = dvdnav_audio_stream_to_lang()
physical stream id = dvdnav_get_audio_logical_stream()

The mplayer needs on 2 parameters:
audio format
channels numbers

I seem that the dvdnav_get_audio_logical_stream() doesn't include the audio 
format and channels number.

Best regards!
Attila



More information about the MPlayer-dev-eng mailing list