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}
diff --git a/modules/video_coding/video_receiver.cc b/modules/video_coding/video_receiver.cc
index a817293..a227a8c 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 @@
     _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 @@
         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 @@
 
   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 @@
     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 @@
   // 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();