GNOME Bugzilla – Bug 760707
appsrc/sink: Add functions for catching/injecting events
Last modified: 2018-11-03 11:44:03 UTC
This is mostly useful for custom events. Any reasons not to do that? Should we prevent using it for standard events that are handled internally (e.g. to prevent setting different caps on the caps property than in the caps event)?
Sure, why not. For appsrc, you can already do that with gst_element_send_event(appsrc,event), so it's just a convenience function, right? We could special-case the CAPS and EOS events and call our equivalent API then to make sure it's handled right. For appsink it's a bit more tricky, I guess we'd keep events and buffers serialized and if someone pulls out a buffer, even though an event is next, then the event just gets dropped (for backwards compat)?
How would a custom function to inject events be different from gst_element_send_event() ?
It wouldn't, it's just more discoverable.
Also does send_event() on appsrc put serialized events into the queue and only send them when it's time? IIRC basesrc will send them right before the next buffer or something like that. But for that we'll just have to override GstElement::send_event() in appsrc anyway. So yes, no behaviour difference to gst_element_send_event() but more discoverable. And appsink would work like Tim mentioned. And there would be some pull_event() or maybe pull_object() (?) or something to check the type of the next thing to pull? And a new callback/signal to notify about that.
*** Bug 768510 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/247.