public void Dispose()
        {
            _readThread.Abort();
            _readThread.Join();
            _readThread = null;

            ClearQueue();
            _queue = null;

            _frameConverter = null;
        }
        public FFmpegManager(FrameConverter frameConverter, ICodecHeaderSource codecHeaderSource)
        {
            _frameConverter    = frameConverter;
            _codecHeaderSource = codecHeaderSource;

            _queue   = new Queue <FFmpegTask>();
            _queueId = 0;

            _readThread      = new Thread(ReadConvertQueue);
            _readThread.Name = "FFmpegConverter";
            _readThread.Start();

            // Load the FFmpeg module (DDL's)
            _frameConverter.RegisterFFmpeg();
        }