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

Unified Diff: content/browser/renderer_host/media/video_capture_manager.h

Issue 2169013002: Change class VideoCaptureDevice::Name to struct VideoCaptureDeviceDescriptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed emircan's comments. Created 4 years, 5 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: content/browser/renderer_host/media/video_capture_manager.h
diff --git a/content/browser/renderer_host/media/video_capture_manager.h b/content/browser/renderer_host/media/video_capture_manager.h
index d69bd897529dced8f77c13cf174c967c798d5dab..18959b6a3f22fe3d85ebb131def5603e7a7802d3 100644
--- a/content/browser/renderer_host/media/video_capture_manager.h
+++ b/content/browser/renderer_host/media/video_capture_manager.h
@@ -25,6 +25,7 @@
#include "base/threading/thread_checker.h"
#include "base/timer/elapsed_timer.h"
#include "build/build_config.h"
+#include "content/browser/media/video_capture_device_info.h"
#include "content/browser/renderer_host/media/media_stream_provider.h"
#include "content/browser/renderer_host/media/video_capture_controller_event_handler.h"
#include "content/common/content_export.h"
@@ -32,7 +33,6 @@
#include "media/base/video_capture_types.h"
#include "media/capture/video/video_capture_device.h"
#include "media/capture/video/video_capture_device_factory.h"
-#include "media/capture/video/video_capture_device_info.h"
#if defined(OS_ANDROID)
#include "base/android/application_status_listener.h"
@@ -180,6 +180,8 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
using SessionMap = std::map<media::VideoCaptureSessionId, MediaStreamDevice>;
using DeviceEntries = std::vector<std::unique_ptr<DeviceEntry>>;
using DeviceStartQueue = std::list<CaptureDeviceStartRequest>;
+ using VideoCaptureDeviceDescriptor = media::VideoCaptureDeviceDescriptor;
+ using VideoCaptureDeviceDescriptors = media::VideoCaptureDeviceDescriptors;
~VideoCaptureManager() override;
@@ -191,7 +193,7 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
void OnDevicesInfoEnumerated(
MediaStreamType stream_type,
base::ElapsedTimer* timer,
- const media::VideoCaptureDeviceInfos& new_devices_info_cache);
+ const VideoCaptureDeviceInfos& new_devices_info_cache);
bool IsOnDeviceThread() const;
@@ -199,11 +201,11 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
// devices in the system |names_snapshot|. Retrieves the supported formats of
// the new devices and sends the new cache to OnDevicesInfoEnumerated().
void ConsolidateDevicesInfoOnDeviceThread(
- base::Callback<void(const media::VideoCaptureDeviceInfos&)>
+ base::Callback<void(const VideoCaptureDeviceInfos&)>
on_devices_enumerated_callback,
MediaStreamType stream_type,
- const media::VideoCaptureDeviceInfos& old_device_info_cache,
- std::unique_ptr<VideoCaptureDevice::Names> names_snapshot);
+ const VideoCaptureDeviceInfos& old_device_info_cache,
+ std::unique_ptr<VideoCaptureDeviceDescriptors> descriptors_snapshot);
// Checks to see if |entry| has no clients left on its controller. If so,
// remove it from the list of devices, and delete it asynchronously. |entry|
@@ -224,7 +226,7 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
DeviceEntry* GetDeviceEntryBySerialId(int serial_id) const;
// Finds the device info by |id| in |devices_info_cache_|, or nullptr.
- media::VideoCaptureDeviceInfo* GetDeviceInfoById(const std::string& id);
+ VideoCaptureDeviceInfo* GetDeviceInfoById(const std::string& id);
// Finds a DeviceEntry entry for the indicated |capture_session_id|, creating
// a fresh one if necessary. Returns nullptr if said |capture_session_id| is
@@ -252,7 +254,7 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
// a DeviceEntry in |devices_|. Ownership of |client| passes to
// the device.
std::unique_ptr<VideoCaptureDevice> DoStartDeviceCaptureOnDeviceThread(
- const VideoCaptureDevice::Name& name,
+ const VideoCaptureDeviceDescriptor& descriptor,
const media::VideoCaptureParams& params,
std::unique_ptr<VideoCaptureDevice::Client> client);
@@ -335,7 +337,7 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
// this list in OnDevicesInfoEnumerated(). GetDeviceSupportedFormats() will
// use this list if the device is not started, otherwise it will retrieve the
// active device capture format from the VideoCaptureController associated.
- media::VideoCaptureDeviceInfos devices_info_cache_;
+ VideoCaptureDeviceInfos devices_info_cache_;
// Map used by DesktopCapture.
std::map<media::VideoCaptureSessionId, gfx::NativeViewId>

Powered by Google App Engine
This is Rietveld 408576698