Function VTPixelRotationSessionRotateImage

Source
pub unsafe extern "C-unwind" fn VTPixelRotationSessionRotateImage(
    session: &VTPixelRotationSession,
    source_buffer: &CVPixelBuffer,
    destination_buffer: &CVPixelBuffer,
) -> i32
Available on crate features VTPixelRotationSession and objc2-core-video only.
Expand description

Rotates a pixel buffer.

Rotates sourceBuffer and places the output in destinationBuffer. For 90 and 270 degree rotations, the width and height of destinationBuffer must be the inverse of sourceBuffer. For 180 degree rotations, the width and height of destinationBuffer and sourceBuffer must match. By default, all existing attachments on destinationBuffer are removed and new attachments are set describing the transferred image. Unrecognised attachments on sourceBuffer will be propagated to destinationBuffer. Some properties may modify this behaviour; see VTPixelRotationProperties.h for more details.

Parameter session: The pixel rotation session.

Parameter sourceBuffer: The source buffer.

Parameter destinationBuffer: The destination buffer.

Returns: If the transfer was successful, noErr; otherwise an error code, such as kVTPixelRotationNotSupportedErr.