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).

cling: https://github.com/4thline/cling

wifi p2p: https://developer.android.com/guide/topics/connectivity/wifip2p.html

Summary(Question):

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.