Beispiel #1
0
    /// <summary>
    /// update UI or behaviors to enable stopping
    /// </summary>
    /// <param name="result"></param>
    void OnStartedRecordingVideo(VideoCapture.VideoCaptureResult result)
    {
        Debug.Log("Started Recording Video!");

        //gameObject.GetComponent<WEKITVideoAnnotationEditor>().changeColor(Color.green);
        // We will stop the video from recording via other input such as a timer or a tap, etc.
    }
Beispiel #2
0
    void OnStoppedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
    {
        Debug.Log("currentVideoPath is " + currentVideoPath);
#if NETFX_CORE
        System.IO.File.Move(currentVideoPath, System.IO.Path.Combine(pictureFolderPath, "Camera Roll", System.IO.Path.GetFileName(currentVideoPath)));
#endif
        m_VideoCapture.Dispose();
        m_VideoCapture = null;
    }
Beispiel #3
0
    void OnStoppedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
    {
        _takingVideo  = false;
        _videoCapture = null;
        _cameraBorderController.Hide();
        _startRecordingTime = DateTime.MaxValue;

        OnVideoFinished?.Invoke(_fileName);
    }
Beispiel #4
0
    void OnStartedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
    {
        if (result.success)
        {
            filename = string.Format("Video_{0}.mp4", Time.time);
            filepath = System.IO.Path.Combine(Application.persistentDataPath, filename);

            m_VideoCapture.StartRecordingAsync(filepath, OnStartedRecordingVideo);
        }
    }
Beispiel #5
0
    void OnStartedVideoCaptureMode(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);
    }
Beispiel #6
0
 /// <summary>
 /// Start Recording
 /// </summary>
 /// <param name="result"></param>
 void RecordingVideo(VideoCapture.VideoCaptureResult result)
 {
     Debug.Log("startrecordingvideo");
     if (result.success)
     {
         string timeStamp = Time.time.ToString().Replace(".", "").Replace(":", "");
         string filename  = string.Format("ReactionTimer_{0}.mp4", timeStamp);
         string filepath  = System.IO.Path.Combine(Application.persistentDataPath, filename);
         filepath = filepath.Replace("/", @"\");
         videoCaptureObject.StartRecordingAsync(filepath, OnStartedRecordingVideo);
     }
 }
Beispiel #7
0
 void OnStartedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
 {
     if (result.success)
     {
         _fileName         = DateTime.Now.ToString("yyyy-MM-dd-hh-mm-ss") + ".mp4";
         _fileNameFullPath = Path.Combine(_mediaPath, _fileName);
         _videoCapture.StartRecordingAsync(_fileNameFullPath, OnStartedRecordingVideo);
     }
     else
     {
         OnVideoFinished?.Invoke("Error");
     }
 }
Beispiel #8
0
    void OnStartedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
    {
        if (result.success)
        {
            DirectoryInfo di = new DirectoryInfo(Application.persistentDataPath + "/video");
            if (!di.Exists)
            {
                di.Create();
            }
            filename = string.Format(@"dummy_{0}.jpg", video_cnt++);
            filePath = Path.Combine(Application.persistentDataPath, filename);

            m_VideoCapture.StartRecordingAsync(filePath, OnStartedRecordingVideo);
        }
    }
Beispiel #9
0
        void OnStartedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
        {
            if (result.success)
            {
                Debug.Log("Started Video Capture Mode!");

                //string timeStamp = Time.time.ToString().Replace(".", "").Replace(":", "");
                //string filename = string.Format("TestVideo_{0}.mp4", timeStamp);
                ////string filename = "Video_jkafdhr983rhf89hrfunfd04858tjhfn9348jfsm943jenef82qacdzcxw578kfj.mp4";
                //string filepath = System.IO.Path.Combine(Application.persistentDataPath, filename);
                //filepath = filepath.Replace("/", @"\");

                if (ReadWrite.Instance.FileExist(filepath))
                {
                    ReadWrite.Instance.FileDelete(filepath);
                }
                m_VideoCapture.StartRecordingAsync(filepath, OnStartedRecordingVideo);
            }
        }
Beispiel #10
0
    void OnStoppedRecordingVideo(VideoCapture.VideoCaptureResult result)
    {
        Debug.Log("Stopped Recording Video!");
        m_VideoCapture.StopVideoModeAsync(OnStoppedVideoCaptureMode);


        GameObject videoFrame = GameObject.CreatePrimitive(PrimitiveType.Quad);
        Billboard  b          = videoFrame.AddComponent <Billboard>();

        videoFrame.transform.position   = Camera.main.transform.position + Camera.main.transform.forward * 3f;
        videoFrame.transform.localScale = new Vector3(.5f, 0.3f, 1f);
        GameObject g = GameObject.FindGameObjectWithTag("MediaPlayer");

        MediaPlayer mp = g.GetComponent <MediaPlayer>();

        mp.OpenVideoFromFile(MediaPlayer.FileLocation.RelativeToPeristentDataFolder, filename);
        ApplyToMaterial am       = g.GetComponent <ApplyToMaterial>();
        Renderer        renderer = videoFrame.GetComponent <Renderer>();

        renderer.material = am._material;
        mp.Play();
    }
Beispiel #11
0
    void OnStoppedRecordingVideo(VideoCapture.VideoCaptureResult result /**/)
    {
        //OnStoppedVideoCaptureMode();
        //Debug.Log("Stopped Recording Video!");
        m_VideoCapture.StopVideoModeAsync(OnStoppedVideoCaptureMode); //
    }

    void OnStoppedVideoCaptureMode(VideoCapture.VideoCaptureResult result /**/)
    {
        m_VideoCapture.Dispose(); //
        m_VideoCapture = null;    //
        VideoCapture_Icon2.SetActive(false);
        VideoCapture_Icon.SetActive(true);
        Video_Right_Menu.SetActive(false);
        CapturedImage.SetActive(true);
        RenderTexture rt = new RenderTexture(256, 256, 16, RenderTextureFormat.ARGB32);

        CapturedImage.GetComponent <VideoPlayer>().targetTexture = rt;
        CapturedImage.GetComponent <RawImage>().texture          = rt;
        //filePath = "C:/Users/qotna/OneDrive/문서/카카오톡 받은 파일/KakaoTalk_20200827_155228433.mp4";
        CapturedImage.GetComponent <VideoPlayer>().url = filePath;

        Invoke("CaptureLerp", 1f);
    }
Beispiel #12
0
 void OnStoppedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
 {
     Debug.Log("Stopped Video Capture Mode!");
 }
Beispiel #13
0
 void OnStoppedRecordingVideo(VideoCapture.VideoCaptureResult result)
 {
     _videoCapture.StopVideoModeAsync(OnStoppedVideoCaptureMode);
 }
Beispiel #14
0
 void OnStartedRecordingVideo(VideoCapture.VideoCaptureResult result)
 {
     m_stopRecordingTimer = Time.time + MaxRecordingTime;
     OnVideoRecordingStarted?.Invoke();
 }
Beispiel #15
0
 void OnStoppedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
 {
     m_VideoCapture.Dispose();
     m_VideoCapture = null;
     Debug.Log("停止录像模式!");
 }
    void OnStoppedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
    {
        _videoCapture = null;

        OnVideoFinished?.Invoke(_fileName);
    }
Beispiel #17
0
 void OnStartedRecordingVideo(VideoCapture.VideoCaptureResult result)
 {
     Debug.Log("Started Recording Video!");
     // We will stop the video from recording via other input such as a timer or a tap, etc.
 }
Beispiel #18
0
 void OnStartedRecordingVideo(VideoCapture.VideoCaptureResult result)
 {
     Debug.Log("Started Recording Video!");
 }
Beispiel #19
0
 void OnStoppedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
 {
     videoCaptureObject.Dispose();
     videoCaptureObject = null;
 }
Beispiel #20
0
 void OnStartedRecordingVideo(VideoCapture.VideoCaptureResult result)
 {
     Debug.Log("Started Recording Video!");
     DebugManager.Instance.PrintToInfoLog("Started Recording Video!\n");
     m_stopRecordingTimer = Time.time + MaxRecordingTime;
 }
Beispiel #21
0
 void OnStoppedRecordingVideo(VideoCapture.VideoCaptureResult result)
 {
     Debug.Log("Stopped Recording Video!");
     m_VideoCapture.StopVideoModeAsync(OnStoppedVideoCaptureMode);
 }
Beispiel #22
0
 void OnStoppedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
 {
     Debug.Log("Stopped Video Capture Mode!");
     MixedRealityCapture.Instance.AfterStopVideoCapture();
 }
Beispiel #23
0
 private void OnStartedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
 {
     throw new NotImplementedException();
 }
Beispiel #24
0
 void OnStartedRecordingVideo(VideoCapture.VideoCaptureResult result)
 {
     Debug.Log("Started Recording Video!");
     m_stopRecordingTimer = Time.time + MaxRecordingTime;
 }
Beispiel #25
0
 void onStoppedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
 {
     videoCapture.Dispose();
     videoCapture = null;
 }
Beispiel #26
0
 void OnStoppedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
 {
     Debug.Log("Stopped Video Capture Mode!");
     DebugManager.Instance.PrintToInfoLog("Stopped Video Capture Mode!\n");
 }
Beispiel #27
0
 void OnStoppedVideoCaptureMode(VideoCapture.VideoCaptureResult result)
 {
     m_VideoCapture.Dispose();
     m_VideoCapture = null;
 }
Beispiel #28
0
 void OnStoppedRecordingVideo(VideoCapture.VideoCaptureResult result)
 {
     Debug.Log("Stopped Recording Video!");
     DebugManager.Instance.PrintToInfoLog("Stopped Recording Video!\n");
     m_VideoCapture.StopVideoModeAsync(OnStoppedVideoCaptureMode);
 }
Beispiel #29
0
 /// <summary>
 /// recording stopped
 /// </summary>
 /// <param name="result"></param>
 void OnStoppedRecordingVideo(VideoCapture.VideoCaptureResult result)
 {
     Debug.Log("Stopped Recording Video!");
     isRecording = false;
     videoCaptureObject.StopVideoModeAsync(OnStoppedVideoCaptureMode);
 }