Core part of ScreenX TV and some sample code.