Skip to main content

FrameProcessorInputFrame

Struct FrameProcessorInputFrame 

Source
pub struct FrameProcessorInputFrame<'a> { /* private fields */ }
Expand description

Call-scoped view of a host-owned native frame submitted to a processor.

The view is intentionally neither Clone nor Copy. Its native handle is valid only for the synchronous submit/receive sequence. A plugin may echo the handle through borrowed_passthrough, but it must retain the platform resource through an explicit platform API before performing asynchronous work or returning an owned output.

use player_plugin::FrameProcessorInputFrame;

fn retain_input(frame: FrameProcessorInputFrame<'_>) {
    let _retained = frame.clone();
}

Implementations§

Source§

impl<'a> FrameProcessorInputFrame<'a>

Source

pub fn new(frame: &'a NativeFrame) -> Self

Borrows an existing native frame for one synchronous submit call.

Source

pub fn metadata(&self) -> &'a NativeFrameMetadata

Returns metadata borrowed from the host-owned input frame.

Source

pub fn native_handle(&self) -> usize

Returns the call-scoped opaque native handle.

Copying this integer does not retain the underlying platform resource; using it after submit_frame returns violates the plugin contract.

Source

pub fn borrowed_passthrough(&self) -> NativeFrame

Creates a host-owned passthrough result without transferring ownership.

The returned frame must only be used as the immediate output for this input. The host keeps the upstream resource alive while consuming that output and will not call FrameProcessorSession::release_frame for it.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.