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

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

Issue 2634263002: Pass camera facing info to audio client (Closed)
Patch Set: separate out video_capture_observer_chromeos Created 3 years, 10 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 2136b308d02a6ca0e060aea10b3a123f6d6af1c3..940619b9c09a1bf115f93def41ece9ba7141ed6c 100644
--- a/content/browser/renderer_host/media/video_capture_manager.h
+++ b/content/browser/renderer_host/media/video_capture_manager.h
@@ -29,6 +29,7 @@
#include "content/browser/renderer_host/media/video_capture_controller_event_handler.h"
#include "content/common/content_export.h"
#include "content/common/media/media_stream_options.h"
+#include "media/base/video_facing.h"
#include "media/capture/video/video_capture_device.h"
#include "media/capture/video/video_capture_device_factory.h"
#include "media/capture/video_capture_types.h"
@@ -53,6 +54,15 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
explicit VideoCaptureManager(
std::unique_ptr<media::VideoCaptureDeviceFactory> factory);
+ // This can be called only before any devices are open or after all devices
+ // are closed.
+ // It can be called more than once and it's ok to not call at all if the
+ // client is not interested in receiving media::VideoCaptureObserver callacks.
+ // This method can be called on whatever thread. The callbacks of
+ // media::VideoCaptureObserver arrive on browser IO thread.
+ void SetVideoCaptureObserver(
+ std::unique_ptr<media::VideoCaptureObserver> observer);
+
void Unregister();
// Implements MediaStreamProvider.
@@ -336,6 +346,8 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
std::unique_ptr<media::VideoCaptureDeviceFactory>
video_capture_device_factory_;
+ std::unique_ptr<media::VideoCaptureObserver> capture_observer_;
+
// Local cache of the enumerated video capture devices' names and capture
// supported formats. A snapshot of the current devices and their capabilities
// is composed in VideoCaptureDeviceFactory::EnumerateDeviceNames() and

Powered by Google App Engine
This is Rietveld 408576698