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:
committed by
Commit Bot
parent
fb6f975401
commit
6deec38ede
@ -16,7 +16,7 @@
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/video/video_timing.h"
|
||||
#include "modules/video_coding/codec_timer.h"
|
||||
#include "rtc_base/critical_section.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -104,30 +104,30 @@ class VCMTiming {
|
||||
enum { kDelayMaxChangeMsPerS = 100 };
|
||||
|
||||
protected:
|
||||
int RequiredDecodeTimeMs() const RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
||||
int RequiredDecodeTimeMs() const RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
|
||||
int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const
|
||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
||||
int TargetDelayInternal() const RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
|
||||
int TargetDelayInternal() const RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
|
||||
|
||||
private:
|
||||
rtc::CriticalSection crit_sect_;
|
||||
mutable Mutex mutex_;
|
||||
Clock* const clock_;
|
||||
bool master_ RTC_GUARDED_BY(crit_sect_);
|
||||
TimestampExtrapolator* ts_extrapolator_ RTC_GUARDED_BY(crit_sect_);
|
||||
std::unique_ptr<VCMCodecTimer> codec_timer_ RTC_GUARDED_BY(crit_sect_);
|
||||
int render_delay_ms_ RTC_GUARDED_BY(crit_sect_);
|
||||
bool master_ RTC_GUARDED_BY(mutex_);
|
||||
TimestampExtrapolator* ts_extrapolator_ RTC_GUARDED_BY(mutex_);
|
||||
std::unique_ptr<VCMCodecTimer> codec_timer_ RTC_GUARDED_BY(mutex_);
|
||||
int render_delay_ms_ RTC_GUARDED_BY(mutex_);
|
||||
// Best-effort playout delay range for frames from capture to render.
|
||||
// The receiver tries to keep the delay between |min_playout_delay_ms_|
|
||||
// and |max_playout_delay_ms_| taking the network jitter into account.
|
||||
// A special case is where min_playout_delay_ms_ = max_playout_delay_ms_ = 0,
|
||||
// in which case the receiver tries to play the frames as they arrive.
|
||||
int min_playout_delay_ms_ RTC_GUARDED_BY(crit_sect_);
|
||||
int max_playout_delay_ms_ RTC_GUARDED_BY(crit_sect_);
|
||||
int jitter_delay_ms_ RTC_GUARDED_BY(crit_sect_);
|
||||
int current_delay_ms_ RTC_GUARDED_BY(crit_sect_);
|
||||
uint32_t prev_frame_timestamp_ RTC_GUARDED_BY(crit_sect_);
|
||||
absl::optional<TimingFrameInfo> timing_frame_info_ RTC_GUARDED_BY(crit_sect_);
|
||||
size_t num_decoded_frames_ RTC_GUARDED_BY(crit_sect_);
|
||||
int min_playout_delay_ms_ RTC_GUARDED_BY(mutex_);
|
||||
int max_playout_delay_ms_ RTC_GUARDED_BY(mutex_);
|
||||
int jitter_delay_ms_ RTC_GUARDED_BY(mutex_);
|
||||
int current_delay_ms_ RTC_GUARDED_BY(mutex_);
|
||||
uint32_t prev_frame_timestamp_ RTC_GUARDED_BY(mutex_);
|
||||
absl::optional<TimingFrameInfo> timing_frame_info_ RTC_GUARDED_BY(mutex_);
|
||||
size_t num_decoded_frames_ RTC_GUARDED_BY(mutex_);
|
||||
};
|
||||
} // namespace webrtc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user