There is no open-source implementation of the Chromecast protocol or API so you won't be able to make a Pi into a Chromecast.
BubbleUPnP is an excellent UPnP app. I recommend you stick to that.
BubbleUPnP is an excellent UPnP app. I recommend you stick to that.