mediacore integration

see corresponding hilary branch