private void CloseVideoSource()
 {
     if (_videoSource != null)
     {
         _videoSource.DetachAllMatrices();
         _videoSource.MatrixUpdated -= OnMatrixUpdated;
         _videoSource.Close();
     }
 }