| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 stats_observer_(new ChannelStatsObserver(this)), | 96 stats_observer_(new ChannelStatsObserver(this)), |
| 97 receive_stats_callback_(nullptr), | 97 receive_stats_callback_(nullptr), |
| 98 incoming_video_stream_(nullptr), | 98 incoming_video_stream_(nullptr), |
| 99 intra_frame_observer_(intra_frame_observer), | 99 intra_frame_observer_(intra_frame_observer), |
| 100 rtt_stats_(rtt_stats), | 100 rtt_stats_(rtt_stats), |
| 101 paced_sender_(paced_sender), | 101 paced_sender_(paced_sender), |
| 102 packet_router_(packet_router), | 102 packet_router_(packet_router), |
| 103 bandwidth_observer_(bandwidth_observer), | 103 bandwidth_observer_(bandwidth_observer), |
| 104 transport_feedback_observer_(transport_feedback_observer), | 104 transport_feedback_observer_(transport_feedback_observer), |
| 105 max_nack_reordering_threshold_(kMaxPacketAgeToNack), | 105 max_nack_reordering_threshold_(kMaxPacketAgeToNack), |
| 106 pre_render_callback_(NULL), | 106 pre_render_callback_(nullptr), |
| 107 last_rtt_ms_(0), | 107 last_rtt_ms_(0), |
| 108 rtp_rtcp_modules_( | 108 rtp_rtcp_modules_( |
| 109 CreateRtpRtcpModules(!sender, | 109 CreateRtpRtcpModules(!sender, |
| 110 vie_receiver_.GetReceiveStatistics(), | 110 vie_receiver_.GetReceiveStatistics(), |
| 111 transport, | 111 transport, |
| 112 intra_frame_observer_, | 112 intra_frame_observer_, |
| 113 bandwidth_observer_.get(), | 113 bandwidth_observer_.get(), |
| 114 transport_feedback_observer_, | 114 transport_feedback_observer_, |
| 115 rtt_stats_, | 115 rtt_stats_, |
| 116 &rtcp_packet_type_counter_observer_, | 116 &rtcp_packet_type_counter_observer_, |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 return stats_observer_.get(); | 308 return stats_observer_.get(); |
| 309 } | 309 } |
| 310 | 310 |
| 311 // Do not acquire the lock of |vcm_| in this function. Decode callback won't | 311 // Do not acquire the lock of |vcm_| in this function. Decode callback won't |
| 312 // necessarily be called from the decoding thread. The decoding thread may have | 312 // necessarily be called from the decoding thread. The decoding thread may have |
| 313 // held the lock when calling VideoDecoder::Decode, Reset, or Release. Acquiring | 313 // held the lock when calling VideoDecoder::Decode, Reset, or Release. Acquiring |
| 314 // the same lock in the path of decode callback can deadlock. | 314 // the same lock in the path of decode callback can deadlock. |
| 315 int32_t ViEChannel::FrameToRender(VideoFrame& video_frame) { // NOLINT | 315 int32_t ViEChannel::FrameToRender(VideoFrame& video_frame) { // NOLINT |
| 316 rtc::CritScope lock(&crit_); | 316 rtc::CritScope lock(&crit_); |
| 317 | 317 |
| 318 if (pre_render_callback_ != NULL) | 318 if (pre_render_callback_) |
| 319 pre_render_callback_->FrameCallback(&video_frame); | 319 pre_render_callback_->FrameCallback(&video_frame); |
| 320 | 320 |
| 321 // TODO(pbos): Remove stream id argument. | 321 // TODO(pbos): Remove stream id argument. |
| 322 incoming_video_stream_->RenderFrame(0xFFFFFFFF, video_frame); | 322 incoming_video_stream_->RenderFrame(0xFFFFFFFF, video_frame); |
| 323 return 0; | 323 return 0; |
| 324 } | 324 } |
| 325 | 325 |
| 326 int32_t ViEChannel::ReceivedDecodedReferenceFrame( | 326 int32_t ViEChannel::ReceivedDecodedReferenceFrame( |
| 327 const uint64_t picture_id) { | 327 const uint64_t picture_id) { |
| 328 return rtp_rtcp_modules_[0]->SendRTCPReferencePictureSelection(picture_id); | 328 return rtp_rtcp_modules_[0]->SendRTCPReferencePictureSelection(picture_id); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 rtc::CritScope lock(&crit_); | 506 rtc::CritScope lock(&crit_); |
| 507 receive_stats_callback_ = receive_statistics_proxy; | 507 receive_stats_callback_ = receive_statistics_proxy; |
| 508 } | 508 } |
| 509 | 509 |
| 510 void ViEChannel::SetIncomingVideoStream( | 510 void ViEChannel::SetIncomingVideoStream( |
| 511 IncomingVideoStream* incoming_video_stream) { | 511 IncomingVideoStream* incoming_video_stream) { |
| 512 rtc::CritScope lock(&crit_); | 512 rtc::CritScope lock(&crit_); |
| 513 incoming_video_stream_ = incoming_video_stream; | 513 incoming_video_stream_ = incoming_video_stream; |
| 514 } | 514 } |
| 515 } // namespace webrtc | 515 } // namespace webrtc |
| OLD | NEW |