AVVideoCompositionInstructionProtocol

Trait AVVideoCompositionInstructionProtocol 

Source
pub unsafe trait AVVideoCompositionInstructionProtocol:
    NSObjectProtocol
    + Send
    + Sync {
    // Provided methods
    unsafe fn timeRange(&self) -> CMTimeRange
       where Self: Sized + Message { ... }
    unsafe fn enablePostProcessing(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn containsTweening(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn requiredSourceTrackIDs(
        &self,
    ) -> Option<Retained<NSArray<NSValue>>>
       where Self: Sized + Message { ... }
    unsafe fn passthroughTrackID(&self) -> CMPersistentTrackID
       where Self: Sized + Message { ... }
    unsafe fn requiredSourceSampleDataTrackIDs(
        &self,
    ) -> Retained<NSArray<NSNumber>>
       where Self: Sized + Message { ... }
}
Available on crate feature AVVideoCompositing only.
Expand description

The AVVideoCompositionInstruction protocol is implemented by objects to represent operations to be performed by a compositor. Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn timeRange(&self) -> CMTimeRange
where Self: Sized + Message,

Available on crate feature objc2-core-media only.

Indicates the timeRange during which the instruction is effective. Note requirements for the timeRanges of instructions described in connection with AVVideoComposition’s instructions key above.

This property is not atomic.

§Safety

This might not be thread-safe.

Source

unsafe fn enablePostProcessing(&self) -> bool
where Self: Sized + Message,

If NO, indicates that post-processing should be skipped for the duration of this instruction. See +[AVVideoCompositionCoreAnimationTool videoCompositionToolWithPostProcessingAsVideoLayer:inLayer:].

This property is not atomic.

§Safety

This might not be thread-safe.

Source

unsafe fn containsTweening(&self) -> bool
where Self: Sized + Message,

If YES, rendering a frame from the same source buffers and the same composition instruction at 2 different compositionTime may yield different output frames. If NO, 2 such compositions would yield the same frame. The media pipeline may be able to avoid some duplicate processing when containsTweening is NO

This property is not atomic.

§Safety

This might not be thread-safe.

Source

unsafe fn requiredSourceTrackIDs(&self) -> Option<Retained<NSArray<NSValue>>>
where Self: Sized + Message,

List of video track IDs required to compose frames for this instruction. If the value of this property is nil, all source tracks will be considered required for composition

This property is not atomic.

§Safety

This might not be thread-safe.

Source

unsafe fn passthroughTrackID(&self) -> CMPersistentTrackID
where Self: Sized + Message,

Available on crate feature objc2-core-media only.

If for the duration of the instruction, the video composition result is one of the source frames, this property should return the corresponding track ID. The compositor won’t be run for the duration of the instruction and the proper source frame will be used instead. The dimensions, clean aperture and pixel aspect ratio of the source buffer will be matched to the required values automatically

This property is not atomic.

§Safety

This might not be thread-safe.

Source

unsafe fn requiredSourceSampleDataTrackIDs(&self) -> Retained<NSArray<NSNumber>>
where Self: Sized + Message,

List of sample data track IDs required to compose frames for this instruction. An empty array indicates that no sample data is required for this instruction.

This property is not atomic.

§Safety

This might not be thread-safe.

Trait Implementations§

Source§

impl ProtocolType for dyn AVVideoCompositionInstructionProtocol

Source§

const NAME: &'static str = "AVVideoCompositionInstruction"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn AVVideoCompositionInstructionProtocol

Implementations on Foreign Types§

Source§

impl<T> AVVideoCompositionInstructionProtocol for ProtocolObject<T>

Implementors§

Source§

impl AVVideoCompositionInstructionProtocol for AVMutableVideoCompositionInstruction

Available on crate feature AVVideoComposition only.
Source§

impl AVVideoCompositionInstructionProtocol for AVVideoCompositionInstruction

Available on crate feature AVVideoComposition only.