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 |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 | 13 |
| 14 #include "webrtc/media/engine/payload_type_mapper.h" |
14 #include "webrtc/test/gtest.h" | 15 #include "webrtc/test/gtest.h" |
15 #include "webrtc/media/engine/payload_type_mapper.h" | |
16 | 16 |
17 namespace cricket { | 17 namespace cricket { |
18 | 18 |
19 class PayloadTypeMapperTest : public testing::Test { | 19 class PayloadTypeMapperTest : public testing::Test { |
20 public: | 20 public: |
21 // TODO(ossu): These are to work around missing comparison operators in | 21 // TODO(ossu): These are to work around missing comparison operators in |
22 // rtc::Optional. They should be removed once Optional has been updated. | 22 // rtc::Optional. They should be removed once Optional has been updated. |
23 int FindMapping(const webrtc::SdpAudioFormat& format) { | 23 int FindMapping(const webrtc::SdpAudioFormat& format) { |
24 auto opt_mapping = mapper_.FindMappingFor(format); | 24 auto opt_mapping = mapper_.FindMappingFor(format); |
25 if (opt_mapping) | 25 if (opt_mapping) |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 EXPECT_EQ(codec.id, payload_type); | 154 EXPECT_EQ(codec.id, payload_type); |
155 EXPECT_EQ(codec.name, format.name); | 155 EXPECT_EQ(codec.name, format.name); |
156 EXPECT_EQ(codec.clockrate, format.clockrate_hz); | 156 EXPECT_EQ(codec.clockrate, format.clockrate_hz); |
157 EXPECT_EQ(codec.channels, format.num_channels); | 157 EXPECT_EQ(codec.channels, format.num_channels); |
158 EXPECT_EQ(codec.params, format.parameters); | 158 EXPECT_EQ(codec.params, format.parameters); |
159 } | 159 } |
160 } | 160 } |
161 | 161 |
162 } // namespace cricket | 162 } // namespace cricket |
OLD | NEW |