[gst-devel] DVD Events

David I. Lehn dlehn at vt.edu
Mon Mar 22 17:11:07 CET 2004


* Jan Schmidt <thaytan at mad.scientist.com> [2004-03-22T19:17:45-0500]:
> The data we're sending are the following "events":
> 
> "spu-reset-highlight" - clear the menu highlight
> "spu-highlight" - colour palette plus highlight region for menu
> "spu-clut-change" - provide a new colour palette for subtitle display
> "spu-still-frame" - tell the SPU that the last frame is a still frame which
> it needs to hold and redisplay on menu highlight changes (for example)
> "spu-stream-change" - command to select a different subtitle stream
> "audio-stream-change" - command to select a different audio track
> "vts-change" - information that the VTS has changed.
> "nav-packet" - information that the DVD VM has switched to a new nav packet.
> 
> Can we add the GST_EVENT_DVD?
> 

I don't think we should be adding media specific code to the core such
as events named "GST_EVENT_DVD".  There are opposing forces of needing
something to handle things like dvd specific events and the goal of
keeping event types to a minimum.  I think if a new event type is needed
it should be more generic but somehow restricted in use.  Something like
GST_EVENT_CUSTOM or _GENERIC look like they might fit but they are so
open ended that they could be abused.  I'm not sure what the answer is
for custom events.

However, why can't the current navigation code be used to implement the
above events?  Maybe it's overloading the meaning of "navigation" for
both internal and user use.  The internal events are just flowing away
from the src rather than back from the sink.  How about something
similar to the current key/mouse code:

void
gst_dvdnav_send_stream_change (GstNavigation * navigation,
    const char *event, int stream)
{
  gst_navigation_send_event (navigation,
      gst_structure_new ("application/x-gst-navigation",
        "event", G_TYPE_STRING, event,
        "stream", G_TYPE_INT, stream,
      	NULL));
}

gst_foo_bar_send_stream_change(GST_NAVIGATION(dvdnavsrc),
  "spu-stream-change", newspustream);
...
gst_foo_bar_send_stream_change(GST_NAVIGATION(dvdnavsrc),
  "audio-stream-change", newaudiostream);

Or something similar to the above.  Basically abstract the events out to
whatever can share parameters and then create named events for them.
Sort of like what x[v]imagesinks do with mouse clicks.  Does this fit
with the code you have for GST_EVENT_DVD?

-dave




More information about the gstreamer-devel mailing list