From 3acd848b5f6c232c4e97cee89eb362956aa326be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 9 Jul 2019 17:51:57 +0300 Subject: [PATCH] Use gst-plugin-version-helper crate to populate the plugin metadata --- Cargo.toml | 4 ++++ build.rs | 5 +++++ src/lib.rs | 12 ++++++------ 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 build.rs diff --git a/Cargo.toml b/Cargo.toml index aa2239cfe..b774dde20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,7 @@ version = "1.0.0" authors = ["Ruben Gonzalez ", "Daniel Vilar "] repository = "https://github.com/teltek/gst-plugin-ndi" license = "LGPL" +description = "NewTek NDI Plugin" [dependencies] glib = { version = "0.8.0", features = ["subclassing"] } @@ -14,6 +15,9 @@ gstreamer-video = "0.14.0" lazy_static = "1.1.0" byte-slice-cast = "0.2.0" +[build-dependencies] +gst-plugin-version-helper = "0.1" + [lib] name = "gstndi" crate-type = ["cdylib"] diff --git a/build.rs b/build.rs new file mode 100644 index 000000000..0d1ddb61d --- /dev/null +++ b/build.rs @@ -0,0 +1,5 @@ +extern crate gst_plugin_version_helper; + +fn main() { + gst_plugin_version_helper::get_info() +} diff --git a/src/lib.rs b/src/lib.rs index 7037fe2dc..db9080c4c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -255,12 +255,12 @@ fn stop_ndi(cat: gst::DebugCategory, element: &gst_base::BaseSrc, id: i8) -> boo gst_plugin_define!( ndi, - "NewTek NDI Plugin", + env!("CARGO_PKG_DESCRIPTION"), plugin_init, - "1.0.0", + concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")), "LGPL", - "ndi", - "ndi", - "https://github.com/teltek/gst-plugin-ndi", - "2018-04-09" + env!("CARGO_PKG_NAME"), + env!("CARGO_PKG_NAME"), + env!("CARGO_PKG_REPOSITORY"), + env!("BUILD_REL_DATE") );