GNOME Bugzilla – Bug 728138
Core could be more helpful with respect to event ordering
Last modified: 2018-11-03 12:20:16 UTC
A precise sequence of events need to be sent before starting data flow. There's already code that ensures ordering, could gst instead of throwing warnings and errors when the ordering is not respected provide vmethods in GstElement for handling that ? ie we can find send_caps, send_stream_start and send_segment boolean fields variations in multiple element methods (videomixer / adder are the ones that come to mind), would be nice to delegate that to GstElement and have vmethods such as get_stream_id, get_segment etc .. I have no API proposal, just starting the discussion :)
I don't think that's a good idea... if this wrong event order happens anywhere in your element, your element is already doing something wrong and such API would just allow to silently fix things after they went wrong... instead of making sure the actual cause is fixed.
I'm not sure if you are both saying the same thing. To recap the situation, asynchronous elements need to queue serialized events so they are pushed before the right buffer. The proposal I see here would be to design helpers (in GstElement and other baseclass) that would make implementation of asynchronous element a little easier in regard to the serialized events handling. Class flags could be used to enabled the desired behavious, and prevent backward compatibility issues. Is this correct Mathieu ?
This is correct, and said better than I did. The idea is not for core to be forgiving, but simply more helpful. I think we could design a way to just not let the chance to the element to do anyting wrong with respect to event ordering.
-- 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/gstreamer/issues/55.