pub struct FrameRef<'core> { /* private fields */ }
Expand description

A reference to a ref-counted frame.

Methods from Deref<Target = Frame<'core>>

Returns the frame format.

Returns the width of a plane, in pixels.

The width depends on the plane number because of the possible chroma subsampling.

Panics

Panics if plane >= format().plane_count().

Returns the height of a plane, in pixels.

The height depends on the plane number because of the possible chroma subsampling.

Panics

Panics if plane >= format().plane_count().

Returns the resolution of a plane.

The resolution depends on the plane number because of the possible chroma subsampling.

Panics

Panics if plane is invalid for this frame.

Returns the distance in bytes between two consecutive lines of a plane.

Panics

Panics if plane >= format().plane_count().

Returns a slice of a plane’s pixel row.

Panics

Panics if the requested plane, row or component type is invalid.

Returns a slice of the plane’s pixels.

The length of the returned slice is height() * width(). If the pixel data has non-zero padding (that is, stride() is larger than width()), an error is returned, since returning the data slice would open access to uninitialized bytes.

Panics

Panics if the requested plane or component type is invalid.

Returns a pointer to the plane’s pixels.

The pointer points to an array with a length of height() * stride() and is valid for as long as the frame is alive.

Panics

Panics if plane >= format().plane_count().

Returns a slice of a plane’s pixel row.

The length of the returned slice is equal to width() * format().bytes_per_sample().

Panics

Panics if plane >= format().plane_count() or if row >= height().

Returns a slice of the plane’s pixels.

The length of the returned slice is height() * width() * format().bytes_per_sample(). If the pixel data has non-zero padding (that is, stride() is larger than width()), an error is returned, since returning the data slice would open access to uninitialized bytes.

Panics

Panics if plane >= format().plane_count() or if row >= height().

Returns a map of frame’s properties.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Returns the VapourSynth type name for this argument type.

Converts to this type from the input type.

Retrieves the value from the map.

Retrieves an iterator over the values from the map.

Sets the property value in the map.

Appends the value to the map.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

The underlying argument type for this parameter type.

Returns whether this parameter is an array.

Returns whether this parameter is optional.

Retrieves this parameter from the given map.

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.