mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-03 02:03:48 +00:00
threadshare: Clean up dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2201>
This commit is contained in:
parent
c37e0b2fa9
commit
be16479f95
5 changed files with 8 additions and 67 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -3218,7 +3218,6 @@ dependencies = [
|
|||
"slab",
|
||||
"socket2",
|
||||
"waker-fn",
|
||||
"winapi",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
|
|
|
@ -28,20 +28,18 @@ socket2 = {features = ["all"], version = "0.5"}
|
|||
waker-fn = "1.1"
|
||||
bitflags = "2.6.0"
|
||||
libc = "0.2"
|
||||
windows-sys = "0.59.0"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
windows-sys = ">=0.52, <=0.59"
|
||||
|
||||
[target.'cfg(not(target_os = "android"))'.dependencies]
|
||||
getifaddrs = "0.1"
|
||||
|
||||
|
||||
# Used by examples
|
||||
clap = { version = "4", features = ["derive"], optional = true }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = { version = "0.3.9", features = ["winsock2", "processthreadsapi"] }
|
||||
|
||||
[dev-dependencies]
|
||||
gst-check.workspace = true
|
||||
gst-app.workspace = true
|
||||
# Used by examples
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
|
||||
[lib]
|
||||
name = "gstthreadshare"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use super::super::CAT;
|
||||
use super::CAT;
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, clap::ValueEnum)]
|
||||
|
@ -13,7 +13,7 @@ pub enum Sink {
|
|||
|
||||
impl Sink {
|
||||
pub fn element_name(self) -> &'static str {
|
||||
use super::super::sink;
|
||||
use super::sink;
|
||||
use Sink::*;
|
||||
match self {
|
||||
AsyncMutex => sink::ASYNC_MUTEX_ELEMENT_NAME,
|
|
@ -1,47 +0,0 @@
|
|||
use super::super::CAT;
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct SyncMutexSink;
|
||||
|
||||
impl SyncMutexSink {
|
||||
pub fn element_name(self) -> &'static str {
|
||||
super::super::sink::SYNC_MUTEX_ELEMENT_NAME
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Args {
|
||||
pub streams: u32,
|
||||
pub groups: u32,
|
||||
pub wait: u32,
|
||||
pub push_period: u32,
|
||||
pub num_buffers: i32,
|
||||
pub sink: SyncMutexSink,
|
||||
pub disable_stats_log: bool,
|
||||
}
|
||||
|
||||
impl Default for Args {
|
||||
fn default() -> Self {
|
||||
Args {
|
||||
streams: 5000,
|
||||
groups: 2,
|
||||
wait: 20,
|
||||
push_period: 20,
|
||||
num_buffers: 5000,
|
||||
sink: SyncMutexSink,
|
||||
disable_stats_log: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn args() -> Args {
|
||||
if std::env::args().len() > 1 {
|
||||
gst::warning!(CAT, "Ignoring command line arguments");
|
||||
gst::warning!(CAT, "Build with `--features=clap`");
|
||||
}
|
||||
|
||||
let args = Args::default();
|
||||
gst::warning!(CAT, "{:?}", args);
|
||||
|
||||
args
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
#[cfg(not(feature = "clap"))]
|
||||
mod default_args;
|
||||
#[cfg(not(feature = "clap"))]
|
||||
pub use default_args::*;
|
||||
|
||||
#[cfg(feature = "clap")]
|
||||
mod clap_args;
|
||||
#[cfg(feature = "clap")]
|
||||
pub use clap_args::*;
|
Loading…
Reference in a new issue