Remove mutable from rtc::CriticalSection members.
rtc::CriticalSection is now lockable from const methods and no longer need to remain mutable. BUG= R=tommi@webrtc.org Review URL: https://codereview.webrtc.org/1613643004 Cr-Commit-Position: refs/heads/master@{#11367}
This commit is contained in:
@ -281,7 +281,7 @@ class AcmReceiver {
|
||||
|
||||
uint32_t NowInTimestamp(int decoder_sampling_rate) const;
|
||||
|
||||
mutable rtc::CriticalSection crit_sect_;
|
||||
rtc::CriticalSection crit_sect_;
|
||||
int id_; // TODO(henrik.lundin) Make const.
|
||||
const Decoder* last_audio_decoder_ GUARDED_BY(crit_sect_);
|
||||
AudioFrame::VADActivity previous_audio_activity_ GUARDED_BY(crit_sect_);
|
||||
|
@ -240,7 +240,7 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
|
||||
// to |index|.
|
||||
int UpdateUponReceivingCodec(int index);
|
||||
|
||||
mutable rtc::CriticalSection acm_crit_sect_;
|
||||
rtc::CriticalSection acm_crit_sect_;
|
||||
rtc::Buffer encode_buffer_ GUARDED_BY(acm_crit_sect_);
|
||||
int id_; // TODO(henrik.lundin) Make const.
|
||||
uint32_t expected_codec_ts_ GUARDED_BY(acm_crit_sect_);
|
||||
@ -274,7 +274,7 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
|
||||
uint32_t last_timestamp_ GUARDED_BY(acm_crit_sect_);
|
||||
uint32_t last_rtp_timestamp_ GUARDED_BY(acm_crit_sect_);
|
||||
|
||||
mutable rtc::CriticalSection callback_crit_sect_;
|
||||
rtc::CriticalSection callback_crit_sect_;
|
||||
AudioPacketizationCallback* packetization_callback_
|
||||
GUARDED_BY(callback_crit_sect_);
|
||||
ACMVADCallback* vad_callback_ GUARDED_BY(callback_crit_sect_);
|
||||
|
@ -147,7 +147,7 @@ class PacketizationCallbackStubOldApi : public AudioPacketizationCallback {
|
||||
int last_payload_type_ GUARDED_BY(crit_sect_);
|
||||
uint32_t last_timestamp_ GUARDED_BY(crit_sect_);
|
||||
std::vector<uint8_t> last_payload_vec_ GUARDED_BY(crit_sect_);
|
||||
mutable rtc::CriticalSection crit_sect_;
|
||||
rtc::CriticalSection crit_sect_;
|
||||
};
|
||||
|
||||
class AudioCodingModuleTestOldApi : public ::testing::Test {
|
||||
@ -579,7 +579,7 @@ class AudioCodingModuleMtTestOldApi : public AudioCodingModuleTestOldApi {
|
||||
int send_count_;
|
||||
int insert_packet_count_;
|
||||
int pull_audio_count_ GUARDED_BY(crit_sect_);
|
||||
mutable rtc::CriticalSection crit_sect_;
|
||||
rtc::CriticalSection crit_sect_;
|
||||
int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<SimulatedClock> fake_clock_;
|
||||
};
|
||||
@ -842,7 +842,7 @@ class AcmReRegisterIsacMtTestOldApi : public AudioCodingModuleTestOldApi {
|
||||
rtc::PlatformThread receive_thread_;
|
||||
rtc::PlatformThread codec_registration_thread_;
|
||||
const rtc::scoped_ptr<EventWrapper> test_complete_;
|
||||
mutable rtc::CriticalSection crit_sect_;
|
||||
rtc::CriticalSection crit_sect_;
|
||||
bool codec_registered_ GUARDED_BY(crit_sect_);
|
||||
int receive_packet_count_ GUARDED_BY(crit_sect_);
|
||||
int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_);
|
||||
|
@ -36,7 +36,7 @@ class LockedIsacBandwidthInfo final {
|
||||
}
|
||||
|
||||
private:
|
||||
mutable rtc::CriticalSection lock_;
|
||||
rtc::CriticalSection lock_;
|
||||
IsacBandwidthInfo bwinfo_ GUARDED_BY(lock_);
|
||||
};
|
||||
|
||||
|
@ -338,7 +338,7 @@ class NetEqImpl : public webrtc::NetEq {
|
||||
// Creates DecisionLogic object with the mode given by |playout_mode_|.
|
||||
virtual void CreateDecisionLogic() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
||||
|
||||
mutable rtc::CriticalSection crit_sect_;
|
||||
rtc::CriticalSection crit_sect_;
|
||||
const rtc::scoped_ptr<BufferLevelFilter> buffer_level_filter_
|
||||
GUARDED_BY(crit_sect_);
|
||||
const rtc::scoped_ptr<DecoderDatabase> decoder_database_
|
||||
|
@ -100,7 +100,7 @@ class Channel : public AudioPacketizationCallback {
|
||||
// 60msec * 32 sample(max)/msec * 2 description (maybe) * 2 bytes/sample
|
||||
uint8_t _payloadData[60 * 32 * 2 * 2];
|
||||
|
||||
mutable rtc::CriticalSection _channelCritSect;
|
||||
rtc::CriticalSection _channelCritSect;
|
||||
FILE* _bitStreamFile;
|
||||
bool _saveBitStream;
|
||||
int16_t _lastPayloadType;
|
||||
|
Reference in New Issue
Block a user