AVSampleBufferAttachContentKey

Function AVSampleBufferAttachContentKey 

Source
pub unsafe extern "C-unwind" fn AVSampleBufferAttachContentKey(
    sbuf: &CMSampleBuffer,
    content_key: &AVContentKey,
    out_error: *mut *mut NSError,
) -> bool
Available on crate features AVContentKeySession and objc2-core-media only.
Expand description

Attaches an AVContentKey to a CMSampleBuffer for the purpose of content decryption.

The client is expected to attach AVContentKeys to CMSampleBuffers that have been created by the client for enqueueing with AVSampleBufferDisplayLayer or AVSampleBufferAudioRenderer, for which the AVContentKeySpecifier matches indications of suitability that are available to the client according to the content key system that’s in use.

  • Parameter sbuf: The sample buffer to which the content key is to be attached.
  • Parameter contentKey: The content key to be attached.
  • Parameter outError: If the result is NO and errorOut is non-NULL, the location referenced by errorOut receives an instance of NSError that describes the reason for failure to attach the content key.

§Safety

out_error must be a valid pointer or null.