Exemple #1
0
        public void Initialize(
            int width,
            int height,
            int fps_,
            int bitrate,
            int gop
            )
        {
            FBCaptureConfig  config = new FBCaptureConfig(bitrate, fps_, gop);
            FBCAPTURE_STATUS status = FBCaptureCreate(config, out handle_);

            if (status != FBCAPTURE_STATUS.OK)
            {
                Debug.LogFormat("[ERROR] FBCaptureCreate() failed. Session status: {0}", status);
                OnFailure(ErrorType.INITIALIZE_FAILED, status);
                return;
            }

            this.fps_ = fps_;

            // create render texture for 360 capture
            SetOutputSize(width, height);

            Debug.LogFormat("[SurroundCapture] FBCapture initialized. (bitrate: {0}, fps_{1}, gop:{2})", bitrate, fps_, gop);
        }
Exemple #2
0
 private static extern FBCAPTURE_STATUS FBCaptureCreate(FBCaptureConfig config, out FBCAPTURE_HANDLE handle_);