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 contains the implementation of GenericV4L2Device used on | 5 // This file contains the implementation of GenericV4L2Device used on |
6 // platforms, which provide generic V4L2 video codec devices. | 6 // platforms, which provide generic V4L2 video codec devices. |
7 | 7 |
8 #ifndef CONTENT_COMMON_GPU_MEDIA_GENERIC_V4L2_DEVICE_H_ | 8 #ifndef MEDIA_GPU_GENERIC_V4L2_DEVICE_H_ |
9 #define CONTENT_COMMON_GPU_MEDIA_GENERIC_V4L2_DEVICE_H_ | 9 #define MEDIA_GPU_GENERIC_V4L2_DEVICE_H_ |
10 | 10 |
11 #include <stddef.h> | 11 #include <stddef.h> |
12 #include <stdint.h> | 12 #include <stdint.h> |
13 | 13 |
14 #include "base/files/scoped_file.h" | 14 #include "base/files/scoped_file.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "content/common/gpu/media/v4l2_device.h" | 16 #include "media/gpu/v4l2_device.h" |
17 | 17 |
18 namespace content { | 18 namespace media { |
19 | 19 |
20 class GenericV4L2Device : public V4L2Device { | 20 class GenericV4L2Device : public V4L2Device { |
21 public: | 21 public: |
22 explicit GenericV4L2Device(Type type); | 22 explicit GenericV4L2Device(Type type); |
23 | 23 |
24 // V4L2Device implementation. | 24 // V4L2Device implementation. |
25 int Ioctl(int request, void* arg) override; | 25 int Ioctl(int request, void* arg) override; |
26 bool Poll(bool poll_device, bool* event_pending) override; | 26 bool Poll(bool poll_device, bool* event_pending) override; |
27 bool SetDevicePollInterrupt() override; | 27 bool SetDevicePollInterrupt() override; |
28 bool ClearDevicePollInterrupt() override; | 28 bool ClearDevicePollInterrupt() override; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 // Use libv4l2 when operating |device_fd_|. | 65 // Use libv4l2 when operating |device_fd_|. |
66 bool use_libv4l2_; | 66 bool use_libv4l2_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(GenericV4L2Device); | 68 DISALLOW_COPY_AND_ASSIGN(GenericV4L2Device); |
69 | 69 |
70 // Lazily initialize static data after sandbox is enabled. Return false on | 70 // Lazily initialize static data after sandbox is enabled. Return false on |
71 // init failure. | 71 // init failure. |
72 static bool PostSandboxInitialization(); | 72 static bool PostSandboxInitialization(); |
73 }; | 73 }; |
74 } // namespace content | 74 } // namespace media |
75 | 75 |
76 #endif // CONTENT_COMMON_GPU_MEDIA_GENERIC_V4L2_DEVICE_H_ | 76 #endif // MEDIA_GPU_GENERIC_V4L2_DEVICE_H_ |
OLD | NEW |