Skip to main content

MediaFrame

Struct MediaFrame 

Source
pub struct MediaFrame<M, S = Shared> { /* private fields */ }
Expand description

An owned native frame reference. Only the writable state permits mutation.

Implementations§

Source§

impl<M, S> MediaFrame<M, S>

Source

pub fn as_ptr(&self) -> *mut VSFrame

Source

pub fn residency(&self) -> VSNodeResidency

Source

pub fn properties(&self) -> Option<MapRef<'_>>

Source§

impl<M> MediaFrame<M, Writable>

Source

pub fn freeze(self) -> MediaFrame<M>

Publishes the frame without copying it or changing its reference count.

Source

pub fn properties_mut(&mut self) -> Option<MapMut<'_>>

Source§

impl<S> MediaFrame<Video, S>

Source

pub fn stride(&self, plane: i32) -> isize

Source

pub fn plane(&self, plane: i32) -> *const u8

Source

pub fn get_video_format(&self) -> &VideoFormat

Source

pub fn get_type(&self) -> MediaType

Source

pub fn frame_width(&self, plane: i32) -> i32

Source

pub fn frame_height(&self, plane: i32) -> i32

Source§

impl MediaFrame<Video, Writable>

Source

pub fn plane_mut(&mut self, plane: i32) -> *mut u8

Source§

impl<S> MediaFrame<Audio, S>

Source

pub fn channel(&self, channel: i32) -> *const u8

Source

pub fn get_audio_format(&self) -> &AudioFormat

Source

pub fn frame_length(&self) -> i32

Source§

impl MediaFrame<Audio, Writable>

Source

pub fn channel_mut(&mut self, channel: i32) -> *mut u8

Trait Implementations§

Source§

impl<M> Clone for MediaFrame<M>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<M: Debug, S: Debug> Debug for MediaFrame<M, S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M, S> Drop for MediaFrame<M, S>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<M: Eq, S: Eq> Eq for MediaFrame<M, S>

Source§

impl<M> Frame for MediaFrame<M>

Source§

fn api(&self) -> Api

Source§

fn as_ptr(&self) -> *mut VSFrame

Source§

fn residency(&self) -> VSNodeResidency

Returns whether the data resides in host or GPU memory.
Source§

fn properties(&self) -> Option<MapRef<'_>>

Source§

impl<M: Hash, S: Hash> Hash for MediaFrame<M, S>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<M: PartialEq, S: PartialEq> PartialEq for MediaFrame<M, S>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<M, S> Send for MediaFrame<M, S>

Source§

impl<M: PartialEq, S: PartialEq> StructuralPartialEq for MediaFrame<M, S>

Auto Trait Implementations§

§

impl<M, S = Shared> !Sync for MediaFrame<M, S>

§

impl<M, S> Forget for MediaFrame<M, S>

§

impl<M, S> Freeze for MediaFrame<M, S>
where PhantomData<fn() -> (M, S)>: Freeze,

§

impl<M, S> Move for MediaFrame<M, S>

§

impl<M, S> RefUnwindSafe for MediaFrame<M, S>

§

impl<M, S> Unpin for MediaFrame<M, S>
where PhantomData<fn() -> (M, S)>: Unpin,

§

impl<M, S> UnsafeUnpin for MediaFrame<M, S>

§

impl<M, S> UnwindSafe for MediaFrame<M, S>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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, !>

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.