[gst-devel] Passing Custom Events

Ronald S. Bultje rbultje at ronald.bitfreak.net
Tue Jan 25 08:07:02 CET 2005


Hi,

On Tue, 2005-01-25 at 15:16, Thirupathiah Annapureddy wrote:
> I thought of sending a custom event from one element to another
> element to exchange this unique information. To create a custom event,
> should i extend GstEventType or i can use any event# higher than
> GST_EVENT_TAG.

Any higher should be good. Maybe we want to add a _PRIVATE value, above
which everything is private (a GstStructure's name then implies the
actual event data).

> Normally down-stream events are handled in _chain or _loop functions
> as part of dataflow. When an element does not handle an event, it
> needs to call gst_pad_event_default to pass it furthur downstream.
> But i have seen some of _chain based elements that do not check
> whether there is any event(GST_IS_EVENT) in the data flow or not. Is
> not this a bad implementation? How come the events are passed furthur
> downstream?

Only event-aware elements (that's a flag, set in the _init() function)
receive events. For other elements, the chain function isn't even called
for events, but gst_pad_event_default() is automatically called. So the
elements are probably not broken.

Ronald

-- 
Ronald S. Bultje <rbultje at ronald.bitfreak.net>





More information about the gstreamer-devel mailing list