private void StopHandlerThread() { _handler?.RemoveCallbacks(ScheduleNext); _handlerThread?.Quit(); _handlerThread?.Interrupt(); _handlerThread = null; }
public void Close() { Console.WriteLine("called Close at PlatformVideoDecoderAndroid Class."); try { if (callbackThread != null) { myCallback.isClosed = true; callbackThread.Looper.Quit(); callbackThread.Looper.Dispose(); callbackThread.Interrupt(); callbackThread.Dispose(); callbackThread = null; } if (handler != null) { handler.Dispose(); handler = null; } if (mDecoder != null) { mDecoder.Stop(); mDecoder.Release(); mDecoder.Dispose(); eosReceived = true; } } catch (Exception e) { Console.WriteLine(e.ToString()); } }
public void StopPeriodic() { _handlerThread.Quit(); _handlerThread.Interrupt(); _handlerThread.Dispose(); }