Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: talk/session/media/channelmanager.h

Issue 1350523003: TransportController refactoring. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing Mac test. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « talk/session/media/channel_unittest.cc ('k') | talk/session/media/channelmanager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void GetSupportedDataCodecs(std::vector<DataCodec>* codecs) const; 98 void GetSupportedDataCodecs(std::vector<DataCodec>* codecs) const;
99 99
100 // Indicates whether the media engine is started. 100 // Indicates whether the media engine is started.
101 bool initialized() const { return initialized_; } 101 bool initialized() const { return initialized_; }
102 // Starts up the media engine. 102 // Starts up the media engine.
103 bool Init(); 103 bool Init();
104 // Shuts down the media engine. 104 // Shuts down the media engine.
105 void Terminate(); 105 void Terminate();
106 106
107 // The operations below all occur on the worker thread. 107 // The operations below all occur on the worker thread.
108
109 // Creates a voice channel, to be associated with the specified session. 108 // Creates a voice channel, to be associated with the specified session.
110 VoiceChannel* CreateVoiceChannel( 109 VoiceChannel* CreateVoiceChannel(
111 webrtc::MediaControllerInterface* media_controller, 110 webrtc::MediaControllerInterface* media_controller,
112 BaseSession* session, 111 TransportController* transport_controller,
113 const std::string& content_name, 112 const std::string& content_name,
114 bool rtcp, 113 bool rtcp,
115 const AudioOptions& options); 114 const AudioOptions& options);
116 // Destroys a voice channel created with the Create API. 115 // Destroys a voice channel created with the Create API.
117 void DestroyVoiceChannel(VoiceChannel* voice_channel); 116 void DestroyVoiceChannel(VoiceChannel* voice_channel);
118 // Creates a video channel, synced with the specified voice channel, and 117 // Creates a video channel, synced with the specified voice channel, and
119 // associated with the specified session. 118 // associated with the specified session.
120 VideoChannel* CreateVideoChannel( 119 VideoChannel* CreateVideoChannel(
121 webrtc::MediaControllerInterface* media_controller, 120 webrtc::MediaControllerInterface* media_controller,
122 BaseSession* session, 121 TransportController* transport_controller,
123 const std::string& content_name, 122 const std::string& content_name,
124 bool rtcp, 123 bool rtcp,
125 const VideoOptions& options); 124 const VideoOptions& options);
126 // Destroys a video channel created with the Create API. 125 // Destroys a video channel created with the Create API.
127 void DestroyVideoChannel(VideoChannel* video_channel); 126 void DestroyVideoChannel(VideoChannel* video_channel);
128 DataChannel* CreateDataChannel( 127 DataChannel* CreateDataChannel(TransportController* transport_controller,
129 BaseSession* session, const std::string& content_name, 128 const std::string& content_name,
130 bool rtcp, DataChannelType data_channel_type); 129 bool rtcp,
130 DataChannelType data_channel_type);
131 // Destroys a data channel created with the Create API. 131 // Destroys a data channel created with the Create API.
132 void DestroyDataChannel(DataChannel* data_channel); 132 void DestroyDataChannel(DataChannel* data_channel);
133 133
134 // Indicates whether any channels exist. 134 // Indicates whether any channels exist.
135 bool has_channels() const { 135 bool has_channels() const {
136 return (!voice_channels_.empty() || !video_channels_.empty()); 136 return (!voice_channels_.empty() || !video_channels_.empty());
137 } 137 }
138 138
139 // 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
140 // GetAudioOptions() for any parameter of no interest. 140 // GetAudioOptions() for any parameter of no interest.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 void Construct(MediaEngineInterface* me, 244 void Construct(MediaEngineInterface* me,
245 DataEngineInterface* dme, 245 DataEngineInterface* dme,
246 DeviceManagerInterface* dm, 246 DeviceManagerInterface* dm,
247 CaptureManager* cm, 247 CaptureManager* cm,
248 rtc::Thread* worker_thread); 248 rtc::Thread* worker_thread);
249 bool InitMediaEngine_w(); 249 bool InitMediaEngine_w();
250 void DestructorDeletes_w(); 250 void DestructorDeletes_w();
251 void Terminate_w(); 251 void Terminate_w();
252 VoiceChannel* CreateVoiceChannel_w( 252 VoiceChannel* CreateVoiceChannel_w(
253 webrtc::MediaControllerInterface* media_controller, 253 webrtc::MediaControllerInterface* media_controller,
254 BaseSession* session, 254 TransportController* transport_controller,
255 const std::string& content_name, 255 const std::string& content_name,
256 bool rtcp, 256 bool rtcp,
257 const AudioOptions& options); 257 const AudioOptions& options);
258 void DestroyVoiceChannel_w(VoiceChannel* voice_channel); 258 void DestroyVoiceChannel_w(VoiceChannel* voice_channel);
259 VideoChannel* CreateVideoChannel_w( 259 VideoChannel* CreateVideoChannel_w(
260 webrtc::MediaControllerInterface* media_controller, 260 webrtc::MediaControllerInterface* media_controller,
261 BaseSession* session, 261 TransportController* transport_controller,
262 const std::string& content_name, 262 const std::string& content_name,
263 bool rtcp, 263 bool rtcp,
264 const VideoOptions& options); 264 const VideoOptions& options);
265 void DestroyVideoChannel_w(VideoChannel* video_channel); 265 void DestroyVideoChannel_w(VideoChannel* video_channel);
266 DataChannel* CreateDataChannel_w( 266 DataChannel* CreateDataChannel_w(TransportController* transport_controller,
267 BaseSession* session, const std::string& content_name, 267 const std::string& content_name,
268 bool rtcp, DataChannelType data_channel_type); 268 bool rtcp,
269 DataChannelType data_channel_type);
269 void DestroyDataChannel_w(DataChannel* data_channel); 270 void DestroyDataChannel_w(DataChannel* data_channel);
270 bool SetAudioOptions_w(const AudioOptions& options, int delay_offset, 271 bool SetAudioOptions_w(const AudioOptions& options, int delay_offset,
271 const Device* in_dev, const Device* out_dev); 272 const Device* in_dev, const Device* out_dev);
272 bool SetCaptureDevice_w(const Device* cam_device); 273 bool SetCaptureDevice_w(const Device* cam_device);
273 void OnVideoCaptureStateChange(VideoCapturer* capturer, 274 void OnVideoCaptureStateChange(VideoCapturer* capturer,
274 CaptureState result); 275 CaptureState result);
275 void GetSupportedFormats_w( 276 void GetSupportedFormats_w(
276 VideoCapturer* capturer, 277 VideoCapturer* capturer,
277 std::vector<cricket::VideoFormat>* out_formats) const; 278 std::vector<cricket::VideoFormat>* out_formats) const;
278 bool IsScreencastRunning_w() const; 279 bool IsScreencastRunning_w() const;
(...skipping 29 matching lines...) Expand all
308 // but selected devices while this sting will be empty or contain current 309 // but selected devices while this sting will be empty or contain current
309 // selected device. 310 // selected device.
310 // TODO(hellner): refactor the code such that there is no need to keep two 311 // TODO(hellner): refactor the code such that there is no need to keep two
311 // strings for video devices that have subtle differences in behavior. 312 // strings for video devices that have subtle differences in behavior.
312 std::string video_device_name_; 313 std::string video_device_name_;
313 }; 314 };
314 315
315 } // namespace cricket 316 } // namespace cricket
316 317
317 #endif // TALK_SESSION_MEDIA_CHANNELMANAGER_H_ 318 #endif // TALK_SESSION_MEDIA_CHANNELMANAGER_H_
OLDNEW
« no previous file with comments | « talk/session/media/channel_unittest.cc ('k') | talk/session/media/channelmanager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698