ImTheSquid / Tuxphones

[In-Development] Discord Screensharing Audio for Linux
MIT License
56 stars 4 forks source link

Tuxphones doesnt want to compile #23

Open excited-bore opened 1 week ago

excited-bore commented 1 week ago

I cloned the github repo, copied the file from bd/release to ~/.config/BetterDiscord/plugins/ and then ran cargo run in the daemon directory.

error[E0282]: type annotations needed for `Box<_>`
  --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.21/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
help: consider giving `items` an explicit type, where the placeholders `_` are specified
   |
83 |     let items: Box<_> = format_items
   |              ++++++++

   Compiling chrono v0.4.24
   Compiling tokio-native-tls v0.3.1
   Compiling libpulse-binding v2.27.1
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

:frowning_face:

ImTheSquid commented 1 week ago

This is probably because the crates we used have not been updated since this project is effectively abandoned. Updating the dependencies may help but I doubt the code will work since it never worked for us.

JustCryen commented 4 days ago

It throws warnings but it does compile for me on Arch. I cannot get the plugin running tho.

Daemon:

warning: unused variable: `audioconvert`
   --> src/gstreamer.rs:207:13
    |
207 |         let audioconvert = gst::ElementFactory::make("audioconvert").build()?;
    |             ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_audioconvert`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `audio_encoder_queue`
   --> src/gstreamer.rs:232:13
    |
232 |         let audio_encoder_queue = gst::ElementFactory::make("queue").build()?;
    |             ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_audio_encoder_queue`

warning: unused variable: `audio_webrtc_queue`
   --> src/gstreamer.rs:234:13
    |
234 |         let audio_webrtc_queue = gst::ElementFactory::make("queue").build()?;
    |             ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_audio_webrtc_queue`

warning: unused variable: `rtc_connection_id`
  --> src/lib.rs:93:33
   |
93 | ...                   rtc_connection_id,
   |                       ^^^^^^^^^^^^^^^^^ help: try ignoring the field: `rtc_connection_id: _`

warning: unused variable: `voice_ssrc`
  --> src/lib.rs:95:33
   |
95 | ...                   voice_ssrc,
   |                       ^^^^^^^^^^ help: try ignoring the field: `voice_ssrc: _`

warning: struct `StreamSSRCs` is never constructed
  --> src/gstreamer.rs:23:12
   |
23 | pub struct StreamSSRCs {
   |            ^^^^^^^^^^^
   |
   = note: `StreamSSRCs` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

warning: fields `encoder` and `encoder_type` are never read
  --> src/gstreamer.rs:73:5
   |
71 | pub struct GstHandle {
   |            --------- fields in this struct
72 |     pipeline: gst::Pipeline,
73 |     encoder: Element,
   |     ^^^^^^^
74 |     encoder_type: VideoEncoderType,
   |     ^^^^^^^^^^^^

warning: `tuxphones` (lib) generated 7 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 38.78s
     Running `target/debug/tuxphones`
  2024-10-22T16:07:20.745876Z  INFO tuxphones: Daemon started
    at src/main.rs:56

Addon error:

 TypeError: Cannot read properties of undefined (reading 'c')
    at WebpackModules.getAllModules (betterdiscord://plugins/0PluginLibrary.plugin.js:3119:29)
    at plugin (betterdiscord://plugins/Tuxphones.plugin.js:85:69)
    at eval (betterdiscord://plugins/Tuxphones.plugin.js:409:13)
    at eval (betterdiscord://plugins/Tuxphones.plugin.js:410:3)
    at N.requireAddon (betterdiscord/renderer.js:5:28601)
    at N.loadAddon (betterdiscord/renderer.js:5:6221)
    at N.loadAddon (betterdiscord/renderer.js:5:26269)
    at N.loadAllAddons (betterdiscord/renderer.js:5:9278)
    at N.initialize (betterdiscord/renderer.js:5:3093)
    at N.initialize (betterdiscord/renderer.js:5:25382)
    at Object.startup (betterdiscord/renderer.js:5:408589)