Glued together from: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/main/examples/src/bin/appsink.rs https://github.com/bevyengine/bevy/blob/main/examples/3d/render_to_texture.rs