| 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 video_codec.codecType != kVideoCodecULPFEC) { | 423 video_codec.codecType != kVideoCodecULPFEC) { |
| 424 // Register codec type with VCM, but do not register RED or ULPFEC. | 424 // Register codec type with VCM, but do not register RED or ULPFEC. |
| 425 if (vcm_->RegisterReceiveCodec(&video_codec, number_of_cores_, false) != | 425 if (vcm_->RegisterReceiveCodec(&video_codec, number_of_cores_, false) != |
| 426 VCM_OK) { | 426 VCM_OK) { |
| 427 return -1; | 427 return -1; |
| 428 } | 428 } |
| 429 } | 429 } |
| 430 return 0; | 430 return 0; |
| 431 } | 431 } |
| 432 | 432 |
| 433 | 433 void ViEChannel::RegisterExternalDecoder(const uint8_t pl_type, |
| 434 int32_t ViEChannel::RegisterExternalDecoder(const uint8_t pl_type, | 434 VideoDecoder* decoder) { |
| 435 VideoDecoder* decoder, | |
| 436 bool buffered_rendering, | |
| 437 int32_t render_delay) { | |
| 438 RTC_DCHECK(!sender_); | 435 RTC_DCHECK(!sender_); |
| 439 vcm_->RegisterExternalDecoder(decoder, pl_type, buffered_rendering); | 436 vcm_->RegisterExternalDecoder(decoder, pl_type); |
| 440 return vcm_->SetRenderDelay(render_delay); | |
| 441 } | 437 } |
| 442 | 438 |
| 443 int32_t ViEChannel::ReceiveCodecStatistics(uint32_t* num_key_frames, | 439 int32_t ViEChannel::ReceiveCodecStatistics(uint32_t* num_key_frames, |
| 444 uint32_t* num_delta_frames) { | 440 uint32_t* num_delta_frames) { |
| 445 CriticalSectionScoped cs(crit_.get()); | 441 CriticalSectionScoped cs(crit_.get()); |
| 446 *num_key_frames = receive_frame_counts_.key_frames; | 442 *num_key_frames = receive_frame_counts_.key_frames; |
| 447 *num_delta_frames = receive_frame_counts_.delta_frames; | 443 *num_delta_frames = receive_frame_counts_.delta_frames; |
| 448 return 0; | 444 return 0; |
| 449 } | 445 } |
| 450 | 446 |
| 451 uint32_t ViEChannel::DiscardedPackets() const { | 447 uint32_t ViEChannel::DiscardedPackets() const { |
| 452 return vcm_->DiscardedPackets(); | 448 return vcm_->DiscardedPackets(); |
| 453 } | 449 } |
| 454 | 450 |
| 455 int ViEChannel::ReceiveDelay() const { | 451 int ViEChannel::ReceiveDelay() const { |
| 456 return vcm_->Delay(); | 452 return vcm_->Delay(); |
| 457 } | 453 } |
| 458 | 454 |
| 455 void ViEChannel::SetExpectedRenderDelay(int delay_ms) { |
| 456 vcm_->SetRenderDelay(delay_ms); |
| 457 } |
| 458 |
| 459 void ViEChannel::SetRTCPMode(const RtcpMode rtcp_mode) { | 459 void ViEChannel::SetRTCPMode(const RtcpMode rtcp_mode) { |
| 460 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 460 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
| 461 rtp_rtcp->SetRTCPStatus(rtcp_mode); | 461 rtp_rtcp->SetRTCPStatus(rtcp_mode); |
| 462 } | 462 } |
| 463 | 463 |
| 464 void ViEChannel::SetProtectionMode(bool enable_nack, | 464 void ViEChannel::SetProtectionMode(bool enable_nack, |
| 465 bool enable_fec, | 465 bool enable_fec, |
| 466 int payload_type_red, | 466 int payload_type_red, |
| 467 int payload_type_fec) { | 467 int payload_type_fec) { |
| 468 // Validate payload types. | 468 // Validate payload types. |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 CriticalSectionScoped cs(crit_.get()); | 1194 CriticalSectionScoped cs(crit_.get()); |
| 1195 receive_stats_callback_ = receive_statistics_proxy; | 1195 receive_stats_callback_ = receive_statistics_proxy; |
| 1196 } | 1196 } |
| 1197 | 1197 |
| 1198 void ViEChannel::SetIncomingVideoStream( | 1198 void ViEChannel::SetIncomingVideoStream( |
| 1199 IncomingVideoStream* incoming_video_stream) { | 1199 IncomingVideoStream* incoming_video_stream) { |
| 1200 CriticalSectionScoped cs(crit_.get()); | 1200 CriticalSectionScoped cs(crit_.get()); |
| 1201 incoming_video_stream_ = incoming_video_stream; | 1201 incoming_video_stream_ = incoming_video_stream; |
| 1202 } | 1202 } |
| 1203 } // namespace webrtc | 1203 } // namespace webrtc |
| OLD | NEW |