Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc

Issue 2203233002: Revert of Add EncodedImageCallback::OnEncodedImage(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 VideoCodec codec_; 199 VideoCodec codec_;
200 200
201 void SendFrame(const RtpRtcpModule* module, uint8_t tid) { 201 void SendFrame(const RtpRtcpModule* module, uint8_t tid) {
202 RTPVideoHeaderVP8 vp8_header = {}; 202 RTPVideoHeaderVP8 vp8_header = {};
203 vp8_header.temporalIdx = tid; 203 vp8_header.temporalIdx = tid;
204 RTPVideoHeader rtp_video_header = { 204 RTPVideoHeader rtp_video_header = {
205 codec_.width, codec_.height, kVideoRotation_0, {-1, -1}, true, 0, 205 codec_.width, codec_.height, kVideoRotation_0, {-1, -1}, true, 0,
206 kRtpVideoVp8, {vp8_header}}; 206 kRtpVideoVp8, {vp8_header}};
207 207
208 const uint8_t payload[100] = {0}; 208 const uint8_t payload[100] = {0};
209 EXPECT_EQ(true, module->impl_->SendOutgoingData( 209 EXPECT_EQ(0, module->impl_->SendOutgoingData(kVideoFrameKey,
210 kVideoFrameKey, codec_.plType, 0, 0, payload, 210 codec_.plType,
211 sizeof(payload), nullptr, &rtp_video_header, nullptr)); 211 0,
212 0,
213 payload,
214 sizeof(payload),
215 NULL,
216 &rtp_video_header));
212 } 217 }
213 218
214 void IncomingRtcpNack(const RtpRtcpModule* module, uint16_t sequence_number) { 219 void IncomingRtcpNack(const RtpRtcpModule* module, uint16_t sequence_number) {
215 bool sender = module->impl_->SSRC() == kSenderSsrc; 220 bool sender = module->impl_->SSRC() == kSenderSsrc;
216 rtcp::Nack nack; 221 rtcp::Nack nack;
217 uint16_t list[1]; 222 uint16_t list[1];
218 list[0] = sequence_number; 223 list[0] = sequence_number;
219 const uint16_t kListLength = sizeof(list) / sizeof(list[0]); 224 const uint16_t kListLength = sizeof(list) / sizeof(list[0]);
220 nack.From(sender ? kReceiverSsrc : kSenderSsrc); 225 nack.From(sender ? kReceiverSsrc : kSenderSsrc);
221 nack.To(sender ? kSenderSsrc : kReceiverSsrc); 226 nack.To(sender ? kSenderSsrc : kReceiverSsrc);
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests); 555 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests);
551 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21)); 556 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21));
552 557
553 // Send module receives the request. 558 // Send module receives the request.
554 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets); 559 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets);
555 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests); 560 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests);
556 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests); 561 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests);
557 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent()); 562 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent());
558 } 563 }
559 } // namespace webrtc 564 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698