raymanfx / libv4l-rs

Video4Linux2 bindings for Rust
MIT License
155 stars 65 forks source link

Fixes to the Glium example #117

Open dcz-self opened 1 month ago

dcz-self commented 1 month ago

The example had several problems: freezing, wrong window size, and old glium version.

This fixes the problems.

MarijnS95 commented 1 month ago

wrong window size

Fwiw I'd argue that this won't fly on tiling window managers, where the size of the window cannot be dictated by the input source (unless the window is made floating). Here the easiest to expect is scaling/stretching?

dcz-self commented 1 month ago

wrong window size Fwiw I'd argue that this won't fly on tiling window managers, where the size of the window cannot be dictated by the input source (unless the window is made floating). Here the easiest to expect is scaling/stretching?

If a window manager wants to use a different size, then setting the size hint isn't going to stop it. Meanwhile, window managers respecting the size will have the right size.

The right solution for wrong size would be letterboxing, but I'm not ready to tackle that in this moment.

dcz-self commented 1 month ago

I added frame skipping here. Tested by adding an artificial delay in the rendering code and observing that frame latencies don't keep growing forever.