Updates to element flags not signalled through the bin hierarchy
Consider a pipeline
P containing a bin
B1 containing another empty bin
B2. At this point neither of these will have for example the
Now when adding a sink element
B2 will have the
SINK flag set. However neither
P will know about this.
When now doing for example a
LATENCY query on
P, this would be sent to all direct child elements that have the
SINK flag set. That is, none in this case.
S was added to
B2 was added to
B1 then both
B2 would have the
SINK flag set and e.g.
LATENCY queries would be forwarded to
B2 and finally the sink
In practice this is a problem with pipelines containing a
webrtcbin inside another bin.
As a potential solution I could imagine a
GST_MESSAGE_OBJECT_FLAGS_UPDATED that is sent whenever an element's flags are changing. That way the whole bin hierarchy can get notified about this and update its own flags/etc accordingly.
The main question here is whether this should also apply to
- flags like
GST_ELEMENT_FLAG_LOCKED_STATE. I could imagine this leading to deadlocks in existing code if
gst_element_set_locked_state()would cause a message to be posted. It's probably called with mutexes locked in more than one place.
- flags on pads. We already send messages for other things affecting pads (
GST_MESSAGE_STRUCTURE_CHANGE) to the parent element, so it would seem consistent to also do that here.
Any opinions, suggestions, comments?