Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVMovieMBS class.

AVMovieMBS.available as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether this class is available.
Example
if not AVMovieMBS.available then
MsgBox "This application requires a newer OS X version."
end if

Returns true on OS X 10.10.

AVMovieMBS.AVMovieReferenceRestrictionsKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates the restrictions used by the movie when resolving references to external media data.

The value of this key is an NSNumber wrapping an AVAssetReferenceRestrictions enum value or the logical combination of multiple such values. See AVAsset.h for the declaration of the AVAssetReferenceRestrictions enum.
Some movies can contain references to media data stored outside the movie's container, for example in another file. This key can be used to specify a policy to use when these references are encountered. If a movie contains one or more references of a type that is forbidden by the reference restrictions, loading of movie properties will fail. In addition, such a movie cannot be used with other AVFoundation modules, such as AVPlayerItem or AVAssetExportSession.

AVMovieMBS.movieTypes as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVMovie MBS AVFoundation Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Provides the file types the AVMovie class understands.
Example
MsgBox join(AVMovieMBS.movieTypes, EndOfLine)

Returns an array of UTIs identifying the file types the AVMovie class understands.

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared 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/String 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.
Returns An AVMovie object or nil in case of error.
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.

See also:

AVMovieMBS.movieWithData(Data as String, Options as Dictionary = nil) as AVMovieMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared 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.
Example
// load movie in memory
dim f as FolderItem = SpecialFolder.Desktop.Child("test.m4v")
dim b as BinaryStream = BinaryStream.Open(f)

// now open it from memory
dim s as string = b.Read(b.Length)
dim m as AVMovieMBS = AVMovieMBS.movieWithData(s)

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

data: An Memoryblock/String 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.
Returns An AVMovie object or nil in case of error.
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.

See also:

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared 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 AVMovieMBS = AVMovieMBS.movieWithFile(f)

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.
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.

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared 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.

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


The biggest plugin in space...