Screencast in wayland over pipewire

In continuation of https://discourse.gnome.org/t/sample-code-to-capture-screen-to-memory-raw-image-in-wayland

code to perform screen cast (from OBS studio , but stripped down for tutorial purpose)