Remove mutable from rtc::CriticalSections.
A couple of mutables were added after last removal of mutables, so removing those. rtc::CriticalSection is const-lockable. BUG= R=tommi@webrtc.org Review URL: https://codereview.webrtc.org/1652983002 Cr-Commit-Position: refs/heads/master@{#11447}
This commit is contained in:
parent
34877eeec9
commit
d8de1154c9
@ -60,7 +60,7 @@ class CallStats : public Module {
|
||||
private:
|
||||
Clock* const clock_;
|
||||
// Protecting all members.
|
||||
mutable rtc::CriticalSection crit_;
|
||||
rtc::CriticalSection crit_;
|
||||
// Observer receiving statistics updates.
|
||||
rtc::scoped_ptr<RtcpRttStats> rtcp_rtt_stats_;
|
||||
// The last time 'Process' resulted in statistic update.
|
||||
|
||||
@ -55,7 +55,7 @@ class EncoderStateFeedback {
|
||||
private:
|
||||
typedef std::map<uint32_t, ViEEncoder*> SsrcEncoderMap;
|
||||
|
||||
mutable rtc::CriticalSection crit_;
|
||||
rtc::CriticalSection crit_;
|
||||
|
||||
// Instance registered at the class requesting new key frames.
|
||||
rtc::scoped_ptr<EncoderStateFeedbackObserver> observer_;
|
||||
|
||||
@ -69,7 +69,7 @@ class PayloadRouter {
|
||||
private:
|
||||
// TODO(mflodman): When the new video API has launched, remove crit_ and
|
||||
// assume rtp_modules_ will never change during a call.
|
||||
mutable rtc::CriticalSection crit_;
|
||||
rtc::CriticalSection crit_;
|
||||
|
||||
// Active sending RTP modules, in layer order.
|
||||
std::vector<RtpRtcp*> rtp_modules_ GUARDED_BY(crit_);
|
||||
|
||||
@ -63,7 +63,7 @@ class VideoCaptureInput : public webrtc::VideoCaptureInput {
|
||||
static bool EncoderThreadFunction(void* obj);
|
||||
bool EncoderProcess();
|
||||
|
||||
mutable rtc::CriticalSection crit_;
|
||||
rtc::CriticalSection crit_;
|
||||
ProcessThread* const module_process_thread_;
|
||||
|
||||
VideoCaptureCallback* const frame_callback_;
|
||||
|
||||
@ -332,7 +332,7 @@ class ViEChannel : public VCMFrameTypeCallback,
|
||||
// Note: this should be implemented with a RW-lock to allow simultaneous
|
||||
// calls into the callback. However that doesn't seem to be needed for the
|
||||
// current type of callbacks covered by this class.
|
||||
mutable rtc::CriticalSection critsect_;
|
||||
rtc::CriticalSection critsect_;
|
||||
T* callback_ GUARDED_BY(critsect_);
|
||||
|
||||
private:
|
||||
@ -403,7 +403,7 @@ class ViEChannel : public VCMFrameTypeCallback,
|
||||
ProcessThread* const module_process_thread_;
|
||||
|
||||
// Used for all registered callbacks except rendering.
|
||||
mutable rtc::CriticalSection crit_;
|
||||
rtc::CriticalSection crit_;
|
||||
|
||||
// Owned modules/classes.
|
||||
rtc::scoped_refptr<PayloadRouter> send_payload_router_;
|
||||
|
||||
@ -158,7 +158,7 @@ class ViEEncoder : public RtcpIntraFrameObserver,
|
||||
const rtc::scoped_ptr<VideoCodingModule> vcm_;
|
||||
rtc::scoped_refptr<PayloadRouter> send_payload_router_;
|
||||
|
||||
mutable rtc::CriticalSection data_cs_;
|
||||
rtc::CriticalSection data_cs_;
|
||||
rtc::scoped_ptr<BitrateObserver> bitrate_observer_;
|
||||
|
||||
SendStatisticsProxy* const stats_proxy_;
|
||||
|
||||
@ -58,7 +58,7 @@ class VieRemb : public RemoteBitrateObserver {
|
||||
typedef std::list<RtpRtcp*> RtpModules;
|
||||
|
||||
Clock* const clock_;
|
||||
mutable rtc::CriticalSection list_crit_;
|
||||
rtc::CriticalSection list_crit_;
|
||||
|
||||
// The last time a REMB was sent.
|
||||
int64_t last_remb_time_;
|
||||
|
||||
@ -152,7 +152,7 @@ class ChannelState {
|
||||
}
|
||||
|
||||
private:
|
||||
mutable rtc::CriticalSection lock_;
|
||||
rtc::CriticalSection lock_;
|
||||
State state_;
|
||||
};
|
||||
|
||||
@ -483,9 +483,9 @@ class Channel
|
||||
int32_t GetPlayoutFrequency();
|
||||
int64_t GetRTT(bool allow_associate_channel) const;
|
||||
|
||||
mutable rtc::CriticalSection _fileCritSect;
|
||||
mutable rtc::CriticalSection _callbackCritSect;
|
||||
mutable rtc::CriticalSection volume_settings_critsect_;
|
||||
rtc::CriticalSection _fileCritSect;
|
||||
rtc::CriticalSection _callbackCritSect;
|
||||
rtc::CriticalSection volume_settings_critsect_;
|
||||
uint32_t _instanceId;
|
||||
int32_t _channelId;
|
||||
|
||||
@ -533,7 +533,7 @@ class Channel
|
||||
uint16_t send_sequence_number_;
|
||||
uint8_t restored_packet_[kVoiceEngineMaxIpPacketSizeBytes];
|
||||
|
||||
mutable rtc::CriticalSection ts_stats_lock_;
|
||||
rtc::CriticalSection ts_stats_lock_;
|
||||
|
||||
rtc::scoped_ptr<rtc::TimestampWrapAroundHandler> rtp_ts_wraparound_handler_;
|
||||
// The rtp timestamp of the first played out audio frame.
|
||||
@ -574,7 +574,7 @@ class Channel
|
||||
// VoENetwork
|
||||
AudioFrame::SpeechType _outputSpeechType;
|
||||
// VoEVideoSync
|
||||
mutable rtc::CriticalSection video_sync_lock_;
|
||||
rtc::CriticalSection video_sync_lock_;
|
||||
uint32_t _average_jitter_buffer_delay_us GUARDED_BY(video_sync_lock_);
|
||||
uint32_t _previousTimestamp;
|
||||
uint16_t _recPacketDelayMs GUARDED_BY(video_sync_lock_);
|
||||
@ -587,7 +587,7 @@ class Channel
|
||||
rtc::scoped_ptr<VoERtcpObserver> rtcp_observer_;
|
||||
rtc::scoped_ptr<NetworkPredictor> network_predictor_;
|
||||
// An associated send channel.
|
||||
mutable rtc::CriticalSection assoc_send_channel_lock_;
|
||||
rtc::CriticalSection assoc_send_channel_lock_;
|
||||
ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_);
|
||||
|
||||
bool pacing_enabled_;
|
||||
|
||||
@ -123,7 +123,7 @@ class ChannelManager {
|
||||
|
||||
Atomic32 last_channel_id_;
|
||||
|
||||
mutable rtc::CriticalSection lock_;
|
||||
rtc::CriticalSection lock_;
|
||||
std::vector<ChannelOwner> channels_;
|
||||
|
||||
const Config& config_;
|
||||
|
||||
@ -67,7 +67,7 @@ private:
|
||||
int16_t length);
|
||||
|
||||
private:
|
||||
mutable rtc::CriticalSection _critSect;
|
||||
rtc::CriticalSection _critSect;
|
||||
int32_t _id;
|
||||
uint16_t _outputFrequencyHz; // {8000, 16000, 32000}
|
||||
int16_t _oldOutputLow[2]; // Data needed for oscillator model
|
||||
|
||||
@ -40,7 +40,7 @@ public:
|
||||
private:
|
||||
enum { kUpdateFrequency = 10};
|
||||
|
||||
mutable rtc::CriticalSection _critSect;
|
||||
rtc::CriticalSection _critSect;
|
||||
|
||||
int16_t _absMax;
|
||||
int16_t _count;
|
||||
|
||||
@ -63,7 +63,7 @@ public:
|
||||
|
||||
protected:
|
||||
const uint32_t _instanceId;
|
||||
mutable rtc::CriticalSection _apiCritPtr;
|
||||
rtc::CriticalSection _apiCritPtr;
|
||||
ChannelManager _channelManager;
|
||||
Statistics _engineStatistics;
|
||||
AudioDeviceModule* _audioDevicePtr;
|
||||
|
||||
@ -39,7 +39,7 @@ class Statistics
|
||||
int32_t LastError() const;
|
||||
|
||||
private:
|
||||
mutable rtc::CriticalSection lock_;
|
||||
rtc::CriticalSection lock_;
|
||||
const uint32_t _instanceId;
|
||||
mutable int32_t _lastError;
|
||||
bool _isInitialized;
|
||||
|
||||
@ -128,8 +128,8 @@ class ConferenceTransport: public webrtc::Transport {
|
||||
void SendPacket(const Packet& packet);
|
||||
bool DispatchPackets();
|
||||
|
||||
mutable rtc::CriticalSection pq_crit_;
|
||||
mutable rtc::CriticalSection stream_crit_;
|
||||
rtc::CriticalSection pq_crit_;
|
||||
rtc::CriticalSection stream_crit_;
|
||||
const rtc::scoped_ptr<webrtc::EventWrapper> packet_event_;
|
||||
rtc::PlatformThread thread_;
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ class LoopBackTransport : public webrtc::Transport {
|
||||
return true;
|
||||
}
|
||||
|
||||
mutable rtc::CriticalSection crit_;
|
||||
rtc::CriticalSection crit_;
|
||||
const rtc::scoped_ptr<webrtc::EventWrapper> packet_event_;
|
||||
rtc::PlatformThread thread_;
|
||||
std::deque<Packet> packet_queue_ GUARDED_BY(crit_);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user