diff --git a/libcamera/src/framebuffer_allocator.rs b/libcamera/src/framebuffer_allocator.rs index 446f1d8..328e1a3 100644 --- a/libcamera/src/framebuffer_allocator.rs +++ b/libcamera/src/framebuffer_allocator.rs @@ -86,6 +86,7 @@ impl FrameBufferAllocator { } } +#[derive(Clone)] pub struct FrameBuffer { ptr: NonNull, _alloc: Arc>, diff --git a/libcamera/src/framebuffer_map.rs b/libcamera/src/framebuffer_map.rs index cd46eaf..49670df 100644 --- a/libcamera/src/framebuffer_map.rs +++ b/libcamera/src/framebuffer_map.rs @@ -17,6 +17,7 @@ pub enum MemoryMappedFrameBufferError { MemoryMapError(std::io::Error), } +#[derive(Clone)] struct MappedPlane { fd: i32, offset: usize, @@ -24,6 +25,7 @@ struct MappedPlane { } /// FrameBuffer wrapper, which exposes internal file descriptors as memory mapped [&[u8]] plane slices. +#[derive(Clone)] pub struct MemoryMappedFrameBuffer { fb: T, mmaps: HashMap,