Skip to content

Fails to build #69

@agvxov

Description

@agvxov
   Compiling dyn-clone v1.0.17
error[E0432]: unresolved import `crate::capture::ScreenCaptureImpl`
  --> src/capture/capturer.rs:11:37
   |
11 | use crate::capture::{ScreenCapture, ScreenCaptureImpl};
   |                                     ^^^^^^^^^^^^^^^^^
   |                                     |
   |                                     no `ScreenCaptureImpl` in `capture`
   |                                     help: a similar name exists in the module: `ScreenCapture`
   |
note: found an item that was configured out
  --> src/capture/mod.rs:37:34
   |
36 | #[cfg(target_os = "windows")]
   |       --------------------- the item is gated behind the `windows` feature
37 | pub use wgc::WGCScreenCapture as ScreenCaptureImpl;
   |                                  ^^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> src/capture/mod.rs:46:32
   |
45 | #[cfg(target_os = "macos")]
   |       ------------------- the item is gated behind the `macos` feature
46 | pub use macos::MacOSCapture as ScreenCaptureImpl;
   |                                ^^^^^^^^^^^^^^^^^

error[E0432]: unresolved import `crate::capture::ScreenCaptureImpl`
  --> src/gui/component/start.rs:9:5
   |
 9 | use crate::capture::ScreenCaptureImpl;
   |     ^^^^^^^^^^^^^^^^-----------------
   |     |               |
   |     |               help: a similar name exists in the module: `ScreenCapture`
   |     no `ScreenCaptureImpl` in `capture`
   |
note: found an item that was configured out
  --> src/capture/mod.rs:37:34
   |
36 | #[cfg(target_os = "windows")]
   |       --------------------- the item is gated behind the `windows` feature
37 | pub use wgc::WGCScreenCapture as ScreenCaptureImpl;
   |                                  ^^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> src/capture/mod.rs:46:32
   |
45 | #[cfg(target_os = "macos")]
   |       ------------------- the item is gated behind the `macos` feature
46 | pub use macos::MacOSCapture as ScreenCaptureImpl;
   |                                ^^^^^^^^^^^^^^^^^

error[E0412]: cannot find type `ScreenCaptureImpl` in this scope
 --> src/capture/mod.rs:9:38
  |
9 |     fn new(config: Config) -> Result<ScreenCaptureImpl>;
  |                                      ^^^^^^^^^^^^^^^^^ not found in this scope
  |
help: you might be missing a type parameter
  |
8 | pub trait ScreenCapture<ScreenCaptureImpl> {
  |                        +++++++++++++++++++

warning: unused import: `ffmpeg::FrameData`
 --> src/encoder/mod.rs:5:9
  |
5 | pub use ffmpeg::FrameData;
  |         ^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default

error[E0282]: type annotations needed
   --> src/capture/capturer.rs:130:33
    |
130 |             Ok(mut capturer) => capturer.available_displays().unwrap(),
    |                                 ^^^^^^^^ cannot infer type

error[E0282]: type annotations needed
   --> src/capture/capturer.rs:140:29
    |
140 |             Ok(capturer) => capturer.selected_display().unwrap(),
    |                             ^^^^^^^^ cannot infer type

error[E0282]: type annotations needed
   --> src/capture/capturer.rs:150:33
    |
150 |             Ok(mut capturer) => capturer.select_display(&display).unwrap(),
    |                                 ^^^^^^^^ cannot infer type

error[E0282]: type annotations needed
   --> src/capture/capturer.rs:188:21
    |
188 |                 let mut capture = capture.lock().await;
    |                     ^^^^^^^^^^^
...
203 |                 let resolution = capture.display().resolution();
    |                                  ------- type must be known at this point
    |
help: consider giving `capture` an explicit type
    |
188 |                 let mut capture: /* Type */ = capture.lock().await;
    |                                ++++++++++++

error[E0282]: type annotations needed
   --> src/capture/capturer.rs:233:17
    |
233 | /                 capture
234 | |                     .start_capture(encoder, output, profiler, shutdown_token.clone())
235 | |                     .await
    | |__________________________^ cannot infer type

error[E0282]: type annotations needed
   --> src/capture/capturer.rs:243:13
    |
243 |             capture.lock().await.stop_capture().await.unwrap();
    |             ^^^^^^^^^^^^^^^^^^^^ cannot infer type

error[E0282]: type annotations needed
   --> src/capture/capturer.rs:243:13
    |
243 |             capture.lock().await.stop_capture().await.unwrap();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type

warning: unused import: `crate::capture::ScreenCapture`
 --> src/main.rs:9:5
  |
9 | use crate::capture::ScreenCapture;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: value assigned to `texture_desc` is never read
   --> src/capture/yuv_convert/yuv_converter.rs:423:5
    |
423 |     texture_desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: maybe it is overwritten before being read?
    = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default

warning: value assigned to `texture_desc` is never read
   --> src/capture/yuv_convert/yuv_converter.rs:424:5
    |
424 |     texture_desc.Usage = D3D11_USAGE_STAGING;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: maybe it is overwritten before being read?

warning: value assigned to `texture_desc` is never read
   --> src/capture/yuv_convert/yuv_converter.rs:425:5
    |
425 |     texture_desc.BindFlags = D3D11_BIND_FLAG::default();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: maybe it is overwritten before being read?

Some errors have detailed explanations: E0282, E0412, E0432.
For more information about an error, try `rustc --explain E0282`.
warning: `mira_sharer` (bin "mira_sharer") generated 5 warnings
error: could not compile `mira_sharer` (bin "mira_sharer") due to 10 previous errors; 5 warnings emitted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions