Platforms to show: All Mac Windows Linux Cross-Platform

/AVFoundation/AVAssertTrack samples


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

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

This example is the version from Sat, 3rd May 2019.

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

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


The biggest plugin in space...