merge from xbmc

merge from xbmc