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

Side by Side Diff: webrtc/voice_engine/channel_manager.h

Issue 2110113003: Reland of "Move RtcEventLog object from inside VoiceEngine to Call.", "Fix to make the start/stop f… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 5 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 | « webrtc/voice_engine/channel.cc ('k') | webrtc/voice_engine/channel_manager.cc » ('j') | 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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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
11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_MANAGER_H 11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_MANAGER_H
12 #define WEBRTC_VOICE_ENGINE_CHANNEL_MANAGER_H 12 #define WEBRTC_VOICE_ENGINE_CHANNEL_MANAGER_H
13 13
14 #include <memory> 14 #include <memory>
15 #include <vector> 15 #include <vector>
16 16
17 #include "webrtc/base/constructormagic.h" 17 #include "webrtc/base/constructormagic.h"
18 #include "webrtc/base/criticalsection.h" 18 #include "webrtc/base/criticalsection.h"
19 #include "webrtc/base/scoped_ref_ptr.h" 19 #include "webrtc/base/scoped_ref_ptr.h"
20 #include "webrtc/call/rtc_event_log.h"
21 #include "webrtc/system_wrappers/include/atomic32.h" 20 #include "webrtc/system_wrappers/include/atomic32.h"
22 #include "webrtc/typedefs.h" 21 #include "webrtc/typedefs.h"
23 22
24 namespace webrtc { 23 namespace webrtc {
25 24
26 class Config; 25 class Config;
27 class AudioDecoderFactory; 26 class AudioDecoderFactory;
28 27
29 namespace voe { 28 namespace voe {
30 29
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // ChannelOwner.channel() will be NULL if channel_id is invalid or no longer 111 // ChannelOwner.channel() will be NULL if channel_id is invalid or no longer
113 // exists. This should be checked with ChannelOwner::IsValid(). 112 // exists. This should be checked with ChannelOwner::IsValid().
114 ChannelOwner GetChannel(int32_t channel_id); 113 ChannelOwner GetChannel(int32_t channel_id);
115 void GetAllChannels(std::vector<ChannelOwner>* channels); 114 void GetAllChannels(std::vector<ChannelOwner>* channels);
116 115
117 void DestroyChannel(int32_t channel_id); 116 void DestroyChannel(int32_t channel_id);
118 void DestroyAllChannels(); 117 void DestroyAllChannels();
119 118
120 size_t NumOfChannels() const; 119 size_t NumOfChannels() const;
121 120
122 // Returns a pointer to the event log object stored within the ChannelManager.
123 RtcEventLog* GetEventLog() const;
124
125 private: 121 private:
126 // Create a channel given a configuration, |config|. 122 // Create a channel given a configuration, |config|.
127 ChannelOwner CreateChannelInternal( 123 ChannelOwner CreateChannelInternal(
128 const Config& config, 124 const Config& config,
129 const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory); 125 const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory);
130 126
131 uint32_t instance_id_; 127 uint32_t instance_id_;
132 128
133 Atomic32 last_channel_id_; 129 Atomic32 last_channel_id_;
134 130
135 rtc::CriticalSection lock_; 131 rtc::CriticalSection lock_;
136 std::vector<ChannelOwner> channels_; 132 std::vector<ChannelOwner> channels_;
137 133
138 const Config& config_; 134 const Config& config_;
139 std::unique_ptr<RtcEventLog> event_log_;
140 135
141 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelManager); 136 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelManager);
142 }; 137 };
143 } // namespace voe 138 } // namespace voe
144 } // namespace webrtc 139 } // namespace webrtc
145 140
146 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_MANAGER_H 141 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_MANAGER_H
OLDNEW
« no previous file with comments | « webrtc/voice_engine/channel.cc ('k') | webrtc/voice_engine/channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698