objc2-video-toolbox 0.3.2

Bindings to the VideoToolbox framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-media")]
use objc2_core_media::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;

use crate::*;

#[cfg(feature = "objc2")]
extern_protocol!(
    /// The protocol that describes the configuration of a processor for a video frame processing session.
    ///
    /// Use `VTFrameProcessorConfiguration` protocol conformance to start a frame processing session. You can query these
    /// properties on an implementation conforming to `VTFrameProcessorConfiguration` without starting a session.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtframeprocessorconfiguration?language=objc)
    #[cfg(feature = "objc2")]
    pub unsafe trait VTFrameProcessorConfiguration: NSObjectProtocol + Send + Sync {
        /// Returns a Boolean indicating whether the system supports this processor on the current configuration.
        #[unsafe(method(isSupported))]
        #[unsafe(method_family = none)]
        unsafe fn isSupported() -> bool;

        #[cfg(feature = "objc2-foundation")]
        /// List of supported pixel formats for source frames for the current configuration.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(frameSupportedPixelFormats))]
        #[unsafe(method_family = none)]
        unsafe fn frameSupportedPixelFormats(&self) -> Retained<NSArray<NSNumber>>;

        #[cfg(feature = "objc2-foundation")]
        /// Pixel buffer attributes dictionary that describes requirements for pixel buffers which represent source frames and reference frames.
        ///
        /// Use ``CVPixelBufferCreateResolvedAttributesDictionary`` to combine this dictionary with your pixel buffer attributes dictionary.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(sourcePixelBufferAttributes))]
        #[unsafe(method_family = none)]
        unsafe fn sourcePixelBufferAttributes(&self)
            -> Retained<NSDictionary<NSString, AnyObject>>;

        #[cfg(feature = "objc2-foundation")]
        /// Pixel buffer attributes dictionary that describes requirements for pixel buffers which represent destination frames.
        ///
        /// Use ``CVPixelBufferCreateResolvedAttributesDictionary`` to combine this dictionary with your pixel buffer attributes dictionary.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(destinationPixelBufferAttributes))]
        #[unsafe(method_family = none)]
        unsafe fn destinationPixelBufferAttributes(
            &self,
        ) -> Retained<NSDictionary<NSString, AnyObject>>;

        /// Returns the number of "next" frames that this processor requires for processing.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[optional]
        #[unsafe(method(nextFrameCount))]
        #[unsafe(method_family = none)]
        unsafe fn nextFrameCount(&self) -> NSInteger;

        /// Returns the number of "previous" frames that this processor requires for processing.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[optional]
        #[unsafe(method(previousFrameCount))]
        #[unsafe(method_family = none)]
        unsafe fn previousFrameCount(&self) -> NSInteger;

        #[cfg(feature = "objc2-core-media")]
        /// Returns the maximum dimensions for a `sourceFrame` for the processor.
        #[optional]
        #[unsafe(method(maximumDimensions))]
        #[unsafe(method_family = none)]
        unsafe fn maximumDimensions() -> CMVideoDimensions;

        #[cfg(feature = "objc2-core-media")]
        /// Returns the minimum dimensions for a `sourceFrame` for the processor.
        #[optional]
        #[unsafe(method(minimumDimensions))]
        #[unsafe(method_family = none)]
        unsafe fn minimumDimensions() -> CMVideoDimensions;
    }
);