Example #1
0
 public MediaRecorderAndroid(AndroidJavaObject recorder, int width, int height, string recordingPath, Action <string> callback) : base(@"com.yusufolokoba.natcorder.RecordingDelegate")
 {
     this.recorder        = recorder;
     this.width           = width;
     this.height          = height;
     this.callback        = callback;
     this.readbackContext = new GLESReadback(true);
     // Start recording
     using (var dispatcher = new RenderDispatcher())
         dispatcher.Dispatch(() => recorder.Call(@"startRecording", recordingPath, this));
 }
        public MediaRecorderiOS(IntPtr recorder, int width, int height, TextureFormat readbackFormat, string recordingPath, Action <string> callback)
        {
            this.recorder        = recorder;
            this.width           = width;
            this.height          = height;
            this.callback        = callback;
            this.readbackContext = new BlockingReadback(readbackFormat);
            // Start recording
            var self = GCHandle.Alloc(this, GCHandleType.Normal);

            recorder.StartRecording(recordingPath, OnRecording, (IntPtr)self);
        }