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

Side by Side Diff: media/capture/video/video_capture_device_factory.h

Issue 2494033004: [Mojo Video Capture] Use string keys instead of VideoCaptureDeviceDescriptor (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | services/video_capture/device_factory_media_to_mojo_adapter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_ 5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_
6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_ 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "media/capture/video/video_capture_device.h" 10 #include "media/capture/video/video_capture_device.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 // VideoCaptureDeviceFactory is the base class for creation of video capture 14 // VideoCaptureDeviceFactory is the base class for creation of video capture
15 // devices in the different platforms. VCDFs are created by MediaStreamManager 15 // devices in the different platforms. VCDFs are created by MediaStreamManager
16 // on IO thread and plugged into VideoCaptureManager, who owns and operates them 16 // on IO thread and plugged into VideoCaptureManager, who owns and operates them
17 // in Device Thread (a.k.a. Audio Thread). 17 // in Device Thread (a.k.a. Audio Thread).
18 // Typical operation is to first call EnumerateDeviceDescriptors() to obtain 18 // Typical operation is to first call EnumerateDeviceDescriptors() to obtain
19 // information about available devices. The obtained descriptors can then be 19 // information about available devices. The obtained descriptors can then be
20 // used to either obtain the supported formats of a device using 20 // used to either obtain the supported formats of a device using
21 // GetSupportedFormats(), or to create an instance of VideoCaptureDevice for 21 // GetSupportedFormats(), or to create an instance of VideoCaptureDevice for
22 // the device using CreateDevice(). 22 // the device using CreateDevice().
23 // TODO(chfremer): Add a layer on top of the platform-specific implementations
24 // that uses strings instead of descriptors as keys for accessing devices.
25 // crbug.com/665065
23 class CAPTURE_EXPORT VideoCaptureDeviceFactory { 26 class CAPTURE_EXPORT VideoCaptureDeviceFactory {
24 public: 27 public:
25 static std::unique_ptr<VideoCaptureDeviceFactory> CreateFactory( 28 static std::unique_ptr<VideoCaptureDeviceFactory> CreateFactory(
26 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); 29 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
27 30
28 VideoCaptureDeviceFactory(); 31 VideoCaptureDeviceFactory();
29 virtual ~VideoCaptureDeviceFactory(); 32 virtual ~VideoCaptureDeviceFactory();
30 33
31 // Creates a VideoCaptureDevice object. Returns NULL if something goes wrong. 34 // Creates a VideoCaptureDevice object. Returns NULL if something goes wrong.
32 virtual std::unique_ptr<VideoCaptureDevice> CreateDevice( 35 virtual std::unique_ptr<VideoCaptureDevice> CreateDevice(
(...skipping 25 matching lines...) Expand all
58 private: 61 private:
59 static VideoCaptureDeviceFactory* CreateVideoCaptureDeviceFactory( 62 static VideoCaptureDeviceFactory* CreateVideoCaptureDeviceFactory(
60 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); 63 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
61 64
62 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceFactory); 65 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceFactory);
63 }; 66 };
64 67
65 } // namespace media 68 } // namespace media
66 69
67 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_ 70 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | services/video_capture/device_factory_media_to_mojo_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698