I’ve cloned gstreamer-rs and gst-plugins-rs. I’d like to make some changes to both and use them together to build gst-plugin-spotify from gst-plugins-rs. I am able to build a clean checkout of gst-plugins-rs and gstreamer-rs, but when I change gst-plugins-rs/Cargo.toml to point to my local gstreamer-rs clone, I get loads of compile errors. I’m not sure I am using the correct method to do this:
diff --git a/Cargo.toml b/Cargo.toml
index ce7dfae8..62af7cd2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -133,7 +133,8 @@ gtk = { package = "gtk4", git = "https://github.com/gtk-rs/gtk4-rs", branch = "m
gdk-wayland = { package = "gdk4-wayland", git = "https://github.com/gtk-rs/gtk4-rs", branch = "master"}
gdk-x11 = { package = "gdk4-x11", git = "https://github.com/gtk-rs/gtk4-rs", branch = "master"}
gdk-win32 = { package = "gdk4-win32", git = "https://github.com/gtk-rs/gtk4-rs", branch = "master"}
-gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "main" }
+gst = { package = "gstreamer", path = "../gstreamer-rs/gstreamer" }
gst-app = { package = "gstreamer-app", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "main" }
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "main" }
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "main" }
~/Dev/gst-plugins-rs$ cargo build --package gst-plugin-spotify
Skipping git submodulehttps://github.com/gtk-rs/gir
due to update strategy in .gitmodules
Skipping git submodulehttps://github.com/gtk-rs/gir-files
due to update strategy in .gitmodules
Skipping git submodulehttps://gitlab.freedesktop.org/gstreamer/gir-files-rs.git
due to update strategy in .gitmodules
Skipping git submodulehttps://github.com/gtk-rs/gir
due to update strategy in .gitmodules
Skipping git submodulehttps://github.com/gtk-rs/gir-files
due to update strategy in .gitmodules
Skipping git submodulehttps://github.com/gtk-rs/gir
due to update strategy in .gitmodules
Skipping git submodulehttps://github.com/gtk-rs/gir-files
due to update strategy in .gitmodules
Skipping git submodulehttps://github.com/gtk-rs/gir
due to update strategy in .gitmodules
Skipping git submodulehttps://github.com/gtk-rs/gir-files
due to update strategy in .gitmodules
Compiling gstreamer v0.22.4 (/home/nicky/Dev/gstreamer-rs/gstreamer)
Compiling gst-plugin-spotify v0.13.0-alpha.1 (/home/nicky/Dev/gst-plugins-rs/audio/spotify)
error[E0659]:ObjectSubclass
is ambiguous
→ audio/spotify/src/spotifyaudiosrc/imp.rs:82:6
|
82 | impl ObjectSubclass for SpotifyAudioSrc {
| ^^^^^^^^^^^^^^ ambiguous name
|
= note: ambiguous because of multiple glob imports of a name in the same module
note:ObjectSubclass
could refer to the trait imported here
→ audio/spotify/src/spotifyaudiosrc/imp.rs:17:5
|
17 | use gst::subclass::prelude::;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= help: consider adding an explicit import ofObjectSubclass
to disambiguate
note:ObjectSubclass
could also refer to the trait imported here
→ audio/spotify/src/spotifyaudiosrc/imp.rs:18:51
|
18 | use gst_base::subclass::{base_src::CreateSuccess, prelude::};
| ^^^^^^^^^^
= help: consider adding an explicit import ofObjectSubclass
to disambiguateerror[E0659]:
ObjectImpl
is ambiguous
→ audio/spotify/src/spotifyaudiosrc/imp.rs:89:6
|
89 | impl ObjectImpl for SpotifyAudioSrc {
| ^^^^^^^^^^ ambiguous name
|
= note: ambiguous because of multiple glob imports of a name in the same module
note:ObjectImpl
could refer to the trait imported here
→ audio/spotify/src/spotifyaudiosrc/imp.rs:17:5
|
17 | use gst::subclass::prelude::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= help: consider adding an explicit import ofObjectImpl
to disambiguate
etc etc etc.
I’ve tried the main branch of gstreamer-rs and also tried switching to the 0.22 (shown above) but I get the same problem. What am I doing wrong here?