Exemple #1
0
 private void StopHandlerThread()
 {
     _handler?.RemoveCallbacks(ScheduleNext);
     _handlerThread?.Quit();
     _handlerThread?.Interrupt();
     _handlerThread = null;
 }
Exemple #2
0
 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();
 }