[gst-devel] mpegdemux and DVD sound
Martin Soto
soto at informatik.uni-kl.de
Thu Mar 20 07:00:10 CET 2003
Hello all:
I've been recently hacking the mpegdemux element to support DVD sound
channels of types other than AC3. One patch I wrote is already
integrated in CVS, and I was going to send a second patch to completely
support PCM sound, but I found a showstopper. It's a bit difficult to
explain, but please bear with me.
Currently, the mpegdemux element creates a new pad private_stream_1_%02d
whenever a new AC3 sound channel is found. When such a pad is created,
it will remain there so long as the element lives, even if the stream
does not include AC3 sound anymore. My patch, in turn, creates a new
pad pcm_stream_%02d whenever a new PCM sound channel is found. These
pads will also remain there regardless of how the stream changes in the
future.
Now, according to my understanding, a DVD may have only 8 sound channels
in total, each of which may use any of the supported audio types (AC3,
PCM, DTS, MPEG). That is, channel 1, for example, could contain AC3
sound at a given time, and later (or in another DVD title, for example)
it could switch to PCM. The German version of "Buena Vista Social
Club", is such a case. The menus use AC3 sound, whereas the film itself
has only a PCM soundtrack, but both the menus and the film, use channel
1 for the sound.
When trying to play this DVD using dvdnavsrc ! mpegdemux, a
private_stream_1_01 pad will be created for the menus at the beginning,
and a new pcm_stream_01 pad will be created as soon as you start the
film, *but the original private_stream_1_01 won't be deleted*. The
problem is that it doesn't actually make sense to have those two pads
simultaneously there, because they correspond to the same channel, and
applications cannot tell which one of them should be used at a given
time.
I have two possible solutions here:
1. If a pad for a given channel must be created and an existing pad for
that same channel is there, the old pad is deleted. I don't know
however, what happens if the pad is still connected. Is it possible to
disconnect it on the fly?
2. You use always the same pad, say private_stream, and change the
capabilities on the fly, depending on the type of audio present at the
moment. Is that possible at all?
I would try and implement any of these solutions (or any other that is
more reasonable) but would need some advice to decide which one is the
most adequate. Your help will be very appreciated.
Thanks a lot,
M. S.
--
Martin Soto <soto at informatik.uni-kl.de>
Universität Kaiserslautern - AG Software Engineering
More information about the gstreamer-devel
mailing list