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

Use RTP demuxer, change notification API #18

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Noarkhh
Copy link
Contributor

@Noarkhh Noarkhh commented Jan 22, 2025

This PR replaces RTP.SessionBin with RTP.Demuxers, elements that take in a single RTP stream, demuxes and depayloads it into a single or multiple media streams. Due to that, when using UDP transport, each incoming stream will have it's own demuxer.

This allows us to simplify the notification API. Up until now the element sent set_up_tracks and new_track notifications. From now on the element would send only set_up_tracks notification and the parent could connect all pads based on control paths provided in the notification instead of relying on ssrcs.

For example, when the source finishes the SETUP phase it sends the set_up_tracks notification containing information about all tracks that have been set up. The parent can now connect a pad for each set up track upfront, with Pad.ref(:output, <track_control_path>), instead of waiting for the new_track notifications.

closes membraneframework/membrane_core#935

|> via_out(Pad.ref(:output, ssrc), options: [depayloader: get_rtp_depayloader(track)])
get_child(demuxer_name)
|> via_out(:output, options: [stream_id: {:payload_type, track.rtpmap.payload_type}])
|> child({:jitter_buffer, make_ref()}, %Membrane.RTP.JitterBuffer{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you think we should have two separate pipelines for tcp and udp ? the jitter buffer will only introduce latency for tcp.

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

Successfully merging this pull request may close these issues.

[rtsp_plugin] Replace RTP.SessionBin with RTP.Demuxers
2 participants