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

Unified 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 side-by-side diff with in-line comments
Download patch
« webrtc/video/rtp_stream_receiver.cc ('K') | « webrtc/video/rtp_stream_receiver.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/rtp_stream_receiver_unittest.cc
diff --git a/webrtc/video/rtp_stream_receiver_unittest.cc b/webrtc/video/rtp_stream_receiver_unittest.cc
index c28ae81042591f82611fb026c177f6483f2bdb46..09ba501f1ad5b979cc33b19c6ca0be157424a6e5 100644
--- a/webrtc/video/rtp_stream_receiver_unittest.cc
+++ b/webrtc/video/rtp_stream_receiver_unittest.cc
@@ -331,4 +331,19 @@ TEST_F(RtpStreamReceiverTest, PaddingInMediaStream) {
rtp_stream_receiver_->OnReceivedPayloadData(nullptr, 0, &header);
}
+TEST_F(RtpStreamReceiverTest, RequestKeyframeIfFirstFrameIsDelta) {
+ WebRtcRTPHeader rtp_header;
+ const std::vector<uint8_t> data({1, 2, 3, 4});
+ memset(&rtp_header, 0, sizeof(rtp_header));
+ rtp_header.header.sequenceNumber = 1;
+ rtp_header.header.markerBit = 1;
+ rtp_header.type.Video.is_first_packet_in_frame = true;
+ rtp_header.frameType = kVideoFrameDelta;
+ rtp_header.type.Video.codec = kRtpVideoGeneric;
+
+ EXPECT_CALL(mock_key_frame_request_sender_, RequestKeyFrame());
+ rtp_stream_receiver_->OnReceivedPayloadData(data.data(), data.size(),
+ &rtp_header);
+}
+
} // namespace webrtc
« 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