Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(983)

Unified Diff: content/common/gpu/media/tegra_v4l2_video_device.h

Issue 137023008: Add support for Tegra V4L2 VDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor nit Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/media/rendering_helper.cc ('k') | content/common/gpu/media/tegra_v4l2_video_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/tegra_v4l2_video_device.h
diff --git a/content/common/gpu/media/tegra_v4l2_video_device.h b/content/common/gpu/media/tegra_v4l2_video_device.h
new file mode 100644
index 0000000000000000000000000000000000000000..62ade4d0a36f876e5138016d789d6618246e9c73
--- /dev/null
+++ b/content/common/gpu/media/tegra_v4l2_video_device.h
@@ -0,0 +1,57 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// This file contains the implementation of TegraV4L2Device used on
+// Tegra platform.
+
+#ifndef CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_VIDEO_DEVICE_H_
+#define CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_VIDEO_DEVICE_H_
+
+#include "content/common/gpu/media/v4l2_video_device.h"
+#include "ui/gl/gl_bindings.h"
+
+namespace content {
+
+// This class implements the V4L2Device interface for Tegra platform.
+// It interfaces with libtegrav4l2 library which provides API that exhibit the
+// V4L2 specification via the library API instead of system calls.
+class TegraV4L2Device : public V4L2Device {
+ public:
+ explicit TegraV4L2Device(EGLContext egl_context);
+ virtual ~TegraV4L2Device();
+
+ virtual int Ioctl(int flags, void* arg) OVERRIDE;
+ virtual bool Poll(bool poll_device, bool* event_pending) OVERRIDE;
+ virtual bool SetDevicePollInterrupt() OVERRIDE;
+ virtual bool ClearDevicePollInterrupt() OVERRIDE;
+ virtual void* Mmap(void* addr,
+ unsigned int len,
+ int prot,
+ int flags,
+ unsigned int offset) OVERRIDE;
+ virtual void Munmap(void* addr, unsigned int len) OVERRIDE;
+ virtual bool Initialize() OVERRIDE;
+ virtual EGLImageKHR CreateEGLImage(EGLDisplay egl_display,
+ GLuint texture_id,
+ gfx::Size frame_buffer_size,
+ unsigned int buffer_index,
+ size_t planes_count) OVERRIDE;
+ virtual EGLBoolean DestroyEGLImage(EGLDisplay egl_display,
+ EGLImageKHR egl_image) OVERRIDE;
+ virtual GLenum GetTextureTarget() OVERRIDE;
+ virtual uint32 PreferredOutputFormat() OVERRIDE;
+
+ private:
+ // The actual device fd.
+ int device_fd_;
+
+ // The EGLContext associated with this device.
+ EGLContext egl_context_;
+
+ DISALLOW_COPY_AND_ASSIGN(TegraV4L2Device);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_VIDEO_DEVICE_H_
« no previous file with comments | « content/common/gpu/media/rendering_helper.cc ('k') | content/common/gpu/media/tegra_v4l2_video_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698