+#if defined(OS_POSIX)
+ // Wraps provided dmabufs
+ // (https://www.kernel.org/doc/Documentation/dma-buf-sharing.txt) with a
+ // VideoFrame. The dmabuf fds are dup()ed on creation, so that the VideoFrame
+ // retains a reference to them, and are automatically close()d on destruction,
+ // dropping the reference. The caller may safely close() its reference after
+ // calling WrapExternalDmabufs().
+ // The image data is only accessible via dmabuf fds, which are usually passed
+ // directly to a hardware device and/or to another process, or can also be
+ // mapped via mmap() for CPU access.
+ // When the frame is destroyed, |no_longer_needed_cb.Run()| will be called.
+ static scoped_refptr<VideoFrame> WrapExternalDmabufs(
+ Format format,
+ const gfx::Size& coded_size,
+ const gfx::Rect& visible_rect,
+ const gfx::Size& natural_size,
+ const std::vector<int> dmabuf_fds,
+ base::TimeDelta timestamp,
+ const base::Closure& no_longer_needed_cb);
+#endif
+