Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gstreamer gstreamer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 922
    • Issues 922
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 438
    • Merge requests 438
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamerGStreamer
  • gstreamergstreamer
  • Issues
  • #737
Closed
Open
Issue created Sep 23, 2021 by Sebastian Dröge@slomo🍵Owner

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 GST_ELEMENT_FLAG_SINK set.

Now when adding a sink element S to B2, B2 will have the SINK flag set. However neither B1 nor 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.

If S was added to B2 before B2 was added to B1 then both B1 and B2 would have the SINK flag set and e.g. LATENCY queries would be forwarded to B1, B2 and finally the sink S.

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?

Assignee
Assign to
Time tracking