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

Unified Diff: media/video/capture/mac/video_capture_device_factory_mac.h

Issue 294893006: VideoCaptureDeviceFactory: Change device enumeration to callback + QTKit enumerates in UI thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: QTKit/AVFoundation Factory create of inexistent device and associated unit tests Created 6 years, 7 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: media/video/capture/mac/video_capture_device_factory_mac.h
diff --git a/media/video/capture/mac/video_capture_device_factory_mac.h b/media/video/capture/mac/video_capture_device_factory_mac.h
index a3f26fdede9b629c92ff985aaf3969c17c5264ea..7bc815381e05d6bfc21a6a44e40ecd1d792b4fa4 100644
--- a/media/video/capture/mac/video_capture_device_factory_mac.h
+++ b/media/video/capture/mac/video_capture_device_factory_mac.h
@@ -15,18 +15,25 @@ namespace media {
class MEDIA_EXPORT VideoCaptureDeviceFactoryMac :
public VideoCaptureDeviceFactory {
public:
- VideoCaptureDeviceFactoryMac();
- virtual ~VideoCaptureDeviceFactoryMac() {}
+ static bool PlatformSupportsAVFoundation();
+
+ explicit VideoCaptureDeviceFactoryMac(
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
+ virtual ~VideoCaptureDeviceFactoryMac();
virtual scoped_ptr<VideoCaptureDevice> Create(
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
const VideoCaptureDevice::Name& device_name) OVERRIDE;
virtual void GetDeviceNames(VideoCaptureDevice::Names* device_names) OVERRIDE;
+ virtual void EnumerateDeviceNames(const base::Callback<
+ void(scoped_ptr<media::VideoCaptureDevice::Names>)>& callback) OVERRIDE;
virtual void GetDeviceSupportedFormats(
const VideoCaptureDevice::Name& device,
VideoCaptureFormats* supported_formats) OVERRIDE;
private:
+ // Cache of |ui_task_runner| for enumerating devices there for QTKit.
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
+
DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceFactoryMac);
};

Powered by Google App Engine
This is Rietveld 408576698