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

Side by Side Diff: content/common/gpu/media/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: Created 6 years, 10 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 unified diff | Download patch
OLDNEW
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_
11 11
12 #include "ui/gl/gl_bindings.h"
13
12 namespace content { 14 namespace content {
13 15
14 class V4L2Device { 16 class V4L2Device {
15 public: 17 public:
16 V4L2Device(); 18 V4L2Device();
17 virtual ~V4L2Device(); 19 virtual ~V4L2Device();
18 20
19 // Tries to create and initialize an appropriate V4L2Device object for the 21 // Tries to create and initialize an appropriate V4L2Device object for the
20 // current platform and returns a scoped_ptr<V4L2Device> on success else 22 // current platform and returns a scoped_ptr<V4L2Device> on success else
21 // returns NULL. 23 // returns NULL.
22 static scoped_ptr<V4L2Device> Create(); 24 static scoped_ptr<V4L2Device> Create(EGLContext egl_context);
23 25
24 // Parameters and return value are the same as for the standard ioctl() system 26 // Parameters and return value are the same as for the standard ioctl() system
25 // call. 27 // call.
26 virtual int Ioctl(int request, void* arg) = 0; 28 virtual int Ioctl(int request, void* arg) = 0;
27 29
28 // This method sleeps until either: 30 // This method sleeps until either:
29 // - SetDevicePollInterrupt() is called (on another thread), 31 // - SetDevicePollInterrupt() is called (on another thread),
30 // - |poll_device| is true, and there is new data to be read from the device, 32 // - |poll_device| is true, and there is new data to be read from the device,
31 // or an event from the device has arrived; in the latter case 33 // or an event from the device has arrived; in the latter case
32 // |*event_pending| will be set to true. 34 // |*event_pending| will be set to true.
(...skipping 10 matching lines...) Expand all
43 virtual bool SetDevicePollInterrupt() = 0; 45 virtual bool SetDevicePollInterrupt() = 0;
44 virtual bool ClearDevicePollInterrupt() = 0; 46 virtual bool ClearDevicePollInterrupt() = 0;
45 47
46 // Wrappers for standard mmap/munmap system calls. 48 // Wrappers for standard mmap/munmap system calls.
47 virtual void* Mmap(void* addr, 49 virtual void* Mmap(void* addr,
48 unsigned int len, 50 unsigned int len,
49 int prot, 51 int prot,
50 int flags, 52 int flags,
51 unsigned int offset) = 0; 53 unsigned int offset) = 0;
52 virtual void Munmap(void* addr, unsigned int len) = 0; 54 virtual void Munmap(void* addr, unsigned int len) = 0;
55
56 virtual EGLImageKHR CreateEGLImage(EGLDisplay egl_display,
Ami GONE FROM CHROMIUM 2014/02/07 09:09:30 Need to document these methods & parameters. I'm e
shivdasp 2014/02/10 13:31:17 This method exists because of the difference in ho
57 EGLint attrib[],
58 unsigned int texture_id,
59 unsigned int buffer_index) = 0;
60
61 virtual unsigned int GetTextureTarget() = 0;
53 }; 62 };
54 } // namespace content 63 } // namespace content
55 64
56 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DEVICE_H_ 65 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698