solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 1 | /* |
kjellander | 1afca73 | 2016-02-07 20:46:45 -0800 | [diff] [blame] | 2 | * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 3 | * |
kjellander | 1afca73 | 2016-02-07 20:46:45 -0800 | [diff] [blame] | 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 9 | */ |
| 10 | |
Steve Anton | e78bcb9 | 2017-10-31 09:53:08 -0700 | [diff] [blame] | 11 | #include <memory> |
| 12 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 13 | #include "api/audio_codecs/builtin_audio_decoder_factory.h" |
| 14 | #include "api/audio_codecs/builtin_audio_encoder_factory.h" |
Jiawei Ou | be14217 | 2018-10-10 01:16:20 -0700 | [diff] [blame^] | 15 | #include "api/video/builtin_video_bitrate_allocator_factory.h" |
Anders Carlsson | b330688 | 2018-05-14 10:11:42 +0200 | [diff] [blame] | 16 | #include "api/video_codecs/builtin_video_decoder_factory.h" |
| 17 | #include "api/video_codecs/builtin_video_encoder_factory.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 18 | #include "media/engine/webrtcmediaengine.h" |
Anders Carlsson | b330688 | 2018-05-14 10:11:42 +0200 | [diff] [blame] | 19 | #include "modules/audio_processing/include/audio_processing.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 20 | #include "test/gtest.h" |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 21 | |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 22 | using webrtc::RtpExtension; |
| 23 | |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 24 | namespace cricket { |
| 25 | namespace { |
| 26 | |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 27 | std::vector<RtpExtension> MakeUniqueExtensions() { |
| 28 | std::vector<RtpExtension> result; |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 29 | char name[] = "a"; |
| 30 | for (int i = 0; i < 7; ++i) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 31 | result.push_back(RtpExtension(name, 1 + i)); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 32 | name[0]++; |
Johannes Kron | 07ba2b9 | 2018-09-26 13:33:35 +0200 | [diff] [blame] | 33 | result.push_back(RtpExtension(name, 255 - i)); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 34 | name[0]++; |
| 35 | } |
| 36 | return result; |
| 37 | } |
| 38 | |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 39 | std::vector<RtpExtension> MakeRedundantExtensions() { |
| 40 | std::vector<RtpExtension> result; |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 41 | char name[] = "a"; |
| 42 | for (int i = 0; i < 7; ++i) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 43 | result.push_back(RtpExtension(name, 1 + i)); |
Johannes Kron | 07ba2b9 | 2018-09-26 13:33:35 +0200 | [diff] [blame] | 44 | result.push_back(RtpExtension(name, 255 - i)); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 45 | name[0]++; |
| 46 | } |
| 47 | return result; |
| 48 | } |
| 49 | |
| 50 | bool SupportedExtensions1(const std::string& name) { |
| 51 | return name == "c" || name == "i"; |
| 52 | } |
| 53 | |
| 54 | bool SupportedExtensions2(const std::string& name) { |
| 55 | return name != "a" && name != "n"; |
| 56 | } |
| 57 | |
| 58 | bool IsSorted(const std::vector<webrtc::RtpExtension>& extensions) { |
| 59 | const std::string* last = nullptr; |
| 60 | for (const auto& extension : extensions) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 61 | if (last && *last > extension.uri) { |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 62 | return false; |
| 63 | } |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 64 | last = &extension.uri; |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 65 | } |
| 66 | return true; |
| 67 | } |
| 68 | } // namespace |
| 69 | |
| 70 | TEST(WebRtcMediaEngineTest, ValidateRtpExtensions_EmptyList) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 71 | std::vector<RtpExtension> extensions; |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 72 | EXPECT_TRUE(ValidateRtpExtensions(extensions)); |
| 73 | } |
| 74 | |
| 75 | TEST(WebRtcMediaEngineTest, ValidateRtpExtensions_AllGood) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 76 | std::vector<RtpExtension> extensions = MakeUniqueExtensions(); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 77 | EXPECT_TRUE(ValidateRtpExtensions(extensions)); |
| 78 | } |
| 79 | |
| 80 | TEST(WebRtcMediaEngineTest, ValidateRtpExtensions_OutOfRangeId_Low) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 81 | std::vector<RtpExtension> extensions = MakeUniqueExtensions(); |
| 82 | extensions.push_back(RtpExtension("foo", 0)); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 83 | EXPECT_FALSE(ValidateRtpExtensions(extensions)); |
| 84 | } |
| 85 | |
| 86 | TEST(WebRtcMediaEngineTest, ValidateRtpExtensions_OutOfRangeId_High) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 87 | std::vector<RtpExtension> extensions = MakeUniqueExtensions(); |
Johannes Kron | 07ba2b9 | 2018-09-26 13:33:35 +0200 | [diff] [blame] | 88 | extensions.push_back(RtpExtension("foo", 256)); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 89 | EXPECT_FALSE(ValidateRtpExtensions(extensions)); |
| 90 | } |
| 91 | |
| 92 | TEST(WebRtcMediaEngineTest, ValidateRtpExtensions_OverlappingIds_StartOfSet) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 93 | std::vector<RtpExtension> extensions = MakeUniqueExtensions(); |
| 94 | extensions.push_back(RtpExtension("foo", 1)); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 95 | EXPECT_FALSE(ValidateRtpExtensions(extensions)); |
| 96 | } |
| 97 | |
| 98 | TEST(WebRtcMediaEngineTest, ValidateRtpExtensions_OverlappingIds_EndOfSet) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 99 | std::vector<RtpExtension> extensions = MakeUniqueExtensions(); |
Johannes Kron | 07ba2b9 | 2018-09-26 13:33:35 +0200 | [diff] [blame] | 100 | extensions.push_back(RtpExtension("foo", 255)); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 101 | EXPECT_FALSE(ValidateRtpExtensions(extensions)); |
| 102 | } |
| 103 | |
| 104 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_EmptyList) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 105 | std::vector<RtpExtension> extensions; |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 106 | std::vector<webrtc::RtpExtension> filtered = |
| 107 | FilterRtpExtensions(extensions, SupportedExtensions1, true); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 108 | EXPECT_EQ(0u, filtered.size()); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 109 | } |
| 110 | |
| 111 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_IncludeOnlySupported) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 112 | std::vector<RtpExtension> extensions = MakeUniqueExtensions(); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 113 | std::vector<webrtc::RtpExtension> filtered = |
| 114 | FilterRtpExtensions(extensions, SupportedExtensions1, false); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 115 | EXPECT_EQ(2u, filtered.size()); |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 116 | EXPECT_EQ("c", filtered[0].uri); |
| 117 | EXPECT_EQ("i", filtered[1].uri); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 118 | } |
| 119 | |
| 120 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_SortedByName_1) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 121 | std::vector<RtpExtension> extensions = MakeUniqueExtensions(); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 122 | std::vector<webrtc::RtpExtension> filtered = |
| 123 | FilterRtpExtensions(extensions, SupportedExtensions2, false); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 124 | EXPECT_EQ(12u, filtered.size()); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 125 | EXPECT_TRUE(IsSorted(filtered)); |
| 126 | } |
| 127 | |
| 128 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_SortedByName_2) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 129 | std::vector<RtpExtension> extensions = MakeUniqueExtensions(); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 130 | std::vector<webrtc::RtpExtension> filtered = |
| 131 | FilterRtpExtensions(extensions, SupportedExtensions2, true); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 132 | EXPECT_EQ(12u, filtered.size()); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 133 | EXPECT_TRUE(IsSorted(filtered)); |
| 134 | } |
| 135 | |
| 136 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_DontRemoveRedundant) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 137 | std::vector<RtpExtension> extensions = MakeRedundantExtensions(); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 138 | std::vector<webrtc::RtpExtension> filtered = |
| 139 | FilterRtpExtensions(extensions, SupportedExtensions2, false); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 140 | EXPECT_EQ(12u, filtered.size()); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 141 | EXPECT_TRUE(IsSorted(filtered)); |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 142 | EXPECT_EQ(filtered[0].uri, filtered[1].uri); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 143 | } |
| 144 | |
| 145 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_RemoveRedundant) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 146 | std::vector<RtpExtension> extensions = MakeRedundantExtensions(); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 147 | std::vector<webrtc::RtpExtension> filtered = |
| 148 | FilterRtpExtensions(extensions, SupportedExtensions2, true); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 149 | EXPECT_EQ(6u, filtered.size()); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 150 | EXPECT_TRUE(IsSorted(filtered)); |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 151 | EXPECT_NE(filtered[0].uri, filtered[1].uri); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 152 | } |
| 153 | |
jbauch | 5869f50 | 2017-06-29 12:31:36 -0700 | [diff] [blame] | 154 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_RemoveRedundantEncrypted_1) { |
| 155 | std::vector<RtpExtension> extensions; |
| 156 | extensions.push_back(webrtc::RtpExtension("b", 1)); |
| 157 | extensions.push_back(webrtc::RtpExtension("b", 2, true)); |
| 158 | extensions.push_back(webrtc::RtpExtension("c", 3)); |
| 159 | extensions.push_back(webrtc::RtpExtension("b", 4)); |
| 160 | std::vector<webrtc::RtpExtension> filtered = |
| 161 | FilterRtpExtensions(extensions, SupportedExtensions2, true); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 162 | EXPECT_EQ(3u, filtered.size()); |
jbauch | 5869f50 | 2017-06-29 12:31:36 -0700 | [diff] [blame] | 163 | EXPECT_TRUE(IsSorted(filtered)); |
| 164 | EXPECT_EQ(filtered[0].uri, filtered[1].uri); |
| 165 | EXPECT_NE(filtered[0].encrypt, filtered[1].encrypt); |
| 166 | EXPECT_NE(filtered[0].uri, filtered[2].uri); |
| 167 | EXPECT_NE(filtered[1].uri, filtered[2].uri); |
| 168 | } |
| 169 | |
| 170 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_RemoveRedundantEncrypted_2) { |
| 171 | std::vector<RtpExtension> extensions; |
| 172 | extensions.push_back(webrtc::RtpExtension("b", 1, true)); |
| 173 | extensions.push_back(webrtc::RtpExtension("b", 2)); |
| 174 | extensions.push_back(webrtc::RtpExtension("c", 3)); |
| 175 | extensions.push_back(webrtc::RtpExtension("b", 4)); |
| 176 | std::vector<webrtc::RtpExtension> filtered = |
| 177 | FilterRtpExtensions(extensions, SupportedExtensions2, true); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 178 | EXPECT_EQ(3u, filtered.size()); |
jbauch | 5869f50 | 2017-06-29 12:31:36 -0700 | [diff] [blame] | 179 | EXPECT_TRUE(IsSorted(filtered)); |
| 180 | EXPECT_EQ(filtered[0].uri, filtered[1].uri); |
| 181 | EXPECT_NE(filtered[0].encrypt, filtered[1].encrypt); |
| 182 | EXPECT_NE(filtered[0].uri, filtered[2].uri); |
| 183 | EXPECT_NE(filtered[1].uri, filtered[2].uri); |
| 184 | } |
| 185 | |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 186 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_RemoveRedundantBwe_1) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 187 | std::vector<RtpExtension> extensions; |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 188 | extensions.push_back( |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 189 | RtpExtension(RtpExtension::kTransportSequenceNumberUri, 3)); |
| 190 | extensions.push_back(RtpExtension(RtpExtension::kTimestampOffsetUri, 9)); |
| 191 | extensions.push_back(RtpExtension(RtpExtension::kAbsSendTimeUri, 6)); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 192 | extensions.push_back( |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 193 | RtpExtension(RtpExtension::kTransportSequenceNumberUri, 1)); |
| 194 | extensions.push_back(RtpExtension(RtpExtension::kTimestampOffsetUri, 14)); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 195 | std::vector<webrtc::RtpExtension> filtered = |
| 196 | FilterRtpExtensions(extensions, SupportedExtensions2, true); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 197 | EXPECT_EQ(1u, filtered.size()); |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 198 | EXPECT_EQ(RtpExtension::kTransportSequenceNumberUri, filtered[0].uri); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 199 | } |
| 200 | |
jbauch | 5869f50 | 2017-06-29 12:31:36 -0700 | [diff] [blame] | 201 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_RemoveRedundantBweEncrypted_1) { |
| 202 | std::vector<RtpExtension> extensions; |
| 203 | extensions.push_back( |
| 204 | RtpExtension(RtpExtension::kTransportSequenceNumberUri, 3)); |
| 205 | extensions.push_back( |
| 206 | RtpExtension(RtpExtension::kTransportSequenceNumberUri, 4, true)); |
| 207 | extensions.push_back(RtpExtension(RtpExtension::kTimestampOffsetUri, 9)); |
| 208 | extensions.push_back(RtpExtension(RtpExtension::kAbsSendTimeUri, 6)); |
| 209 | extensions.push_back( |
| 210 | RtpExtension(RtpExtension::kTransportSequenceNumberUri, 1)); |
| 211 | extensions.push_back( |
| 212 | RtpExtension(RtpExtension::kTransportSequenceNumberUri, 2, true)); |
| 213 | extensions.push_back(RtpExtension(RtpExtension::kTimestampOffsetUri, 14)); |
| 214 | std::vector<webrtc::RtpExtension> filtered = |
| 215 | FilterRtpExtensions(extensions, SupportedExtensions2, true); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 216 | EXPECT_EQ(2u, filtered.size()); |
jbauch | 5869f50 | 2017-06-29 12:31:36 -0700 | [diff] [blame] | 217 | EXPECT_EQ(RtpExtension::kTransportSequenceNumberUri, filtered[0].uri); |
| 218 | EXPECT_EQ(RtpExtension::kTransportSequenceNumberUri, filtered[1].uri); |
| 219 | EXPECT_NE(filtered[0].encrypt, filtered[1].encrypt); |
| 220 | } |
| 221 | |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 222 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_RemoveRedundantBwe_2) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 223 | std::vector<RtpExtension> extensions; |
| 224 | extensions.push_back(RtpExtension(RtpExtension::kTimestampOffsetUri, 1)); |
| 225 | extensions.push_back(RtpExtension(RtpExtension::kAbsSendTimeUri, 14)); |
| 226 | extensions.push_back(RtpExtension(RtpExtension::kTimestampOffsetUri, 7)); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 227 | std::vector<webrtc::RtpExtension> filtered = |
| 228 | FilterRtpExtensions(extensions, SupportedExtensions2, true); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 229 | EXPECT_EQ(1u, filtered.size()); |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 230 | EXPECT_EQ(RtpExtension::kAbsSendTimeUri, filtered[0].uri); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | TEST(WebRtcMediaEngineTest, FilterRtpExtensions_RemoveRedundantBwe_3) { |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 234 | std::vector<RtpExtension> extensions; |
| 235 | extensions.push_back(RtpExtension(RtpExtension::kTimestampOffsetUri, 2)); |
| 236 | extensions.push_back(RtpExtension(RtpExtension::kTimestampOffsetUri, 14)); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 237 | std::vector<webrtc::RtpExtension> filtered = |
| 238 | FilterRtpExtensions(extensions, SupportedExtensions2, true); |
Mirko Bonadei | f859e55 | 2018-05-30 15:31:29 +0200 | [diff] [blame] | 239 | EXPECT_EQ(1u, filtered.size()); |
isheriff | 6f8d686 | 2016-05-26 11:24:55 -0700 | [diff] [blame] | 240 | EXPECT_EQ(RtpExtension::kTimestampOffsetUri, filtered[0].uri); |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 241 | } |
ossu | 111744e | 2016-06-15 02:22:32 -0700 | [diff] [blame] | 242 | |
ossu | 111744e | 2016-06-15 02:22:32 -0700 | [diff] [blame] | 243 | TEST(WebRtcMediaEngineFactoryTest, CreateWithBuiltinDecoders) { |
| 244 | std::unique_ptr<MediaEngineInterface> engine(WebRtcMediaEngineFactory::Create( |
Anders Carlsson | b330688 | 2018-05-14 10:11:42 +0200 | [diff] [blame] | 245 | nullptr /* adm */, webrtc::CreateBuiltinAudioEncoderFactory(), |
| 246 | webrtc::CreateBuiltinAudioDecoderFactory(), |
| 247 | webrtc::CreateBuiltinVideoEncoderFactory(), |
Jiawei Ou | be14217 | 2018-10-10 01:16:20 -0700 | [diff] [blame^] | 248 | webrtc::CreateBuiltinVideoDecoderFactory(), |
| 249 | webrtc::CreateBuiltinVideoBitrateAllocatorFactory(), |
| 250 | nullptr /* audio_mixer */, webrtc::AudioProcessingBuilder().Create())); |
ossu | 111744e | 2016-06-15 02:22:32 -0700 | [diff] [blame] | 251 | EXPECT_TRUE(engine); |
| 252 | } |
| 253 | |
solenberg | 7e4e01a | 2015-12-02 08:05:01 -0800 | [diff] [blame] | 254 | } // namespace cricket |