Migrate modules/video_coding to webrtc::Mutex.

Bug: webrtc:11567
Change-Id: I8023fbe7595f7ba8ae7c7db3583fc2e560ec3df2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178803
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31644}
This commit is contained in:
Markus Handell
2020-07-07 12:17:12 +02:00
committed by Commit Bot
parent fb6f975401
commit 6deec38ede
23 changed files with 190 additions and 191 deletions

View File

@ -24,6 +24,7 @@
#include "modules/video_coding/receiver.h"
#include "modules/video_coding/timing.h"
#include "rtc_base/one_time_event.h"
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/synchronization/sequence_checker.h"
#include "rtc_base/thread_annotations.h"
#include "rtc_base/thread_checker.h"
@ -100,7 +101,7 @@ class VideoReceiver : public Module {
rtc::ThreadChecker decoder_thread_checker_;
rtc::ThreadChecker module_thread_checker_;
Clock* const clock_;
rtc::CriticalSection process_crit_;
Mutex process_mutex_;
VCMTiming* _timing;
VCMReceiver _receiver;
VCMDecodedFrameCallback _decodedFrameCallback;
@ -111,8 +112,8 @@ class VideoReceiver : public Module {
VCMPacketRequestCallback* _packetRequestCallback;
// Used on both the module and decoder thread.
bool _scheduleKeyRequest RTC_GUARDED_BY(process_crit_);
bool drop_frames_until_keyframe_ RTC_GUARDED_BY(process_crit_);
bool _scheduleKeyRequest RTC_GUARDED_BY(process_mutex_);
bool drop_frames_until_keyframe_ RTC_GUARDED_BY(process_mutex_);
// Modified on the construction thread while not attached to the process
// thread. Once attached to the process thread, its value is only read