Skip to content

Instantly share code, notes, and snippets.

@rzaitov
Last active August 29, 2015 14:03
Show Gist options
  • Save rzaitov/22120d7cd0a8078833b8 to your computer and use it in GitHub Desktop.
Save rzaitov/22120d7cd0a8078833b8 to your computer and use it in GitHub Desktop.
public class MyController : UIViewController, IAVCaptureFileOutputRecordingDelegate
{
private AVCaptureMovieFileOutput _movieFileOutput;
private NSUrl _outputUrl;
public void DoWork()
{
// follow doesn't work.
// Because there is no overload StartRecordingToOutputFile (NSUrl, IAVCaptureFileOutputRecordingDelegate)
_movieFileOutput.StartRecordingToOutputFile(_outputUrl, this);
}
#region AVCaptureFileOutputRecordingDelegate methods
[Export ("captureOutput:didStartRecordingToOutputFileAtURL:fromConnections:")]
public virtual void DidStartRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, NSObject[] connections)
{
// code which uses all passed parameters: captureOutput, outputFileUrl, connections
// Also here I want to have access to MyController's private fields
}
[Export ("captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error:")]
public virtual void FinishedRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, NSObject[] connections, NSError error)
{
// code which uses all passed parameters: captureOutput, outputFileUrl, connections, error
// Also here I want to have access to MyController's private fields
}
#endregion
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment