Contents

init(data:options:error:)

Creates a mutable movie object from a movie stored in a data object.

Declaration

init(data: Data, options: [String : Any]? = nil, error: ()) throws

Parameters

  • data:

    An NSData object that contains a movie header.

  • options:

    A dictionary that contains key for specifying the movie object initialization. Currently, no keys are defined.

Return Value

An AVMutableMovie object.

Discussion

On initialization, the defaultMediaDataStorage property and any associated mediaDataStorage properties are set to nil. To create an AVMutableMovie from a file and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.

Use this method to create movies from movie headers that are not stored in files, which can include movies on the pasteboard.

See Also

Creating a movie