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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 RtpRtcpModule receiver_; | 196 RtpRtcpModule receiver_; |
197 VideoCodec codec_; | 197 VideoCodec codec_; |
198 | 198 |
199 void SendFrame(const RtpRtcpModule* module, uint8_t tid) { | 199 void SendFrame(const RtpRtcpModule* module, uint8_t tid) { |
200 RTPVideoHeaderVP8 vp8_header = {}; | 200 RTPVideoHeaderVP8 vp8_header = {}; |
201 vp8_header.temporalIdx = tid; | 201 vp8_header.temporalIdx = tid; |
202 RTPVideoHeader rtp_video_header; | 202 RTPVideoHeader rtp_video_header; |
203 rtp_video_header.width = codec_.width; | 203 rtp_video_header.width = codec_.width; |
204 rtp_video_header.height = codec_.height; | 204 rtp_video_header.height = codec_.height; |
205 rtp_video_header.rotation = kVideoRotation_0; | 205 rtp_video_header.rotation = kVideoRotation_0; |
| 206 rtp_video_header.content_type = VideoContentType::kUnspecified; |
206 rtp_video_header.playout_delay = {-1, -1}; | 207 rtp_video_header.playout_delay = {-1, -1}; |
207 rtp_video_header.is_first_packet_in_frame = true; | 208 rtp_video_header.is_first_packet_in_frame = true; |
208 rtp_video_header.simulcastIdx = 0; | 209 rtp_video_header.simulcastIdx = 0; |
209 rtp_video_header.codec = kRtpVideoVp8; | 210 rtp_video_header.codec = kRtpVideoVp8; |
210 rtp_video_header.codecHeader = {vp8_header}; | 211 rtp_video_header.codecHeader = {vp8_header}; |
211 | 212 |
212 const uint8_t payload[100] = {0}; | 213 const uint8_t payload[100] = {0}; |
213 EXPECT_EQ(true, module->impl_->SendOutgoingData( | 214 EXPECT_EQ(true, module->impl_->SendOutgoingData( |
214 kVideoFrameKey, codec_.plType, 0, 0, payload, | 215 kVideoFrameKey, codec_.plType, 0, 0, payload, |
215 sizeof(payload), nullptr, &rtp_video_header, nullptr)); | 216 sizeof(payload), nullptr, &rtp_video_header, nullptr)); |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests); | 555 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests); |
555 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21)); | 556 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21)); |
556 | 557 |
557 // Send module receives the request. | 558 // Send module receives the request. |
558 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets); | 559 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets); |
559 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests); | 560 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests); |
560 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests); | 561 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests); |
561 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent()); | 562 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent()); |
562 } | 563 } |
563 } // namespace webrtc | 564 } // namespace webrtc |
OLD | NEW |