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

Side by Side Diff: content/common/gpu/media/tegra_v4l2_device.h

Issue 1822983002: Support external buffer import in VDA interface and add a V4L2SVDA impl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 contains the implementation of TegraV4L2Device used on 5 // This file contains the implementation of TegraV4L2Device used on
6 // Tegra platform. 6 // Tegra platform.
7 7
8 #ifndef CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_DEVICE_H_ 8 #ifndef CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_DEVICE_H_
9 #define CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_DEVICE_H_ 9 #define CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_DEVICE_H_
10 10
(...skipping 17 matching lines...) Expand all
28 bool Poll(bool poll_device, bool* event_pending) override; 28 bool Poll(bool poll_device, bool* event_pending) override;
29 bool SetDevicePollInterrupt() override; 29 bool SetDevicePollInterrupt() override;
30 bool ClearDevicePollInterrupt() override; 30 bool ClearDevicePollInterrupt() override;
31 void* Mmap(void* addr, 31 void* Mmap(void* addr,
32 unsigned int len, 32 unsigned int len,
33 int prot, 33 int prot,
34 int flags, 34 int flags,
35 unsigned int offset) override; 35 unsigned int offset) override;
36 void Munmap(void* addr, unsigned int len) override; 36 void Munmap(void* addr, unsigned int len) override;
37 bool Initialize() override; 37 bool Initialize() override;
38 std::vector<base::ScopedFD> GetDmabufsForV4L2Buffer(
39 int index,
40 size_t num_planes,
41 enum v4l2_buf_type type) override;
38 bool CanCreateEGLImageFrom(uint32_t v4l2_pixfmt) override; 42 bool CanCreateEGLImageFrom(uint32_t v4l2_pixfmt) override;
39 EGLImageKHR CreateEGLImage(EGLDisplay egl_display, 43 EGLImageKHR CreateEGLImage(
40 EGLContext egl_context, 44 EGLDisplay egl_display,
41 GLuint texture_id, 45 EGLContext egl_context,
42 gfx::Size frame_buffer_size, 46 GLuint texture_id,
43 unsigned int buffer_index, 47 const gfx::Size& size,
44 uint32_t v4l2_pixfmt, 48 unsigned int buffer_index,
45 size_t num_v4l2_planes); 49 uint32_t v4l2_pixfmt,
50 const std::vector<base::ScopedFD>& dmabuf_fds) override;
46 EGLBoolean DestroyEGLImage(EGLDisplay egl_display, 51 EGLBoolean DestroyEGLImage(EGLDisplay egl_display,
47 EGLImageKHR egl_image) override; 52 EGLImageKHR egl_image) override;
48 GLenum GetTextureTarget() override; 53 GLenum GetTextureTarget() override;
49 uint32_t PreferredInputFormat() override; 54 uint32_t PreferredInputFormat() override;
50 55
51 private: 56 private:
52 ~TegraV4L2Device() override; 57 ~TegraV4L2Device() override;
53 58
54 // The actual device fd. 59 // The actual device fd.
55 int device_fd_; 60 int device_fd_;
56 61
57 DISALLOW_COPY_AND_ASSIGN(TegraV4L2Device); 62 DISALLOW_COPY_AND_ASSIGN(TegraV4L2Device);
58 }; 63 };
59 64
60 } // namespace content 65 } // namespace content
61 66
62 #endif // CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_DEVICE_H_ 67 #endif // CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698