private void FtInterfaceCameraProxyOnCameraFrameDecoded(object sender, FrameDecodedEventArgs eventArgs) { // Invalidate the camera view on the ui thread Activity?.RunOnUiThread(() => { if (_imageViewCameraStream != null && FtInterfaceCameraProxy.ImageBitmap != null) { if (_firstFrame && !FtInterfaceCameraProxy.ImageBitmap.IsRecycled) { InitializeCameraView(); } else if (!FtInterfaceCameraProxy.ImageBitmap.IsRecycled) { _imageViewCameraStream?.Invalidate(); } } }); }
private void FtInterfaceCameraProxyOnCameraFrameDecoded(object sender, FrameDecodedEventArgs eventArgs) { Activity?.RunOnUiThread(() => { if (_imageViewCameraStream != null && FtInterfaceCameraProxy.ImageBitmap != null) { // When this is the first frame: initialize the image view if (_firstFrame && !FtInterfaceCameraProxy.ImageBitmap.IsRecycled) { InitializeCameraView(); } else if (!FtInterfaceCameraProxy.ImageBitmap.IsRecycled) { // Invalidate the image view to display the actual stored bitmap _imageViewCameraStream?.Invalidate(); } } }); }