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

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

Issue 1358413003: Revert of TransportController refactoring. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
108 // Creates a voice channel, to be associated with the specified session. 109 // Creates a voice channel, to be associated with the specified session.
109 VoiceChannel* CreateVoiceChannel( 110 VoiceChannel* CreateVoiceChannel(
110 webrtc::MediaControllerInterface* media_controller, 111 webrtc::MediaControllerInterface* media_controller,
111 TransportController* transport_controller, 112 BaseSession* session,
112 const std::string& content_name, 113 const std::string& content_name,
113 bool rtcp, 114 bool rtcp,
114 const AudioOptions& options); 115 const AudioOptions& options);
115 // Destroys a voice channel created with the Create API. 116 // Destroys a voice channel created with the Create API.
116 void DestroyVoiceChannel(VoiceChannel* voice_channel); 117 void DestroyVoiceChannel(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 session.
119 VideoChannel* CreateVideoChannel( 120 VideoChannel* CreateVideoChannel(
120 webrtc::MediaControllerInterface* media_controller, 121 webrtc::MediaControllerInterface* media_controller,
121 TransportController* transport_controller, 122 BaseSession* session,
122 const std::string& content_name, 123 const std::string& content_name,
123 bool rtcp, 124 bool rtcp,
124 const VideoOptions& options); 125 const VideoOptions& options);
125 // Destroys a video channel created with the Create API. 126 // Destroys a video channel created with the Create API.
126 void DestroyVideoChannel(VideoChannel* video_channel); 127 void DestroyVideoChannel(VideoChannel* video_channel);
127 DataChannel* CreateDataChannel(TransportController* transport_controller, 128 DataChannel* CreateDataChannel(
128 const std::string& content_name, 129 BaseSession* session, const std::string& content_name,
129 bool rtcp, 130 bool rtcp, DataChannelType data_channel_type);
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 TransportController* transport_controller, 254 BaseSession* session,
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 TransportController* transport_controller, 261 BaseSession* session,
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(TransportController* transport_controller, 266 DataChannel* CreateDataChannel_w(
267 const std::string& content_name, 267 BaseSession* session, const std::string& content_name,
268 bool rtcp, 268 bool rtcp, DataChannelType data_channel_type);
269 DataChannelType data_channel_type);
270 void DestroyDataChannel_w(DataChannel* data_channel); 269 void DestroyDataChannel_w(DataChannel* data_channel);
271 bool SetAudioOptions_w(const AudioOptions& options, int delay_offset, 270 bool SetAudioOptions_w(const AudioOptions& options, int delay_offset,
272 const Device* in_dev, const Device* out_dev); 271 const Device* in_dev, const Device* out_dev);
273 bool SetCaptureDevice_w(const Device* cam_device); 272 bool SetCaptureDevice_w(const Device* cam_device);
274 void OnVideoCaptureStateChange(VideoCapturer* capturer, 273 void OnVideoCaptureStateChange(VideoCapturer* capturer,
275 CaptureState result); 274 CaptureState result);
276 void GetSupportedFormats_w( 275 void GetSupportedFormats_w(
277 VideoCapturer* capturer, 276 VideoCapturer* capturer,
278 std::vector<cricket::VideoFormat>* out_formats) const; 277 std::vector<cricket::VideoFormat>* out_formats) const;
279 bool IsScreencastRunning_w() const; 278 bool IsScreencastRunning_w() const;
(...skipping 29 matching lines...) Expand all
309 // but selected devices while this sting will be empty or contain current 308 // but selected devices while this sting will be empty or contain current
310 // selected device. 309 // selected device.
311 // TODO(hellner): refactor the code such that there is no need to keep two 310 // TODO(hellner): refactor the code such that there is no need to keep two
312 // strings for video devices that have subtle differences in behavior. 311 // strings for video devices that have subtle differences in behavior.
313 std::string video_device_name_; 312 std::string video_device_name_;
314 }; 313 };
315 314
316 } // namespace cricket 315 } // namespace cricket
317 316
318 #endif // TALK_SESSION_MEDIA_CHANNELMANAGER_H_ 317 #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