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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 ss << ", "; | 71 ss << ", "; |
72 } | 72 } |
73 ss << ']'; | 73 ss << ']'; |
74 ss << ", rtp: " << rtp.ToString(); | 74 ss << ", rtp: " << rtp.ToString(); |
75 ss << ", renderer: " << (renderer ? "(renderer)" : "nullptr"); | 75 ss << ", renderer: " << (renderer ? "(renderer)" : "nullptr"); |
76 ss << ", render_delay_ms: " << render_delay_ms; | 76 ss << ", render_delay_ms: " << render_delay_ms; |
77 if (!sync_group.empty()) | 77 if (!sync_group.empty()) |
78 ss << ", sync_group: " << sync_group; | 78 ss << ", sync_group: " << sync_group; |
79 ss << ", pre_decode_callback: " | 79 ss << ", pre_decode_callback: " |
80 << (pre_decode_callback ? "(EncodedFrameObserver)" : "nullptr"); | 80 << (pre_decode_callback ? "(EncodedFrameObserver)" : "nullptr"); |
81 ss << ", pre_render_callback: " | |
82 << (pre_render_callback ? "(I420FrameCallback)" : "nullptr"); | |
83 ss << ", target_delay_ms: " << target_delay_ms; | 81 ss << ", target_delay_ms: " << target_delay_ms; |
84 ss << '}'; | 82 ss << '}'; |
85 | 83 |
86 return ss.str(); | 84 return ss.str(); |
87 } | 85 } |
88 | 86 |
89 std::string VideoReceiveStream::Config::Rtp::ToString() const { | 87 std::string VideoReceiveStream::Config::Rtp::ToString() const { |
90 std::stringstream ss; | 88 std::stringstream ss; |
91 ss << "{remote_ssrc: " << remote_ssrc; | 89 ss << "{remote_ssrc: " << remote_ssrc; |
92 ss << ", local_ssrc: " << local_ssrc; | 90 ss << ", local_ssrc: " << local_ssrc; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 VideoCodec codec = CreateDecoderVideoCodec(decoder); | 319 VideoCodec codec = CreateDecoderVideoCodec(decoder); |
322 RTC_CHECK( | 320 RTC_CHECK( |
323 rtp_stream_receiver_.AddReceiveCodec(codec, decoder.codec_params)); | 321 rtp_stream_receiver_.AddReceiveCodec(codec, decoder.codec_params)); |
324 RTC_CHECK_EQ(VCM_OK, video_receiver_.RegisterReceiveCodec( | 322 RTC_CHECK_EQ(VCM_OK, video_receiver_.RegisterReceiveCodec( |
325 &codec, num_cpu_cores_, false)); | 323 &codec, num_cpu_cores_, false)); |
326 } | 324 } |
327 | 325 |
328 video_stream_decoder_.reset(new VideoStreamDecoder( | 326 video_stream_decoder_.reset(new VideoStreamDecoder( |
329 &video_receiver_, &rtp_stream_receiver_, &rtp_stream_receiver_, | 327 &video_receiver_, &rtp_stream_receiver_, &rtp_stream_receiver_, |
330 rtp_stream_receiver_.IsRetransmissionsEnabled(), protected_by_fec, | 328 rtp_stream_receiver_.IsRetransmissionsEnabled(), protected_by_fec, |
331 &stats_proxy_, renderer, config_.pre_render_callback)); | 329 &stats_proxy_, renderer)); |
332 // Register the channel to receive stats updates. | 330 // Register the channel to receive stats updates. |
333 call_stats_->RegisterStatsObserver(video_stream_decoder_.get()); | 331 call_stats_->RegisterStatsObserver(video_stream_decoder_.get()); |
334 // Start the decode thread | 332 // Start the decode thread |
335 decode_thread_.Start(); | 333 decode_thread_.Start(); |
336 decode_thread_.SetPriority(rtc::kHighestPriority); | 334 decode_thread_.SetPriority(rtc::kHighestPriority); |
337 rtp_stream_receiver_.StartReceive(); | 335 rtp_stream_receiver_.StartReceive(); |
338 } | 336 } |
339 | 337 |
340 void VideoReceiveStream::Stop() { | 338 void VideoReceiveStream::Stop() { |
341 RTC_DCHECK_RUN_ON(&worker_thread_checker_); | 339 RTC_DCHECK_RUN_ON(&worker_thread_checker_); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 if (video_receiver_.Decode(frame.get()) == VCM_OK) | 510 if (video_receiver_.Decode(frame.get()) == VCM_OK) |
513 rtp_stream_receiver_.FrameDecoded(frame->picture_id); | 511 rtp_stream_receiver_.FrameDecoded(frame->picture_id); |
514 } else { | 512 } else { |
515 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs | 513 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs |
516 << " ms, requesting keyframe."; | 514 << " ms, requesting keyframe."; |
517 RequestKeyFrame(); | 515 RequestKeyFrame(); |
518 } | 516 } |
519 } | 517 } |
520 } // namespace internal | 518 } // namespace internal |
521 } // namespace webrtc | 519 } // namespace webrtc |
OLD | NEW |