protected override void OnDestroy() { running = false; evt.WaitOne(); base.OnDestroy(); codec.Dispose(); sview.Dispose(); }
public bool Stop() { bool result = true; try { if (!IsStopped) { surfaceHolder.Dispose(); windowManager.RemoveView(surfaceView); surfaceView.Dispose(); windowManager.Dispose(); IsStopped = true; cameraPreviewCallback.GotchaAFrameCallback = null; } } catch (Exception e) { Log.Error(TAG, "Error: " + e.StackTrace); result = false; } return(result); }