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 { ... }
}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§
Sourceunsafe fn timeRange(&self) -> CMTimeRange
Available on crate feature objc2-core-media only.
unsafe fn timeRange(&self) -> CMTimeRange
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.
Sourceunsafe fn enablePostProcessing(&self) -> bool
unsafe fn enablePostProcessing(&self) -> bool
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.
Sourceunsafe fn containsTweening(&self) -> bool
unsafe fn containsTweening(&self) -> bool
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.
Sourceunsafe fn requiredSourceTrackIDs(&self) -> Option<Retained<NSArray<NSValue>>>
unsafe fn requiredSourceTrackIDs(&self) -> Option<Retained<NSArray<NSValue>>>
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.
Sourceunsafe fn passthroughTrackID(&self) -> CMPersistentTrackID
Available on crate feature objc2-core-media only.
unsafe fn passthroughTrackID(&self) -> CMPersistentTrackID
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.
Sourceunsafe fn requiredSourceSampleDataTrackIDs(&self) -> Retained<NSArray<NSNumber>>
unsafe fn requiredSourceSampleDataTrackIDs(&self) -> Retained<NSArray<NSNumber>>
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
impl ProtocolType for dyn AVVideoCompositionInstructionProtocol
impl<T> ImplementedBy<T> for dyn AVVideoCompositionInstructionProtocol
Implementations on Foreign Types§
impl<T> AVVideoCompositionInstructionProtocol for ProtocolObject<T>where
T: ?Sized + AVVideoCompositionInstructionProtocol,
Implementors§
impl AVVideoCompositionInstructionProtocol for AVMutableVideoCompositionInstruction
AVVideoComposition only.impl AVVideoCompositionInstructionProtocol for AVVideoCompositionInstruction
AVVideoComposition only.