frameCount
TypeScriptget frameCount(): numberSwift declarationvar frameCount: Int { get }class · iOS 27.0+ · SDK 27.1
class AVPlannedVideoSegmentWritingRequestget frameCount(): numberSwift declarationvar frameCount: Int { get }makeResumableWriterInput(mediaType: AVMediaType, outputSettings?: (Record<string, SDKHandle>) | null, sourceFormatHint?: (_CoreMedia_CMFormatDescription) | null): AVAssetWriterInputSwift declarationfunc makeResumableWriterInput(for mediaType: AVMediaType, outputSettings: [String : any Sendable]? = nil, sourceFormatHint: CMFormatDescription? = nil) throws -> AVAssetWriterInputHelper function that returns a minimally configured AVAssetWriterInput object for writing the current segment. The final video encoder state from the previous segment will be restored before writing starts. Clients using AVAssetWriterInput with video compression must use this method to create the writer input for writing the segment. The planner initializes the writer input in such a way that when writing starts, the video encoder's state is restored to the final state of the last segment. The client should perform additional configurations on the returned writer input as needed, but must apply the same configurations for each segment of the track. Client cannot call this method more than once on a writing request object. For the same segment writing request, this method and the "createResumableCompressionSessionWithAllocator" method are mutually exclusive. The client can call either one of the two, but not both. This method fails (returns nil) with error if the outputSettings or sourceFormatHint differs from the previous segment. The writing request retains the writer input but does not mutate it after this method is returned. - Parameters: - mediaType: The type of media that an input accepts. - outputSettings: The settings to use for configuring the AVAssetWriterInput object to be returned. Create an output settings dictionary manually, or use AVOutputSettingsAssistant to create preset-based settings. - sourceFormatHint: A hint about the format of the media data to append. The input uses the source format hint to fill in missing output settings. If you specify a hint, you only need to specify AVFormatIDKey for the audio output settings, and AVVideoCodecKey is the only required key for video output settings. The system raises an error if the format description isn't valid for the indicated media type. - Returns: A new writer input. - Throws: An error if the input cannot be created or if settings differ from previous segment.
createResumableCompressionSession(width: number, height: number, codecType: SDKHandle, encoderSpecification: (Record<string, SDKHandle>) | null, sourceImageBufferAttributes: (Record<string, SDKHandle>) | null, outputHandler: ((arg0: number, arg1: _VideoToolbox_VTEncodeInfoFlags, arg2: (_CoreMedia_CMSampleBuffer) | null) => void)): _VideoToolbox_VTCompressionSessionSwift declarationfunc createResumableCompressionSession(width: Int32, height: Int32, codecType: CMVideoCodecType, encoderSpecification: [String : any Sendable]? = nil, sourceImageBufferAttributes: [String : any Sendable]? = nil, outputHandler: @escaping @Sendable (OSStatus, VTEncodeInfoFlags, CMSampleBuffer?) -> Void) throws -> VTCompressionSessionHelper function to create a VTCompressionSession that restores the video encoder state persisted at the end of the previous segment. Clients using VTCompressionSession directly to produce encoded video samples for writing the segment must use this method to create the session. The client should perform additional configurations on the returned compression session, but must apply the same configurations for each segment of the track. Client cannot call this method more than once on a writing request object. For the same segment writing request, this method and the makeResumableWriterInput method are mutually exclusive. The client can call either one of the two, but not both. This method fails (returns nil) with error if the parameters differ from the previous segment. The client should release the session after use. The writing request retains the compression session but does not mutate the session after this method is returned. - Parameters: - width: The pixel width of video frames. - height: The pixel height of video frames. - codecType: The codec type. - encoderSpecification: A dictionary describing the characteristics of a video encoder to use. Pass nil to let the system choose an encoder. If the client provides a specification, it should omit the following keys kVTCompressionPropertyKey_SourceFrameCount, kVTCompressionPropertyKey_MoreFramesBeforeStart, kVTCompressionPropertyKey_MoreFramesAfterEnd since such keys will be overwritten by the underlying implementation. - sourceImageBufferAttributes: Required attributes for source pixel buffers, used when creating a pixel buffer pool for source frames. If you don't want the system to create one for you, pass nil. Using pixel buffers not allocated by the system increases the chance that you'll have to copy image data. - outputHandler: The handler to invoke with compressed frames. The system may call this function asynchronously, on a different thread from the one that calls VTCompressionSessionEncodeFrame. - Returns: A configured VTCompressionSession ready for encoding this segment. - Throws: An error if the session cannot be created or if parameters differ from previous segment.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
AVPlannedVideoSegmentWritingRequest.init()
inherited init: clang: 'init' is unavailable