| 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 CONTENT_COMMON_GPU_MEDIA_GENERIC_V4L2_DEVICE_H_ |
| 9 #define CONTENT_COMMON_GPU_MEDIA_GENERIC_V4L2_DEVICE_H_ | 9 #define CONTENT_COMMON_GPU_MEDIA_GENERIC_V4L2_DEVICE_H_ |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 unsigned int buffer_index, | 37 unsigned int buffer_index, |
| 38 uint32_t v4l2_pixfmt, | 38 uint32_t v4l2_pixfmt, |
| 39 size_t num_v4l2_planes) override; | 39 size_t num_v4l2_planes) override; |
| 40 EGLBoolean DestroyEGLImage(EGLDisplay egl_display, | 40 EGLBoolean DestroyEGLImage(EGLDisplay egl_display, |
| 41 EGLImageKHR egl_image) override; | 41 EGLImageKHR egl_image) override; |
| 42 GLenum GetTextureTarget() override; | 42 GLenum GetTextureTarget() override; |
| 43 uint32 PreferredInputFormat() override; | 43 uint32 PreferredInputFormat() override; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 ~GenericV4L2Device() override; | 46 ~GenericV4L2Device() override; |
| 47 const Type type_; | |
| 48 | 47 |
| 49 // The actual device fd. | 48 // The actual device fd. |
| 50 base::ScopedFD device_fd_; | 49 base::ScopedFD device_fd_; |
| 51 | 50 |
| 52 // eventfd fd to signal device poll thread when its poll() should be | 51 // eventfd fd to signal device poll thread when its poll() should be |
| 53 // interrupted. | 52 // interrupted. |
| 54 base::ScopedFD device_poll_interrupt_fd_; | 53 base::ScopedFD device_poll_interrupt_fd_; |
| 55 | 54 |
| 56 // Use libv4l2 when operating |device_fd_|. | 55 // Use libv4l2 when operating |device_fd_|. |
| 57 bool use_libv4l2_; | 56 bool use_libv4l2_; |
| 58 | 57 |
| 59 DISALLOW_COPY_AND_ASSIGN(GenericV4L2Device); | 58 DISALLOW_COPY_AND_ASSIGN(GenericV4L2Device); |
| 60 | 59 |
| 61 // Lazily initialize static data after sandbox is enabled. Return false on | 60 // Lazily initialize static data after sandbox is enabled. Return false on |
| 62 // init failure. | 61 // init failure. |
| 63 static bool PostSandboxInitialization(); | 62 static bool PostSandboxInitialization(); |
| 64 }; | 63 }; |
| 65 } // namespace content | 64 } // namespace content |
| 66 | 65 |
| 67 #endif // CONTENT_COMMON_GPU_MEDIA_GENERIC_V4L2_DEVICE_H_ | 66 #endif // CONTENT_COMMON_GPU_MEDIA_GENERIC_V4L2_DEVICE_H_ |
| OLD | NEW |