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

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

Issue 17402002: Reconnect support for DirectShow video capture devices in parallel to MediaFoundation ones. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // VideoCaptureDevice is the abstract base class for realizing video capture 5 // VideoCaptureDevice is the abstract base class for realizing video capture
6 // device support in Chromium. It provides the interface for OS dependent 6 // device support in Chromium. It provides the interface for OS dependent
7 // implementations. 7 // implementations.
8 // The class is created and functions are invoked on a thread owned by 8 // The class is created and functions are invoked on a thread owned by
9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS 9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS
10 // specific implementation. 10 // specific implementation.
(...skipping 13 matching lines...) Expand all
24 class MEDIA_EXPORT VideoCaptureDevice { 24 class MEDIA_EXPORT VideoCaptureDevice {
25 public: 25 public:
26 26
27 struct Name { 27 struct Name {
28 // Friendly name of a device 28 // Friendly name of a device
29 std::string device_name; 29 std::string device_name;
30 30
31 // Unique name of a device. Even if there are multiple devices with the same 31 // Unique name of a device. Even if there are multiple devices with the same
32 // friendly name connected to the computer this will be unique. 32 // friendly name connected to the computer this will be unique.
33 std::string unique_id; 33 std::string unique_id;
34
35 friend bool operator==(const Name& left, const Name& right) {
tommi (sloooow) - chröme 2013/06/24 11:09:27 In general operator overloading is discouraged but
mcasas 2013/06/25 07:04:36 Ok, supposition correct, done.
36 return (left.unique_id == right.unique_id);
37 }
38 bool operator<(const Name& other) {
39 return (this->unique_id < other.unique_id);
tommi (sloooow) - chröme 2013/06/24 11:09:27 remove "this->"
mcasas 2013/06/25 07:04:36 Done.
40 }
34 }; 41 };
35 typedef std::list<Name> Names; 42 typedef std::list<Name> Names;
36 43
37 class MEDIA_EXPORT EventHandler { 44 class MEDIA_EXPORT EventHandler {
38 public: 45 public:
39 46
40 // Reserve an output buffer into which a video frame can be captured 47 // Reserve an output buffer into which a video frame can be captured
41 // directly. If all buffers are currently busy, returns NULL. 48 // directly. If all buffers are currently busy, returns NULL.
42 // 49 //
43 // The returned VideoFrames will always be allocated with a YV12 format. The 50 // The returned VideoFrames will always be allocated with a YV12 format. The
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // not permitted to make any additional calls to its EventHandler. 140 // not permitted to make any additional calls to its EventHandler.
134 virtual void DeAllocate() = 0; 141 virtual void DeAllocate() = 0;
135 142
136 // Get the name of the capture device. 143 // Get the name of the capture device.
137 virtual const Name& device_name() = 0; 144 virtual const Name& device_name() = 0;
138 }; 145 };
139 146
140 } // namespace media 147 } // namespace media
141 148
142 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ 149 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698