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 CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ | 9 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ |
10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ | 10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ |
(...skipping 22 matching lines...) Expand all Loading... |
33 static uint32 VideoCodecProfileToV4L2PixFmt(media::VideoCodecProfile profile, | 33 static uint32 VideoCodecProfileToV4L2PixFmt(media::VideoCodecProfile profile, |
34 bool slice_based); | 34 bool slice_based); |
35 static uint32_t V4L2PixFmtToDrmFormat(uint32_t format); | 35 static uint32_t V4L2PixFmtToDrmFormat(uint32_t format); |
36 // Convert format requirements requested by a V4L2 device to gfx::Size. | 36 // Convert format requirements requested by a V4L2 device to gfx::Size. |
37 static gfx::Size CodedSizeFromV4L2Format(struct v4l2_format format); | 37 static gfx::Size CodedSizeFromV4L2Format(struct v4l2_format format); |
38 | 38 |
39 enum Type { | 39 enum Type { |
40 kDecoder, | 40 kDecoder, |
41 kEncoder, | 41 kEncoder, |
42 kImageProcessor, | 42 kImageProcessor, |
| 43 kJpegDecoder, |
43 }; | 44 }; |
44 | 45 |
45 // Creates and initializes an appropriate V4L2Device of |type| for the | 46 // Creates and initializes an appropriate V4L2Device of |type| for the |
46 // current platform and returns a scoped_ptr<V4L2Device> on success, or NULL. | 47 // current platform and returns a scoped_ptr<V4L2Device> on success, or NULL. |
47 static scoped_refptr<V4L2Device> Create(Type type); | 48 static scoped_refptr<V4L2Device> Create(Type type); |
48 | 49 |
49 // Parameters and return value are the same as for the standard ioctl() system | 50 // Parameters and return value are the same as for the standard ioctl() system |
50 // call. | 51 // call. |
51 virtual int Ioctl(int request, void* arg) = 0; | 52 virtual int Ioctl(int request, void* arg) = 0; |
52 | 53 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 friend class base::RefCountedThreadSafe<V4L2Device>; | 122 friend class base::RefCountedThreadSafe<V4L2Device>; |
122 explicit V4L2Device(Type type); | 123 explicit V4L2Device(Type type); |
123 virtual ~V4L2Device(); | 124 virtual ~V4L2Device(); |
124 | 125 |
125 const Type type_; | 126 const Type type_; |
126 }; | 127 }; |
127 | 128 |
128 } // namespace content | 129 } // namespace content |
129 | 130 |
130 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ | 131 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ |
OLD | NEW |