From 26b834c26763cf891d71eca749e5027962a8811e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Wed, 16 Nov 2022 13:22:27 +0100 Subject: [PATCH] cargo: remove x11 dependency but use GST_XINITTHREADS --- Cargo.lock | 11 ----------- Cargo.toml | 1 - src/common.rs | 4 +--- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 966069f..0f8bc74 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -540,7 +540,6 @@ dependencies = [ "serde", "serde_any", "simplelog", - "x11", "xml-rs 0.8.4", ] @@ -1465,16 +1464,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "xml-rs" version = "0.6.1" diff --git a/Cargo.toml b/Cargo.toml index 785c96d..0506c9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,6 @@ gettext-rs = {version = "0.7", features = ["gettext-system"]} log = "0.4.11" once_cell = "1.7.2" xml-rs = "0.8.4" -x11 = { version = "2.18", features = ["xlib"] } serde = "1.0" serde_any = "0.5" simplelog = "0.11.2" diff --git a/src/common.rs b/src/common.rs index 3bd823f..ed9a1fe 100644 --- a/src/common.rs +++ b/src/common.rs @@ -10,9 +10,7 @@ use anyhow::Result; use gtk::glib; pub fn init() -> Result<()> { - unsafe { - x11::xlib::XInitThreads(); - } + std::env::set_var("GST_XINITTHREADS", "1"); gst::init()?; gtk::init()?; Ok(())