OLD | NEW |
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 VideoReceiveStream::VideoReceiveStream( | 173 VideoReceiveStream::VideoReceiveStream( |
174 int num_cpu_cores, | 174 int num_cpu_cores, |
175 CongestionController* congestion_controller, | 175 CongestionController* congestion_controller, |
176 VideoReceiveStream::Config config, | 176 VideoReceiveStream::Config config, |
177 webrtc::VoiceEngine* voice_engine, | 177 webrtc::VoiceEngine* voice_engine, |
178 ProcessThread* process_thread, | 178 ProcessThread* process_thread, |
179 CallStats* call_stats, | 179 CallStats* call_stats, |
180 VieRemb* remb) | 180 VieRemb* remb) |
181 : transport_adapter_(config.rtcp_send_transport), | 181 : transport_adapter_(config.rtcp_send_transport), |
182 encoded_frame_proxy_(config.pre_decode_callback), | |
183 config_(std::move(config)), | 182 config_(std::move(config)), |
184 process_thread_(process_thread), | 183 process_thread_(process_thread), |
185 clock_(Clock::GetRealTimeClock()), | 184 clock_(Clock::GetRealTimeClock()), |
186 decode_thread_(DecodeThreadFunction, this, "DecodingThread"), | 185 decode_thread_(DecodeThreadFunction, this, "DecodingThread"), |
187 congestion_controller_(congestion_controller), | 186 congestion_controller_(congestion_controller), |
188 call_stats_(call_stats), | 187 call_stats_(call_stats), |
189 video_receiver_(clock_, nullptr, this, this, this), | 188 video_receiver_(clock_, nullptr, this, this, this), |
190 stats_proxy_(&config_, clock_), | 189 stats_proxy_(&config_, clock_), |
191 rtp_stream_receiver_(&video_receiver_, | 190 rtp_stream_receiver_(&video_receiver_, |
192 congestion_controller_->GetRemoteBitrateEstimator( | 191 congestion_controller_->GetRemoteBitrateEstimator( |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 } | 332 } |
334 | 333 |
335 // TODO(asapersson): Consider moving callback from video_encoder.h or | 334 // TODO(asapersson): Consider moving callback from video_encoder.h or |
336 // creating a different callback. | 335 // creating a different callback. |
337 int32_t VideoReceiveStream::Encoded( | 336 int32_t VideoReceiveStream::Encoded( |
338 const EncodedImage& encoded_image, | 337 const EncodedImage& encoded_image, |
339 const CodecSpecificInfo* codec_specific_info, | 338 const CodecSpecificInfo* codec_specific_info, |
340 const RTPFragmentationHeader* fragmentation) { | 339 const RTPFragmentationHeader* fragmentation) { |
341 stats_proxy_.OnPreDecode(encoded_image, codec_specific_info); | 340 stats_proxy_.OnPreDecode(encoded_image, codec_specific_info); |
342 if (config_.pre_decode_callback) { | 341 if (config_.pre_decode_callback) { |
343 // TODO(asapersson): Remove EncodedFrameCallbackAdapter. | 342 config_.pre_decode_callback->EncodedFrameCallback( |
344 encoded_frame_proxy_.Encoded( | 343 EncodedFrame(encoded_image._buffer, encoded_image._length, |
345 encoded_image, codec_specific_info, fragmentation); | 344 encoded_image._frameType)); |
346 } | 345 } |
347 if (kEnableFrameRecording) { | 346 if (kEnableFrameRecording) { |
348 if (!ivf_writer_.get()) { | 347 if (!ivf_writer_.get()) { |
349 RTC_DCHECK(codec_specific_info); | 348 RTC_DCHECK(codec_specific_info); |
350 std::ostringstream oss; | 349 std::ostringstream oss; |
351 oss << "receive_bitstream_ssrc_" << config_.rtp.remote_ssrc << ".ivf"; | 350 oss << "receive_bitstream_ssrc_" << config_.rtp.remote_ssrc << ".ivf"; |
352 ivf_writer_ = | 351 ivf_writer_ = |
353 IvfFileWriter::Open(oss.str(), codec_specific_info->codecType); | 352 IvfFileWriter::Open(oss.str(), codec_specific_info->codecType); |
354 } | 353 } |
355 if (ivf_writer_.get()) { | 354 if (ivf_writer_.get()) { |
(...skipping 19 matching lines...) Expand all Loading... |
375 const std::vector<uint16_t>& sequence_numbers) { | 374 const std::vector<uint16_t>& sequence_numbers) { |
376 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers); | 375 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers); |
377 } | 376 } |
378 | 377 |
379 void VideoReceiveStream::RequestKeyFrame() { | 378 void VideoReceiveStream::RequestKeyFrame() { |
380 rtp_stream_receiver_.RequestKeyFrame(); | 379 rtp_stream_receiver_.RequestKeyFrame(); |
381 } | 380 } |
382 | 381 |
383 } // namespace internal | 382 } // namespace internal |
384 } // namespace webrtc | 383 } // namespace webrtc |
OLD | NEW |