| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 AudioOptions& options) = 0; |
| 85 // Creates a video media channel, paired with the specified voice channel. | 85 // Creates a video media channel, paired with the specified voice channel. |
| 86 // Returns NULL on failure. | 86 // Returns NULL on failure. |
| 87 virtual VideoMediaChannel* CreateVideoChannel( | 87 virtual VideoMediaChannel* CreateVideoChannel( |
| 88 webrtc::Call* call, | 88 webrtc::Call* call, |
| 89 const VideoOptions& options) = 0; | 89 const VideoOptions& options) = 0; |
| 90 | 90 |
| 91 // Configuration | |
| 92 // Gets global audio options. | |
| 93 virtual AudioOptions GetAudioOptions() const = 0; | |
| 94 // Sets global audio options. "options" are from AudioOptions, above. | |
| 95 virtual bool SetAudioOptions(const AudioOptions& options) = 0; | |
| 96 // Sets the default (maximum) codec/resolution and encoder option to capture | 91 // Sets the default (maximum) codec/resolution and encoder option to capture |
| 97 // and encode video. | 92 // and encode video. |
| 98 virtual bool SetDefaultVideoEncoderConfig(const VideoEncoderConfig& config) | 93 virtual bool SetDefaultVideoEncoderConfig(const VideoEncoderConfig& config) |
| 99 = 0; | 94 = 0; |
| 100 | 95 |
| 101 // Device selection | |
| 102 virtual bool SetSoundDevices(const Device* in_device, | |
| 103 const Device* out_device) = 0; | |
| 104 | |
| 105 // Device configuration | 96 // Device configuration |
| 106 // Gets the current speaker volume, as a value between 0 and 255. | 97 // Gets the current speaker volume, as a value between 0 and 255. |
| 107 virtual bool GetOutputVolume(int* level) = 0; | 98 virtual bool GetOutputVolume(int* level) = 0; |
| 108 // Sets the current speaker volume, as a value between 0 and 255. | 99 // Sets the current speaker volume, as a value between 0 and 255. |
| 109 virtual bool SetOutputVolume(int level) = 0; | 100 virtual bool SetOutputVolume(int level) = 0; |
| 110 | 101 |
| 111 // Gets the current microphone level, as a value between 0 and 10. | 102 // Gets the current microphone level, as a value between 0 and 10. |
| 112 virtual int GetInputLevel() = 0; | 103 virtual int GetInputLevel() = 0; |
| 113 | 104 |
| 114 virtual const std::vector<AudioCodec>& audio_codecs() = 0; | 105 virtual const std::vector<AudioCodec>& audio_codecs() = 0; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 160 } |
| 170 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 161 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
| 171 const AudioOptions& options) { | 162 const AudioOptions& options) { |
| 172 return voice_.CreateChannel(call, options); | 163 return voice_.CreateChannel(call, options); |
| 173 } | 164 } |
| 174 virtual VideoMediaChannel* CreateVideoChannel(webrtc::Call* call, | 165 virtual VideoMediaChannel* CreateVideoChannel(webrtc::Call* call, |
| 175 const VideoOptions& options) { | 166 const VideoOptions& options) { |
| 176 return video_.CreateChannel(call, options); | 167 return video_.CreateChannel(call, options); |
| 177 } | 168 } |
| 178 | 169 |
| 179 virtual AudioOptions GetAudioOptions() const { | |
| 180 return voice_.GetOptions(); | |
| 181 } | |
| 182 virtual bool SetAudioOptions(const AudioOptions& options) { | |
| 183 return voice_.SetOptions(options); | |
| 184 } | |
| 185 virtual bool SetDefaultVideoEncoderConfig(const VideoEncoderConfig& config) { | 170 virtual bool SetDefaultVideoEncoderConfig(const VideoEncoderConfig& config) { |
| 186 return video_.SetDefaultEncoderConfig(config); | 171 return video_.SetDefaultEncoderConfig(config); |
| 187 } | 172 } |
| 188 | 173 |
| 189 virtual bool SetSoundDevices(const Device* in_device, | |
| 190 const Device* out_device) { | |
| 191 return voice_.SetDevices(in_device, out_device); | |
| 192 } | |
| 193 | |
| 194 virtual bool GetOutputVolume(int* level) { | 174 virtual bool GetOutputVolume(int* level) { |
| 195 return voice_.GetOutputVolume(level); | 175 return voice_.GetOutputVolume(level); |
| 196 } | 176 } |
| 197 virtual bool SetOutputVolume(int level) { | 177 virtual bool SetOutputVolume(int level) { |
| 198 return voice_.SetOutputVolume(level); | 178 return voice_.SetOutputVolume(level); |
| 199 } | 179 } |
| 200 | 180 |
| 201 virtual int GetInputLevel() { | 181 virtual int GetInputLevel() { |
| 202 return voice_.GetInputLevel(); | 182 return voice_.GetInputLevel(); |
| 203 } | 183 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 class DataEngineInterface { | 222 class DataEngineInterface { |
| 243 public: | 223 public: |
| 244 virtual ~DataEngineInterface() {} | 224 virtual ~DataEngineInterface() {} |
| 245 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; | 225 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; |
| 246 virtual const std::vector<DataCodec>& data_codecs() = 0; | 226 virtual const std::vector<DataCodec>& data_codecs() = 0; |
| 247 }; | 227 }; |
| 248 | 228 |
| 249 } // namespace cricket | 229 } // namespace cricket |
| 250 | 230 |
| 251 #endif // TALK_MEDIA_BASE_MEDIAENGINE_H_ | 231 #endif // TALK_MEDIA_BASE_MEDIAENGINE_H_ |
| OLD | NEW |