diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-07-23 23:07:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-07-23 23:07:18 +0000 |
commit | 9e9b79187bff6d54f8e15db1978c157f8dda9335 (patch) | |
tree | 9ba6a46a7e4cd59e1018b94136f46578efe31f2e /modules/video_coding/video_receiver.cc | |
parent | 37f9b0ea9ea6a8c490bdb0dc2f44a586b01c8ab2 (diff) | |
parent | 206ccd0b36df69a0d0d0d26ddf7c4ead20202f91 (diff) | |
download | webrtc-9e9b79187bff6d54f8e15db1978c157f8dda9335.tar.gz |
Merge changes Ida3bfe62,I2d596942
* changes:
Merge remote tracking branch 'upstream-master'
Generate new Android.bp file and correct build errors
Diffstat (limited to 'modules/video_coding/video_receiver.cc')
-rw-r--r-- | modules/video_coding/video_receiver.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/video_coding/video_receiver.cc b/modules/video_coding/video_receiver.cc index a817293f2f..a227a8c337 100644 --- a/modules/video_coding/video_receiver.cc +++ b/modules/video_coding/video_receiver.cc @@ -31,7 +31,6 @@ #include "modules/video_coding/timing.h" #include "modules/video_coding/video_coding_impl.h" #include "rtc_base/checks.h" -#include "rtc_base/critical_section.h" #include "rtc_base/location.h" #include "rtc_base/logging.h" #include "rtc_base/one_time_event.h" @@ -71,7 +70,7 @@ void VideoReceiver::Process() { _keyRequestTimer.Processed(); bool request_key_frame = _frameTypeCallback != nullptr; if (request_key_frame) { - rtc::CritScope cs(&process_crit_); + MutexLock lock(&process_mutex_); request_key_frame = _scheduleKeyRequest; } if (request_key_frame) @@ -94,7 +93,7 @@ void VideoReceiver::Process() { ret = RequestKeyFrame(); } if (ret == VCM_OK && !nackList.empty()) { - rtc::CritScope cs(&process_crit_); + MutexLock lock(&process_mutex_); if (_packetRequestCallback != nullptr) { _packetRequestCallback->ResendPackets(&nackList[0], nackList.size()); } @@ -183,7 +182,7 @@ int32_t VideoReceiver::Decode(uint16_t maxWaitTimeMs) { bool drop_frame = false; { - rtc::CritScope cs(&process_crit_); + MutexLock lock(&process_mutex_); if (drop_frames_until_keyframe_) { // Still getting delta frames, schedule another keyframe request as if // decode failed. @@ -229,7 +228,7 @@ int32_t VideoReceiver::RequestKeyFrame() { if (ret < 0) { return ret; } - rtc::CritScope cs(&process_crit_); + MutexLock lock(&process_mutex_); _scheduleKeyRequest = false; } else { return VCM_MISSING_CALLBACK; @@ -291,7 +290,7 @@ int32_t VideoReceiver::IncomingPacket(const uint8_t* incomingPayload, // request scheduling to throttle the requests. if (ret == VCM_FLUSH_INDICATOR) { { - rtc::CritScope cs(&process_crit_); + MutexLock lock(&process_mutex_); drop_frames_until_keyframe_ = true; } RequestKeyFrame(); |