[MPlayer-dev-eng] playlist over streaming protocol

Roberto Togni rxt at rtogni.it
Wed Jan 17 00:12:51 CET 2007


Hi all

I'm working on smil playlists streamed over realrtsp (audio/video
playback only, not full multistream smil support).
I'm trying to figure out whatìs the best way to integrate it into
mplayer code.

Scenario: the playlist is sent as a stream (like audio or video), so
the realrtsp code can get it with little changes. The stream layer is
not aware that it's streaming a playlist instead of audio/video content
(it can know it by parsing metadata, but is not its job). To get the
playlist you need to start the stream and read data from it, the
headers (sdp) alone are not enough.
Normally realrtsp encapsulate every stream into a .RMF file (real file),
but this can be easily avoided if needed.

The playlist packet has a binary header, the playlist itself is text.
Unfortunately the playlist can be split in more packets; each packet
have a binary header.


The solution I implemented now (before discovering a sample with
multi packets) is this:
- Add an unique signature in front of the playlist packet
- extend  the smil playlist parser to recognize that signature
- hack it to skip the binary data
- perform unescaping of \" to " if it's parsing this special smil
playlist
- the header is text, so it's automagically ignored

It works ok with -playlist, even if it's a bit hack (see attached
patch, for reference only), but it fails on multipackets playlists (the
binary data contains zeros, and the playtree code treats them as eof).


The possible solutions are:
1- extend the playtree code to handle binary data (reading and skipping)
and let it parse the packets (the added signature may be still useful,
but i can do without it if needed).

2- encapsulate the playlist in .RMF, and let demux_real.c demux it; add
some code in mplayer.c to process it. This is the same solution used
for mov reference files (data is passed as a fake video demuxer), but
the code needed to parse the smil files is probably bigger.

3- create something new, like a playlist decoder, and pass the data
through the real demuxer like solution 2. This is probably too complex
if it's needed only by this code, but could be the cleaner solution.
You probably need a null demuxer for standard plaintext playlists.

4- implement something to allow a demuxer to add entries to the
playtree, and parse the playlist in the demuxer.

imho 1 is the simplest, 2 is ok as long as the number of special cases
is low, 3-4 are probably the best but are more complex.

Any other ideas or comments?


Btw i'll work also to restore automatic playlist detection soon (from
network and for playlists with a detectable format), so if any solution
can make this task better/safer its preferred.

Ciao,
 Roberto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtspsmil.diff
Type: text/x-patch
Size: 2994 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070117/42b4d4b7/attachment.bin>


More information about the MPlayer-dev-eng mailing list