Skip to content

Commit

Permalink
Merge branch 'master' into raja_selected_candidate_pair_stats
Browse files Browse the repository at this point in the history
  • Loading branch information
boks1971 authored Oct 7, 2024
2 parents 5a44fc7 + 64f32d2 commit 70504e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sdp.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ func populateLocalCandidates(sessionDescription *SessionDescription, i *ICEGathe
}
}

// nolint: gocognit
func addSenderSDP(
mediaSection mediaSection,
isPlanB bool,
Expand All @@ -395,14 +396,20 @@ func addSenderSDP(
if encoding.RTX.SSRC != 0 {
media = media.WithValueAttribute("ssrc-group", fmt.Sprintf("FID %d %d", encoding.SSRC, encoding.RTX.SSRC))
}

if encoding.FEC.SSRC != 0 {
media = media.WithValueAttribute("ssrc-group", fmt.Sprintf("FEC-FR %d %d", encoding.SSRC, encoding.FEC.SSRC))
}

media = media.WithMediaSource(uint32(encoding.SSRC), track.StreamID() /* cname */, track.StreamID() /* streamLabel */, track.ID())

if !isPlanB {
if encoding.RTX.SSRC != 0 {
media = media.WithMediaSource(uint32(encoding.RTX.SSRC), track.StreamID() /* cname */, track.StreamID() /* streamLabel */, track.ID())
}
if encoding.FEC.SSRC != 0 {
media = media.WithMediaSource(uint32(encoding.FEC.SSRC), track.StreamID() /* cname */, track.StreamID() /* streamLabel */, track.ID())
}

media = media.WithPropertyAttribute("msid:" + track.StreamID() + " " + track.ID())
}
}
Expand Down

0 comments on commit 70504e4

Please sign in to comment.