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>
impl<'a> FrameProcessorInputFrame<'a>
Sourcepub fn new(frame: &'a NativeFrame) -> Self
pub fn new(frame: &'a NativeFrame) -> Self
Borrows an existing native frame for one synchronous submit call.
Sourcepub fn metadata(&self) -> &'a NativeFrameMetadata
pub fn metadata(&self) -> &'a NativeFrameMetadata
Returns metadata borrowed from the host-owned input frame.
Sourcepub fn native_handle(&self) -> usize
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.
Sourcepub fn borrowed_passthrough(&self) -> NativeFrame
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.