Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "optional pad" type in Membrane Core #836

Open
varsill opened this issue Jun 27, 2024 · 1 comment
Open

Add "optional pad" type in Membrane Core #836

varsill opened this issue Jun 27, 2024 · 1 comment
Labels

Comments

@varsill
Copy link
Contributor

varsill commented Jun 27, 2024

Along with availability: :always and availability: :on_request, we could have availability: :optional pad.
A pad with availability: :optional could either exist or not exist, but there would be at most one instance of such a pad.
The pad could be referred from the element's implementation with just plain name, without any dynamic identifier, which would be a benefit over using availability: :on_request pads, where we need to be aware of the dynamic id.

@Noarkhh
Copy link
Contributor

Noarkhh commented Aug 20, 2024

One of the things worth considering would be whether the optional pad would need to be linked before the element enters playback: :playing or if it could be linked like a dynamic pad. I personally believe that by being static (needing to be linked before :playing playback state) it would solve some problems that appear with dynamic pads.

One of these problems is a case where it is undecidable whether a pad hasn't been connected yet, or it won't be connected at all. It appears in the HLS SinkBin, where it prevents us from being able to nicely have :muxed_av mode with no audio.

A CMAF Muxer needs to have all of it's input pads connected before entering playback, therefore if an audio pad isn't connected to the HLS SinkBin it's undecidable if a CMAF Muxer should be created with only video input or if we should wait for an audio track to be linked to the SinkBin and only then create the muxer(s) with both video and audio input tracks.
Currently the latter approach is implemented, but that makes the SinkBin crash when in :muxed_av mode and no pad with an audio track is connected (the linking of video inputs times out).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

2 participants