I'm trying to record video (without have ing a preview) in my iOS app.
So based on the RecordPlayAudioView example in iOS Kit i've tried to record video instead.
So far without any success so I wonder if it is doable at all using AVFoundation?
Hi again Dear forum.
I suck at writing Declares.
I think I'm stuck with declaring a Delegate:
I'm using this from iOSKit:
declare sub startRecordingToOutputFileURL_ lib AVFoundationLib selector "startRecordingToOutputFileURL:recordingDelegate:" (obj_id as ptr, outputFileURL as ptr, del as ptr) startRecordingToOutputFileURL_(self, outputFileURL, del)
The delegate del should be this delegate:
but it isn't declared in the iOSKit and I'm clueless.
Any help is appreciated :-)
That delegate (and a lot of the video recording classes) aren't included in iOSKit because they are not thread safe within Xojo. Would you be able to try passing nil for the delegate and see what happens? If that doesn't work some tricks may be possible to make it work.
To add to what I said, most of AVFoundation is actually unsafe and there is just a small amount of safe classes included in iOSKit from the monster of a framework provided by Apple. Until Xojo supports real threading or some way to call into the framework safely without crashing your app, many of these classes may not be possible to use in Xojo :(