Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_H_ | |
| 6 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_H_ | |
| 7 | |
| 8 #include "media/video/capture/video_capture_device.h" | |
| 9 | |
| 10 namespace media { | |
| 11 | |
| 12 // VideoCaptureDeviceFactory is the abstract base class for creation of video | |
| 13 // capture devices in the different platforms. Derived classes are created and | |
| 14 // owned by VideoCaptureManager in IO Thread. | |
|
perkj_chrome
2014/04/17 08:39:09
So this is obviously not true VideoCaptureManager:
mcasas
2014/04/23 06:20:28
Correct, factory lives and operates in Device Thre
| |
| 15 class MEDIA_EXPORT VideoCaptureDeviceFactory { | |
| 16 public: | |
| 17 VideoCaptureDeviceFactory() {}; | |
| 18 virtual ~VideoCaptureDeviceFactory() {}; | |
| 19 | |
| 20 // Creates a VideoCaptureDevice object. Returns NULL if something goes wrong. | |
| 21 // TODO(mcasas): Return a scoped_ptr to make ownership explicit. | |
|
perkj_chrome
2014/04/17 08:39:09
This is a new class. Why leave this as a TODO?
mcasas
2014/04/23 06:20:28
Changed here to scoped_ptr<> since it clarifies ow
| |
| 22 virtual VideoCaptureDevice* Create( | |
| 23 const VideoCaptureDevice::Name& device_name); | |
| 24 | |
| 25 // Gets the names of all video capture devices connected to this computer. | |
| 26 virtual void GetDeviceNames(VideoCaptureDevice::Names* device_names); | |
| 27 | |
| 28 // Gets the supported formats of a particular device attached to the system. | |
| 29 // This method should be called before allocating or starting a device. In | |
| 30 // case format enumeration is not supported, or there was a problem, the | |
| 31 // formats array will be empty. | |
| 32 virtual void GetDeviceSupportedFormats( | |
| 33 const VideoCaptureDevice::Name& device, | |
| 34 VideoCaptureFormats* supported_formats); | |
| 35 | |
| 36 private: | |
| 37 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceFactory); | |
| 38 }; | |
| 39 | |
| 40 } // namespace media | |
| 41 | |
| 42 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_H_ | |
| OLD | NEW |