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_VIDEO_DEVICE_H_ | 9 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DEVICE_H_ |
10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DEVICE_H_ | 10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DEVICE_H_ |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 virtual ~V4L2Device(); | 28 virtual ~V4L2Device(); |
29 | 29 |
30 enum Type { | 30 enum Type { |
31 kDecoder, | 31 kDecoder, |
32 kEncoder, | 32 kEncoder, |
33 kImageProcessor, | 33 kImageProcessor, |
34 }; | 34 }; |
35 | 35 |
36 // Creates and initializes an appropriate V4L2Device of |type| for the | 36 // Creates and initializes an appropriate V4L2Device of |type| for the |
37 // current platform and returns a scoped_ptr<V4L2Device> on success, or NULL. | 37 // current platform and returns a scoped_ptr<V4L2Device> on success, |
| 38 // or nullptr. |
38 static scoped_ptr<V4L2Device> Create(Type type); | 39 static scoped_ptr<V4L2Device> Create(Type type); |
39 | 40 |
40 // Parameters and return value are the same as for the standard ioctl() system | 41 // Parameters and return value are the same as for the standard ioctl() system |
41 // call. | 42 // call. |
42 virtual int Ioctl(int request, void* arg) = 0; | 43 virtual int Ioctl(int request, void* arg) = 0; |
43 | 44 |
44 // This method sleeps until either: | 45 // This method sleeps until either: |
45 // - SetDevicePollInterrupt() is called (on another thread), | 46 // - SetDevicePollInterrupt() is called (on another thread), |
46 // - |poll_device| is true, and there is new data to be read from the device, | 47 // - |poll_device| is true, and there is new data to be read from the device, |
47 // or an event from the device has arrived; in the latter case | 48 // or an event from the device has arrived; in the latter case |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // Returns the preferred V4L2 input format or 0 if don't care. | 94 // Returns the preferred V4L2 input format or 0 if don't care. |
94 virtual uint32 PreferredInputFormat() = 0; | 95 virtual uint32 PreferredInputFormat() = 0; |
95 | 96 |
96 // Returns the preferred V4L2 output format or 0 if don't care. | 97 // Returns the preferred V4L2 output format or 0 if don't care. |
97 virtual uint32 PreferredOutputFormat() = 0; | 98 virtual uint32 PreferredOutputFormat() = 0; |
98 }; | 99 }; |
99 | 100 |
100 } // namespace content | 101 } // namespace content |
101 | 102 |
102 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DEVICE_H_ | 103 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DEVICE_H_ |
OLD | NEW |