Delete master_timing argument to VCMTiming.

Makes construction simpler, and allows the ts_extrapolator_ pointer
to be marked const.

Followup to https://webrtc-review.googlesource.com/c/src/+/190721

Bug: webrtc:12102
Change-Id: I2abeb960935b5470509f654a4a9d5121c8001900
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190981
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32535}
This commit is contained in:
Niels Möller
2020-10-30 10:44:52 +01:00
committed by Commit Bot
parent 36274f9158
commit 043725fefd
2 changed files with 11 additions and 23 deletions

View File

@ -19,6 +19,7 @@
#include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/thread_annotations.h"
#include "rtc_base/time/timestamp_extrapolator.h"
namespace webrtc {
@ -27,10 +28,8 @@ class TimestampExtrapolator;
class VCMTiming {
public:
// The primary timing component should be passed
// if this is the dual timing component.
explicit VCMTiming(Clock* clock, VCMTiming* master_timing = NULL);
virtual ~VCMTiming();
explicit VCMTiming(Clock* clock);
virtual ~VCMTiming() = default;
// Resets the timing to the initial state.
void Reset();
@ -117,8 +116,7 @@ class VCMTiming {
private:
mutable Mutex mutex_;
Clock* const clock_;
bool master_ RTC_GUARDED_BY(mutex_);
TimestampExtrapolator* ts_extrapolator_ RTC_GUARDED_BY(mutex_)
const std::unique_ptr<TimestampExtrapolator> ts_extrapolator_
RTC_PT_GUARDED_BY(mutex_);
std::unique_ptr<VCMCodecTimer> codec_timer_ RTC_GUARDED_BY(mutex_)
RTC_PT_GUARDED_BY(mutex_);