OLD | NEW |
---|---|
(Empty) | |
1 #ifndef CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_VIDEO_DEVICE_H_ | |
2 #define CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_VIDEO_DEVICE_H_ | |
3 | |
4 #include "content/common/gpu/media/v4l2_video_device.h" | |
5 #include "ui/gl/gl_bindings.h" | |
6 | |
7 namespace content { | |
8 | |
9 class TegraV4L2Device : public V4L2Device { | |
Ami GONE FROM CHROMIUM
2014/02/07 09:09:30
Class commentary please.
| |
10 public: | |
11 TegraV4L2Device(EGLContext egl_context); | |
Ami GONE FROM CHROMIUM
2014/02/07 09:09:30
explicit
| |
12 virtual ~TegraV4L2Device(); | |
13 | |
14 // Tries to create and initialize an TegraV4L2Device, returns | |
Ami GONE FROM CHROMIUM
2014/02/07 09:09:30
s/an/a/
but this comment seems like leftover copy/
| |
15 // a scoped_ptr on success else returns NULL. | |
16 int Ioctl(int flags, void* arg); | |
17 bool Poll(bool poll_device, bool* event_pending); | |
18 bool SetDevicePollInterrupt(void); | |
19 bool ClearDevicePollInterrupt(void); | |
20 void* Mmap(void* addr, | |
21 unsigned int len, | |
22 int prot, | |
23 int flags, | |
24 unsigned int offset); | |
25 void Munmap(void* addr, unsigned int len); | |
26 // Does all the initialization of device fds , returns true on success. | |
Ami GONE FROM CHROMIUM
2014/02/07 09:09:30
precede by newline
| |
27 bool Initialize(void); | |
28 | |
29 EGLImageKHR CreateEGLImage(EGLDisplay egl_display, | |
Ami GONE FROM CHROMIUM
2014/02/07 09:09:30
this and the next method belong above Initialize a
| |
30 EGLint attrib[], | |
31 unsigned int texture_id, | |
32 unsigned int buffer_index); | |
33 | |
34 unsigned int GetTextureTarget(); | |
35 | |
36 private: | |
37 // The actual device fd. | |
38 int device_fd_; | |
39 | |
40 // The EGLContext associated with this device. | |
41 EGLContext egl_context_; | |
Pawel Osciak
2014/02/10 06:36:17
To be honest I'm not especially excited with EGLCo
| |
42 | |
43 typedef int32 (*TegraV4L2OpenFunc)(const char* name, int32 flags); | |
44 typedef int32 (*TegraV4L2IoctlFunc)(int32 fd, unsigned long cmd, ...); | |
45 typedef int32 (*TegraV4L2CloseFunc)(int32 fd); | |
46 typedef int32 (*TegraV4L2PollFunc)(int32 fd, | |
47 bool poll_device, | |
48 bool* event_pending); | |
49 typedef int32 (*TegraV4L2SetDevicePollInterruptFunc)(int32 fd); | |
50 typedef int32 (*TegraV4L2ClearDevicePollInterruptFunc)(int32 fd); | |
51 | |
52 TegraV4L2OpenFunc TegraV4L2Open; | |
53 TegraV4L2IoctlFunc TegraV4L2Ioctl; | |
54 TegraV4L2CloseFunc TegraV4L2Close; | |
55 TegraV4L2PollFunc TegraV4L2Poll; | |
56 TegraV4L2SetDevicePollInterruptFunc TegraV4L2SetDevicePollInterrupt; | |
57 TegraV4L2ClearDevicePollInterruptFunc TegraV4L2ClearDevicePollInterrupt; | |
Ami GONE FROM CHROMIUM
2014/02/07 09:09:30
l.43-57 could be file-static in the .cc file, righ
| |
58 | |
59 DISALLOW_COPY_AND_ASSIGN(TegraV4L2Device); | |
60 }; | |
61 } | |
Pawel Osciak
2014/02/10 06:36:17
Empty line above and // namespace content please.
| |
62 | |
63 #endif // CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_VIDEO_DEVICE_H_ | |
OLD | NEW |