$OpenBSD: patch-media_base_video_frame_cc,v 1.2 2016/05/28 14:49:39 robert Exp $
--- media/base/video_frame.cc.orig.port	Wed May 25 21:01:03 2016
+++ media/base/video_frame.cc	Thu May 26 08:09:47 2016
@@ -49,7 +49,7 @@ static std::string StorageTypeToString(
       return "OWNED_MEMORY";
     case VideoFrame::STORAGE_SHMEM:
       return "SHMEM";
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
     case VideoFrame::STORAGE_DMABUFS:
       return "DMABUFS";
 #endif
@@ -71,7 +71,7 @@ static std::string StorageTypeToString(
 // static
 static bool IsStorageTypeMappable(VideoFrame::StorageType storage_type) {
   return
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
       // This is not strictly needed but makes explicit that, at VideoFrame
       // level, DmaBufs are not mappable from userspace.
       storage_type != VideoFrame::STORAGE_DMABUFS &&
@@ -311,7 +311,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalYuvG
   return frame;
 }
 
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
 // static
 scoped_refptr<VideoFrame> VideoFrame::WrapExternalDmabufs(
     VideoPixelFormat format,
@@ -427,7 +427,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapVideoFrame(
     wrapping_frame->data_[i] = frame->data(i);
   }
 
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
   // If there are any |dmabuf_fds_| plugged in, we should duplicate them.
   if (frame->storage_type() == STORAGE_DMABUFS) {
     std::vector<int> original_fds;
@@ -712,7 +712,7 @@ VideoFrame::gpu_memory_buffer_handles() const {
   return gpu_memory_buffer_handles_;
 }
 
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
 int VideoFrame::dmabuf_fd(size_t plane) const {
   DCHECK_EQ(storage_type_, STORAGE_DMABUFS);
   DCHECK(IsValidPlane(plane, format_));
