blob: 37ec8bd3fb3e3943880f67de60fe15768a9d57b4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- services/video_capture/broadcasting_receiver.cc.orig 2019-12-12 12:39:57 UTC
+++ services/video_capture/broadcasting_receiver.cc
@@ -40,7 +40,7 @@ void CloneSharedBufferHandle(const mojo::ScopedSharedB
void CloneSharedBufferToRawFileDescriptorHandle(
const mojo::ScopedSharedBufferHandle& source,
media::mojom::VideoBufferHandlePtr* target) {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// |source| is unwrapped to a |PlatformSharedMemoryRegion|, from whence a file
// descriptor can be extracted which is then mojo-wrapped.
base::subtle::PlatformSharedMemoryRegion platform_region =
@@ -178,7 +178,7 @@ void BroadcastingReceiver::BufferContext::
ConvertRawFileDescriptorToSharedBuffer() {
DCHECK(buffer_handle_->is_shared_memory_via_raw_file_descriptor());
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// The conversion unwraps the descriptor from its mojo handle to the raw file
// descriptor (ie, an int). This is used to create a
// PlatformSharedMemoryRegion which is then wrapped as a
|