| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 uint32_t test_timestamp_; | 140 uint32_t test_timestamp_; |
| 141 uint16_t test_sequence_number_; | 141 uint16_t test_sequence_number_; |
| 142 uint8_t video_frame_[65000]; | 142 uint8_t video_frame_[65000]; |
| 143 size_t payload_data_length_; | 143 size_t payload_data_length_; |
| 144 SimulatedClock fake_clock; | 144 SimulatedClock fake_clock; |
| 145 RateLimiter retransmission_rate_limiter_; | 145 RateLimiter retransmission_rate_limiter_; |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 TEST_F(RtpRtcpVideoTest, BasicVideo) { | 148 TEST_F(RtpRtcpVideoTest, BasicVideo) { |
| 149 uint32_t timestamp = 3000; | 149 uint32_t timestamp = 3000; |
| 150 EXPECT_TRUE(video_module_->SendOutgoingData( | 150 EXPECT_EQ(0, video_module_->SendOutgoingData(kVideoFrameDelta, 123, |
| 151 kVideoFrameDelta, 123, timestamp, timestamp / 90, video_frame_, | 151 timestamp, |
| 152 payload_data_length_, nullptr, nullptr, nullptr)); | 152 timestamp / 90, |
| 153 video_frame_, |
| 154 payload_data_length_)); |
| 153 } | 155 } |
| 154 | 156 |
| 155 TEST_F(RtpRtcpVideoTest, PaddingOnlyFrames) { | 157 TEST_F(RtpRtcpVideoTest, PaddingOnlyFrames) { |
| 156 const size_t kPadSize = 255; | 158 const size_t kPadSize = 255; |
| 157 uint8_t padding_packet[kPadSize]; | 159 uint8_t padding_packet[kPadSize]; |
| 158 uint32_t seq_num = 0; | 160 uint32_t seq_num = 0; |
| 159 uint32_t timestamp = 3000; | 161 uint32_t timestamp = 3000; |
| 160 VideoCodec codec; | 162 VideoCodec codec; |
| 161 codec.codecType = kVideoCodecVP8; | 163 codec.codecType = kVideoCodecVP8; |
| 162 codec.plType = kPayloadType; | 164 codec.plType = kPayloadType; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 184 payload_specific, true)); | 186 payload_specific, true)); |
| 185 EXPECT_EQ(0u, receiver_->payload_size()); | 187 EXPECT_EQ(0u, receiver_->payload_size()); |
| 186 EXPECT_EQ(payload_length, receiver_->rtp_header().header.paddingLength); | 188 EXPECT_EQ(payload_length, receiver_->rtp_header().header.paddingLength); |
| 187 } | 189 } |
| 188 timestamp += 3000; | 190 timestamp += 3000; |
| 189 fake_clock.AdvanceTimeMilliseconds(33); | 191 fake_clock.AdvanceTimeMilliseconds(33); |
| 190 } | 192 } |
| 191 } | 193 } |
| 192 | 194 |
| 193 } // namespace webrtc | 195 } // namespace webrtc |
| OLD | NEW |