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

Unified Diff: talk/session/media/channelmanager.h

Issue 1346153002: Remove use of DeviceManager from ChannelManager. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: talk/session/media/channelmanager.h
diff --git a/talk/session/media/channelmanager.h b/talk/session/media/channelmanager.h
index 5f7651934dae862688dbe9b2275a7cdaee2b2fe2..cb4559c7b0a5b349e420ff6154e95f3d63cc1aa4 100644
--- a/talk/session/media/channelmanager.h
+++ b/talk/session/media/channelmanager.h
@@ -65,12 +65,10 @@ class ChannelManager : public rtc::MessageHandler,
// ownership of these objects.
ChannelManager(MediaEngineInterface* me,
DataEngineInterface* dme,
- DeviceManagerInterface* dm,
CaptureManager* cm,
rtc::Thread* worker);
// Same as above, but gives an easier default DataEngine.
ChannelManager(MediaEngineInterface* me,
- DeviceManagerInterface* dm,
rtc::Thread* worker);
~ChannelManager();
@@ -135,29 +133,8 @@ class ChannelManager : public rtc::MessageHandler,
return (!voice_channels_.empty() || !video_channels_.empty());
}
- // Configures the audio and video devices. A null pointer can be passed to
- // GetAudioOptions() for any parameter of no interest.
- bool GetAudioOptions(std::string* wave_in_device,
- std::string* wave_out_device,
- AudioOptions* options);
- bool SetAudioOptions(const std::string& wave_in_device,
- const std::string& wave_out_device,
- const AudioOptions& options);
bool GetOutputVolume(int* level);
bool SetOutputVolume(int level);
- bool IsSameCapturer(const std::string& capturer_name,
- VideoCapturer* capturer);
- // TODO(noahric): Nearly everything called "device" in this API is actually a
- // device name, so this should really be GetCaptureDeviceName, and the
- // next method should be GetCaptureDevice.
- bool GetCaptureDevice(std::string* cam_device);
- // Gets the current capture Device.
- bool GetVideoCaptureDevice(Device* device);
- // Create capturer based on what has been set in SetCaptureDevice().
- VideoCapturer* CreateVideoCapturer();
- // Create capturer from a screen.
- VideoCapturer* CreateScreenCapturer(const ScreencastId& screenid);
- bool SetCaptureDevice(const std::string& cam_device);
bool SetDefaultVideoEncoderConfig(const VideoEncoderConfig& config);
// RTX will be enabled/disabled in engines that support it. The supporting
// engines will start offering an RTX codec. Must be called before Init().
@@ -196,35 +173,16 @@ class ChannelManager : public rtc::MessageHandler,
// The operations below occur on the main thread.
- bool GetAudioInputDevices(std::vector<std::string>* names);
- bool GetAudioOutputDevices(std::vector<std::string>* names);
- bool GetVideoCaptureDevices(std::vector<std::string>* names);
- void SetVideoCaptureDeviceMaxFormat(const std::string& usb_id,
- const VideoFormat& max_format);
-
// Starts AEC dump using existing file.
bool StartAecDump(rtc::PlatformFile file);
- sigslot::repeater0<> SignalDevicesChange;
sigslot::signal2<VideoCapturer*, CaptureState> SignalVideoCaptureStateChange;
- // Returns the current selected device. Note: Subtly different from
- // GetCaptureDevice(). See member video_device_ for more details.
- // This API is mainly a hook used by unittests.
- const std::string& video_device_name() const { return video_device_name_; }
-
-
protected:
// Adds non-transient parameters which can only be changed through the
// options store.
- bool SetAudioOptions(const std::string& wave_in_device,
- const std::string& wave_out_device,
- const AudioOptions& options,
- int delay_offset);
+ bool SetAudioOptions(const AudioOptions& options, int delay_offset);
int audio_delay_offset() const { return audio_delay_offset_; }
- // This is here so that ChannelManager subclasses can set the video
- // capturer factories to use.
- DeviceManagerInterface* device_manager() { return device_manager_.get(); }
private:
typedef std::vector<VoiceChannel*> VoiceChannels;
@@ -233,7 +191,6 @@ class ChannelManager : public rtc::MessageHandler,
void Construct(MediaEngineInterface* me,
DataEngineInterface* dme,
- DeviceManagerInterface* dm,
CaptureManager* cm,
rtc::Thread* worker_thread);
bool InitMediaEngine_w();
@@ -260,7 +217,6 @@ class ChannelManager : public rtc::MessageHandler,
void DestroyDataChannel_w(DataChannel* data_channel);
bool SetAudioOptions_w(const AudioOptions& options, int delay_offset,
const Device* in_dev, const Device* out_dev);
- bool SetCaptureDevice_w(const Device* cam_device);
void OnVideoCaptureStateChange(VideoCapturer* capturer,
CaptureState result);
void GetSupportedFormats_w(
@@ -271,7 +227,6 @@ class ChannelManager : public rtc::MessageHandler,
rtc::scoped_ptr<MediaEngineInterface> media_engine_;
rtc::scoped_ptr<DataEngineInterface> data_media_engine_;
- rtc::scoped_ptr<DeviceManagerInterface> device_manager_;
rtc::scoped_ptr<CaptureManager> capture_manager_;
bool initialized_;
rtc::Thread* main_thread_;
@@ -281,25 +236,14 @@ class ChannelManager : public rtc::MessageHandler,
VideoChannels video_channels_;
DataChannels data_channels_;
- std::string audio_in_device_;
- std::string audio_out_device_;
AudioOptions audio_options_;
int audio_delay_offset_;
int audio_output_volume_;
- std::string camera_device_;
VideoEncoderConfig default_video_encoder_config_;
VideoRenderer* local_renderer_;
bool enable_rtx_;
bool capturing_;
-
- // String containing currently set device. Note that this string is subtly
- // different from camera_device_. E.g. camera_device_ will list unplugged
- // but selected devices while this sting will be empty or contain current
- // selected device.
- // TODO(hellner): refactor the code such that there is no need to keep two
- // strings for video devices that have subtle differences in behavior.
- std::string video_device_name_;
};
} // namespace cricket

Powered by Google App Engine
This is Rietveld 408576698