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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 // Indicates whether the media engine is started. | 95 // Indicates whether the media engine is started. |
96 bool initialized() const { return initialized_; } | 96 bool initialized() const { return initialized_; } |
97 // Starts up the media engine. | 97 // Starts up the media engine. |
98 bool Init(); | 98 bool Init(); |
99 // Shuts down the media engine. | 99 // Shuts down the media engine. |
100 void Terminate(); | 100 void Terminate(); |
101 | 101 |
102 // The operations below all occur on the worker thread. | 102 // The operations below all occur on the worker thread. |
103 | 103 |
104 // Creates a voice channel, to be associated with the specified session. | 104 // Creates a voice channel, to be associated with the specified |
105 VoiceChannel* CreateVoiceChannel(BaseSession* session, | 105 // TransportController. |
| 106 VoiceChannel* CreateVoiceChannel(TransportController* transport_controller, |
106 const std::string& content_name, | 107 const std::string& content_name, |
107 bool rtcp, | 108 bool rtcp, |
108 const AudioOptions& options); | 109 const AudioOptions& options); |
109 // Destroys a voice channel created with the Create API. | 110 // Destroys a voice channel created with the Create API. |
110 void DestroyVoiceChannel(VoiceChannel* voice_channel, | 111 void DestroyVoiceChannel(VoiceChannel* voice_channel, |
111 VideoChannel* video_channel); | 112 VideoChannel* video_channel); |
112 // TODO(pbos): Remove as soon as all call sites specify VideoOptions. | 113 // TODO(pbos): Remove as soon as all call sites specify VideoOptions. |
113 VideoChannel* CreateVideoChannel(BaseSession* session, | 114 VideoChannel* CreateVideoChannel(TransportController* transport_controller, |
114 const std::string& content_name, | 115 const std::string& content_name, |
115 bool rtcp, | 116 bool rtcp, |
116 VoiceChannel* voice_channel); | 117 VoiceChannel* voice_channel); |
117 // Creates a video channel, synced with the specified voice channel, and | 118 // Creates a video channel, synced with the specified voice channel, and |
118 // associated with the specified session. | 119 // associated with the specified TransportController. |
119 VideoChannel* CreateVideoChannel(BaseSession* session, | 120 VideoChannel* CreateVideoChannel(TransportController* transport_controller, |
120 const std::string& content_name, | 121 const std::string& content_name, |
121 bool rtcp, | 122 bool rtcp, |
122 const VideoOptions& options, | 123 const VideoOptions& options, |
123 VoiceChannel* voice_channel); | 124 VoiceChannel* voice_channel); |
124 // Destroys a video channel created with the Create API. | 125 // Destroys a video channel created with the Create API. |
125 void DestroyVideoChannel(VideoChannel* video_channel); | 126 void DestroyVideoChannel(VideoChannel* video_channel); |
126 DataChannel* CreateDataChannel( | 127 DataChannel* CreateDataChannel(TransportController* transport_controller, |
127 BaseSession* session, const std::string& content_name, | 128 const std::string& content_name, |
128 bool rtcp, DataChannelType data_channel_type); | 129 bool rtcp, |
| 130 DataChannelType data_channel_type); |
129 // Destroys a data channel created with the Create API. | 131 // Destroys a data channel created with the Create API. |
130 void DestroyDataChannel(DataChannel* data_channel); | 132 void DestroyDataChannel(DataChannel* data_channel); |
131 | 133 |
132 // Indicates whether any channels exist. | 134 // Indicates whether any channels exist. |
133 bool has_channels() const { | 135 bool has_channels() const { |
134 return (!voice_channels_.empty() || !video_channels_.empty()); | 136 return (!voice_channels_.empty() || !video_channels_.empty()); |
135 } | 137 } |
136 | 138 |
137 // Configures the audio and video devices. A null pointer can be passed to | 139 // Configures the audio and video devices. A null pointer can be passed to |
138 // GetAudioOptions() for any parameter of no interest. | 140 // GetAudioOptions() for any parameter of no interest. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 typedef std::vector<DataChannel*> DataChannels; | 242 typedef std::vector<DataChannel*> DataChannels; |
241 | 243 |
242 void Construct(MediaEngineInterface* me, | 244 void Construct(MediaEngineInterface* me, |
243 DataEngineInterface* dme, | 245 DataEngineInterface* dme, |
244 DeviceManagerInterface* dm, | 246 DeviceManagerInterface* dm, |
245 CaptureManager* cm, | 247 CaptureManager* cm, |
246 rtc::Thread* worker_thread); | 248 rtc::Thread* worker_thread); |
247 bool InitMediaEngine_w(); | 249 bool InitMediaEngine_w(); |
248 void DestructorDeletes_w(); | 250 void DestructorDeletes_w(); |
249 void Terminate_w(); | 251 void Terminate_w(); |
250 VoiceChannel* CreateVoiceChannel_w(BaseSession* session, | 252 VoiceChannel* CreateVoiceChannel_w(TransportController* transport_controller, |
251 const std::string& content_name, | 253 const std::string& content_name, |
252 bool rtcp, | 254 bool rtcp, |
253 const AudioOptions& options); | 255 const AudioOptions& options); |
254 void DestroyVoiceChannel_w(VoiceChannel* voice_channel, | 256 void DestroyVoiceChannel_w(VoiceChannel* voice_channel, |
255 VideoChannel* video_channel); | 257 VideoChannel* video_channel); |
256 VideoChannel* CreateVideoChannel_w(BaseSession* session, | 258 VideoChannel* CreateVideoChannel_w(TransportController* transport_controller, |
257 const std::string& content_name, | 259 const std::string& content_name, |
258 bool rtcp, | 260 bool rtcp, |
259 const VideoOptions& options, | 261 const VideoOptions& options, |
260 VoiceChannel* voice_channel); | 262 VoiceChannel* voice_channel); |
261 void DestroyVideoChannel_w(VideoChannel* video_channel); | 263 void DestroyVideoChannel_w(VideoChannel* video_channel); |
262 DataChannel* CreateDataChannel_w( | 264 DataChannel* CreateDataChannel_w(TransportController* transport_controller, |
263 BaseSession* session, const std::string& content_name, | 265 const std::string& content_name, |
264 bool rtcp, DataChannelType data_channel_type); | 266 bool rtcp, |
| 267 DataChannelType data_channel_type); |
265 void DestroyDataChannel_w(DataChannel* data_channel); | 268 void DestroyDataChannel_w(DataChannel* data_channel); |
266 bool SetAudioOptions_w(const AudioOptions& options, int delay_offset, | 269 bool SetAudioOptions_w(const AudioOptions& options, int delay_offset, |
267 const Device* in_dev, const Device* out_dev); | 270 const Device* in_dev, const Device* out_dev); |
268 bool SetCaptureDevice_w(const Device* cam_device); | 271 bool SetCaptureDevice_w(const Device* cam_device); |
269 void OnVideoCaptureStateChange(VideoCapturer* capturer, | 272 void OnVideoCaptureStateChange(VideoCapturer* capturer, |
270 CaptureState result); | 273 CaptureState result); |
271 void GetSupportedFormats_w( | 274 void GetSupportedFormats_w( |
272 VideoCapturer* capturer, | 275 VideoCapturer* capturer, |
273 std::vector<cricket::VideoFormat>* out_formats) const; | 276 std::vector<cricket::VideoFormat>* out_formats) const; |
274 bool IsScreencastRunning_w() const; | 277 bool IsScreencastRunning_w() const; |
(...skipping 29 matching lines...) Expand all Loading... |
304 // but selected devices while this sting will be empty or contain current | 307 // but selected devices while this sting will be empty or contain current |
305 // selected device. | 308 // selected device. |
306 // TODO(hellner): refactor the code such that there is no need to keep two | 309 // TODO(hellner): refactor the code such that there is no need to keep two |
307 // strings for video devices that have subtle differences in behavior. | 310 // strings for video devices that have subtle differences in behavior. |
308 std::string video_device_name_; | 311 std::string video_device_name_; |
309 }; | 312 }; |
310 | 313 |
311 } // namespace cricket | 314 } // namespace cricket |
312 | 315 |
313 #endif // TALK_SESSION_MEDIA_CHANNELMANAGER_H_ | 316 #endif // TALK_SESSION_MEDIA_CHANNELMANAGER_H_ |
OLD | NEW |