Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // This file defines the V4L2Device interface which is used by the | 5 // This file defines the V4L2Device interface which is used by the |
| 6 // V4L2DecodeAccelerator class to delegate/pass the device specific | 6 // V4L2DecodeAccelerator class to delegate/pass the device specific |
| 7 // handling of any of the functionalities. | 7 // handling of any of the functionalities. |
| 8 | 8 |
| 9 #ifndef MEDIA_GPU_V4L2_DEVICE_H_ | 9 #ifndef MEDIA_GPU_V4L2_DEVICE_H_ |
| 10 #define MEDIA_GPU_V4L2_DEVICE_H_ | 10 #define MEDIA_GPU_V4L2_DEVICE_H_ |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 // Convert format requirements requested by a V4L2 device to gfx::Size. | 44 // Convert format requirements requested by a V4L2 device to gfx::Size. |
| 45 static gfx::Size CodedSizeFromV4L2Format(struct v4l2_format format); | 45 static gfx::Size CodedSizeFromV4L2Format(struct v4l2_format format); |
| 46 | 46 |
| 47 enum Type { | 47 enum Type { |
| 48 kDecoder, | 48 kDecoder, |
| 49 kEncoder, | 49 kEncoder, |
| 50 kImageProcessor, | 50 kImageProcessor, |
| 51 kJpegDecoder, | 51 kJpegDecoder, |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 // Returns true if V4L2 device of this platform requires libv4l2. | |
| 55 static bool IsUsingLibV4L2(); | |
|
Mark Dittmer
2016/05/04 15:04:41
Does this also need MEDIA_GPU_EXPORT?
| |
| 56 | |
| 54 // Creates and initializes an appropriate V4L2Device of |type| for the | 57 // Creates and initializes an appropriate V4L2Device of |type| for the |
| 55 // current platform and returns a scoped_refptr<V4L2Device> on success, or | 58 // current platform and returns a scoped_refptr<V4L2Device> on success, or |
| 56 // NULL. | 59 // NULL. |
| 57 static scoped_refptr<V4L2Device> Create(Type type); | 60 static scoped_refptr<V4L2Device> Create(Type type); |
| 58 | 61 |
| 59 // Parameters and return value are the same as for the standard ioctl() system | 62 // Parameters and return value are the same as for the standard ioctl() system |
| 60 // call. | 63 // call. |
| 61 virtual int Ioctl(int request, void* arg) = 0; | 64 virtual int Ioctl(int request, void* arg) = 0; |
| 62 | 65 |
| 63 // This method sleeps until either: | 66 // This method sleeps until either: |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 friend class base::RefCountedThreadSafe<V4L2Device>; | 155 friend class base::RefCountedThreadSafe<V4L2Device>; |
| 153 explicit V4L2Device(Type type); | 156 explicit V4L2Device(Type type); |
| 154 virtual ~V4L2Device(); | 157 virtual ~V4L2Device(); |
| 155 | 158 |
| 156 const Type type_; | 159 const Type type_; |
| 157 }; | 160 }; |
| 158 | 161 |
| 159 } // namespace media | 162 } // namespace media |
| 160 | 163 |
| 161 #endif // MEDIA_GPU_V4L2_DEVICE_H_ | 164 #endif // MEDIA_GPU_V4L2_DEVICE_H_ |
| OLD | NEW |