| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "webrtc/media/base/videocapturer.h" | 44 #include "webrtc/media/base/videocapturer.h" |
| 45 #include "webrtc/media/base/videocommon.h" | 45 #include "webrtc/media/base/videocommon.h" |
| 46 #include "webrtc/media/devices/devicemanager.h" | 46 #include "webrtc/media/devices/devicemanager.h" |
| 47 | 47 |
| 48 #if defined(GOOGLE_CHROME_BUILD) || defined(CHROMIUM_BUILD) | 48 #if defined(GOOGLE_CHROME_BUILD) || defined(CHROMIUM_BUILD) |
| 49 #define DISABLE_MEDIA_ENGINE_FACTORY | 49 #define DISABLE_MEDIA_ENGINE_FACTORY |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 namespace webrtc { | 52 namespace webrtc { |
| 53 class Call; | 53 class Call; |
| 54 struct MediaConfig; |
| 54 } | 55 } |
| 55 | 56 |
| 56 namespace cricket { | 57 namespace cricket { |
| 57 | 58 |
| 58 class VideoCapturer; | 59 class VideoCapturer; |
| 59 | 60 |
| 60 struct RtpCapabilities { | 61 struct RtpCapabilities { |
| 61 std::vector<RtpHeaderExtension> header_extensions; | 62 std::vector<RtpHeaderExtension> header_extensions; |
| 62 }; | 63 }; |
| 63 | 64 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 74 virtual bool Init(rtc::Thread* worker_thread) = 0; | 75 virtual bool Init(rtc::Thread* worker_thread) = 0; |
| 75 // Shuts down the engine. | 76 // Shuts down the engine. |
| 76 virtual void Terminate() = 0; | 77 virtual void Terminate() = 0; |
| 77 // TODO(solenberg): Remove once VoE API refactoring is done. | 78 // TODO(solenberg): Remove once VoE API refactoring is done. |
| 78 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const = 0; | 79 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const = 0; |
| 79 | 80 |
| 80 // MediaChannel creation | 81 // MediaChannel creation |
| 81 // Creates a voice media channel. Returns NULL on failure. | 82 // Creates a voice media channel. Returns NULL on failure. |
| 82 virtual VoiceMediaChannel* CreateChannel( | 83 virtual VoiceMediaChannel* CreateChannel( |
| 83 webrtc::Call* call, | 84 webrtc::Call* call, |
| 85 const webrtc::MediaConfig& config, |
| 84 const AudioOptions& options) = 0; | 86 const AudioOptions& options) = 0; |
| 85 // Creates a video media channel, paired with the specified voice channel. | 87 // Creates a video media channel, paired with the specified voice channel. |
| 86 // Returns NULL on failure. | 88 // Returns NULL on failure. |
| 87 virtual VideoMediaChannel* CreateVideoChannel( | 89 virtual VideoMediaChannel* CreateVideoChannel( |
| 88 webrtc::Call* call, | 90 webrtc::Call* call, |
| 91 const webrtc::MediaConfig& config, |
| 89 const VideoOptions& options) = 0; | 92 const VideoOptions& options) = 0; |
| 90 | 93 |
| 91 // Device configuration | 94 // Device configuration |
| 92 // Gets the current speaker volume, as a value between 0 and 255. | 95 // Gets the current speaker volume, as a value between 0 and 255. |
| 93 virtual bool GetOutputVolume(int* level) = 0; | 96 virtual bool GetOutputVolume(int* level) = 0; |
| 94 // Sets the current speaker volume, as a value between 0 and 255. | 97 // Sets the current speaker volume, as a value between 0 and 255. |
| 95 virtual bool SetOutputVolume(int level) = 0; | 98 virtual bool SetOutputVolume(int level) = 0; |
| 96 | 99 |
| 97 // Gets the current microphone level, as a value between 0 and 10. | 100 // Gets the current microphone level, as a value between 0 and 10. |
| 98 virtual int GetInputLevel() = 0; | 101 virtual int GetInputLevel() = 0; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 return true; | 152 return true; |
| 150 } | 153 } |
| 151 virtual void Terminate() { | 154 virtual void Terminate() { |
| 152 voice_.Terminate(); | 155 voice_.Terminate(); |
| 153 } | 156 } |
| 154 | 157 |
| 155 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { | 158 virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { |
| 156 return voice_.GetAudioState(); | 159 return voice_.GetAudioState(); |
| 157 } | 160 } |
| 158 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 161 virtual VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
| 162 const webrtc::MediaConfig& config, |
| 159 const AudioOptions& options) { | 163 const AudioOptions& options) { |
| 160 return voice_.CreateChannel(call, options); | 164 return voice_.CreateChannel(call, config, options); |
| 161 } | 165 } |
| 162 virtual VideoMediaChannel* CreateVideoChannel(webrtc::Call* call, | 166 virtual VideoMediaChannel* CreateVideoChannel( |
| 163 const VideoOptions& options) { | 167 webrtc::Call* call, |
| 164 return video_.CreateChannel(call, options); | 168 const webrtc::MediaConfig& config, |
| 169 const VideoOptions& options) { |
| 170 return video_.CreateChannel(call, config, options); |
| 165 } | 171 } |
| 166 | 172 |
| 167 virtual bool GetOutputVolume(int* level) { | 173 virtual bool GetOutputVolume(int* level) { |
| 168 return voice_.GetOutputVolume(level); | 174 return voice_.GetOutputVolume(level); |
| 169 } | 175 } |
| 170 virtual bool SetOutputVolume(int level) { | 176 virtual bool SetOutputVolume(int level) { |
| 171 return voice_.SetOutputVolume(level); | 177 return voice_.SetOutputVolume(level); |
| 172 } | 178 } |
| 173 | 179 |
| 174 virtual int GetInputLevel() { | 180 virtual int GetInputLevel() { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 class DataEngineInterface { | 221 class DataEngineInterface { |
| 216 public: | 222 public: |
| 217 virtual ~DataEngineInterface() {} | 223 virtual ~DataEngineInterface() {} |
| 218 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; | 224 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; |
| 219 virtual const std::vector<DataCodec>& data_codecs() = 0; | 225 virtual const std::vector<DataCodec>& data_codecs() = 0; |
| 220 }; | 226 }; |
| 221 | 227 |
| 222 } // namespace cricket | 228 } // namespace cricket |
| 223 | 229 |
| 224 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ | 230 #endif // WEBRTC_MEDIA_BASE_MEDIAENGINE_H_ |
| OLD | NEW |