cargo: remove x11 dependency but use GST_XINITTHREADS

This commit is contained in:
Stéphane Cerveau 2022-11-16 13:22:27 +01:00
parent 9bcca3863a
commit 26b834c267
3 changed files with 1 additions and 15 deletions

11
Cargo.lock generated
View file

@ -540,7 +540,6 @@ dependencies = [
"serde", "serde",
"serde_any", "serde_any",
"simplelog", "simplelog",
"x11",
"xml-rs 0.8.4", "xml-rs 0.8.4",
] ]
@ -1465,16 +1464,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "x11"
version = "2.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dd0565fa8bfba8c5efe02725b14dff114c866724eff2cfd44d76cea74bcd87a"
dependencies = [
"libc",
"pkg-config",
]
[[package]] [[package]]
name = "xml-rs" name = "xml-rs"
version = "0.6.1" version = "0.6.1"

View file

@ -15,7 +15,6 @@ gettext-rs = {version = "0.7", features = ["gettext-system"]}
log = "0.4.11" log = "0.4.11"
once_cell = "1.7.2" once_cell = "1.7.2"
xml-rs = "0.8.4" xml-rs = "0.8.4"
x11 = { version = "2.18", features = ["xlib"] }
serde = "1.0" serde = "1.0"
serde_any = "0.5" serde_any = "0.5"
simplelog = "0.11.2" simplelog = "0.11.2"

View file

@ -10,9 +10,7 @@ use anyhow::Result;
use gtk::glib; use gtk::glib;
pub fn init() -> Result<()> { pub fn init() -> Result<()> {
unsafe { std::env::set_var("GST_XINITTHREADS", "1");
x11::xlib::XInitThreads();
}
gst::init()?; gst::init()?;
gtk::init()?; gtk::init()?;
Ok(()) Ok(())