summaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-media_base_video__frame.h
blob: 3f650d9953ce7a9ac3a8f84ebbf18258611fbcdd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- media/base/video_frame.h.orig	2017-04-19 19:06:35 UTC
+++ media/base/video_frame.h
@@ -62,7 +62,7 @@ class MEDIA_EXPORT VideoFrame : public b
     STORAGE_UNOWNED_MEMORY = 2,  // External, non owned data pointers.
     STORAGE_OWNED_MEMORY = 3,  // VideoFrame has allocated its own data buffer.
     STORAGE_SHMEM = 4,         // Pixels are backed by Shared Memory.
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
     // TODO(mcasas): Consider turning this type into STORAGE_NATIVE or another
     // meaningful name and handle it appropriately in all cases.
     STORAGE_DMABUFS = 5,  // Each plane is stored into a DmaBuf.
@@ -186,7 +186,7 @@ class MEDIA_EXPORT VideoFrame : public b
       uint8_t* a_data,
       base::TimeDelta timestamp);
 
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
   // 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
@@ -336,7 +336,7 @@ class MEDIA_EXPORT VideoFrame : public b
   // Returns the offset into the shared memory where the frame data begins.
   size_t shared_memory_offset() const;
 
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
   // Returns backing DmaBuf file descriptor for given |plane|, if present, or
   // -1 if not.
   // TODO(mcasas): Rename to DmabufFd() to comply with Style Guide.
@@ -528,7 +528,7 @@ class MEDIA_EXPORT VideoFrame : public b
   base::SharedMemoryHandle shared_memory_handle_;
   size_t shared_memory_offset_;
 
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
   // Dmabufs for each plane. If set, this frame has DmaBuf backing in some way.
   base::ScopedFD dmabuf_fds_[kMaxPlanes];
 #endif