Moving existing MediaServer code to libmediaserver