1 --- src/3rdparty/chromium/media/base/video_frame.cc.orig 2025-08-15 18:30:00 UTC 2 +++ src/3rdparty/chromium/media/base/video_frame.cc 3 @@ -92,7 +92,7 @@ std::string VideoFrame::StorageTypeToString( 4 return "OWNED_MEMORY"; 5 case VideoFrame::STORAGE_SHMEM: 6 return "SHMEM"; 7 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 8 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 9 case VideoFrame::STORAGE_DMABUFS: 10 return "DMABUFS"; 11 #endif 12 @@ -106,7 +106,7 @@ bool VideoFrame::IsStorageTypeMappable(VideoFrame::Sto 13 // static 14 bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) { 15 return 16 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 17 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 18 // This is not strictly needed but makes explicit that, at VideoFrame 19 // level, DmaBufs are not mappable from userspace. 20 storage_type != VideoFrame::STORAGE_DMABUFS && 21 @@ -420,7 +420,7 @@ VideoFrame::CreateFrameForGpuMemoryBufferOrMappableSII 22 plane_size.width() * VideoFrame::BytesPerElement(*format, plane); 23 } 24 uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; 25 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 26 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 27 bool is_native_buffer = 28 gpu_memory_buffer 29 ? (gpu_memory_buffer->GetType() != gfx::SHARED_MEMORY_BUFFER) 30 @@ -938,7 +938,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalGpuM 31 return frame; 32 } 33 34 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 35 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 36 // static 37 scoped_refptr<VideoFrame> VideoFrame::WrapExternalDmabufs( 38 const VideoFrameLayout& layout, 39 @@ -1623,7 +1623,7 @@ scoped_refptr<gpu::ClientSharedImage> VideoFrame::shar 40 return wrapped_frame_ ? wrapped_frame_->shared_image() : shared_image_; 41 } 42 43 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 44 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 45 size_t VideoFrame::NumDmabufFds() const { 46 if (wrapped_frame_) { 47 return wrapped_frame_->NumDmabufFds(); 48