Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: webrtc/video_engine/vie_channel.cc

Issue 1428293003: Add VideoCodec::PreferDecodeLate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 if (vcm_->RegisterReceiveCodec(&video_codec, number_of_cores_, false) != 422 if (vcm_->RegisterReceiveCodec(&video_codec, number_of_cores_, false) !=
423 VCM_OK) { 423 VCM_OK) {
424 return -1; 424 return -1;
425 } 425 }
426 } 426 }
427 return 0; 427 return 0;
428 } 428 }
429 429
430 430
431 int32_t ViEChannel::RegisterExternalDecoder(const uint8_t pl_type, 431 int32_t ViEChannel::RegisterExternalDecoder(const uint8_t pl_type,
432 VideoDecoder* decoder, 432 VideoDecoder* decoder) {
433 bool buffered_rendering,
434 int32_t render_delay) {
435 RTC_DCHECK(!sender_); 433 RTC_DCHECK(!sender_);
436 int32_t result; 434 return vcm_->RegisterExternalDecoder(decoder, pl_type);
437 result = vcm_->RegisterExternalDecoder(decoder, pl_type, buffered_rendering);
438 if (result != VCM_OK) {
439 return result;
440 }
441 return vcm_->SetRenderDelay(render_delay);
442 } 435 }
443 436
444 int32_t ViEChannel::DeRegisterExternalDecoder(const uint8_t pl_type) { 437 int32_t ViEChannel::DeRegisterExternalDecoder(const uint8_t pl_type) {
445 RTC_DCHECK(!sender_); 438 RTC_DCHECK(!sender_);
446 VideoCodec current_receive_codec; 439 VideoCodec current_receive_codec;
447 int32_t result = 0; 440 int32_t result = 0;
448 result = vcm_->ReceiveCodec(&current_receive_codec); 441 result = vcm_->ReceiveCodec(&current_receive_codec);
449 if (vcm_->RegisterExternalDecoder(NULL, pl_type, false) != VCM_OK) { 442 if (vcm_->RegisterExternalDecoder(NULL, pl_type) != VCM_OK) {
450 return -1; 443 return -1;
451 } 444 }
452 445
453 if (result == 0 && current_receive_codec.plType == pl_type) { 446 if (result == 0 && current_receive_codec.plType == pl_type) {
454 result = vcm_->RegisterReceiveCodec(&current_receive_codec, 447 result = vcm_->RegisterReceiveCodec(&current_receive_codec,
455 number_of_cores_, false); 448 number_of_cores_, false);
456 } 449 }
457 return result; 450 return result;
458 } 451 }
459 452
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 CriticalSectionScoped cs(crit_.get()); 1237 CriticalSectionScoped cs(crit_.get());
1245 receive_stats_callback_ = receive_statistics_proxy; 1238 receive_stats_callback_ = receive_statistics_proxy;
1246 } 1239 }
1247 1240
1248 void ViEChannel::SetIncomingVideoStream( 1241 void ViEChannel::SetIncomingVideoStream(
1249 IncomingVideoStream* incoming_video_stream) { 1242 IncomingVideoStream* incoming_video_stream) {
1250 CriticalSectionScoped cs(crit_.get()); 1243 CriticalSectionScoped cs(crit_.get());
1251 incoming_video_stream_ = incoming_video_stream; 1244 incoming_video_stream_ = incoming_video_stream;
1252 } 1245 }
1253 } // namespace webrtc 1246 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698