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

RTP Muxer #173

Open
wants to merge 17 commits into
base: rtp-demuxer
Choose a base branch
from
Open

RTP Muxer #173

wants to merge 17 commits into from

Conversation

Noarkhh
Copy link
Contributor

@Noarkhh Noarkhh commented Dec 3, 2024

@Noarkhh Noarkhh force-pushed the rtp-muxer branch 5 times, most recently from 178a7f5 to 3646889 Compare December 5, 2024 15:50
@Noarkhh Noarkhh force-pushed the rtp-muxer branch 3 times, most recently from ac6f353 to 5f98ea7 Compare December 12, 2024 15:02
@Noarkhh Noarkhh changed the base branch from master to rtp-demuxer December 12, 2024 15:32
@Noarkhh Noarkhh force-pushed the rtp-muxer branch 6 times, most recently from cb4e235 to 4b341c8 Compare December 19, 2024 10:42
@Noarkhh Noarkhh marked this pull request as ready for review December 19, 2024 10:45
@Noarkhh Noarkhh requested a review from mat-hek December 19, 2024 10:45
@Noarkhh Noarkhh changed the title Rtp muxer RTP Muxer Dec 19, 2024
@@ -0,0 +1,179 @@
defmodule Membrane.RTP.Muxer do
@moduledoc false
Copy link
Member

Choose a reason for hiding this comment

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

🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I forgor

Copy link
Member

Choose a reason for hiding this comment

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

Can we have a test where we demux and mux packets two times and check if we get the same results? That would need to happen on a stream that's already past the jitter buffer.

sequence_number = rem(stream_state.sequence_number + 1, @max_sequence_number + 1)

state =
Bunch.Struct.put_in(state, [:stream_states, pad_ref, :sequence_number], sequence_number)
Copy link
Member

Choose a reason for hiding this comment

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

don't use Bunch.Struct

@@ -1,5 +1,9 @@
defmodule Membrane.RTP.Muxer do
@moduledoc false
@moduledoc """
Element that combines multiple streams into a single RTP stream. Each new input stream is assigned a unique SSRC, that the packets
Copy link
Member

Choose a reason for hiding this comment

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

The first line is used as a short description

Suggested change
Element that combines multiple streams into a single RTP stream. Each new input stream is assigned a unique SSRC, that the packets
Element that combines multiple streams into a single RTP stream.
Each new input stream is assigned a unique SSRC, that the packets

Comment on lines 116 to 119
|> Bunch.Struct.update_in(:ssrc, &(&1 - ssrc))
|> Bunch.Struct.update_in(:sequence_number, &(&1 - first_sequence_number))
# round to ignore insignificant differences in timestamps
|> Bunch.Struct.update_in(:timestamp, &round((&1 - first_timestamp) / 10))
Copy link
Member

Choose a reason for hiding this comment

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

Bunch.Struct 😡

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.

[rtp] Create a RTP muxer
2 participants