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

Unified Diff: media/video/capture/video_capture_device_factory.cc

Issue 235353002: Extract VideoCaptureDeviceFactory out of VideoCaptureDevice and use for File and FakeVCD. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: perkj@s comments Created 6 years, 8 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/video_capture_device_factory.cc
diff --git a/media/video/capture/video_capture_device_factory.cc b/media/video/capture/video_capture_device_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e1003c7c9804d89488ee0a20e6e2cdaf91de9437
--- /dev/null
+++ b/media/video/capture/video_capture_device_factory.cc
@@ -0,0 +1,33 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "media/video/capture/video_capture_device_factory.h"
+
+namespace media {
+
+VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() {
+ thread_checker_.DetachFromThread();
+};
+
+scoped_ptr<VideoCaptureDevice> VideoCaptureDeviceFactory::Create(
+ const VideoCaptureDevice::Name& device_name) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return scoped_ptr<VideoCaptureDevice>(
+ VideoCaptureDevice::Create(device_name));
+}
+
+void VideoCaptureDeviceFactory::GetDeviceNames(
+ VideoCaptureDevice::Names* device_names) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ VideoCaptureDevice::GetDeviceNames(device_names);
+};
tommi (sloooow) - chröme 2014/04/23 14:33:59 no ; (and a few lines below)
mcasas 2014/04/23 15:13:30 I must have been temporarily blind :) Done.
+
+void VideoCaptureDeviceFactory::GetDeviceSupportedFormats(
+ const VideoCaptureDevice::Name& device,
+ VideoCaptureFormats* supported_formats) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ VideoCaptureDevice::GetDeviceSupportedFormats(device, supported_formats);
+};
+
+} // namespace media

Powered by Google App Engine
This is Rietveld 408576698