[MPlayer-G2-dev] Stream layer split proposition.
Dmitry Baryshkov
mitya at school.ioffe.ru
Wed Jul 28 18:07:21 CEST 2004
Hello,
Here comes my recent idea: to split current stream layer to two layers:
physical stream and logical stream. Here is what I mean:
In most of cases, input streams are very simple: file over something
(over filesystem, over ftp, over some other network protocol, etc).
But even DVD streams are much worse: DVD stream can exist over raw-device
(read with bunch of ioct's for decoding), over any fd (simple reading & seeking)
and over bunch-of-VOBs-and-IFOs. All these are _physical_ streams.
But, from player's POV, DVD can be seen as (at least)
two different _logical_ streams: simple per-title reading (as in current
MPlayer & G2) and as those fancy navigation menus, events, etc.
Another example: VCD, CD-DA and other non-plain CD's can exist as normal
CD/CD-R/etc or as .cue+.bin, as .cue+bunch-of-tracks (maybe it's the
same. I'm not sure). Or as some metadata(track offsets, sector sizes,
etc) and raw byte stream (fd).
So here (again) is the proposition: to split stream code to two
independant layers with caching between them. (I mean, only physical
stream must be cached. Logical stream should be directly feeded to the
demuxers.)
I can't propose any API (yet), but I think, that they can be as simple
as static metadata (i.e. file name, size, etc. for file-based phys.streams,
cuesheet for cd-based, etc).
I can see only two problems with this approach:
1) device-based DVD phys stream must be intellectual to determine
if a block is encrypted or not without the help from logical stream
layer (it should duplicate/incorporate some part of current libdvdread)
2) again DVD, but now bunch-of-VOBS problem. to provide VOBs as
unificated DVD stream, we should incorporate some type of
'mkisofs -dvd-video ...' into phys stream.
There is another solution for this -- use stream-of-VOBs-and-IFOs as
a basic DVD stream and convert all other DVD streams to this, but I
don't know if it's better or worse.
--
With best wishes
Dmitry Baryshkov
More information about the MPlayer-G2-dev
mailing list