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

Side by Side Diff: voice_engine/voice_engine_impl.cc

Issue 3018523002: Clean out unused methods from VoiceEngine and VoEBase. (Closed)
Patch Set: rebase Created 3 years, 3 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
« no previous file with comments | « voice_engine/voice_engine_fixture.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 rtc::CritScope cs(crit_sec()); 67 rtc::CritScope cs(crit_sec());
68 RTC_DCHECK(statistics().Initialized()); 68 RTC_DCHECK(statistics().Initialized());
69 return std::unique_ptr<voe::ChannelProxy>( 69 return std::unique_ptr<voe::ChannelProxy>(
70 new voe::ChannelProxy(channel_manager().GetChannel(channel_id))); 70 new voe::ChannelProxy(channel_manager().GetChannel(channel_id)));
71 } 71 }
72 72
73 VoiceEngine* VoiceEngine::Create() { 73 VoiceEngine* VoiceEngine::Create() {
74 return GetVoiceEngine(); 74 return GetVoiceEngine();
75 } 75 }
76 76
77 int VoiceEngine::SetTraceFilter(unsigned int filter) {
78 WEBRTC_TRACE(kTraceApiCall, kTraceVoice,
79 VoEId(gVoiceEngineInstanceCounter, -1),
80 "SetTraceFilter(filter=0x%x)", filter);
81
82 // Remember old filter
83 uint32_t oldFilter = Trace::level_filter();
84 Trace::set_level_filter(filter);
85
86 // If previous log was ignored, log again after changing filter
87 if (kTraceNone == oldFilter) {
88 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, -1, "SetTraceFilter(filter=0x%x)",
89 filter);
90 }
91
92 return 0;
93 }
94
95 int VoiceEngine::SetTraceFile(const char* fileNameUTF8, bool addFileCounter) {
96 int ret = Trace::SetTraceFile(fileNameUTF8, addFileCounter);
97 WEBRTC_TRACE(kTraceApiCall, kTraceVoice,
98 VoEId(gVoiceEngineInstanceCounter, -1),
99 "SetTraceFile(fileNameUTF8=%s, addFileCounter=%d)", fileNameUTF8,
100 addFileCounter);
101 return (ret);
102 }
103
104 int VoiceEngine::SetTraceCallback(TraceCallback* callback) {
105 WEBRTC_TRACE(kTraceApiCall, kTraceVoice,
106 VoEId(gVoiceEngineInstanceCounter, -1),
107 "SetTraceCallback(callback=0x%x)", callback);
108 return (Trace::SetTraceCallback(callback));
109 }
110
111 bool VoiceEngine::Delete(VoiceEngine*& voiceEngine) { 77 bool VoiceEngine::Delete(VoiceEngine*& voiceEngine) {
112 if (voiceEngine == NULL) 78 if (voiceEngine == NULL)
113 return false; 79 return false;
114 80
115 VoiceEngineImpl* s = static_cast<VoiceEngineImpl*>(voiceEngine); 81 VoiceEngineImpl* s = static_cast<VoiceEngineImpl*>(voiceEngine);
116 // Release the reference that was added in GetVoiceEngine. 82 // Release the reference that was added in GetVoiceEngine.
117 int ref = s->Release(); 83 int ref = s->Release();
118 voiceEngine = NULL; 84 voiceEngine = NULL;
119 85
120 if (ref != 0) { 86 if (ref != 0) {
121 WEBRTC_TRACE( 87 WEBRTC_TRACE(
122 kTraceWarning, kTraceVoice, -1, 88 kTraceWarning, kTraceVoice, -1,
123 "VoiceEngine::Delete did not release the very last reference. " 89 "VoiceEngine::Delete did not release the very last reference. "
124 "%d references remain.", 90 "%d references remain.",
125 ref); 91 ref);
126 } 92 }
127 93
128 return true; 94 return true;
129 } 95 }
130
131 std::string VoiceEngine::GetVersionString() {
132 std::string version = "VoiceEngine 4.1.0";
133 #ifdef WEBRTC_EXTERNAL_TRANSPORT
134 version += " (External transport build)";
135 #endif
136 return version;
137 }
138
139 } // namespace webrtc 96 } // namespace webrtc
OLDNEW
« no previous file with comments | « voice_engine/voice_engine_fixture.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698