When recording, the header must be written with extradata set to the content of the very first packet. Suggested-by: Steve Lhomme <robux4@ycbcr.xyz> Fixes <https://github.com/Genymobile/scrcpy/issues/351> Fixes <https://github.com/Genymobile/scrcpy/issues/416>
Implement recording in a separate "class".