| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 26 matching lines...) Expand all Loading... |
| 37 (data[6] << 8) + data[7]; | 37 (data[6] << 8) + data[7]; |
| 38 EXPECT_EQ(timestamp, parsed_timestamp); | 38 EXPECT_EQ(timestamp, parsed_timestamp); |
| 39 EXPECT_EQ(static_cast<uint8_t>(fec_pltype), data[kRtpHeaderSize]); | 39 EXPECT_EQ(static_cast<uint8_t>(fec_pltype), data[kRtpHeaderSize]); |
| 40 } | 40 } |
| 41 | 41 |
| 42 class ProducerFecTest : public ::testing::Test { | 42 class ProducerFecTest : public ::testing::Test { |
| 43 protected: | 43 protected: |
| 44 virtual void SetUp() { | 44 virtual void SetUp() { |
| 45 fec_ = new ForwardErrorCorrection(); | 45 fec_ = new ForwardErrorCorrection(); |
| 46 producer_ = new ProducerFec(fec_); | 46 producer_ = new ProducerFec(fec_); |
| 47 generator_ = new FrameGenerator; | 47 generator_ = new FrameGenerator(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 virtual void TearDown() { | 50 virtual void TearDown() { |
| 51 delete producer_; | 51 delete producer_; |
| 52 delete fec_; | 52 delete fec_; |
| 53 delete generator_; | 53 delete generator_; |
| 54 } | 54 } |
| 55 ForwardErrorCorrection* fec_; | 55 ForwardErrorCorrection* fec_; |
| 56 ProducerFec* producer_; | 56 ProducerFec* producer_; |
| 57 FrameGenerator* generator_; | 57 FrameGenerator* generator_; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 kRedPayloadType, | 198 kRedPayloadType, |
| 199 packet->header.header.payloadType, | 199 packet->header.header.payloadType, |
| 200 red_packet.get(), | 200 red_packet.get(), |
| 201 true); // Marker bit set. | 201 true); // Marker bit set. |
| 202 for (int i = 0; i < 10; ++i) | 202 for (int i = 0; i < 10; ++i) |
| 203 EXPECT_EQ(i, red_packet->data()[kRtpHeaderSize + 1 + i]); | 203 EXPECT_EQ(i, red_packet->data()[kRtpHeaderSize + 1 + i]); |
| 204 delete packet; | 204 delete packet; |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace webrtc | 207 } // namespace webrtc |
| OLD | NEW |