Skip to content

webrtcsink: fix codec selection discoveries

Since ab1ec126:

webrtcsink: Add support for pre encoded streams

Discovery pipelines for remote offers were no longer fed any buffers.

While some encoders could already produce caps with no input buffers, others, such as x264enc, simply hung forever. This resulted in no answer getting produced if for instance video-caps were constrained to H264.

Fix this by tracking discovery pipelines at the State rather than the InputStream level, removing the useless distinction of Initial vs. CodecSelection discoveries, and always feeding all the current discovery pipelines with incoming buffers.

For reference, the issue here was that codec selection discoveries were assigned to local clones of InputStreams, not tracked anywhere, and thus not iterated for discoveries when queuing incoming buffers from the chain function, as it only looked at the original instance of InputStream's in state.streams.

Merge request reports

Loading