Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

AVAssetMBS.assetWithData(Data as MemoryBlock, Options as Dictionary = nil) as AVAssetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method AVFoundation MBS AVFoundation Plugin 16.0 Yes No No Yes, macOS only No
Function: Creates an AVMovie object from a movie header stored in an data parameter.
Notes:
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:

Feedback, Comments & Corrections

AVAssetMBS.assetWithData(Data as String, Options as Dictionary = nil) as AVAssetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method AVFoundation MBS AVFoundation Plugin 16.0 Yes No No Yes, macOS only No
Function: 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 AVAssetMBS = AVAssetMBS.movieWithData(s)

MsgBox str(m.duration.Seconds)+" seconds."
Notes:
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:

Feedback, Comments & Corrections

AVAssetMBS.assetWithFile(file as folderitem) as AVAssetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method AVFoundation MBS AVFoundation Plugin 13.2 Yes No No Yes, macOS only No
Function: Returns an asset for inspection of a media resource.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.mov")
dim a as AVAssetMBS = AVAssetMBS.assetWithFile(f)

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

Feedback, Comments & Corrections

AVAssetMBS.assetWithURL(URL as string) as AVAssetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method AVFoundation MBS AVFoundation Plugin 13.2 Yes No No Yes, macOS only No
Function: Returns an asset for inspection of a media resource.

Feedback, Comments & Corrections

AVAssetMBS.available as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method AVFoundation MBS AVFoundation Plugin 13.2 Yes No No Yes, macOS only No
Function: Whether this class is available.
Notes: Returns true on Mac OS X 10.7 and newer.

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins