OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 44 matching lines...) Loading... |
55 // Initialization | 55 // Initialization |
56 // Starts the engine. | 56 // Starts the engine. |
57 virtual bool Init(rtc::Thread* worker_thread) = 0; | 57 virtual bool Init(rtc::Thread* worker_thread) = 0; |
58 // Shuts down the engine. | 58 // Shuts down the engine. |
59 virtual void Terminate() = 0; | 59 virtual void Terminate() = 0; |
60 // TODO(solenberg): Remove once VoE API refactoring is done. | 60 // TODO(solenberg): Remove once VoE API refactoring is done. |
61 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const = 0; | 61 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const = 0; |
62 | 62 |
63 // MediaChannel creation | 63 // MediaChannel creation |
64 // Creates a voice media channel. Returns NULL on failure. | 64 // Creates a voice media channel. Returns NULL on failure. |
65 virtual VoiceMediaChannel* CreateChannel( | 65 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
66 webrtc::Call* call, | 66 const MediaConfig& config, |
67 const AudioOptions& options) = 0; | 67 const AudioOptions& options) = 0; |
68 // Creates a video media channel, paired with the specified voice channel. | 68 // Creates a video media channel, paired with the specified voice channel. |
69 // Returns NULL on failure. | 69 // Returns NULL on failure. |
70 virtual VideoMediaChannel* CreateVideoChannel( | 70 virtual VideoMediaChannel* CreateVideoChannel( |
71 webrtc::Call* call, | 71 webrtc::Call* call, |
| 72 const MediaConfig& config, |
72 const VideoOptions& options) = 0; | 73 const VideoOptions& options) = 0; |
73 | 74 |
74 // Device configuration | 75 // Device configuration |
75 // Gets the current speaker volume, as a value between 0 and 255. | 76 // Gets the current speaker volume, as a value between 0 and 255. |
76 virtual bool GetOutputVolume(int* level) = 0; | 77 virtual bool GetOutputVolume(int* level) = 0; |
77 // Sets the current speaker volume, as a value between 0 and 255. | 78 // Sets the current speaker volume, as a value between 0 and 255. |
78 virtual bool SetOutputVolume(int level) = 0; | 79 virtual bool SetOutputVolume(int level) = 0; |
79 | 80 |
80 // Gets the current microphone level, as a value between 0 and 10. | 81 // Gets the current microphone level, as a value between 0 and 10. |
81 virtual int GetInputLevel() = 0; | 82 virtual int GetInputLevel() = 0; |
(...skipping 50 matching lines...) Loading... |
132 return true; | 133 return true; |
133 } | 134 } |
134 virtual void Terminate() { | 135 virtual void Terminate() { |
135 voice_.Terminate(); | 136 voice_.Terminate(); |
136 } | 137 } |
137 | 138 |
138 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { | 139 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { |
139 return voice_.GetAudioState(); | 140 return voice_.GetAudioState(); |
140 } | 141 } |
141 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 142 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
| 143 const MediaConfig& config, |
142 const AudioOptions& options) { | 144 const AudioOptions& options) { |
143 return voice_.CreateChannel(call, options); | 145 return voice_.CreateChannel(call, config, options); |
144 } | 146 } |
145 virtual VideoMediaChannel* CreateVideoChannel(webrtc::Call* call, | 147 virtual VideoMediaChannel* CreateVideoChannel(webrtc::Call* call, |
| 148 const MediaConfig& config, |
146 const VideoOptions& options) { | 149 const VideoOptions& options) { |
147 return video_.CreateChannel(call, options); | 150 return video_.CreateChannel(call, config, options); |
148 } | 151 } |
149 | 152 |
150 virtual bool GetOutputVolume(int* level) { | 153 virtual bool GetOutputVolume(int* level) { |
151 return voice_.GetOutputVolume(level); | 154 return voice_.GetOutputVolume(level); |
152 } | 155 } |
153 virtual bool SetOutputVolume(int level) { | 156 virtual bool SetOutputVolume(int level) { |
154 return voice_.SetOutputVolume(level); | 157 return voice_.SetOutputVolume(level); |
155 } | 158 } |
156 | 159 |
157 virtual int GetInputLevel() { | 160 virtual int GetInputLevel() { |
(...skipping 40 matching lines...) Loading... |
198 class DataEngineInterface { | 201 class DataEngineInterface { |
199 public: | 202 public: |
200 virtual ~DataEngineInterface() {} | 203 virtual ~DataEngineInterface() {} |
201 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; | 204 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; |
202 virtual const std::vector<DataCodec>& data_codecs() = 0; | 205 virtual const std::vector<DataCodec>& data_codecs() = 0; |
203 }; | 206 }; |
204 | 207 |
205 } // namespace cricket | 208 } // namespace cricket |
206 | 209 |
207 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ | 210 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ |
OLD | NEW |