public void Release() { if (handle_ == IntPtr.Zero) { return; } FBCAPTURE_STATUS status = FBCaptureRelease(handle_); handle_ = IntPtr.Zero; if (status != FBCAPTURE_STATUS.OK) { Debug.LogFormat("[Error] FBCaptureRelease() failed. Session status: {0}", status); OnFailure(ErrorType.RELEASE_FAILED, status); } }
private static extern FBCAPTURE_STATUS FBCaptureMute(FBCAPTURE_HANDLE handle_, bool mute);
private static extern FBCAPTURE_STATUS FBCaptureGetSessionStatus(FBCAPTURE_HANDLE handle_);
private static extern FBCAPTURE_STATUS FBCaptureRelease(FBCAPTURE_HANDLE handle_);
private static extern FBCAPTURE_STATUS FBCaptureSaveScreenShot(FBCAPTURE_HANDLE handle_, IntPtr texturePtr, DestinationURL dstUrl, bool flipTexture);
private static extern FBCAPTURE_STATUS FBCaptureStopSession(FBCAPTURE_HANDLE handle_);
private static extern FBCAPTURE_STATUS FBCaptureEncodeFrame(FBCAPTURE_HANDLE handle_, IntPtr texturePtr);
private static extern FBCAPTURE_STATUS FBCaptureStartSession(FBCAPTURE_HANDLE handle_, DestinationURL dstUrl);
private static extern FBCAPTURE_STATUS FBCaptureCreate(FBCaptureConfig config, out FBCAPTURE_HANDLE handle_);