Platforms to show: All Mac Windows Linux Cross-Platform

/AVFoundation/AVAssertTrack samples


Required plugins for this example: MBS MacCF Plugin, MBS MacCG Plugin, MBS Main Plugin, MBS MacBase Plugin, MBS Picture Plugin, MBS Util Plugin, MBS AVFoundation Plugin

Last modified Sat, 3rd May 2019.

You find this example project in your MBS Xojo Plugin download as a Xojo project file within the examples folder: /AVFoundation/AVAssertTrack samples

Download this example: AVAssertTrack samples.zip

Project "AVAssertTrack samples.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
EventHandler Sub Open() dim f as FolderItem = SpecialFolder.Desktop.Child("test.m4v") if not f.Exists then MsgBox "This app looks for test.m4v on your desktop..." break quit Return end if dim a as AVAssetMBS = AVAssetMBS.assetWithFile(f) dim tracks() as AVAssetTrackMBS = a.tracksWithMediaType(AVFoundationMBS.AVMediaTypeAudio) dim track as AVAssetTrackMBS = tracks(0) dim d as new Dictionary dim n as integer = OSTypeFromStringMBS(AVFoundationMBS.kAudioFormatLinearPCM) d.Value(AVFoundationMBS.AVFormatIDKey) = n d.Value(AVFoundationMBS.AVLinearPCMBitDepthKey) = 16 d.Value(AVFoundationMBS.AVLinearPCMIsBigEndianKey) = false d.Value(AVFoundationMBS.AVLinearPCMIsFloatKey) = false d.Value(AVFoundationMBS.AVLinearPCMIsNonInterleaved) = false dim SampleData as MemoryBlock = track.trackSamples(d) Backdrop = RenderSamplesMBS(SampleData, SampleData.Size / 2, 1, me.Width, me.Height, 1, &c88B5C4, &c274C5A, &c203F4E, 15) End EventHandler
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

Download this example: AVAssertTrack samples.zip

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


The biggest plugin in space...