| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 virtual bool Init(rtc::Thread* worker_thread) = 0; | 74 virtual bool Init(rtc::Thread* worker_thread) = 0; |
| 75 // Shuts down the engine. | 75 // Shuts down the engine. |
| 76 virtual void Terminate() = 0; | 76 virtual void Terminate() = 0; |
| 77 // TODO(solenberg): Remove once VoE API refactoring is done. | 77 // TODO(solenberg): Remove once VoE API refactoring is done. |
| 78 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const = 0; | 78 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const = 0; |
| 79 | 79 |
| 80 // MediaChannel creation | 80 // MediaChannel creation |
| 81 // Creates a voice media channel. Returns NULL on failure. | 81 // Creates a voice media channel. Returns NULL on failure. |
| 82 virtual VoiceMediaChannel* CreateChannel( | 82 virtual VoiceMediaChannel* CreateChannel( |
| 83 webrtc::Call* call, | 83 webrtc::Call* call, |
| 84 const AudioOptions& options) = 0; | 84 const MediaChannelOptions& options, |
| 85 const AudioOptions& audio_options) = 0; |
| 85 // Creates a video media channel, paired with the specified voice channel. | 86 // Creates a video media channel, paired with the specified voice channel. |
| 86 // Returns NULL on failure. | 87 // Returns NULL on failure. |
| 87 virtual VideoMediaChannel* CreateVideoChannel( | 88 virtual VideoMediaChannel* CreateVideoChannel( |
| 88 webrtc::Call* call, | 89 webrtc::Call* call, |
| 89 const VideoOptions& options) = 0; | 90 const MediaChannelOptions& options, |
| 91 const VideoOptions& video_options) = 0; |
| 90 | 92 |
| 91 // Device configuration | 93 // Device configuration |
| 92 // Gets the current speaker volume, as a value between 0 and 255. | 94 // Gets the current speaker volume, as a value between 0 and 255. |
| 93 virtual bool GetOutputVolume(int* level) = 0; | 95 virtual bool GetOutputVolume(int* level) = 0; |
| 94 // Sets the current speaker volume, as a value between 0 and 255. | 96 // Sets the current speaker volume, as a value between 0 and 255. |
| 95 virtual bool SetOutputVolume(int level) = 0; | 97 virtual bool SetOutputVolume(int level) = 0; |
| 96 | 98 |
| 97 // Gets the current microphone level, as a value between 0 and 10. | 99 // Gets the current microphone level, as a value between 0 and 10. |
| 98 virtual int GetInputLevel() = 0; | 100 virtual int GetInputLevel() = 0; |
| 99 | 101 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 return true; | 151 return true; |
| 150 } | 152 } |
| 151 virtual void Terminate() { | 153 virtual void Terminate() { |
| 152 voice_.Terminate(); | 154 voice_.Terminate(); |
| 153 } | 155 } |
| 154 | 156 |
| 155 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { | 157 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { |
| 156 return voice_.GetAudioState(); | 158 return voice_.GetAudioState(); |
| 157 } | 159 } |
| 158 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 160 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
| 159 const AudioOptions& options) { | 161 const MediaChannelOptions& options, |
| 160 return voice_.CreateChannel(call, options); | 162 const AudioOptions& audio_options) { |
| 163 return voice_.CreateChannel(call, options, audio_options); |
| 161 } | 164 } |
| 162 virtual VideoMediaChannel* CreateVideoChannel(webrtc::Call* call, | 165 virtual VideoMediaChannel* CreateVideoChannel( |
| 163 const VideoOptions& options) { | 166 webrtc::Call* call, |
| 164 return video_.CreateChannel(call, options); | 167 const MediaChannelOptions& options, |
| 168 const VideoOptions& video_options) { |
| 169 return video_.CreateChannel(call, options, video_options); |
| 165 } | 170 } |
| 166 | 171 |
| 167 virtual bool GetOutputVolume(int* level) { | 172 virtual bool GetOutputVolume(int* level) { |
| 168 return voice_.GetOutputVolume(level); | 173 return voice_.GetOutputVolume(level); |
| 169 } | 174 } |
| 170 virtual bool SetOutputVolume(int level) { | 175 virtual bool SetOutputVolume(int level) { |
| 171 return voice_.SetOutputVolume(level); | 176 return voice_.SetOutputVolume(level); |
| 172 } | 177 } |
| 173 | 178 |
| 174 virtual int GetInputLevel() { | 179 virtual int GetInputLevel() { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 class DataEngineInterface { | 220 class DataEngineInterface { |
| 216 public: | 221 public: |
| 217 virtual ~DataEngineInterface() {} | 222 virtual ~DataEngineInterface() {} |
| 218 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; | 223 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; |
| 219 virtual const std::vector<DataCodec>& data_codecs() = 0; | 224 virtual const std::vector<DataCodec>& data_codecs() = 0; |
| 220 }; | 225 }; |
| 221 | 226 |
| 222 } // namespace cricket | 227 } // namespace cricket |
| 223 | 228 |
| 224 #endif // TALK_MEDIA_BASE_MEDIAENGINE_H_ | 229 #endif // TALK_MEDIA_BASE_MEDIAENGINE_H_ |
| OLD | NEW |