pub struct VulkanFrameLease { /* private fields */ }Expand description
Ref-counted ownership of an opaque FFmpeg Vulkan frame.
Implementations§
Source§impl VulkanFrameLease
impl VulkanFrameLease
Sourcepub fn download(&self) -> Result<DecodedFrame, BridgeError>
pub fn download(&self) -> Result<DecodedFrame, BridgeError>
Copies this frame’s pixels to the CPU, for a surface that could not be imported.
Every byte of the copy’s rows, up to its linesizes, is written (the padding past the pixels is zero), so its planes are shared.
§Errors
Returns BridgeError when FFmpeg cannot transfer the frame.
Sourcepub fn info(&self) -> Result<VulkanFrameInfo, BridgeError>
pub fn info(&self) -> Result<VulkanFrameInfo, BridgeError>
Returns a locked snapshot of the frame’s native image state.
§Errors
Returns BridgeError when the frame or its hardware context is invalid.
Sourcepub fn lock_access(&self) -> Result<VulkanFrameAccessGuard<'_>, BridgeError>
pub fn lock_access(&self) -> Result<VulkanFrameAccessGuard<'_>, BridgeError>
Locks the FFmpeg frame and queue for one native GPU handoff.
§Errors
Returns BridgeError if the frame has no usable sampled images or queue.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for VulkanFrameLease
impl RefUnwindSafe for VulkanFrameLease
impl Send for VulkanFrameLease
impl Sync for VulkanFrameLease
impl Unpin for VulkanFrameLease
impl UnsafeUnpin for VulkanFrameLease
impl UnwindSafe for VulkanFrameLease
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more