| 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 } | 428 } |
| 429 return 0; | 429 return 0; |
| 430 } | 430 } |
| 431 | 431 |
| 432 | 432 |
| 433 int32_t ViEChannel::RegisterExternalDecoder(const uint8_t pl_type, | 433 int32_t ViEChannel::RegisterExternalDecoder(const uint8_t pl_type, |
| 434 VideoDecoder* decoder, | 434 VideoDecoder* decoder, |
| 435 bool buffered_rendering, | 435 bool buffered_rendering, |
| 436 int32_t render_delay) { | 436 int32_t render_delay) { |
| 437 RTC_DCHECK(!sender_); | 437 RTC_DCHECK(!sender_); |
| 438 int32_t result; | 438 vcm_->RegisterExternalDecoder(decoder, pl_type, buffered_rendering); |
| 439 result = vcm_->RegisterExternalDecoder(decoder, pl_type, buffered_rendering); | |
| 440 if (result != VCM_OK) { | |
| 441 return result; | |
| 442 } | |
| 443 return vcm_->SetRenderDelay(render_delay); | 439 return vcm_->SetRenderDelay(render_delay); |
| 444 } | 440 } |
| 445 | 441 |
| 446 int32_t ViEChannel::DeRegisterExternalDecoder(const uint8_t pl_type) { | 442 int32_t ViEChannel::DeRegisterExternalDecoder(const uint8_t pl_type) { |
| 447 RTC_DCHECK(!sender_); | 443 RTC_DCHECK(!sender_); |
| 448 VideoCodec current_receive_codec; | 444 VideoCodec current_receive_codec; |
| 449 int32_t result = 0; | 445 int32_t result = 0; |
| 450 result = vcm_->ReceiveCodec(¤t_receive_codec); | 446 result = vcm_->ReceiveCodec(¤t_receive_codec); |
| 451 if (vcm_->RegisterExternalDecoder(NULL, pl_type, false) != VCM_OK) { | 447 vcm_->RegisterExternalDecoder(NULL, pl_type, false); |
| 452 return -1; | |
| 453 } | |
| 454 | 448 |
| 455 if (result == 0 && current_receive_codec.plType == pl_type) { | 449 if (result == 0 && current_receive_codec.plType == pl_type) { |
| 456 result = vcm_->RegisterReceiveCodec(¤t_receive_codec, | 450 result = vcm_->RegisterReceiveCodec(¤t_receive_codec, |
| 457 number_of_cores_, false); | 451 number_of_cores_, false); |
| 458 } | 452 } |
| 459 return result; | 453 return result; |
| 460 } | 454 } |
| 461 | 455 |
| 462 int32_t ViEChannel::ReceiveCodecStatistics(uint32_t* num_key_frames, | 456 int32_t ViEChannel::ReceiveCodecStatistics(uint32_t* num_key_frames, |
| 463 uint32_t* num_delta_frames) { | 457 uint32_t* num_delta_frames) { |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1219 CriticalSectionScoped cs(crit_.get()); | 1213 CriticalSectionScoped cs(crit_.get()); |
| 1220 receive_stats_callback_ = receive_statistics_proxy; | 1214 receive_stats_callback_ = receive_statistics_proxy; |
| 1221 } | 1215 } |
| 1222 | 1216 |
| 1223 void ViEChannel::SetIncomingVideoStream( | 1217 void ViEChannel::SetIncomingVideoStream( |
| 1224 IncomingVideoStream* incoming_video_stream) { | 1218 IncomingVideoStream* incoming_video_stream) { |
| 1225 CriticalSectionScoped cs(crit_.get()); | 1219 CriticalSectionScoped cs(crit_.get()); |
| 1226 incoming_video_stream_ = incoming_video_stream; | 1220 incoming_video_stream_ = incoming_video_stream; |
| 1227 } | 1221 } |
| 1228 } // namespace webrtc | 1222 } // namespace webrtc |
| OLD | NEW |