Draft: screen-cast: add skeleton for PipeWire explicit sync
This is an example of how I think explicit sync can be added to the PipeWire screen cast. I need some help with the details for managing the sync_fds and the sync_points. I'm not sure this API is already merged or not..
To test, the client also needs to add support for explicit sync. There are some draft example here: https://gitlab.freedesktop.org/wtaymans/pipewire/-/commit/fc901bc4ec0635a894fb86db12d37b13930948c8 again, I have no idea if this can be implemented yet.
Add new param to request SyncTimeline metadata on buffer that contain the sync_point.
Add new Buffers param depending on the SyncTimeline metada and that adds extra space for the sync_fd.
When we receive a buffer from PipeWire with the SyncTimeline, alsa set up the spa_data with the sync_fd and the sync type. We use the GenericFd type.
When we render a buffer with SyncTimeline, render to the framebuffer and return the sync_point for the sync_fd.