merge source code from https://github.com/muhku/FreeStreamer