OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 timestamp_ += frame.samples_per_channel_; | 112 timestamp_ += frame.samples_per_channel_; |
113 ASSERT_GE(acm_->Add10MsData(frame), 0); | 113 ASSERT_GE(acm_->Add10MsData(frame), 0); |
114 } | 114 } |
115 } | 115 } |
116 | 116 |
117 template <size_t N> | 117 template <size_t N> |
118 void AddSetOfCodecs(const RentACodec::CodecId(&ids)[N]) { | 118 void AddSetOfCodecs(const RentACodec::CodecId(&ids)[N]) { |
119 for (auto id : ids) { | 119 for (auto id : ids) { |
120 const auto i = RentACodec::CodecIndexFromId(id); | 120 const auto i = RentACodec::CodecIndexFromId(id); |
121 ASSERT_TRUE(i); | 121 ASSERT_TRUE(i); |
122 ASSERT_EQ( | 122 ASSERT_EQ(0, receiver_->AddCodec(*i, codecs_[*i].pltype, |
123 0, receiver_->AddCodec(*i, codecs_[*i].pltype, codecs_[*i].channels, | 123 codecs_[*i].channels, codecs_[*i].plfreq, |
124 codecs_[*i].plfreq, nullptr, "")); | 124 nullptr, codecs_[*i].plname)); |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
128 int SendData(FrameType frame_type, | 128 int SendData(FrameType frame_type, |
129 uint8_t payload_type, | 129 uint8_t payload_type, |
130 uint32_t timestamp, | 130 uint32_t timestamp, |
131 const uint8_t* payload_data, | 131 const uint8_t* payload_data, |
132 size_t payload_len_bytes, | 132 size_t payload_len_bytes, |
133 const RTPFragmentationHeader* fragmentation) override { | 133 const RTPFragmentationHeader* fragmentation) override { |
134 if (frame_type == kEmptyFrame) | 134 if (frame_type == kEmptyFrame) |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 receiver_->last_packet_sample_rate_hz()); | 499 receiver_->last_packet_sample_rate_hz()); |
500 EXPECT_EQ(0, receiver_->LastAudioCodec(&codec)); | 500 EXPECT_EQ(0, receiver_->LastAudioCodec(&codec)); |
501 EXPECT_TRUE(CodecsEqual(c.inst, codec)); | 501 EXPECT_TRUE(CodecsEqual(c.inst, codec)); |
502 } | 502 } |
503 } | 503 } |
504 #endif | 504 #endif |
505 | 505 |
506 } // namespace acm2 | 506 } // namespace acm2 |
507 | 507 |
508 } // namespace webrtc | 508 } // namespace webrtc |
OLD | NEW |