How is Miracast related to Wi-Fi Direct?

Wi-Fi Direct allows devices to connect directly to each other, without the need for a Wi-Fi access point (AP). It simply requires the push of a button or the entry of a PIN. Wi-Fi Direct allows source and display devices to discover one another and provides the underlying device-to-device connectivity for Miracast. Miracast builds upon Wi-Fi Direct with mechanisms to negotiate video capabilities, setup content protection (if needed), stream content, and maintain the video session.