diff --git a/Cargo.lock b/Cargo.lock index 57d04ef8e..b08a1649a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2648,6 +2648,21 @@ dependencies = [ "system-deps", ] +[[package]] +name = "gst-plugin-analytics" +version = "0.14.0-alpha.1" +dependencies = [ + "chrono", + "glib", + "gst-plugin-version-helper", + "gstreamer", + "gstreamer-analytics", + "gstreamer-base", + "gstreamer-rtp", + "gstreamer-video", + "xmltree", +] + [[package]] name = "gst-plugin-audiofx" version = "0.14.0-alpha.1" @@ -3182,21 +3197,6 @@ dependencies = [ "regex", ] -[[package]] -name = "gst-plugin-relationmeta" -version = "0.14.0-alpha.1" -dependencies = [ - "chrono", - "glib", - "gst-plugin-version-helper", - "gstreamer", - "gstreamer-analytics", - "gstreamer-base", - "gstreamer-rtp", - "gstreamer-video", - "xmltree", -] - [[package]] name = "gst-plugin-reqwest" version = "0.14.0-alpha.1" diff --git a/Cargo.toml b/Cargo.toml index ccab07d7c..9a857a034 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,8 @@ members = [ "tutorial", "version-helper", + "analytics/analytics", + "audio/audiofx", "audio/claxon", "audio/csound", @@ -32,7 +34,6 @@ members = [ "net/onvif", "net/raptorq", "net/reqwest", - "net/relationmeta", "net/rtp", "net/rtsp", "net/webrtchttp", @@ -71,6 +72,8 @@ members = [ default-members = [ "version-helper", + "analytics/analytics", + "audio/audiofx", "audio/claxon", "audio/lewton", @@ -90,7 +93,6 @@ default-members = [ "net/onvif", "net/raptorq", "net/reqwest", - "net/relationmeta", "net/rtp", "net/rtsp", "net/webrtchttp", diff --git a/net/relationmeta/Cargo.toml b/analytics/analytics/Cargo.toml similarity index 90% rename from net/relationmeta/Cargo.toml rename to analytics/analytics/Cargo.toml index 33d757b77..3ae028d46 100644 --- a/net/relationmeta/Cargo.toml +++ b/analytics/analytics/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "gst-plugin-relationmeta" +name = "gst-plugin-analytics" version.workspace = true authors = ["Benjamin Gaignard "] repository.workspace = true license = "MPL-2.0" -description = "GStreamer Rust Relation Meta Plugin" +description = "GStreamer Rust Analytics Plugin" edition.workspace = true rust-version.workspace = true @@ -19,7 +19,7 @@ xmltree = "0.11" glib = { workspace = true, features = ["v2_62"] } [lib] -name = "gstrsrelationmeta" +name = "gstrsanalytics" crate-type = ["cdylib", "rlib"] path = "src/lib.rs" diff --git a/net/relationmeta/LICENSE-MPL-2.0 b/analytics/analytics/LICENSE-MPL-2.0 similarity index 100% rename from net/relationmeta/LICENSE-MPL-2.0 rename to analytics/analytics/LICENSE-MPL-2.0 diff --git a/net/relationmeta/build.rs b/analytics/analytics/build.rs similarity index 100% rename from net/relationmeta/build.rs rename to analytics/analytics/build.rs diff --git a/net/relationmeta/src/lib.rs b/analytics/analytics/src/lib.rs similarity index 94% rename from net/relationmeta/src/lib.rs rename to analytics/analytics/src/lib.rs index ae759d161..31830c360 100644 --- a/net/relationmeta/src/lib.rs +++ b/analytics/analytics/src/lib.rs @@ -8,9 +8,9 @@ #![allow(clippy::non_send_fields_in_send_ty, unused_doc_comments)] /** - * plugin-rsrelationmeta: + * plugin-rsanalytics: * - * Since: plugins-rs-0.13.0 + * Since: plugins-rs-0.14.0 */ use gst::glib; @@ -32,7 +32,7 @@ fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { } gst::plugin_define!( - rsrelationmeta, + rsanalytics, env!("CARGO_PKG_DESCRIPTION"), plugin_init, concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")), diff --git a/net/relationmeta/src/onvifmeta2relationmeta/imp.rs b/analytics/analytics/src/onvifmeta2relationmeta/imp.rs similarity index 100% rename from net/relationmeta/src/onvifmeta2relationmeta/imp.rs rename to analytics/analytics/src/onvifmeta2relationmeta/imp.rs diff --git a/net/relationmeta/src/onvifmeta2relationmeta/mod.rs b/analytics/analytics/src/onvifmeta2relationmeta/mod.rs similarity index 100% rename from net/relationmeta/src/onvifmeta2relationmeta/mod.rs rename to analytics/analytics/src/onvifmeta2relationmeta/mod.rs diff --git a/net/relationmeta/src/relationmeta2onvifmeta/imp.rs b/analytics/analytics/src/relationmeta2onvifmeta/imp.rs similarity index 100% rename from net/relationmeta/src/relationmeta2onvifmeta/imp.rs rename to analytics/analytics/src/relationmeta2onvifmeta/imp.rs diff --git a/net/relationmeta/src/relationmeta2onvifmeta/mod.rs b/analytics/analytics/src/relationmeta2onvifmeta/mod.rs similarity index 100% rename from net/relationmeta/src/relationmeta2onvifmeta/mod.rs rename to analytics/analytics/src/relationmeta2onvifmeta/mod.rs diff --git a/ci/utils.py b/ci/utils.py index 24a2b730a..aad05414a 100644 --- a/ci/utils.py +++ b/ci/utils.py @@ -13,6 +13,7 @@ DIRS = [ # Plugins whose name is prefixed by 'rs' RS_PREFIXED = [ + 'analytics', 'audiofx', 'closedcaption', 'file', @@ -25,7 +26,6 @@ RS_PREFIXED = [ 'rtp', 'rtsp', 'inter', - 'relationmeta', ] OVERRIDE = { diff --git a/dependencies.py b/dependencies.py index 3f9eb7978..da820ba77 100755 --- a/dependencies.py +++ b/dependencies.py @@ -26,6 +26,7 @@ PARSER.add_argument('--feature-deps', action="store_true", help="Get list of fea # Map plugin name to directory name, for those that does not match. RENAMES = { + 'rsanalytics': 'analytics', 'rsaudiofx': 'audiofx', 'rsfile': 'file', 'rsflv': 'flavors', @@ -33,7 +34,6 @@ RENAMES = { 'rsrtsp': 'rtsp', 'rswebp': 'webp', 'rsonvif': 'onvif', - 'rsrelationmeta': 'relationmeta', 'rstracers': 'tracers', 'rsclosedcaption': 'closedcaption', 'rswebrtc': 'webrtc', diff --git a/docs/plugins/gst_plugins_cache.json b/docs/plugins/gst_plugins_cache.json index ae7e4c91d..14ee4eec2 100644 --- a/docs/plugins/gst_plugins_cache.json +++ b/docs/plugins/gst_plugins_cache.json @@ -7913,6 +7913,103 @@ "tracers": {}, "url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs" }, + "rsanalytics": { + "description": "GStreamer Rust Analytics Plugin", + "elements": { + "onvifmeta2relationmeta": { + "author": "Benjamin Gaignard ", + "description": "Convert ONVIF metadata to relation metadata", + "hierarchy": [ + "GstOnvifMeta2RelationMeta", + "GstElement", + "GstObject", + "GInitiallyUnowned", + "GObject" + ], + "klass": "Metadata", + "pad-templates": { + "sink": { + "caps": "ANY", + "direction": "sink", + "presence": "always" + }, + "src": { + "caps": "ANY", + "direction": "src", + "presence": "always" + } + }, + "rank": "none" + }, + "relationmeta2onvifmeta": { + "author": "Benjamin Gaignard ", + "description": "Convert relation metadata to ONVIF metadata", + "hierarchy": [ + "GstRelationMeta2OnvifMeta", + "GstElement", + "GstObject", + "GInitiallyUnowned", + "GObject" + ], + "klass": "Metadata", + "pad-templates": { + "sink": { + "caps": "ANY", + "direction": "sink", + "presence": "always" + }, + "src": { + "caps": "ANY", + "direction": "src", + "presence": "always" + } + }, + "properties": { + "time-source": { + "blurb": "Time source for UTC timestamps", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "clock (0)", + "mutable": "ready", + "readable": true, + "type": "GstRsOnvifNtpTimeSource", + "writable": true + } + }, + "rank": "none" + } + }, + "filename": "gstrsanalytics", + "license": "MPL-2.0", + "other-types": { + "GstRsOnvifNtpTimeSource": { + "kind": "enum", + "values": [ + { + "desc": "UNIX time based on realtime clock.", + "name": "clock", + "value": "0" + }, + { + "desc": "Running time is in UTC", + "name": "running-time", + "value": "1" + }, + { + "desc": "Pipeline clock is UTC", + "name": "clock-time", + "value": "2" + } + ] + } + }, + "package": "gst-plugin-analytics", + "source": "gst-plugin-analytics", + "tracers": {}, + "url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs" + }, "rsaudiofx": { "description": "GStreamer Rust Audio Effects Plugin", "elements": { @@ -10521,103 +10618,6 @@ "tracers": {}, "url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs" }, - "rsrelationmeta": { - "description": "GStreamer Rust Relation Meta Plugin", - "elements": { - "onvifmeta2relationmeta": { - "author": "Benjamin Gaignard ", - "description": "Convert ONVIF metadata to relation metadata", - "hierarchy": [ - "GstOnvifMeta2RelationMeta", - "GstElement", - "GstObject", - "GInitiallyUnowned", - "GObject" - ], - "klass": "Metadata", - "pad-templates": { - "sink": { - "caps": "ANY", - "direction": "sink", - "presence": "always" - }, - "src": { - "caps": "ANY", - "direction": "src", - "presence": "always" - } - }, - "rank": "none" - }, - "relationmeta2onvifmeta": { - "author": "Benjamin Gaignard ", - "description": "Convert relation metadata to ONVIF metadata", - "hierarchy": [ - "GstRelationMeta2OnvifMeta", - "GstElement", - "GstObject", - "GInitiallyUnowned", - "GObject" - ], - "klass": "Metadata", - "pad-templates": { - "sink": { - "caps": "ANY", - "direction": "sink", - "presence": "always" - }, - "src": { - "caps": "ANY", - "direction": "src", - "presence": "always" - } - }, - "properties": { - "time-source": { - "blurb": "Time source for UTC timestamps", - "conditionally-available": false, - "construct": false, - "construct-only": false, - "controllable": false, - "default": "clock (0)", - "mutable": "ready", - "readable": true, - "type": "GstRsOnvifNtpTimeSource", - "writable": true - } - }, - "rank": "none" - } - }, - "filename": "gstrsrelationmeta", - "license": "MPL-2.0", - "other-types": { - "GstRsOnvifNtpTimeSource": { - "kind": "enum", - "values": [ - { - "desc": "UNIX time based on realtime clock.", - "name": "clock", - "value": "0" - }, - { - "desc": "Running time is in UTC", - "name": "running-time", - "value": "1" - }, - { - "desc": "Pipeline clock is UTC", - "name": "clock-time", - "value": "2" - } - ] - } - }, - "package": "gst-plugin-relationmeta", - "source": "gst-plugin-relationmeta", - "tracers": {}, - "url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs" - }, "rsrtp": { "description": "GStreamer Rust RTP Plugin", "elements": { diff --git a/meson.build b/meson.build index d00500563..272c43cae 100644 --- a/meson.build +++ b/meson.build @@ -92,7 +92,7 @@ endif if get_option('threadshare').allowed() or get_option('rtsp').allowed() deps += [['gstreamer-net-1.0', 'gstreamer', 'gst_net_dep', 'gst_net']] endif -if get_option('relationmeta').allowed() +if get_option('analytics').allowed() deps += [['gstreamer-analytics-1.0', 'gst-plugins-bad', 'gstanalytics_dep', 'gstanalytics']] endif @@ -112,6 +112,7 @@ endforeach # kept in the same order as the `members` list in Cargo.toml plugins = { + 'analytics': {'library': 'libgstrsanalytics'}, 'audiofx': { 'library': 'libgstrsaudiofx', 'examples': ['hrtfrender'], @@ -160,7 +161,6 @@ plugins = { }, 'raptorq': {'library': 'libgstraptorq'}, 'reqwest': {'library': 'libgstreqwest'}, - 'relationmeta': {'library': 'libgstrsrelationmeta'}, 'rtsp': {'library': 'libgstrsrtsp'}, 'rtp': {'library': 'libgstrsrtp'}, 'webrtchttp': {'library': 'libgstwebrtchttp'}, diff --git a/meson_options.txt b/meson_options.txt index 95349ca45..65b24641e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,5 +1,8 @@ # Same order as members in Cargo.toml +# analytics +option('analytics', type: 'feature', value: 'auto', description: 'Build analytics plugin') + # audio option('audiofx', type: 'feature', value: 'auto', description: 'Build audiofx plugin') option('claxon', type: 'feature', value: 'auto', description: 'Build claxon plugin') @@ -34,7 +37,6 @@ option('ndi', type: 'feature', value: 'auto', description: 'Build ndi plugin') option('onvif', type: 'feature', value: 'auto', description: 'Build onvif plugin') option('raptorq', type: 'feature', value: 'auto', description: 'Build raptorq plugin') option('reqwest', type: 'feature', value: 'auto', description: 'Build reqwest plugin') -option('relationmeta', type: 'feature', value: 'auto', description: 'Build relationmeta plugin') option('rtsp', type: 'feature', value: 'auto', description: 'Build rtsp plugin') option('rtp', type: 'feature', value: 'auto', description: 'Build rtp plugin') option('webrtc', type: 'feature', value: 'auto', yield: true, description: 'Build webrtc plugin')