henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 1 | /* |
| 2 | * libjingle |
| 3 | * Copyright 2004 Google Inc. |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions are met: |
| 7 | * |
| 8 | * 1. Redistributions of source code must retain the above copyright notice, |
| 9 | * this list of conditions and the following disclaimer. |
| 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
| 11 | * this list of conditions and the following disclaimer in the documentation |
| 12 | * and/or other materials provided with the distribution. |
| 13 | * 3. The name of the author may not be used to endorse or promote products |
| 14 | * derived from this software without specific prior written permission. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
| 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
| 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
| 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | */ |
| 27 | |
| 28 | #ifndef TALK_SESSION_MEDIA_CHANNELMANAGER_H_ |
| 29 | #define TALK_SESSION_MEDIA_CHANNELMANAGER_H_ |
| 30 | |
| 31 | #include <string> |
| 32 | #include <vector> |
| 33 | |
buildbot@webrtc.org | 5b1ebac | 2014-08-07 17:18:00 +0000 | [diff] [blame] | 34 | #include "talk/media/base/capturemanager.h" |
| 35 | #include "talk/media/base/mediaengine.h" |
henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame] | 36 | #include "webrtc/p2p/base/session.h" |
buildbot@webrtc.org | 5b1ebac | 2014-08-07 17:18:00 +0000 | [diff] [blame] | 37 | #include "talk/session/media/voicechannel.h" |
buildbot@webrtc.org | 65b98d1 | 2014-08-07 22:09:08 +0000 | [diff] [blame] | 38 | #include "webrtc/base/criticalsection.h" |
| 39 | #include "webrtc/base/fileutils.h" |
| 40 | #include "webrtc/base/sigslotrepeater.h" |
| 41 | #include "webrtc/base/thread.h" |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 42 | |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 43 | namespace webrtc { |
| 44 | class MediaControllerInterface; |
| 45 | } |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 46 | namespace cricket { |
| 47 | |
henrike@webrtc.org | 0481f15 | 2014-08-19 14:56:59 +0000 | [diff] [blame] | 48 | const int kDefaultAudioDelayOffset = 0; |
| 49 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 50 | class VoiceChannel; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 51 | |
| 52 | // ChannelManager allows the MediaEngine to run on a separate thread, and takes |
| 53 | // care of marshalling calls between threads. It also creates and keeps track of |
| 54 | // voice and video channels; by doing so, it can temporarily pause all the |
| 55 | // channels when a new audio or video device is chosen. The voice and video |
| 56 | // channels are stored in separate vectors, to easily allow operations on just |
| 57 | // voice or just video channels. |
| 58 | // ChannelManager also allows the application to discover what devices it has |
| 59 | // using device manager. |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 60 | class ChannelManager : public rtc::MessageHandler, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 61 | public sigslot::has_slots<> { |
| 62 | public: |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 63 | // For testing purposes. Allows the media engine and data media |
| 64 | // engine and dev manager to be mocks. The ChannelManager takes |
| 65 | // ownership of these objects. |
| 66 | ChannelManager(MediaEngineInterface* me, |
| 67 | DataEngineInterface* dme, |
| 68 | DeviceManagerInterface* dm, |
| 69 | CaptureManager* cm, |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 70 | rtc::Thread* worker); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 71 | // Same as above, but gives an easier default DataEngine. |
| 72 | ChannelManager(MediaEngineInterface* me, |
| 73 | DeviceManagerInterface* dm, |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 74 | rtc::Thread* worker); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 75 | ~ChannelManager(); |
| 76 | |
| 77 | // Accessors for the worker thread, allowing it to be set after construction, |
| 78 | // but before Init. set_worker_thread will return false if called after Init. |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 79 | rtc::Thread* worker_thread() const { return worker_thread_; } |
| 80 | bool set_worker_thread(rtc::Thread* thread) { |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 81 | if (initialized_) return false; |
| 82 | worker_thread_ = thread; |
| 83 | return true; |
| 84 | } |
| 85 | |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 86 | MediaEngineInterface* media_engine() { return media_engine_.get(); } |
| 87 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 88 | // Gets capabilities. Can be called prior to starting the media engine. |
| 89 | int GetCapabilities(); |
| 90 | |
| 91 | // Retrieves the list of supported audio & video codec types. |
| 92 | // Can be called before starting the media engine. |
| 93 | void GetSupportedAudioCodecs(std::vector<AudioCodec>* codecs) const; |
| 94 | void GetSupportedAudioRtpHeaderExtensions(RtpHeaderExtensions* ext) const; |
| 95 | void GetSupportedVideoCodecs(std::vector<VideoCodec>* codecs) const; |
| 96 | void GetSupportedVideoRtpHeaderExtensions(RtpHeaderExtensions* ext) const; |
| 97 | void GetSupportedDataCodecs(std::vector<DataCodec>* codecs) const; |
| 98 | |
| 99 | // Indicates whether the media engine is started. |
| 100 | bool initialized() const { return initialized_; } |
| 101 | // Starts up the media engine. |
| 102 | bool Init(); |
| 103 | // Shuts down the media engine. |
| 104 | void Terminate(); |
| 105 | |
| 106 | // The operations below all occur on the worker thread. |
torbjorng | a81a42f | 2015-09-23 02:16:58 -0700 | [diff] [blame] | 107 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 108 | // Creates a voice channel, to be associated with the specified session. |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 109 | VoiceChannel* CreateVoiceChannel( |
| 110 | webrtc::MediaControllerInterface* media_controller, |
torbjorng | a81a42f | 2015-09-23 02:16:58 -0700 | [diff] [blame] | 111 | BaseSession* session, |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 112 | const std::string& content_name, |
| 113 | bool rtcp, |
| 114 | const AudioOptions& options); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 115 | // Destroys a voice channel created with the Create API. |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 116 | void DestroyVoiceChannel(VoiceChannel* voice_channel); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 117 | // Creates a video channel, synced with the specified voice channel, and |
| 118 | // associated with the specified session. |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 119 | VideoChannel* CreateVideoChannel( |
| 120 | webrtc::MediaControllerInterface* media_controller, |
torbjorng | a81a42f | 2015-09-23 02:16:58 -0700 | [diff] [blame] | 121 | BaseSession* session, |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 122 | const std::string& content_name, |
| 123 | bool rtcp, |
| 124 | const VideoOptions& options); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 125 | // Destroys a video channel created with the Create API. |
| 126 | void DestroyVideoChannel(VideoChannel* video_channel); |
torbjorng | a81a42f | 2015-09-23 02:16:58 -0700 | [diff] [blame] | 127 | DataChannel* CreateDataChannel( |
| 128 | BaseSession* session, const std::string& content_name, |
| 129 | bool rtcp, DataChannelType data_channel_type); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 130 | // Destroys a data channel created with the Create API. |
| 131 | void DestroyDataChannel(DataChannel* data_channel); |
| 132 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 133 | // Indicates whether any channels exist. |
| 134 | bool has_channels() const { |
Fredrik Solenberg | ccb49e7 | 2015-05-19 11:37:56 +0200 | [diff] [blame] | 135 | return (!voice_channels_.empty() || !video_channels_.empty()); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 136 | } |
| 137 | |
| 138 | // Configures the audio and video devices. A null pointer can be passed to |
| 139 | // GetAudioOptions() for any parameter of no interest. |
| 140 | bool GetAudioOptions(std::string* wave_in_device, |
mallinath@webrtc.org | a27be8e | 2013-09-27 23:04:10 +0000 | [diff] [blame] | 141 | std::string* wave_out_device, |
| 142 | AudioOptions* options); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 143 | bool SetAudioOptions(const std::string& wave_in_device, |
mallinath@webrtc.org | a27be8e | 2013-09-27 23:04:10 +0000 | [diff] [blame] | 144 | const std::string& wave_out_device, |
| 145 | const AudioOptions& options); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 146 | bool GetOutputVolume(int* level); |
| 147 | bool SetOutputVolume(int level); |
| 148 | bool IsSameCapturer(const std::string& capturer_name, |
| 149 | VideoCapturer* capturer); |
henrike@webrtc.org | 723d683 | 2013-07-12 16:04:50 +0000 | [diff] [blame] | 150 | // TODO(noahric): Nearly everything called "device" in this API is actually a |
| 151 | // device name, so this should really be GetCaptureDeviceName, and the |
| 152 | // next method should be GetCaptureDevice. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 153 | bool GetCaptureDevice(std::string* cam_device); |
henrike@webrtc.org | 723d683 | 2013-07-12 16:04:50 +0000 | [diff] [blame] | 154 | // Gets the current capture Device. |
| 155 | bool GetVideoCaptureDevice(Device* device); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 156 | // Create capturer based on what has been set in SetCaptureDevice(). |
| 157 | VideoCapturer* CreateVideoCapturer(); |
buildbot@webrtc.org | 65b98d1 | 2014-08-07 22:09:08 +0000 | [diff] [blame] | 158 | // Create capturer from a screen. |
| 159 | VideoCapturer* CreateScreenCapturer(const ScreencastId& screenid); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 160 | bool SetCaptureDevice(const std::string& cam_device); |
| 161 | bool SetDefaultVideoEncoderConfig(const VideoEncoderConfig& config); |
| 162 | // RTX will be enabled/disabled in engines that support it. The supporting |
| 163 | // engines will start offering an RTX codec. Must be called before Init(). |
| 164 | bool SetVideoRtxEnabled(bool enable); |
| 165 | |
| 166 | // Starts/stops the local microphone and enables polling of the input level. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 167 | bool capturing() const { return capturing_; } |
| 168 | |
| 169 | // Configures the logging output of the mediaengine(s). |
| 170 | void SetVoiceLogging(int level, const char* filter); |
| 171 | void SetVideoLogging(int level, const char* filter); |
| 172 | |
hbos@webrtc.org | 1e64263 | 2015-02-25 09:49:41 +0000 | [diff] [blame] | 173 | // Gets capturer's supported formats in a thread safe manner |
| 174 | std::vector<cricket::VideoFormat> GetSupportedFormats( |
| 175 | VideoCapturer* capturer) const; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 176 | // The following are done in the new "CaptureManager" style that |
| 177 | // all local video capturers, processors, and managers should move to. |
| 178 | // TODO(pthatcher): Make methods nicer by having start return a handle that |
| 179 | // can be used for stop and restart, rather than needing to pass around |
| 180 | // formats a a pseudo-handle. |
| 181 | bool StartVideoCapture(VideoCapturer* video_capturer, |
| 182 | const VideoFormat& video_format); |
| 183 | // When muting, produce black frames then pause the camera. |
| 184 | // When unmuting, start the camera. Camera starts unmuted. |
| 185 | bool MuteToBlackThenPause(VideoCapturer* video_capturer, bool muted); |
| 186 | bool StopVideoCapture(VideoCapturer* video_capturer, |
| 187 | const VideoFormat& video_format); |
| 188 | bool RestartVideoCapture(VideoCapturer* video_capturer, |
| 189 | const VideoFormat& previous_format, |
| 190 | const VideoFormat& desired_format, |
| 191 | CaptureManager::RestartOptions options); |
| 192 | |
| 193 | bool AddVideoRenderer(VideoCapturer* capturer, VideoRenderer* renderer); |
| 194 | bool RemoveVideoRenderer(VideoCapturer* capturer, VideoRenderer* renderer); |
| 195 | bool IsScreencastRunning() const; |
| 196 | |
| 197 | // The operations below occur on the main thread. |
| 198 | |
| 199 | bool GetAudioInputDevices(std::vector<std::string>* names); |
| 200 | bool GetAudioOutputDevices(std::vector<std::string>* names); |
| 201 | bool GetVideoCaptureDevices(std::vector<std::string>* names); |
| 202 | void SetVideoCaptureDeviceMaxFormat(const std::string& usb_id, |
| 203 | const VideoFormat& max_format); |
| 204 | |
wu@webrtc.org | a989080 | 2013-12-13 00:21:03 +0000 | [diff] [blame] | 205 | // Starts AEC dump using existing file. |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 206 | bool StartAecDump(rtc::PlatformFile file); |
wu@webrtc.org | a989080 | 2013-12-13 00:21:03 +0000 | [diff] [blame] | 207 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 208 | sigslot::repeater0<> SignalDevicesChange; |
| 209 | sigslot::signal2<VideoCapturer*, CaptureState> SignalVideoCaptureStateChange; |
| 210 | |
| 211 | // Returns the current selected device. Note: Subtly different from |
| 212 | // GetCaptureDevice(). See member video_device_ for more details. |
| 213 | // This API is mainly a hook used by unittests. |
| 214 | const std::string& video_device_name() const { return video_device_name_; } |
| 215 | |
buildbot@webrtc.org | 992febb | 2014-09-05 16:39:08 +0000 | [diff] [blame] | 216 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 217 | protected: |
| 218 | // Adds non-transient parameters which can only be changed through the |
| 219 | // options store. |
| 220 | bool SetAudioOptions(const std::string& wave_in_device, |
mallinath@webrtc.org | a27be8e | 2013-09-27 23:04:10 +0000 | [diff] [blame] | 221 | const std::string& wave_out_device, |
| 222 | const AudioOptions& options, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 223 | int delay_offset); |
| 224 | int audio_delay_offset() const { return audio_delay_offset_; } |
buildbot@webrtc.org | 65b98d1 | 2014-08-07 22:09:08 +0000 | [diff] [blame] | 225 | // This is here so that ChannelManager subclasses can set the video |
| 226 | // capturer factories to use. |
| 227 | DeviceManagerInterface* device_manager() { return device_manager_.get(); } |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 228 | |
| 229 | private: |
| 230 | typedef std::vector<VoiceChannel*> VoiceChannels; |
| 231 | typedef std::vector<VideoChannel*> VideoChannels; |
| 232 | typedef std::vector<DataChannel*> DataChannels; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 233 | |
| 234 | void Construct(MediaEngineInterface* me, |
| 235 | DataEngineInterface* dme, |
| 236 | DeviceManagerInterface* dm, |
| 237 | CaptureManager* cm, |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 238 | rtc::Thread* worker_thread); |
henrika@webrtc.org | 62f6e75 | 2015-02-11 08:38:35 +0000 | [diff] [blame] | 239 | bool InitMediaEngine_w(); |
hbos@webrtc.org | 4aef5fe | 2015-02-25 10:09:05 +0000 | [diff] [blame] | 240 | void DestructorDeletes_w(); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 241 | void Terminate_w(); |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 242 | VoiceChannel* CreateVoiceChannel_w( |
| 243 | webrtc::MediaControllerInterface* media_controller, |
torbjorng | a81a42f | 2015-09-23 02:16:58 -0700 | [diff] [blame] | 244 | BaseSession* session, |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 245 | const std::string& content_name, |
| 246 | bool rtcp, |
| 247 | const AudioOptions& options); |
| 248 | void DestroyVoiceChannel_w(VoiceChannel* voice_channel); |
| 249 | VideoChannel* CreateVideoChannel_w( |
| 250 | webrtc::MediaControllerInterface* media_controller, |
torbjorng | a81a42f | 2015-09-23 02:16:58 -0700 | [diff] [blame] | 251 | BaseSession* session, |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 252 | const std::string& content_name, |
| 253 | bool rtcp, |
| 254 | const VideoOptions& options); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 255 | void DestroyVideoChannel_w(VideoChannel* video_channel); |
torbjorng | a81a42f | 2015-09-23 02:16:58 -0700 | [diff] [blame] | 256 | DataChannel* CreateDataChannel_w( |
| 257 | BaseSession* session, const std::string& content_name, |
| 258 | bool rtcp, DataChannelType data_channel_type); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 259 | void DestroyDataChannel_w(DataChannel* data_channel); |
mallinath@webrtc.org | a27be8e | 2013-09-27 23:04:10 +0000 | [diff] [blame] | 260 | bool SetAudioOptions_w(const AudioOptions& options, int delay_offset, |
| 261 | const Device* in_dev, const Device* out_dev); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 262 | bool SetCaptureDevice_w(const Device* cam_device); |
| 263 | void OnVideoCaptureStateChange(VideoCapturer* capturer, |
| 264 | CaptureState result); |
hbos@webrtc.org | 1e64263 | 2015-02-25 09:49:41 +0000 | [diff] [blame] | 265 | void GetSupportedFormats_w( |
| 266 | VideoCapturer* capturer, |
| 267 | std::vector<cricket::VideoFormat>* out_formats) const; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 268 | bool IsScreencastRunning_w() const; |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 269 | virtual void OnMessage(rtc::Message *message); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 270 | |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 271 | rtc::scoped_ptr<MediaEngineInterface> media_engine_; |
| 272 | rtc::scoped_ptr<DataEngineInterface> data_media_engine_; |
| 273 | rtc::scoped_ptr<DeviceManagerInterface> device_manager_; |
| 274 | rtc::scoped_ptr<CaptureManager> capture_manager_; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 275 | bool initialized_; |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 276 | rtc::Thread* main_thread_; |
| 277 | rtc::Thread* worker_thread_; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 278 | |
| 279 | VoiceChannels voice_channels_; |
| 280 | VideoChannels video_channels_; |
| 281 | DataChannels data_channels_; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 282 | |
| 283 | std::string audio_in_device_; |
| 284 | std::string audio_out_device_; |
mallinath@webrtc.org | a27be8e | 2013-09-27 23:04:10 +0000 | [diff] [blame] | 285 | AudioOptions audio_options_; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 286 | int audio_delay_offset_; |
| 287 | int audio_output_volume_; |
| 288 | std::string camera_device_; |
| 289 | VideoEncoderConfig default_video_encoder_config_; |
| 290 | VideoRenderer* local_renderer_; |
| 291 | bool enable_rtx_; |
| 292 | |
| 293 | bool capturing_; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 294 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 295 | // String containing currently set device. Note that this string is subtly |
| 296 | // different from camera_device_. E.g. camera_device_ will list unplugged |
| 297 | // but selected devices while this sting will be empty or contain current |
| 298 | // selected device. |
| 299 | // TODO(hellner): refactor the code such that there is no need to keep two |
| 300 | // strings for video devices that have subtle differences in behavior. |
| 301 | std::string video_device_name_; |
| 302 | }; |
| 303 | |
| 304 | } // namespace cricket |
| 305 | |
| 306 | #endif // TALK_SESSION_MEDIA_CHANNELMANAGER_H_ |