diff --git a/src/modules/rtp_rtcp/source/rtp_packet_history.cc b/src/modules/rtp_rtcp/source/rtp_packet_history.cc index df5caf113..791fbf96d 100644 --- a/src/modules/rtp_rtcp/source/rtp_packet_history.cc +++ b/src/modules/rtp_rtcp/source/rtp_packet_history.cc @@ -43,7 +43,7 @@ void RTPPacketHistory::SetStorePacketsStatus(bool enable, void RTPPacketHistory::Allocate(uint16_t number_to_store) { assert(number_to_store > 0); - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); if (store_) { WEBRTC_TRACE(kTraceWarning, kTraceRtpRtcp, -1, "SetStorePacketsStatus already set, number: %d", number_to_store); @@ -60,7 +60,7 @@ void RTPPacketHistory::Allocate(uint16_t number_to_store) { } void RTPPacketHistory::Free() { - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); if (!store_) { return; } @@ -83,7 +83,7 @@ void RTPPacketHistory::Free() { } bool RTPPacketHistory::StorePackets() const { - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); return store_; } @@ -114,7 +114,7 @@ int32_t RTPPacketHistory::PutRTPPacket(const uint8_t* packet, return 0; } - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); if (!store_) { return 0; } @@ -152,7 +152,7 @@ int32_t RTPPacketHistory::PutRTPPacket(const uint8_t* packet, } bool RTPPacketHistory::HasRTPPacket(uint16_t sequence_number) const { - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); if (!store_) { return false; } @@ -177,7 +177,7 @@ bool RTPPacketHistory::GetRTPPacket(uint16_t sequence_number, uint16_t* packet_length, int64_t* stored_time_ms, StorageType* type) const { - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); if (!store_) { return false; } @@ -224,7 +224,7 @@ bool RTPPacketHistory::GetRTPPacket(uint16_t sequence_number, } void RTPPacketHistory::UpdateResendTime(uint16_t sequence_number) { - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); if (!store_) { return; } diff --git a/src/modules/rtp_rtcp/source/transmission_bucket.cc b/src/modules/rtp_rtcp/source/transmission_bucket.cc index 6808b104d..8b9af2da7 100644 --- a/src/modules/rtp_rtcp/source/transmission_bucket.cc +++ b/src/modules/rtp_rtcp/source/transmission_bucket.cc @@ -49,7 +49,7 @@ TransmissionBucket::~TransmissionBucket() { } void TransmissionBucket::Reset() { - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); accumulator_ = 0; bytes_rem_interval_ = 0; packets_.clear(); @@ -58,7 +58,7 @@ void TransmissionBucket::Reset() { void TransmissionBucket::Fill(uint16_t seq_num, uint32_t timestamp, uint16_t num_bytes) { - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); accumulator_ += num_bytes; Packet p(seq_num, timestamp, num_bytes, clock_->GetTimeInMS()); @@ -66,14 +66,14 @@ void TransmissionBucket::Fill(uint16_t seq_num, } bool TransmissionBucket::Empty() { - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); return packets_.empty(); } void TransmissionBucket::UpdateBytesPerInterval( uint32_t delta_time_ms, uint16_t target_bitrate_kbps) { - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); uint32_t bytes_per_interval = kBytesPerIntervalMargin * (target_bitrate_kbps * delta_time_ms / 8); @@ -86,7 +86,7 @@ void TransmissionBucket::UpdateBytesPerInterval( } int32_t TransmissionBucket::GetNextPacket() { - webrtc::CriticalSectionScoped cs(*critsect_); + CriticalSectionScoped cs(critsect_); if (accumulator_ == 0) { // Empty. diff --git a/src/modules/video_processing/main/source/video_processing_impl.cc b/src/modules/video_processing/main/source/video_processing_impl.cc index 3619996d0..8a470a93e 100644 --- a/src/modules/video_processing/main/source/video_processing_impl.cc +++ b/src/modules/video_processing/main/source/video_processing_impl.cc @@ -65,7 +65,7 @@ VideoProcessingModule::Destroy(VideoProcessingModule* module) WebRtc_Word32 VideoProcessingModuleImpl::ChangeUniqueId(const WebRtc_Word32 id) { - CriticalSectionScoped mutex(_mutex); + CriticalSectionScoped mutex(&_mutex); _id = id; _brightnessDetection.ChangeUniqueId(id); _deflickering.ChangeUniqueId(id); @@ -77,7 +77,7 @@ VideoProcessingModuleImpl::ChangeUniqueId(const WebRtc_Word32 id) WebRtc_Word32 VideoProcessingModuleImpl::Id() const { - CriticalSectionScoped mutex(_mutex); + CriticalSectionScoped mutex(&_mutex); return _id; } @@ -103,7 +103,7 @@ VideoProcessingModuleImpl::~VideoProcessingModuleImpl() void VideoProcessingModuleImpl::Reset() { - CriticalSectionScoped mutex(_mutex); + CriticalSectionScoped mutex(&_mutex); _deflickering.Reset(); _denoising.Reset(); _brightnessDetection.Reset(); @@ -225,7 +225,7 @@ VideoProcessingModuleImpl::Deflickering(WebRtc_UWord8* frame, const WebRtc_UWord32 timestamp, FrameStats& stats) { - CriticalSectionScoped mutex(_mutex); + CriticalSectionScoped mutex(&_mutex); return _deflickering.ProcessFrame(frame, width, height, timestamp, stats); } @@ -240,7 +240,7 @@ VideoProcessingModuleImpl::Denoising(WebRtc_UWord8* frame, const WebRtc_UWord32 width, const WebRtc_UWord32 height) { - CriticalSectionScoped mutex(_mutex); + CriticalSectionScoped mutex(&_mutex); return _denoising.ProcessFrame(frame, width, height); } @@ -257,7 +257,7 @@ VideoProcessingModuleImpl::BrightnessDetection(const WebRtc_UWord8* frame, const WebRtc_UWord32 height, const FrameStats& stats) { - CriticalSectionScoped mutex(_mutex); + CriticalSectionScoped mutex(&_mutex); return _brightnessDetection.ProcessFrame(frame, width, height, stats); } @@ -265,7 +265,7 @@ VideoProcessingModuleImpl::BrightnessDetection(const WebRtc_UWord8* frame, void VideoProcessingModuleImpl::EnableTemporalDecimation(bool enable) { - CriticalSectionScoped mutex(_mutex); + CriticalSectionScoped mutex(&_mutex); _framePreProcessor.EnableTemporalDecimation(enable); } @@ -273,14 +273,14 @@ VideoProcessingModuleImpl::EnableTemporalDecimation(bool enable) void VideoProcessingModuleImpl::SetInputFrameResampleMode(VideoFrameResampling resamplingMode) { - CriticalSectionScoped cs(_mutex); + CriticalSectionScoped cs(&_mutex); _framePreProcessor.SetInputFrameResampleMode(resamplingMode); } WebRtc_Word32 VideoProcessingModuleImpl::SetMaxFrameRate(WebRtc_UWord32 maxFrameRate) { - CriticalSectionScoped cs(_mutex); + CriticalSectionScoped cs(&_mutex); return _framePreProcessor.SetMaxFrameRate(maxFrameRate); } @@ -288,7 +288,7 @@ VideoProcessingModuleImpl::SetMaxFrameRate(WebRtc_UWord32 maxFrameRate) WebRtc_Word32 VideoProcessingModuleImpl::SetTargetResolution(WebRtc_UWord32 width, WebRtc_UWord32 height, WebRtc_UWord32 frameRate) { - CriticalSectionScoped cs(_mutex); + CriticalSectionScoped cs(&_mutex); return _framePreProcessor.SetTargetResolution(width, height, frameRate); } @@ -296,7 +296,7 @@ VideoProcessingModuleImpl::SetTargetResolution(WebRtc_UWord32 width, WebRtc_UWor WebRtc_UWord32 VideoProcessingModuleImpl::DecimatedFrameRate() { - CriticalSectionScoped cs(_mutex); + CriticalSectionScoped cs(&_mutex); return _framePreProcessor.DecimatedFrameRate(); } @@ -304,28 +304,28 @@ VideoProcessingModuleImpl::DecimatedFrameRate() WebRtc_UWord32 VideoProcessingModuleImpl::DecimatedWidth() const { - CriticalSectionScoped cs(_mutex); + CriticalSectionScoped cs(&_mutex); return _framePreProcessor.DecimatedWidth(); } WebRtc_UWord32 VideoProcessingModuleImpl::DecimatedHeight() const { - CriticalSectionScoped cs(_mutex); + CriticalSectionScoped cs(&_mutex); return _framePreProcessor.DecimatedHeight(); } WebRtc_Word32 VideoProcessingModuleImpl::PreprocessFrame(const VideoFrame *frame, VideoFrame **processedFrame) { - CriticalSectionScoped mutex(_mutex); + CriticalSectionScoped mutex(&_mutex); return _framePreProcessor.PreprocessFrame(frame, processedFrame); } VideoContentMetrics* VideoProcessingModuleImpl::ContentMetrics() const { - CriticalSectionScoped mutex(_mutex); + CriticalSectionScoped mutex(&_mutex); return _framePreProcessor.ContentMetrics(); } @@ -333,7 +333,7 @@ VideoProcessingModuleImpl::ContentMetrics() const void VideoProcessingModuleImpl::EnableContentAnalysis(bool enable) { - CriticalSectionScoped mutex(_mutex); + CriticalSectionScoped mutex(&_mutex); _framePreProcessor.EnableContentAnalysis(enable); } diff --git a/src/modules/video_render/main/source/incoming_video_stream.cc b/src/modules/video_render/main/source/incoming_video_stream.cc index 0a29482e4..637d60719 100644 --- a/src/modules/video_render/main/source/incoming_video_stream.cc +++ b/src/modules/video_render/main/source/incoming_video_stream.cc @@ -183,7 +183,7 @@ WebRtc_Word32 IncomingVideoStream::SetExpectedRenderDelay( "%s(%d) for stream %d", __FUNCTION__, delay_ms, stream_id_); return -1; } - CriticalSectionScoped cs(buffer_critsect_); + CriticalSectionScoped cs(&buffer_critsect_); return render_buffers_.SetRenderDelay(delay_ms); } diff --git a/src/modules/video_render/main/source/video_render_impl.cc b/src/modules/video_render/main/source/video_render_impl.cc index 6c273a805..a162ef62a 100644 --- a/src/modules/video_render/main/source/video_render_impl.cc +++ b/src/modules/video_render/main/source/video_render_impl.cc @@ -847,7 +847,7 @@ WebRtc_Word32 ModuleVideoRenderImpl::GetLastRenderedFrame( WebRtc_Word32 ModuleVideoRenderImpl::SetExpectedRenderDelay( WebRtc_UWord32 stream_id, WebRtc_Word32 delay_ms) { - CriticalSectionScoped cs(_moduleCrit); + CriticalSectionScoped cs(&_moduleCrit); if (!_ptrRenderer) { WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, diff --git a/src/video_engine/test/libvietest/helpers/vie_file_capture_device.cc b/src/video_engine/test/libvietest/helpers/vie_file_capture_device.cc index 5d6abfae9..db395204d 100644 --- a/src/video_engine/test/libvietest/helpers/vie_file_capture_device.cc +++ b/src/video_engine/test/libvietest/helpers/vie_file_capture_device.cc @@ -52,7 +52,7 @@ ViEFileCaptureDevice::~ViEFileCaptureDevice() { bool ViEFileCaptureDevice::OpenI420File(const std::string& path, int width, int height) { - webrtc::CriticalSectionScoped cs(*mutex_); + webrtc::CriticalSectionScoped cs(mutex_); assert(input_file_ == NULL); input_file_ = std::fopen(path.c_str(), "rb"); @@ -68,7 +68,7 @@ bool ViEFileCaptureDevice::OpenI420File(const std::string& path, void ViEFileCaptureDevice::ReadFileFor(uint64_t time_slice_ms, uint32_t max_fps) { - webrtc::CriticalSectionScoped cs(*mutex_); + webrtc::CriticalSectionScoped cs(mutex_); assert(input_file_ != NULL); unsigned char* frame_buffer = new unsigned char[frame_length_]; @@ -98,7 +98,7 @@ void ViEFileCaptureDevice::ReadFileFor(uint64_t time_slice_ms, } void ViEFileCaptureDevice::CloseFile() { - webrtc::CriticalSectionScoped cs(*mutex_); + webrtc::CriticalSectionScoped cs(mutex_); assert(input_file_ != NULL); std::fclose(input_file_); diff --git a/src/video_engine/test/libvietest/testbed/tb_external_transport.cc b/src/video_engine/test/libvietest/testbed/tb_external_transport.cc index 83de07e4f..c383848b7 100644 --- a/src/video_engine/test/libvietest/testbed/tb_external_transport.cc +++ b/src/video_engine/test/libvietest/testbed/tb_external_transport.cc @@ -267,27 +267,27 @@ int TbExternalTransport::SendRTCPPacket(int channel, const void *data, int len) WebRtc_Word32 TbExternalTransport::SetPacketLoss(WebRtc_Word32 lossRate) { - webrtc::CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(&_statCrit); _lossRate = lossRate; return 0; } void TbExternalTransport::SetNetworkDelay(WebRtc_Word64 delayMs) { - webrtc::CriticalSectionScoped cs(_crit); + webrtc::CriticalSectionScoped cs(&_crit); _networkDelayMs = delayMs; } void TbExternalTransport::SetSSRCFilter(WebRtc_UWord32 ssrc) { - webrtc::CriticalSectionScoped cs(_crit); + webrtc::CriticalSectionScoped cs(&_crit); _filterSSRC = true; _SSRC = ssrc; } void TbExternalTransport::ClearStats() { - webrtc::CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(&_statCrit); _rtpCount = 0; _dropCount = 0; _rtcpCount = 0; @@ -297,7 +297,7 @@ void TbExternalTransport::GetStats(WebRtc_Word32& numRtpPackets, WebRtc_Word32& numDroppedPackets, WebRtc_Word32& numRtcpPackets) { - webrtc::CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(&_statCrit); numRtpPackets = _rtpCount; numDroppedPackets = _dropCount; numRtcpPackets = _rtcpCount; @@ -305,25 +305,25 @@ void TbExternalTransport::GetStats(WebRtc_Word32& numRtpPackets, void TbExternalTransport::EnableSSRCCheck() { - webrtc::CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(&_statCrit); _checkSSRC = true; } unsigned int TbExternalTransport::ReceivedSSRC() { - webrtc::CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(&_statCrit); return _lastSSRC; } void TbExternalTransport::EnableSequenceNumberCheck() { - webrtc::CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(&_statCrit); _checkSequenceNumber = true; } unsigned short TbExternalTransport::GetFirstSequenceNumber() { - webrtc::CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(&_statCrit); return _firstSequenceNumber; } @@ -371,7 +371,7 @@ bool TbExternalTransport::ViEExternalTransportProcess() { unsigned int ssrc = 0; { - webrtc::CriticalSectionScoped cs(_statCrit); + webrtc::CriticalSectionScoped cs(&_statCrit); ssrc = ((packet->packetBuffer[8]) << 24); ssrc += (packet->packetBuffer[9] << 16); ssrc += (packet->packetBuffer[10] << 8); diff --git a/src/video_engine/vie_channel_manager.cc b/src/video_engine/vie_channel_manager.cc index ad181386c..a6b17eb26 100644 --- a/src/video_engine/vie_channel_manager.cc +++ b/src/video_engine/vie_channel_manager.cc @@ -82,7 +82,7 @@ void ViEChannelManager::SetModuleProcessThread( } int ViEChannelManager::CreateChannel(int* channel_id) { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); // Get a new channel id. int new_channel_id = FreeChannelId(); @@ -137,7 +137,7 @@ int ViEChannelManager::CreateChannel(int* channel_id) { int ViEChannelManager::CreateChannel(int* channel_id, int original_channel, bool sender) { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); ChannelGroup* channel_group = FindGroup(original_channel); if (!channel_group) { @@ -207,7 +207,7 @@ int ViEChannelManager::DeleteChannel(int channel_id) { ViEManagerWriteScoped wl(this); // Protect the maps. - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); ChannelMap::iterator c_it = channel_map_.find(channel_id); if (c_it == channel_map_.end()) { @@ -281,7 +281,7 @@ int ViEChannelManager::SetVoiceEngine(VoiceEngine* voice_engine) { // Write lock to make sure no one is using the channel. ViEManagerWriteScoped wl(this); - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); VoEVideoSync* sync_interface = NULL; if (voice_engine) { @@ -309,7 +309,7 @@ int ViEChannelManager::SetVoiceEngine(VoiceEngine* voice_engine) { int ViEChannelManager::ConnectVoiceChannel(int channel_id, int audio_channel_id) { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); if (!voice_sync_interface_) { WEBRTC_TRACE(kTraceError, kTraceVideo, ViEId(engine_id_, channel_id), "No VoE set"); @@ -323,7 +323,7 @@ int ViEChannelManager::ConnectVoiceChannel(int channel_id, } int ViEChannelManager::DisconnectVoiceChannel(int channel_id) { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); ViEChannel* channel = ViEChannelPtr(channel_id); if (channel) { channel->SetVoiceChannel(-1, NULL); @@ -333,13 +333,13 @@ int ViEChannelManager::DisconnectVoiceChannel(int channel_id) { } VoiceEngine* ViEChannelManager::GetVoiceEngine() { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); return voice_engine_; } bool ViEChannelManager::SetRembStatus(int channel_id, bool sender, bool receiver) { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); ChannelGroup* group = FindGroup(channel_id); if (!group) { return false; @@ -355,7 +355,7 @@ bool ViEChannelManager::SetRembStatus(int channel_id, bool sender, bool ViEChannelManager::SetBandwidthEstimationMode( BandwidthEstimationMode mode) { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); if (channel_groups_.size() > 0) { return false; } @@ -375,7 +375,7 @@ bool ViEChannelManager::SetBandwidthEstimationMode( void ViEChannelManager::UpdateSsrcs(int channel_id, const std::list& ssrcs) { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); ChannelGroup* channel_group = FindGroup(channel_id); if (channel_group == NULL) { return; @@ -435,7 +435,7 @@ bool ViEChannelManager::CreateChannelObject( } ViEChannel* ViEChannelManager::ViEChannelPtr(int channel_id) const { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); ChannelMap::const_iterator it = channel_map_.find(channel_id); if (it == channel_map_.end()) { WEBRTC_TRACE(kTraceError, kTraceVideo, ViEId(engine_id_), @@ -446,7 +446,7 @@ ViEChannel* ViEChannelManager::ViEChannelPtr(int channel_id) const { } ViEEncoder* ViEChannelManager::ViEEncoderPtr(int video_channel_id) const { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); EncoderMap::const_iterator it = vie_encoder_map_.find(video_channel_id); if (it == vie_encoder_map_.end()) { return NULL; @@ -470,7 +470,7 @@ int ViEChannelManager::FreeChannelId() { } void ViEChannelManager::ReturnChannelId(int channel_id) { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); assert(channel_id < kViEMaxNumberOfChannels + kViEChannelIdBase && channel_id >= kViEChannelIdBase); free_channel_ids_[channel_id - kViEChannelIdBase] = true; @@ -487,7 +487,7 @@ ChannelGroup* ViEChannelManager::FindGroup(int channel_id) { } bool ViEChannelManager::ChannelUsingViEEncoder(int channel_id) const { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); EncoderMap::const_iterator orig_it = vie_encoder_map_.find(channel_id); if (orig_it == vie_encoder_map_.end()) { // No ViEEncoder for this channel. @@ -510,7 +510,7 @@ bool ViEChannelManager::ChannelUsingViEEncoder(int channel_id) const { void ViEChannelManager::ChannelsUsingViEEncoder(int channel_id, ChannelList* channels) const { - CriticalSectionScoped cs(*channel_id_critsect_); + CriticalSectionScoped cs(channel_id_critsect_); EncoderMap::const_iterator orig_it = vie_encoder_map_.find(channel_id); for (ChannelMap::const_iterator c_it = channel_map_.begin(); diff --git a/src/video_engine/vie_file_player.cc b/src/video_engine/vie_file_player.cc index 1f01cad00..e7e45b9ae 100644 --- a/src/video_engine/vie_file_player.cc +++ b/src/video_engine/vie_file_player.cc @@ -289,7 +289,7 @@ int ViEFilePlayer::StopPlayAudio() { int ViEFilePlayer::Read(void* buf, int len) { // Protect from simultaneous reading from multiple channels. - CriticalSectionScoped lock(*audio_cs_); + CriticalSectionScoped lock(audio_cs_); if (NeedsAudioFromFile(buf)) { // We will run the VoE in 16KHz. if (file_player_->Get10msAudioFromFile(decoded_audio_, @@ -336,19 +336,19 @@ void ViEFilePlayer::PlayFileEnded(const WebRtc_Word32 id) { "%s: file_id %d", __FUNCTION__, id_); file_player_->StopPlayingFile(); - CriticalSectionScoped lock(*feedback_cs_); + CriticalSectionScoped lock(feedback_cs_); if (observer_) { observer_->PlayFileEnded(id_); } } bool ViEFilePlayer::IsObserverRegistered() { - CriticalSectionScoped lock(*feedback_cs_); + CriticalSectionScoped lock(feedback_cs_); return observer_ != NULL; } int ViEFilePlayer::RegisterObserver(ViEFileObserver* observer) { - CriticalSectionScoped lock(*feedback_cs_); + CriticalSectionScoped lock(feedback_cs_); if (observer_) { return -1; } @@ -357,7 +357,7 @@ int ViEFilePlayer::RegisterObserver(ViEFileObserver* observer) { } int ViEFilePlayer::DeRegisterObserver() { - CriticalSectionScoped lock(*feedback_cs_); + CriticalSectionScoped lock(feedback_cs_); observer_ = NULL; return 0; } @@ -383,7 +383,7 @@ int ViEFilePlayer::SendAudioOnChannel(const int audio_channel, } audio_channels_sending_.insert(audio_channel); - CriticalSectionScoped lock(*audio_cs_); + CriticalSectionScoped lock(audio_cs_); audio_clients_++; return 0; } @@ -410,7 +410,7 @@ int ViEFilePlayer::StopSendAudioOnChannel(const int audio_channel) { audio_channel); } audio_channels_sending_.erase(audio_channel); - CriticalSectionScoped lock(*audio_cs_); + CriticalSectionScoped lock(audio_cs_); audio_clients_--; assert(audio_clients_ >= 0); return 0; @@ -433,7 +433,7 @@ int ViEFilePlayer::PlayAudioLocally(const int audio_channel, return -1; } - CriticalSectionScoped lock(*audio_cs_); + CriticalSectionScoped lock(audio_cs_); local_audio_channel_ = audio_channel; audio_clients_++; return 0; @@ -452,7 +452,7 @@ int ViEFilePlayer::StopPlayAudioLocally(const int audio_channel) { return -1; } - CriticalSectionScoped lock(*audio_cs_); + CriticalSectionScoped lock(audio_cs_); local_audio_channel_ = -1; audio_clients_--; return 0; diff --git a/src/video_engine/vie_file_recorder.cc b/src/video_engine/vie_file_recorder.cc index 6f377c45b..cdb0d50ea 100644 --- a/src/video_engine/vie_file_recorder.cc +++ b/src/video_engine/vie_file_recorder.cc @@ -43,7 +43,7 @@ int ViEFileRecorder::StartRecording(const char* file_nameUTF8, const CodecInst& audio_codec_inst, VoiceEngine* voe_ptr, const FileFormats file_format) { - CriticalSectionScoped lock(*recorder_cs_); + CriticalSectionScoped lock(recorder_cs_); if (file_recorder_) { WEBRTC_TRACE(kTraceError, kTraceVideo, instance_id_, @@ -138,7 +138,7 @@ int ViEFileRecorder::StopRecording() { "audio"); } } - CriticalSectionScoped lock(*recorder_cs_); + CriticalSectionScoped lock(recorder_cs_); if (voe_file_interface_) { voe_file_interface_->Release(); voe_file_interface_ = NULL; @@ -160,27 +160,27 @@ int ViEFileRecorder::StopRecording() { } void ViEFileRecorder::SetFrameDelay(int frame_delay) { - CriticalSectionScoped lock(*recorder_cs_); + CriticalSectionScoped lock(recorder_cs_); frame_delay_ = frame_delay; } bool ViEFileRecorder::RecordingStarted() { - CriticalSectionScoped lock(*recorder_cs_); + CriticalSectionScoped lock(recorder_cs_); return file_recorder_ && file_recorder_->IsRecording(); } bool ViEFileRecorder::FirstFrameRecorded() { - CriticalSectionScoped lock(*recorder_cs_); + CriticalSectionScoped lock(recorder_cs_); return is_first_frame_recorded_; } bool ViEFileRecorder::IsRecordingFileFormat(const FileFormats file_format) { - CriticalSectionScoped lock(*recorder_cs_); + CriticalSectionScoped lock(recorder_cs_); return (file_recorder_->RecordingFileFormat() == file_format) ? true : false; } void ViEFileRecorder::RecordVideoFrame(const VideoFrame& video_frame) { - CriticalSectionScoped lock(*recorder_cs_); + CriticalSectionScoped lock(recorder_cs_); if (file_recorder_ && file_recorder_->IsRecording()) { if (!IsRecordingFileFormat(kFileFormatAviFile)) @@ -221,7 +221,7 @@ bool ViEFileRecorder::Write(const void* buf, int len) { AudioFrame::kUndefined, AudioFrame::kVadUnknown); - CriticalSectionScoped lock(*recorder_cs_); + CriticalSectionScoped lock(recorder_cs_); if (file_recorder_ && file_recorder_->IsRecording()) { TickTime tick_time = TickTime::Now(); file_recorder_->RecordAudioToFile(audio_frame, &tick_time);