Esempio n. 1
0
        void Update()
        {
#if VIMEO_AVPRO_CAPTURE_SUPPORT
            // Hooking into AVPro by monitoring status changes
            if (_recorder != null && _recorder.encoderType == EncoderType.AVProMovieCapture && _avproEncoder != null)
            {
                if (_avproEncoder.IsCapturing())
                {
                    isRecording = true;
                }
                else if (isRecording)   // it was recording, but no longer
                {
                    isRecording = false;

                    if (File.Exists(_avproEncoder.LastFilePath))   // if the file exists, then it finished
                    {
                        Debug.Log("[VimeoRecorder] AVPro recording finished");
                        _recorder.EndRecording();
                    }
                    else
                    {
                        Debug.Log("[VimeoRecorder] AVPro recording cancelled");
                    }
                }
            }
#endif // VIMEO_AVPRO_CAPTURE_SUPPORT
        }
Esempio n. 2
0
 public void LateUpdate()
 {
     if (encoder != null && isRecording)
     {
         if (recorder.recordMode == RecordMode.Duration)
         {
             if (currentFrame > recorder.frameRate * recorder.recordDuration)
             {
                 recorder.EndRecording();
             }
             else
             {
                 StartCoroutine(RecordFrame());
             }
         }
         else
         {
             StartCoroutine(RecordFrame());
         }
     }
 }