Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Side by Side Diff: webrtc/voice_engine/shared_data.cc

Issue 1477013005: Replace RefCountImpl with rtc::RefCountedObject. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 OutputMixer::Destroy(_outputMixerPtr); 49 OutputMixer::Destroy(_outputMixerPtr);
50 TransmitMixer::Destroy(_transmitMixerPtr); 50 TransmitMixer::Destroy(_transmitMixerPtr);
51 if (_audioDevicePtr) { 51 if (_audioDevicePtr) {
52 _audioDevicePtr->Release(); 52 _audioDevicePtr->Release();
53 } 53 }
54 delete _apiCritPtr; 54 delete _apiCritPtr;
55 _moduleProcessThreadPtr->Stop(); 55 _moduleProcessThreadPtr->Stop();
56 Trace::ReturnTrace(); 56 Trace::ReturnTrace();
57 } 57 }
58 58
59 void SharedData::set_audio_device(AudioDeviceModule* audio_device) 59 void SharedData::set_audio_device(
60 { 60 rtc::scoped_refptr<AudioDeviceModule> audio_device) {
61 // AddRef first in case the pointers are equal. 61 _audioDevicePtr = audio_device;
62 if (audio_device)
63 audio_device->AddRef();
64 if (_audioDevicePtr)
65 _audioDevicePtr->Release();
66 _audioDevicePtr = audio_device;
67 } 62 }
68 63
69 void SharedData::set_audio_processing(AudioProcessing* audioproc) { 64 void SharedData::set_audio_processing(AudioProcessing* audioproc) {
70 audioproc_.reset(audioproc); 65 audioproc_.reset(audioproc);
71 _transmitMixerPtr->SetAudioProcessingModule(audioproc); 66 _transmitMixerPtr->SetAudioProcessingModule(audioproc);
72 _outputMixerPtr->SetAudioProcessingModule(audioproc); 67 _outputMixerPtr->SetAudioProcessingModule(audioproc);
73 } 68 }
74 69
75 int SharedData::NumOfSendingChannels() { 70 int SharedData::NumOfSendingChannels() {
76 ChannelManager::Iterator it(&_channelManager); 71 ChannelManager::Iterator it(&_channelManager);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 103 }
109 104
110 void SharedData::SetLastError(int32_t error, TraceLevel level, 105 void SharedData::SetLastError(int32_t error, TraceLevel level,
111 const char* msg) const { 106 const char* msg) const {
112 _engineStatistics.SetLastError(error, level, msg); 107 _engineStatistics.SetLastError(error, level, msg);
113 } 108 }
114 109
115 } // namespace voe 110 } // namespace voe
116 111
117 } // namespace webrtc 112 } // namespace webrtc
OLDNEW
« webrtc/voice_engine/shared_data.h ('K') | « webrtc/voice_engine/shared_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698