diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /media/webrtc/signaling/gtest/mediapipeline_unittest.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'media/webrtc/signaling/gtest/mediapipeline_unittest.cpp')
-rw-r--r-- | media/webrtc/signaling/gtest/mediapipeline_unittest.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/media/webrtc/signaling/gtest/mediapipeline_unittest.cpp b/media/webrtc/signaling/gtest/mediapipeline_unittest.cpp index afbdb85f18..032023d95f 100644 --- a/media/webrtc/signaling/gtest/mediapipeline_unittest.cpp +++ b/media/webrtc/signaling/gtest/mediapipeline_unittest.cpp @@ -598,6 +598,15 @@ TEST_F(MediaPipelineFilterTest, TestSSRCFilter) { EXPECT_FALSE(Filter(filter, 556, 110)); } +TEST_F(MediaPipelineFilterTest, TestSSRCFilterOverridesPayloadTypeFilter) { + MediaPipelineFilter filter; + filter.AddRemoteSSRC(555); + filter.AddUniqueReceivePT(110); + // We have a configured ssrc; do not allow payload type matching. + EXPECT_FALSE(Filter(filter, 556, 110)); + EXPECT_TRUE(Filter(filter, 555, 110)); +} + #define SSRC(ssrc) \ ((ssrc >> 24) & 0xFF), ((ssrc >> 16) & 0xFF), ((ssrc >> 8) & 0xFF), \ (ssrc & 0xFF) @@ -627,9 +636,14 @@ TEST_F(MediaPipelineFilterTest, TestMidFilter) { TEST_F(MediaPipelineFilterTest, TestPayloadTypeFilter) { MediaPipelineFilter filter; - filter.AddUniquePT(110); + filter.AddUniqueReceivePT(110); EXPECT_TRUE(Filter(filter, 555, 110)); EXPECT_FALSE(Filter(filter, 556, 111)); + // Matching based on unique payload type causes us to learn the ssrc. + EXPECT_TRUE(Filter(filter, 555, 98)); + // Once we have learned an SSRC, do _not_ learn new ones based on payload + // type. + EXPECT_FALSE(Filter(filter, 557, 110)); } TEST_F(MediaPipelineFilterTest, TestSSRCMovedWithMid) { @@ -651,7 +665,7 @@ TEST_F(MediaPipelineFilterTest, TestRemoteSDPNoSSRCs) { MediaPipelineFilter filter; const auto mid = Some(std::string("mid0")); filter.SetRemoteMediaStreamId(mid); - filter.AddUniquePT(111); + filter.AddUniqueReceivePT(111); EXPECT_TRUE(Filter(filter, 555, 110, mid)); EXPECT_TRUE(Filter(filter, 555, 110)); |