[gst-devel] dvd design

David I. Lehn dlehn at vt.edu
Fri Sep 28 14:21:03 CEST 2001


I've managed to confuse myself as to the best direction to take dvd
player design in gstreamer.

in order to promote reuse and to deal with the legal issue of css
decryption i fully think we should use libdvdread (found on ogle site or
in livid cvs).  it has support to link in libdvdcss at runtime if
available.  

but i'm not sure how it should be used properly in a gstreamer way.
here are a few of the ideas i've been looking at:

full player element
-------------------

take a high level viewpoint.  do much of the nav and jumping around on
the dvd in one element.  this basically tosses out the current dvdsrc.
instead of byte offsets and so on the user can just set
title/chapter/angle/etc params.  some of the core dvd processing
involves much tight integration.  this puts it all in one place.  its
similar to the sample dvd player app that comes with libdvdread.

things like subtitle and audio track selection will still be done
elsewhere.  this is just a logical vs physical sort of view of a dvd.

things like seek and so on can of course be implemented in this probably
in a more sane way than with offsets but seeking to lba should be
possible too.

will need to have some way to access ifo stuff like subtitle colormaps
and so on.  how? maybe something like described below.

pros:
dvd details not exposed.
i've got it written already ;)
it's what most people will probably want to use.
simple interface for complex guts.

cons:
dvd details not exposed.
not fine grained.
not very 'gstreamer' like... no real streams except at the output.


componentized element
---------------------

(may need to check out the libdvdread api to get this)

dvdsrc could just be a element front end for dvd_reader.h api.  have a
secondary element that does the ifo and so on parsing and knows how to
do the cell jumping around like in the one big element idea above.
basically the secondary element would need to be able to do what
pullregion stuff was probably designed for.   grab n blocks at some
offset via the dvdread api.

but... its not that simple.  you can open parts of the dvd in various
ways.  ifo/bup/menu/vts for different titles.  so you probably need some
params like title and domain like the dvdread api has.  it looks like we
are getting really close to the full player element idea.

does it make sense to have really dynamic pads?  like start requesting a
pad for vts stream from title 3 and you get a "vts_3" pad?  request ifo
for title 8 and get "ifo_8"?  i'm not even sure what it means to stream
an ifo.  its a data structure not a stream.

could also have raw dvdsrc that basically does nothing but have an
accessor to dvd_reader_t.  then create many dvdparse elements for
streams you are interested in that use dvdsrc.  could set some params
on the dvdparse element to tell it which title/domain to stream out.
I'm not sure how to do this as one element without silly hacks.  dont
really want to create pads for every ifo/vts/etc, just the ones the user
needs. (suggestions?)

this is more gstreamer like, but still is kinda weird to have dvdsrc
basically just be a holder for a object pointer and no real streams.

I'm leaning towards some variation on this design.

pros:
more gstreamerish
more flexable for strange people that want to do weird stuff
could probably be wrapped in a compound element and look like the full
player element idea.

cons:
strange hacks maybe needed.
doesn't fit the libdvdread api too well


raw element
-----------

this basically tosses out using libdvdread.  do all the low level access
ourselves.  rewrite or otherwise adapt libdvdread to be able to use our
raw dvdsrc then continue as above.

pros:
none.

cons:
this sucks.  i don't want to rewrite low level details and there are few
if any advantages to doing so.



probably more to write about this.  but i'm looking for comments.
anyone have reasons to use any of the above designs over the others?

i'm not sure how much of this code belongs in gstreamer tree vs a dvd
player application.

-dave
-- 
David I. Lehn <dlehn at vt.edu>  | http://www.lehn.org/~dlehn/
Computer Engineering Graduate @ Virginia Tech in sunny Blacksburg, VA




More information about the gstreamer-devel mailing list