Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVMovieMBS class.

AVMovieMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The private constructor.

See also:

AVMovieMBS.Constructor(Data as MemoryBlock, Options as Dictionary = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an AVMovie object from a movie header stored in an data parameter.

data: An Memoryblock containing a movie header. We make a copy of that.
options: Dictionary object that contains keys for specifying options for the initialization of the AVMovie object. Currently no keys are defined.

You can use this method to operate on movie headers that are not stored in files; this might include movie headers on the pasteboard (which do not contain media data). In general you should avoid loading an entire movie file with its media data into an instance of Memoryblock/String! By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
If you want to create an AVMutableMovie from an NSData object 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.

In case of error raises an exception.

Available on OS X 10.11.

See also:

AVMovieMBS.Constructor(File as FolderItem, Options as Dictionary = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an AVMovie object from a movie header stored in a QuickTime movie file or ISO base media file.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.m4v")
dim m as new AVMovieMBS(f, nil)

MsgBox str(m.duration.Seconds)+" seconds."

File: A folderitem that specifies a file containing a movie header.
options: A Dictionary object that contains keys for specifying options for the initialization of the AVMovie object. Currently no keys are defined.

By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
If you want 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.

Raises exception if something goes wrong.

See also:

AVMovieMBS.Constructor(URL as String, Options as Dictionary = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an AVMovie object from a movie header stored in a QuickTime movie file or ISO base media file.

URL: An URL that specifies a file containing a movie header.
options: A Dictionary object that contains keys for specifying options for the initialization of the AVMovie object. Currently no keys are defined.
Returns An AVMovie object or nil in case of error.
By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
If you want 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.

Raises exception if something goes wrong.

See also:

AVMovieMBS.copy as AVMovieMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a copy of the movie.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.m4v")
dim m as new AVMovieMBS(f, nil)

dim c as AVMutableMovieMBS = m.mutableCopy

Break // now edit

dim k as AVMovieMBS = c.copy

break // now we have k with snapshot and can still edit c

AVMovieMBS.movieHeaderWithFileType(fileType as String, byref error as NSErrorMBS) as MemoryBlock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a memoryblock object containing the movie header of the AVMovie object.

fileType: A UTI indicating the specific file format of the movie header (e.g. AVFileTypeQuickTimeMovie for a QuickTime movie).
Error: If an error occurs reading the movie header, describes the nature of the failure.

The movie header will be a pure reference movie, with no base URL, suitable for use on the pasteboard.
Returns memoryblock in case of success or nil in case of error.

Available on OS X 10.11 or newer.

AVMovieMBS.movieTracks as AVMovieTrackMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The tracks in a movie.

The value of this property is an array of tracks the movie contains; the tracks are of type AVMovieTrack.

AVMovieMBS.movieTracksWithMediaCharacteristic(mediaCharacteristic as string) as AVMovieTrackMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Provides an array of AVMovieTracks of the asset that present media with the specified characteristic.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.m4v")
dim m as new AVMovieMBS(f, nil)

dim videotracks() as AVMovieTrackMBS = m.movieTracksWithMediaCharacteristic(AVFoundationMBS.AVMediaCharacteristicVisual)

MsgBox str(UBound(videotracks)+1)+" visual tracks"

mediaCharacteristic: The media characteristic according to which the receiver filters its AVMovieTracks. (Media characteristics are defined in AVMediaFormat.h)
An array of AVMovieTracks; may be empty if no tracks with the specified characteristic are available.
Becomes callable without blocking when the key "tracks" has been loaded.

AVMovieMBS.movieTracksWithMediaType(mediaType as string) as AVMovieTrackMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Provides an array of AVMovieTracks of the asset that present media of the specified media type.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.m4v")
dim m as new AVMovieMBS(f, nil)

dim videotracks() as AVMovieTrackMBS = m.movieTracksWithMediaType(AVFoundationMBS.AVMediaTypeVideo)

MsgBox str(UBound(videotracks)+1)+" video tracks"

mediaType: The media type according to which the receiver filters its AVMovieTracks. (Media types are defined in AVMediaFormat.h)
An array of AVMovieTracks; may be empty if no tracks of the specified media type are available.
Becomes callable without blocking when the key "tracks" has been loaded.

AVMovieMBS.movieTrackWithTrackID(ID as Integer) as AVMovieTrackMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Provides an instance of AVMovieTrack that represents the track of the specified trackID.

ID: The trackID of the requested AVMovieTrack.

Returns n instance of AVMovieTrack; may be nil if no track of the specified trackID is available.
Becomes callable without blocking when the key "tracks" has been loaded

AVMovieMBS.mutableCopy as AVMutableMovieMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a mutable copy of the movie.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.m4v")
dim m as new AVMovieMBS(f, nil)

dim c as AVMutableMovieMBS = m.mutableCopy

Break // now edit

dim k as AVMovieMBS = c.copy

break // now we have k with snapshot and can still edit c

AVMovieMBS.writeMovieHeaderToFile(File as FolderItem, fileType as String, options as Integer, byref error as NSErrorMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Writes the movie header to a destination file.

File: A folderitem indicating where to write the movie header.
fileType: A UTI indicating the specific file format (e.g. AVFileTypeQuickTimeMovie for a QuickTime movie).
options: An integer whose bits specify options for the writing of the movie header. Can be AVMovieWritingTruncateDestinationToMovieHeaderOnly.
Error: If an error occurs writing the movie header, describes the nature of the failure.

Data references in the output movie header are adjusted to be relative to the destination URL. Note that modifications to instances of AVMutableMovie, to their constituent AVMutableMovieTracks, or to their collections of metadata are committed to storage when their movie headers are written.

AVMovieMBS.writeMovieHeaderToURL(URL as String, fileType as String, options as Integer, byref error as NSErrorMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Writes the movie header to a destination URL.

URL: An URL indicating where to write the movie header.
fileType: A UTI indicating the specific file format (e.g. AVFileTypeQuickTimeMovie for a QuickTime movie).
options: An integer whose bits specify options for the writing of the movie header. Can be AVMovieWritingTruncateDestinationToMovieHeaderOnly.
Error: If an error occurs writing the movie header, describes the nature of the failure.

Data references in the output movie header are adjusted to be relative to the destination URL. Note that modifications to instances of AVMutableMovie, to their constituent AVMutableMovieTracks, or to their collections of metadata are committed to storage when their movie headers are written.

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...