| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |