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(); } }
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(); } }
public void CaptureScreenshot() { if (currDoSurroundCapture) { surroundCapture.TakeScreenshot(screenShotWidth, screenShotHeight, ScreenShotName(screenShotWidth, screenShotHeight)); } if (!currDoSurroundCapture) { nonSurroundCapture.TakeScreenshot(screenShotWidth, screenShotHeight, ScreenShotName(screenShotWidth, screenShotHeight)); } }
void Update() { if (!keyPressed()) { return; } if (Input.GetKeyDown(CaptureInitKey)) { onOptionSet(); surroundCapture.Initialize(width_, height_, fps_, bitrate_, gop_); } else if (Input.GetKeyDown(CaptureScreenShotKey)) { surroundCapture.TakeScreenshot(screenshotUrl_); } else if (Input.GetKeyDown(CaptureVideoStartKey)) { surroundCapture.StartEncoding(videoUrl_); } else if (Input.GetKeyDown(CaptureVideoStopKey)) { surroundCapture.StopEncoding(); } else if (Input.GetKeyDown(CaptureLiveStartKey)) { surroundCapture.StartEncoding(streamUrl_); } else if (Input.GetKeyDown(CaptureLiveStopKey)) { surroundCapture.StopEncoding(); } else if (Input.GetKeyDown(CaptureRleaseKey)) { surroundCapture.Release(); } }
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(); } }