Last active
August 29, 2015 14:03
-
-
Save rzaitov/22120d7cd0a8078833b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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