CMSampleBuffer
extension CMSampleBuffer
-
Creates an offset
CMSampleBufferfor the given time offset and duration.Declaration
Swift
public class func createSampleBuffer(fromSampleBuffer sampleBuffer: CMSampleBuffer, withTimeOffset timeOffset: CMTime, duration: CMTime?) -> CMSampleBuffer?Parameters
sampleBufferInput sample buffer to copy and offset.
timeOffsetTime offset for the output sample buffer.
durationOptional duration for the output sample buffer.
Return Value
Sample buffer with the desired time offset and duration, otherwise nil.
-
Extracts the metadata dictionary from a
CMSampleBuffer. (ie EXIF: Aperture, Brightness, Exposure, FocalLength, etc)Declaration
Swift
public func metadata() -> [String : Any]?Parameters
sampleBuffersample buffer to be processed
Return Value
metadata dictionary from the provided sample buffer
-
Appends the provided metadata dictionary key/value pairs.
Declaration
Swift
public func append(metadataAdditions: [String : Any])Parameters
metadataAdditionsMetadata key/value pairs to be appended.
CMSampleBuffer Extension Reference