Sorry for the large diff, the implementation is quite long, and I can't really find a good way to split it into commits.
The VideoFrame is rotated while copying, to put the pixels in their correct positions (OpenGL seems to return the image in reverted order by default)