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

Side by Side Diff: webrtc/video/rtp_stream_receiver_unittest.cc

Issue 2874933004: Request keyframe if the first received frame is not a keyframe. (Closed)
Patch Set: Created 3 years, 7 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 2017 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2017 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 header.header.sequenceNumber = 6; 325 header.header.sequenceNumber = 6;
326 rtp_stream_receiver_->OnReceivedPayloadData(data.data(), data.size(), 326 rtp_stream_receiver_->OnReceivedPayloadData(data.data(), data.size(),
327 &header); 327 &header);
328 328
329 EXPECT_CALL(mock_on_complete_frame_callback_, DoOnCompleteFrame(_)); 329 EXPECT_CALL(mock_on_complete_frame_callback_, DoOnCompleteFrame(_));
330 header.header.sequenceNumber = 5; 330 header.header.sequenceNumber = 5;
331 rtp_stream_receiver_->OnReceivedPayloadData(nullptr, 0, &header); 331 rtp_stream_receiver_->OnReceivedPayloadData(nullptr, 0, &header);
332 } 332 }
333 333
334 TEST_F(RtpStreamReceiverTest, RequestKeyframeIfFirstFrameIsDelta) {
335 WebRtcRTPHeader rtp_header;
336 const std::vector<uint8_t> data({1, 2, 3, 4});
337 memset(&rtp_header, 0, sizeof(rtp_header));
338 rtp_header.header.sequenceNumber = 1;
339 rtp_header.header.markerBit = 1;
340 rtp_header.type.Video.is_first_packet_in_frame = true;
341 rtp_header.frameType = kVideoFrameDelta;
342 rtp_header.type.Video.codec = kRtpVideoGeneric;
343
344 EXPECT_CALL(mock_key_frame_request_sender_, RequestKeyFrame());
345 rtp_stream_receiver_->OnReceivedPayloadData(data.data(), data.size(),
346 &rtp_header);
347 }
348
334 } // namespace webrtc 349 } // namespace webrtc
OLDNEW
« webrtc/video/rtp_stream_receiver.cc ('K') | « webrtc/video/rtp_stream_receiver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698