Android has native screen mirroring capabilities (when pulling down the status bar, there is a "cast" icon).
It uses for two technologies:
Miracast is an open standard, Google Cast is proprietary.
Google Cast requires "gapps" on LineageOS. (proprietary google library)
Linux implementations
List of applications: https://wiki.thingsandstuff.org/Networked_media#Miracast
Uses DIAL (http://www.dial-multiscreen.org, https://en.wikipedia.org/wiki/Discovery_and_Launch)
CASTv1 receiver implementations
Senders:
Control it with curl:
Find receivers:
$ gssdp-discover --timeout=3 -t urn:dial-multiscreen-org:device:dialreceiver:1
Run a youtube video:
$ curl -X POST -d "v=zjR_AhxPnVM" http://dreambox:8008/apps/YouTube
Custom protocol
CASTv2 Receiver implementations
CAST v2 senders
List of applications: https://wiki.thingsandstuff.org/Networked_media#Google_Cast_.2F_Chromecast