I am currently trying to write a video player widget for a GUI framework using this crate and wgpu, which requires me to convert frames to a suitable pixel format (like rgba) after they have been decoded.
I did this conversion using VideoFrameScaler, but after that I have no idea how to turn the data from the planes into an actually valid frame for wgpu.
A naive solution of just appending all the data slices together works for some videos, but not all.
I am currently trying to write a video player widget for a GUI framework using this crate and wgpu, which requires me to convert frames to a suitable pixel format (like
rgba) after they have been decoded.I did this conversion using
VideoFrameScaler, but after that I have no idea how to turn the data from the planes into an actually valid frame for wgpu.A naive solution of just appending all the data slices together works for some videos, but not all.