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
3 // found in the LICENSE file.
5 // This file contains the implementation of ExynosV4L2Device used on
8 #ifndef CONTENT_COMMON_GPU_MEDIA_EXYNOS_V4L2_VIDEO_DEVICE_H_
9 #define CONTENT_COMMON_GPU_MEDIA_EXYNOS_V4L2_VIDEO_DEVICE_H_
11 #include "content/common/gpu/media/v4l2_video_device.h"
15 class ExynosV4L2Device
: public V4L2Device
{
17 explicit ExynosV4L2Device(Type type
);
18 virtual ~ExynosV4L2Device();
20 // V4L2Device implementation.
21 virtual int Ioctl(int request
, void* arg
) OVERRIDE
;
22 virtual bool Poll(bool poll_device
, bool* event_pending
) OVERRIDE
;
23 virtual bool SetDevicePollInterrupt() OVERRIDE
;
24 virtual bool ClearDevicePollInterrupt() OVERRIDE
;
25 virtual void* Mmap(void* addr
,
29 unsigned int offset
) OVERRIDE
;
30 virtual void Munmap(void* addr
, unsigned int len
) OVERRIDE
;
31 virtual bool Initialize() OVERRIDE
;
32 virtual EGLImageKHR
CreateEGLImage(EGLDisplay egl_display
,
33 EGLContext egl_context
,
35 gfx::Size frame_buffer_size
,
36 unsigned int buffer_index
,
37 size_t planes_count
) OVERRIDE
;
38 virtual EGLBoolean
DestroyEGLImage(EGLDisplay egl_display
,
39 EGLImageKHR egl_image
) OVERRIDE
;
40 virtual GLenum
GetTextureTarget() OVERRIDE
;
41 virtual uint32
PreferredInputFormat() OVERRIDE
;
42 virtual uint32
PreferredOutputFormat() OVERRIDE
;
47 // The actual device fd.
50 // eventfd fd to signal device poll thread when its poll() should be
52 int device_poll_interrupt_fd_
;
54 DISALLOW_COPY_AND_ASSIGN(ExynosV4L2Device
);
56 } // namespace content
58 #endif // CONTENT_COMMON_GPU_MEDIA_EXYNOS_V4L2_VIDEO_DEVICE_H_