Cling vs wifi-p2p for Android to TV video broadcasting

I am trying to make an app to connect to my TV and broadcast or play a video from the internet.

I have seen that UPnP/DLNA library for Java and Android(cling) seems like a good way to do it(could make it work on the android studio IDE but it seems so complicated) but then I found Wi-Fi Peer-to-Peer as much as I read(Something seemed to be missing).


wifi p2p:


I would love a clear explanation if both can do what I need, just cling can, or I need both to do the project in hand.

Thanks in Advance.