Skip to content

Failure to build - unresolved import & other errors #119

@MichaelMackus

Description

@MichaelMackus

cargo 1.86.0
rustc 1.86.0


error[E0432]: unresolved import `ffmpeg::ffi::av_channel_layout_describe`
  --> src/audio.rs:17:11
   |
17 |     ffi::{av_channel_layout_describe, av_find_input_format},
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `av_channel_layout_describe` in the root

error[E0599]: no variant or associated item named `VAAPI` found for enum `Pixel` in the current scope
  --> src/avhw.rs:58:47
   |
58 |             (*hwframe_casted).format = Pixel::VAAPI.into();
   |                                               ^^^^^ variant or associated item not found in `Pixel`

error[E0609]: no field `ch_layout` on type `AVCodecContext`
   --> src/audio.rs:356:52
    |
356 |     let ch_layout = unsafe { input.as_ptr().read().ch_layout };
    |                                                    ^^^^^^^^^ unknown field
    |
    = note: available fields are: `av_class`, `log_level_offset`, `codec_type`, `codec`, `codec_id` ... and 95 others

error[E0609]: no field `time_base` on type `AVFrame`
    --> src/main.rs:1325:34
     |
1325 |             (*surf.as_mut_ptr()).time_base.num = 1;
     |                                  ^^^^^^^^^ unknown field
     |
     = note: available fields are: `data`, `linesize`, `extended_data`, `width`, `height` ... and 49 others

error[E0609]: no field `time_base` on type `AVFrame`
    --> src/main.rs:1326:34
     |
1326 |             (*surf.as_mut_ptr()).time_base.den = 1_000_000_000;
     |                                  ^^^^^^^^^ unknown field
     |
     = note: available fields are: `data`, `linesize`, `extended_data`, `width`, `height` ... and 49 others

error[E0599]: no variant or associated item named `VAAPI` found for enum `Pixel` in the current scope
    --> src/main.rs:1575:47
     |
1575 |         EncodePixelFormat::Vaapi(_) => Pixel::VAAPI,
     |                                               ^^^^^ variant or associated item not found in `Pixel`

error[E0599]: no variant or associated item named `VAAPI` found for enum `Pixel` in the current scope
    --> src/main.rs:1668:50
     |
1668 |     } else if supported_formats.contains(&Pixel::VAAPI) {
     |                                                  ^^^^^ variant or associated item not found in `Pixel`

error[E0599]: no variant or associated item named `VAAPI` found for enum `Pixel` in the current scope
    --> src/main.rs:2244:42
     |
2244 |     if args.encode_pixfmt == Some(Pixel::VAAPI) {
     |                                          ^^^^^ variant or associated item not found in `Pixel`

Some errors have detailed explanations: E0432, E0599, E0609.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `wl-screenrec` (bin "wl-screenrec") due to 8 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions