[gst-devel] DVD autoplugging and Python
Martin Soto
soto at informatik.uni-kl.de
Sat Jul 9 00:44:12 CEST 2005
Hi Ronald,
(sorry for the late answer, I was out of town)
On Wed, 2005-07-06 at 19:12 +0200, Ronald S. Bultje wrote:
> I'm interested in joining efforts to do this differently. I've already
> told you this multiple times, and you've told me you believed it would
> be rather hard, but I've managed to get the full engine working inside
> dvdnav, or well, mostly. As a result, Totem, with no (*) changes
> whatsever, now plays DVDs with menus. My engine isn't as good as yours
> yet, e.g. I cannot select an audio stream in the menu and have Totem
> pick that up in the menu (or the language switching happening in the
> first place :) ).
>
> Are you interested in helping out with the last pieces and having true
> DVD support as an integrated part of GStreamer?
Well yes, I am. It is of course OK with me if DVD playback is properly
integrated into GStreamer, and, although I don't understand some of the
details involved, I believe you that it can be done in some way or
another.
On the other hand, I guess I should clarify what I'm doing just to avoid
confusion. In the current version of Seamless (available from my Arch
repository at gna.org) I replaced libdvdnav by a completely new
implementation in Python. I'm using a sort of hack to integrate that
with the GStreamer pipeline, namely, I have an element written in C that
fires signals when it needs more data. The Python code hooks to those
signals and tells the element which DVD sectors to read next.
I went through all this effort out of frustration with libdvdnav. Don't
take me wrong: the original libdvdnav authors did a heck of a good job
of reverse engineering the DVD format. On the other hand, you can see
that they implemented a lot of the code without a complete understanding
of the problem, and that lead to some really horrible solutions. My code
is, in my opinion, cleaner and easier to understand, and should be a
much better base to implement playback tricks and extensions of all
sorts. I hope to get into that soon (so long as I manage to get the
basic functionality right, see below).
> Also, I'd like all changes that will be applied to dvddemux in the
> future to be well tested with Totem. I've seen that seemingly innocent
> changes, like removing the block-timeout (it's there as a safeguard
> against deadlocks) from playbin (yes, I tried that as a clean-up - do
> not try that at home :) ), can have quite bad effects on DVD playback,
> and your mimetype-check in dvddemux of a while ago, which was also
> seemingly innocent, broke Totem's DVD playback as well.
I could argue that my check was not only seemingly innocent, but
correct. The problem was rather in dvdnavsrc, but I should have fixed
that as well. Fair enough, I suppose changes to the main DVD pipeline
should be tested with Totem. I'll take that into account for future
commits.
> I really want Totem to play DVDs with menus, so let's make sure that any
> future changes to dvddemux do not break Totem. I'm not asking you to
> switch and develop Totem from now on, don't get me wrong, but please be
> careful from now on when applying changes to dvddemux and related DVD
> elements. Totem really is a very important application for GStreamer,
> it's pretty much our prime-time video-playback show-off on the GNOME
> desktop. Bad bugs there make us look bad in total. :).
And speaking about integration, I have more stuff that could be
integrated. I recently revamped the subtitle decoder to handle a number
of cases properly that weren't being taken into account. It now even
handles subtitle animations up to some extent. I didn't commit those
changes to gst-plugins though, because they're sort of radical, and
actually require a new type of DVD event to work properly. However, if
there is interest, I'm willing to collaborate with people to get this
into gst-plugins.
The Python DVD machine would be, of course, another candidate for
integration, but it would require a somewhat better Python
infrastructure in GStreamer. We'll see, maybe we manage to get that
working as well.
Have fun,
M. S.
--
More information about the gstreamer-devel
mailing list