[MPlayer-dev-eng] [patch] DVD NAV work continues...

Arpi arpi at thot.banki.hu
Mon Apr 1 20:38:05 CEST 2002


Hi,

> It's pretty different code, but I agree, it belongs in the stream layer.  
> Should I split it into a separate file, or stuff the functions into the 
> end of "limpdemux/open.c" like the regular dvd reading functions?

new file...

> > my suggestion: make a new event source (should ask Albeu for details, and
> > read his docs anout input core) and send all events from dvdnav there.
> > then, at the other enf od the event pipe, in mplayer.c, handle these event
> s
> > just like other keyboard and mouse etc events.
> 
> Actually, it looks like I don't want to process this during the input
> event loop.  I need to process aid and aid changes before the next packet
> is read from libdvdnav (otherwise I get packets from the wrong audio/sub
> stream until I return to the input event loop), so I've put the event
> handler back into the stream layer, and I just give the dvdnav code access
> to the demuxer structure so I can get at the audio/sub->id's.

note, that mplayer core is _not_ ready for runtime aid/sid changes!
it may work while parameters (ie. codec, number of channels, bitrate etc of
audio, palette of subpic) don't change.

you really shouldn't do such changes at steram layer - why isn't enough to
change aid/sid from mplayer.c ?
changing it in stream code, while it's caled from the demuxre can lead to
crash in demuxer... it's not ready for parameters changed from outside.

just imagine...
mplayer.c -> dec_audio -> ac3 frame decoder -> demuxer read frame ->
stream layer

but you change aid in stream so the next block of audio will be readed from
different stream -> will cause ac3 decoder to cause noise or crash.
(it won't crash, as it checks for crc and will print warning about broken
audio packet but it is not normal)

such events MUST be handled in mplayer.c layer, it can uninit and reinit
audio decoder or spu decoder after ID change.


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list