void OnStartedVideoCaptureMode(UnityEngine.XR.WSA.WebCam.VideoCapture.VideoCaptureResult result) { Debug.Log("Started Video Capture Mode!"); string timeStamp = Time.time.ToString().Replace(".", "").Replace(":", ""); string filename = string.Format("TestVideo_{0}.mp4", timeStamp); string filepath = System.IO.Path.Combine(Application.persistentDataPath, filename); filepath = filepath.Replace("/", @"\"); m_VideoCapture.StartRecordingAsync(filepath, OnStartedRecordingVideo); }
private static VideoCapture.VideoCaptureResult MakeCaptureResult(long hResult) { VideoCapture.VideoCaptureResult result = default(VideoCapture.VideoCaptureResult); VideoCapture.CaptureResultType resultType; if (hResult == VideoCapture.HR_SUCCESS) { resultType = VideoCapture.CaptureResultType.Success; } else { resultType = VideoCapture.CaptureResultType.UnknownError; } result.resultType = resultType; result.hResult = hResult; return(result); }
void OnStoppedRecordingVideo(UnityEngine.XR.WSA.WebCam.VideoCapture.VideoCaptureResult result) { Debug.Log("Stopped Recording Video!"); m_VideoCapture.StopVideoModeAsync(OnStoppedVideoCaptureMode); }
void OnStartedRecordingVideo(UnityEngine.XR.WSA.WebCam.VideoCapture.VideoCaptureResult result) { Debug.Log("Started Recording Video!"); m_stopRecordingTimer = Time.time + MaxRecordingTime; }
void OnStoppedVideoCaptureMode(UnityEngine.XR.WSA.WebCam.VideoCapture.VideoCaptureResult result) { Debug.Log("Stopped Video Capture Mode!"); }