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

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

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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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/15 09:34:01 is That really true? I thought the VideoCaptureMan
mcasas 2014/04/15 13:47:09 MediaStreamManager lives between UI thread and IO
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.
22 virtual VideoCaptureDevice* Create(
perkj_chrome 2014/04/15 09:34:01 Add areal implementation of this interface as well
mcasas 2014/04/15 13:47:09 Done.
23 const VideoCaptureDevice::Name& device_name) = 0;
24
25 // Gets the names of all video capture devices connected to this computer.
26 virtual void GetDeviceNames(VideoCaptureDevice::Names* device_names) = 0;
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) = 0;
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698