Miracast is not content-aware, it's just a standard to stream a video over Wi-Fi, competing with Intel Wireless Display (and other proprietary Wireless Display implementations)
The beauty of the Google Cast protocol is that you can hand over meta-data as well as the actual source-URL to the receiver and it can initiate the stream directly.
> the fact that google dropped it from stock android kind of says it all - they clearly think that chromecast isn't good enough to compete without being coddled.
Google had a basic implementation in AOSP to kickstart things, but when being deployed to the market it turned out to be too cumbersome and complicated:
1. Each vendor had to certify his device for Miracast implementation with the Wi-Fi Alliance.
2. The Miracast receiver (sink) was buggy in many TV-sets and often didn't even work well with devices from the same vendor (i.e. Samsung Galaxy with Samsung TV)
3. Mobile Chipset vendors (Qualcomm, Mediatek) started to provide their own Miracast implementations to make more efficient use of their HW-architecture
4. Power-consumption of Miracast was too high (the device has to encode it's display content into a H.264 stream)
In the end Google saw the potential to deliver a good experience with a cheap dongle and took matters in their own hands. Miracast on AOSP was not maintained further because it was anyway not used by any major device-vendor (Samsung, LG, Sony, Motorola)