OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 TEST(H264ProfileLevelId, TestParseSdpProfileLevelIdInvalid) { | 145 TEST(H264ProfileLevelId, TestParseSdpProfileLevelIdInvalid) { |
146 CodecParameterMap params; | 146 CodecParameterMap params; |
147 params["profile-level-id"] = "foobar"; | 147 params["profile-level-id"] = "foobar"; |
148 EXPECT_FALSE(ParseSdpProfileLevelId(params)); | 148 EXPECT_FALSE(ParseSdpProfileLevelId(params)); |
149 } | 149 } |
150 | 150 |
151 TEST(H264ProfileLevelId, TestGenerateProfileLevelIdForAnswerEmpty) { | 151 TEST(H264ProfileLevelId, TestGenerateProfileLevelIdForAnswerEmpty) { |
152 CodecParameterMap answer_params; | 152 CodecParameterMap answer_params; |
153 GenerateProfileLevelIdForAnswer(CodecParameterMap(), CodecParameterMap(), | 153 GenerateProfileLevelIdForAnswer(CodecParameterMap(), CodecParameterMap(), |
154 &answer_params); | 154 &answer_params); |
155 EXPECT_EQ("42e01f", answer_params["profile-level-id"]); | 155 EXPECT_TRUE(answer_params.empty()); |
156 } | 156 } |
157 | 157 |
158 TEST(H264ProfileLevelId, | 158 TEST(H264ProfileLevelId, |
159 TestGenerateProfileLevelIdForAnswerLevelSymmetryCapped) { | 159 TestGenerateProfileLevelIdForAnswerLevelSymmetryCapped) { |
160 CodecParameterMap low_level; | 160 CodecParameterMap low_level; |
161 low_level["profile-level-id"] = "42e015"; | 161 low_level["profile-level-id"] = "42e015"; |
162 CodecParameterMap high_level; | 162 CodecParameterMap high_level; |
163 high_level["profile-level-id"] = "42e01f"; | 163 high_level["profile-level-id"] = "42e01f"; |
164 | 164 |
165 // Level asymmetry is not allowed; test that answer level is the lower of the | 165 // Level asymmetry is not allowed; test that answer level is the lower of the |
(...skipping 21 matching lines...) Expand all Loading... |
187 remote_params["level-asymmetry-allowed"] = "1"; | 187 remote_params["level-asymmetry-allowed"] = "1"; |
188 CodecParameterMap answer_params; | 188 CodecParameterMap answer_params; |
189 GenerateProfileLevelIdForAnswer(local_params, remote_params, &answer_params); | 189 GenerateProfileLevelIdForAnswer(local_params, remote_params, &answer_params); |
190 // When level asymmetry is allowed, we can answer a higher level than what was | 190 // When level asymmetry is allowed, we can answer a higher level than what was |
191 // offered. | 191 // offered. |
192 EXPECT_EQ("42e01f", answer_params["profile-level-id"]); | 192 EXPECT_EQ("42e01f", answer_params["profile-level-id"]); |
193 } | 193 } |
194 | 194 |
195 } // namespace H264 | 195 } // namespace H264 |
196 } // namespace webrtc | 196 } // namespace webrtc |
OLD | NEW |