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