raymanfx / libv4l-rs

Video4Linux2 bindings for Rust
MIT License
145 stars 62 forks source link

Upgrade `glium` example to `winit 0.29` and `glium 0.34` #86

Closed dependabot[bot] closed 5 months ago

dependabot[bot] commented 9 months ago

Updates the requirements on glium to permit the latest version.

Changelog

Sourced from glium's changelog.

Version 0.33.0 (2023-11-1)

  • Add read methods for Unsigned textures
  • Add gl::HALF_FLOAT to bind_attribute
  • Lowered version check for gl_PointSize from 3.0 to 2.0
  • Added Dynamic Uniform based on HashMap.
  • Updated glutin to version 0.30.0. See the glutin release notes here.

Version 0.32.1 (2022-07-31)

  • Bugfix release to not panic when given multiple vertex attributes with unspecified location numbers.

Version 0.32.0 (2022-07-30)

  • Updated glutin to version 0.29.0. See the glutin release notes here.
  • Support for location binding for Vertex attributes.

Version 0.31 (2021-12-11)

  • Updated glutin to version 0.28.0. See the glutin release notes here.
  • Use mdbook for the book.

Version 0.30.2 (2021-09-06)

  • Added depth and stencil buffer blitting.
  • Added dual source blending.
  • Implemented AsUniformValue for Texture2d directly.

Version 0.30.1 (2021-07-12)

  • Added ClientFormat::U1U5U5U5Reversed.
  • Updated ouroboros to 0.10.

Version 0.30.0 (2021-06-23)

  • Updated glutin to version 0.27.0. See the glutin release notes here.
  • Replaced unmaintained rental with ouroboros.
  • Allow instancing on GLES3 or later.
  • Support for importing and using Vulkan semaphores.
  • Made Content::read an unsafe API.
  • Modernized and fixed the third chapter of the tutorial.

Version 0.29.1 (2021-04-22)

  • Updated rand to 0.8.
  • Updated cgmath to 0.18.
  • Made UniformsStorage implement Copy and Clone.
  • Use $crate::uniform! internally.
  • Implemented From instead of Into for some conversions.

... (truncated)

Commits


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
MarijnS95 commented 9 months ago

I haven't been able to test this example because the JPEG decoder panics on data from my camera:

failed to decode JPEG: Format("scan makes use of unset dc huffman table")
dependabot[bot] commented 8 months ago

A newer version of glium exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

MarijnS95 commented 5 months ago

@raymanfx can you check this? The current winit 0.22 is ancient enough to not even run:

$ cargo r --example glium
   Compiling v4l v0.14.0 (/newdata/Code/Rust/libv4l-rs)
    Finished dev [unoptimized + debuginfo] target(s) in 1.55s
     Running `target/debug/examples/glium`
Using device: /dev/video0

Active format:
width          : 640
height         : 480
fourcc         : MJPG
field          : progressive
stride         : 0
size           : 614400
colorspace     : sRGB
quantization   : default
transfer       : sRGB transfer function

Active parameters:
capabilities : Capabilities(TIME_PER_FRAME)
modes        : Modes(0x0)
interval     : 1/5 [s]

interface 'wl_output' has no event 4
thread 'main' panicked at /home/marijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.22.2/src/platform_impl/linux/wayland/event_loop.rs:405:10:
called `Result::unwrap()` on an `Err` value: Os { code: 0, kind: Uncategorized, message: "Success" }
stack backtrace:
   0: rust_begin_unwind
             at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:647:5
   1: core::panicking::panic_fmt
             at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/result.rs:1649:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/result.rs:1073:23
   4: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::new
             at /home/marijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.22.2/src/platform_impl/linux/wayland/event_loop.rs:337:19
   5: winit::platform_impl::platform::EventLoop<T>::new_wayland_any_thread
             at /home/marijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.22.2/src/platform_impl/linux/mod.rs:579:9
   6: winit::platform_impl::platform::EventLoop<T>::new_any_thread
             at /home/marijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.22.2/src/platform_impl/linux/mod.rs:555:33
   7: winit::platform_impl::platform::EventLoop<T>::new
             at /home/marijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.22.2/src/platform_impl/linux/mod.rs:533:9
   8: winit::event_loop::EventLoop<T>::with_user_event
             at /home/marijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.22.2/src/event_loop.rs:129:25
   9: winit::event_loop::EventLoop<()>::new
             at /home/marijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.22.2/src/event_loop.rs:115:9
  10: glium::main
             at ./examples/glium.rs:57:22
  11: core::ops::function::FnOnce::call_once
             at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

But with this upgrade decoding fails, which is likely unrelated but I'd like to make sure that it runs first.

MarijnS95 commented 5 months ago

I forgot that I have an old and slow laptop, where this works but is quite terrible on the CPU.