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

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


2006. május 23. 21.52 dátummal James Courtier-Dutton ezt írta:
> Ötvös Attila wrote:
> > Hi James Courtier-Dutton!
> >
> > I modified the libdvdnav for mplayer:
> >
> > 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.).
> >
> > Because of the still frames decoding error so get needed the repeat of
>
> What decoding error is this?

I think the problem has two parts:

1, At first mplayer reads some first frames. The mplayer will try out the 
codecs to determine stream type if the DVD begins with still frame.

2, In the mplayer is the libmpeg2 who can't decode the stream if one frame is 
in stream. The libmpeg2 needs at the least 2-3 frames.

On this I found out to repeat the still frame 5 times. So the mplayer can use 
the still frame.

> > these pgc-s this is way I created new functions:
> > dvdnav_still_back() - repeat of the still frame cell (pgc)
> > dvdnav_wait_back() - repeat of the cell (pgc)
> > (but this functions don't reprocess dvd pre-commands)
> > dvdnav_wait_still_clear() - end of the repeat
> > dvdnav_is_still_cell() - Is it a still frame? (it doesn't probably need)
> > dvdnav_button_auto_action() - enable/disable of the button auto action
>
> It seems like a rather major work around to me. In xine we just store
> the still frame on the output, and keep displaying it, instead of trying
> to keep the stream full.

If the mplayer decodes succesfullly the still frames then the mplayer will 
work similar to the xine. The mplayer repeats maximum 5 times still frames.

> > At the cell change event to processing the mplayer needs to deterimne
> > if the change is real or only repeat:
> > dvdnav_get_pgc() - quering of the current pgc number
>
> ??? A cell is not the same as a pgc. (Program Chain)

The dvdnav_cell_change event only include cellN and pgN and it doesn't include 
pgcN but the mplayer will need for the pgcN too:

Example (Friends 10 seanson):
main menu: cellN=1 pgN=1 pgcN=1
episodes menu:  cellN=1 pgN=1 pgcN=2
special features menu: cellN=1 pgN=1 pgcN=6
languages menu: cellN=1 pgN=1 pgcN=3

> > New functions sice my last post to devel mail list:
> > dvdnav_get_active_audio_stream()
> > dvdnav_get_active_spu_stream()
> > If menu spu id not default then mplayer query the spu id that's way
> > mplayer show correct spu.
>
> Don't we already have this functionality. Maybe it is just implemented
> differently. In any case, xine manages to switch to the correct active
> stream at the right time.
> A dvdnav_get_active_audio_stream() would surely not be accurate enough
> time wise.

I'm sorry! It is my mistake that this is implemented:

dvdnav.h:
-------------

#ifdef USE_MPDVDNAV
...
int8_t dvdnav_get_active_audio_stream(dvdnav_t *self); <<<---
#endif
...
#ifdef USE_MPDVDNAV
...
int8_t dvdnav_get_active_spu_stream(dvdnav_t *self);
#endif

/*
 * Get active audio stream.
 */
int8_t dvdnav_get_active_audio_stream(dvdnav_t *self); <<<----

/*
 * Get active spu stream.
 */
int8_t dvdnav_get_active_spu_stream(dvdnav_t *self);

Best regards!
Attila



More information about the MPlayer-dev-eng mailing list