Phew, finished the initial implementation of window screencasting in niri! Complete with stream resolution change on window resizing.
Some details are still iffy regarding frame timing and frame callbacks, especially to obscured windows, but it *should* work decently fine for now.