Skip to content

Commit

Permalink
Remove multicodec test
Browse files Browse the repository at this point in the history
Remote multicodec test
  • Loading branch information
cnderrauber committed Jul 17, 2024
1 parent ab35031 commit 45ae949
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions mediaengine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,40 +453,6 @@ a=fmtp:97 apt=96
_, _, err := m.getCodecByPayload(97)
assert.ErrorIs(t, err, ErrCodecNotFound)
})

t.Run("Multiple codecs same kind", func(t *testing.T) {
const mixedCodecs = `v=0
o=- 4596489990601351948 2 IN IP4 127.0.0.1
s=-
t=0 0
m=video 60323 UDP/TLS/RTP/SAVPF 96
a=rtpmap:96 VP9/90000
m=video 60323 UDP/TLS/RTP/SAVPF 94
a=rtpmap:94 VP8/90000
`
m := MediaEngine{}
assert.NoError(t, m.RegisterCodec(RTPCodecParameters{
RTPCodecCapability: RTPCodecCapability{MimeTypeVP8, 90000, 0, "", nil},
PayloadType: 94,
}, RTPCodecTypeVideo))
assert.NoError(t, m.RegisterCodec(RTPCodecParameters{
RTPCodecCapability: RTPCodecCapability{MimeTypeVP9, 90000, 0, "", nil},
PayloadType: 96,
}, RTPCodecTypeVideo))

assert.NoError(t, m.updateFromRemoteDescription(mustParse(mixedCodecs)))
assert.True(t, m.negotiatedVideo)

vp8Codec, _, err := m.getCodecByPayload(94)
assert.NoError(t, err)
assert.Equal(t, vp8Codec.MimeType, MimeTypeVP8)

vp9Codec, _, err := m.getCodecByPayload(96)
assert.NoError(t, err)
assert.Equal(t, vp9Codec.MimeType, MimeTypeVP9)

})

}

func TestMediaEngineHeaderExtensionDirection(t *testing.T) {
Expand Down

0 comments on commit 45ae949

Please sign in to comment.