| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 class RtpStreamReceiverTest : public testing::Test { | 98 class RtpStreamReceiverTest : public testing::Test { |
| 99 public: | 99 public: |
| 100 RtpStreamReceiverTest() | 100 RtpStreamReceiverTest() |
| 101 : config_(CreateConfig()), | 101 : config_(CreateConfig()), |
| 102 timing_(Clock::GetRealTimeClock()), | 102 timing_(Clock::GetRealTimeClock()), |
| 103 process_thread_(ProcessThread::Create("TestThread")) {} | 103 process_thread_(ProcessThread::Create("TestThread")) {} |
| 104 | 104 |
| 105 void SetUp() { | 105 void SetUp() { |
| 106 rtp_stream_receiver_.reset(new RtpStreamReceiver( | 106 rtp_stream_receiver_.reset(new RtpStreamReceiver( |
| 107 nullptr, nullptr, &mock_transport_, nullptr, &packet_router_, | 107 nullptr, &mock_transport_, nullptr, &packet_router_, |
| 108 nullptr, &config_, nullptr, process_thread_.get(), | 108 nullptr, &config_, nullptr, process_thread_.get(), |
| 109 &mock_nack_sender_, &mock_key_frame_request_sender_, | 109 &mock_nack_sender_, &mock_key_frame_request_sender_, |
| 110 &mock_on_complete_frame_callback_, &timing_)); | 110 &mock_on_complete_frame_callback_, &timing_)); |
| 111 } | 111 } |
| 112 | 112 |
| 113 WebRtcRTPHeader GetDefaultPacket() { | 113 WebRtcRTPHeader GetDefaultPacket() { |
| 114 WebRtcRTPHeader packet; | 114 WebRtcRTPHeader packet; |
| 115 memset(&packet, 0, sizeof(packet)); | 115 memset(&packet, 0, sizeof(packet)); |
| 116 packet.type.Video.codec = kRtpVideoH264; | 116 packet.type.Video.codec = kRtpVideoH264; |
| 117 return packet; | 117 return packet; |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 mock_on_complete_frame_callback_.AppendExpectedBitstream( | 290 mock_on_complete_frame_callback_.AppendExpectedBitstream( |
| 291 kH264StartCode, sizeof(kH264StartCode)); | 291 kH264StartCode, sizeof(kH264StartCode)); |
| 292 mock_on_complete_frame_callback_.AppendExpectedBitstream(data.data(), | 292 mock_on_complete_frame_callback_.AppendExpectedBitstream(data.data(), |
| 293 data.size()); | 293 data.size()); |
| 294 EXPECT_CALL(mock_on_complete_frame_callback_, DoOnCompleteFrame(_)); | 294 EXPECT_CALL(mock_on_complete_frame_callback_, DoOnCompleteFrame(_)); |
| 295 rtp_stream_receiver_->OnReceivedPayloadData(data.data(), data.size(), | 295 rtp_stream_receiver_->OnReceivedPayloadData(data.data(), data.size(), |
| 296 &idr_packet); | 296 &idr_packet); |
| 297 } | 297 } |
| 298 | 298 |
| 299 } // namespace webrtc | 299 } // namespace webrtc |
| OLD | NEW |