| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 depended on the OS | 9 // VideoCaptureManager. Capturing is done on other threads depended on the OS |
| 10 // specific implementation. | 10 // specific implementation. |
| 11 | 11 |
| 12 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 12 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
| 13 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 13 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
| 14 | 14 |
| 15 #include <list> | 15 #include <list> |
| 16 #include <string> | 16 #include <string> |
| 17 | 17 |
| 18 #include "base/time.h" | 18 #include "base/time.h" |
| 19 #include "media/base/media_export.h" |
| 19 | 20 |
| 20 namespace media { | 21 namespace media { |
| 21 | 22 |
| 22 class VideoCaptureDevice { | 23 class MEDIA_EXPORT VideoCaptureDevice { |
| 23 public: | 24 public: |
| 24 | 25 |
| 25 struct Name { | 26 struct Name { |
| 26 // Friendly name of a device | 27 // Friendly name of a device |
| 27 std::string device_name; | 28 std::string device_name; |
| 28 | 29 |
| 29 // Unique name of a device. Even if there are multiple devices with the same | 30 // Unique name of a device. Even if there are multiple devices with the same |
| 30 // friendly name connected to the computer this will be unique. | 31 // friendly name connected to the computer this will be unique. |
| 31 std::string unique_id; | 32 std::string unique_id; |
| 32 }; | 33 }; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // state it was when created. | 102 // state it was when created. |
| 102 virtual void DeAllocate() = 0; | 103 virtual void DeAllocate() = 0; |
| 103 | 104 |
| 104 // Get the name of the capture device. | 105 // Get the name of the capture device. |
| 105 virtual const Name& device_name() = 0; | 106 virtual const Name& device_name() = 0; |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 } // namespace media | 109 } // namespace media |
| 109 | 110 |
| 110 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 111 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
| OLD | NEW |