Does anyone know of a way to pair Ubuntu with a miracast device (such as the nexus 4)?

Ideally I'd like to have the miracast stream set up similar to a webcam stream, so it can be recorded.