void Update()
        {
            // 360 screen capturing
            if (Input.GetKeyDown(screenShotKey) && doSurroundCapture)
            {
                surroundCapture.TakeScreenshot(screenShotWidth, screenShotHeight, ScreenShotName(screenShotWidth, screenShotHeight));
            }

            else if (Input.GetKeyDown(encodingStartShotKey) && doSurroundCapture)
            {
                surroundCapture.StartEncodingVideo(videoWidth, videoHeight, MovieName(videoWidth, videoHeight));
            }

            else if (Input.GetKeyDown(encodingStopShotKey) && doSurroundCapture)
            {
                surroundCapture.StopEncodingVideo();
            }

            // 2D screen capturing
            if (Input.GetKeyDown(screenShotKey) && !doSurroundCapture)
            {
                nonSurroundCapture.TakeScreenshot(screenShotWidth, screenShotHeight, ScreenShotName(screenShotWidth, screenShotHeight));
            }

            else if (Input.GetKeyDown(encodingStartShotKey) && !doSurroundCapture)
            {
                nonSurroundCapture.StartEncodingVideo(videoWidth, videoHeight, MovieName(videoWidth, videoHeight));
            }

            else if (Input.GetKeyDown(encodingStopShotKey) && !doSurroundCapture)
            {
                nonSurroundCapture.StopEncodingVideo();
            }
        }
Beispiel #2
0
        void Update()
        {
            // Check in real time if capture option is changed if there is no encoding session happening at the moment
            doSurroundCapture   = doSurroundCaptureOption;
            liveStreaming       = liveStreamingOption;
            liveStreamServerUrl = streamKeyOption;

            // 360 screen capturing
            if (Input.GetKeyDown(screenShotKey) && currDoSurroundCapture)
            {
                surroundCapture.TakeScreenshot(screenShotWidth, screenShotHeight, ScreenShotName(screenShotWidth, screenShotHeight));
            }
            else if (Input.GetKeyDown(encodingStartShotKey) && currDoSurroundCapture)
            {
                surroundCapture.StartEncodingVideo(videoWidth, videoHeight, fps, MovieName(videoWidth, videoHeight));
            }
            else if (Input.GetKeyDown(encodingStopShotKey) && currDoSurroundCapture)
            {
                surroundCapture.StopEncodingVideo();
            }

            // 2D screen capturing
            if (Input.GetKeyDown(screenShotKey) && !currDoSurroundCapture)
            {
                nonSurroundCapture.TakeScreenshot(screenShotWidth, screenShotHeight, ScreenShotName(screenShotWidth, screenShotHeight));
            }
            else if (Input.GetKeyDown(encodingStartShotKey) && !currDoSurroundCapture)
            {
                nonSurroundCapture.StartEncodingVideo(videoWidth, videoHeight, fps, MovieName(videoWidth, videoHeight));
            }
            else if (Input.GetKeyDown(encodingStopShotKey) && !currDoSurroundCapture)
            {
                nonSurroundCapture.StopEncodingVideo();
            }
        }
Beispiel #3
0
 public void StartCaptureVideo()
 {
     if (currDoSurroundCapture)
     {
         surroundCapture.StartEncodingVideo(videoWidth, videoHeight, fps, bitrate, MovieName(videoWidth, videoHeight));
     }
     if (!currDoSurroundCapture)
     {
         nonSurroundCapture.StartEncodingVideo(videoWidth, videoHeight, fps, bitrate, MovieName(videoWidth, videoHeight));
     }
 }
Beispiel #4
0
        void Update()
        {
            // [RMS] added this tracking
            if (doSurroundCapture)
            {
                if (surroundCapture.IsEncoding() == false)
                {
                    var found = GameObject.Find("FBCaptureEncoder");
                    if (found != null)
                    {
                        found.transform.position = Camera.main.transform.position;
                    }
                }
            }
            else
            {
                if (nonSurroundCapture.IsEncoding() == false || TrackMainCamera)
                {
                    var found = GameObject.Find("FBCaptureEncoder");
                    if (found != null)
                    {
                        float alpha = Math.Max(0, Math.Min(1, TrackingAlpha));
                        found.transform.position =
                            Vector3.Lerp(found.transform.position, Camera.main.transform.position, alpha);
                        found.transform.rotation =
                            Quaternion.Lerp(found.transform.rotation, Camera.main.transform.rotation, alpha);
                    }
                }
            }


            // 360 screen capturing
            if (Input.GetKeyDown(screenShotKey) && doSurroundCapture)
            {
                surroundCapture.TakeScreenshot(screenShotWidth, screenShotHeight, ScreenShotName(screenShotWidth, screenShotHeight));
            }

            else if (Input.GetKeyDown(encodingStartShotKey) && doSurroundCapture)
            {
                surroundCapture.StartEncodingVideo(surroundVideoWidth, videoHeight, MovieName(surroundVideoWidth, videoHeight));
            }

            else if (Input.GetKeyDown(encodingStopShotKey) && doSurroundCapture)
            {
                surroundCapture.StopEncodingVideo();
            }

            // 2D screen capturing
            if (Input.GetKeyDown(screenShotKey) && !doSurroundCapture)
            {
                nonSurroundCapture.TakeScreenshot(screenShotWidth, screenShotHeight, ScreenShotName(screenShotWidth, screenShotHeight));
            }

            else if (Input.GetKeyDown(encodingStartShotKey) && !doSurroundCapture)
            {
                nonSurroundCapture.StartEncodingVideo(viewVideoWidth, videoHeight, MovieName(viewVideoWidth, videoHeight));
            }

            else if (Input.GetKeyDown(encodingStopShotKey) && !doSurroundCapture)
            {
                nonSurroundCapture.StopEncodingVideo();
            }
        }