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

Side by Side Diff: webrtc/modules/video_coding/video_receiver.cc

Issue 2744813002: Start documenting the threading model (Closed)
Patch Set: Convert thread checks in Android code to DCHECKs Created 3 years, 9 months 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) 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 request_key_frame = true; 351 request_key_frame = true;
352 ret = VCM_OK; 352 ret = VCM_OK;
353 } 353 }
354 if (request_key_frame) { 354 if (request_key_frame) {
355 rtc::CritScope cs(&process_crit_); 355 rtc::CritScope cs(&process_crit_);
356 _scheduleKeyRequest = true; 356 _scheduleKeyRequest = true;
357 } 357 }
358 return ret; 358 return ret;
359 } 359 }
360 360
361 void VideoReceiver::PollDecodedFrames() {
362 if (_decoder)
363 _decoder->PollDecodedFrames();
364 }
365
361 // Register possible receive codecs, can be called multiple times 366 // Register possible receive codecs, can be called multiple times
362 int32_t VideoReceiver::RegisterReceiveCodec(const VideoCodec* receiveCodec, 367 int32_t VideoReceiver::RegisterReceiveCodec(const VideoCodec* receiveCodec,
363 int32_t numberOfCores, 368 int32_t numberOfCores,
364 bool requireKeyFrame) { 369 bool requireKeyFrame) {
365 rtc::CritScope cs(&receive_crit_); 370 rtc::CritScope cs(&receive_crit_);
366 if (receiveCodec == nullptr) { 371 if (receiveCodec == nullptr) {
367 return VCM_PARAMETER_ERROR; 372 return VCM_PARAMETER_ERROR;
368 } 373 }
369 if (!_codecDataBase.RegisterReceiveCodec(receiveCodec, numberOfCores, 374 if (!_codecDataBase.RegisterReceiveCodec(receiveCodec, numberOfCores,
370 requireKeyFrame)) { 375 requireKeyFrame)) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 _receiver.SetNackSettings(max_nack_list_size, max_packet_age_to_nack, 501 _receiver.SetNackSettings(max_nack_list_size, max_packet_age_to_nack,
497 max_incomplete_time_ms); 502 max_incomplete_time_ms);
498 } 503 }
499 504
500 int VideoReceiver::SetMinReceiverDelay(int desired_delay_ms) { 505 int VideoReceiver::SetMinReceiverDelay(int desired_delay_ms) {
501 return _receiver.SetMinReceiverDelay(desired_delay_ms); 506 return _receiver.SetMinReceiverDelay(desired_delay_ms);
502 } 507 }
503 508
504 } // namespace vcm 509 } // namespace vcm
505 } // namespace webrtc 510 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/video_coding_impl.h ('k') | webrtc/sdk/android/src/jni/androidmediadecoder_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698