diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-06-02 10:30:34 +0300 |
---|---|---|
committer | Mathieu Duponchelle <mathieu@centricular.com> | 2022-06-15 00:44:00 +0300 |
commit | dfa5b9d8bbba57035551ff53898e559348c59585 (patch) | |
tree | d87863285fdfbec095d60038cec001e0b02bd5cf | |
parent | 939f37dec5f570d92dde70f952dbe6067f22626e (diff) |
onvifaggregator: Add support for UNIX reference timestamp metadata
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/780>
-rw-r--r-- | net/onvif/src/onvifaggregator/imp.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/onvif/src/onvifaggregator/imp.rs b/net/onvif/src/onvifaggregator/imp.rs index 35bc951c..e1c49830 100644 --- a/net/onvif/src/onvifaggregator/imp.rs +++ b/net/onvif/src/onvifaggregator/imp.rs @@ -68,6 +68,7 @@ static CAT: Lazy<gst::DebugCategory> = Lazy::new(|| { }); static NTP_CAPS: Lazy<gst::Caps> = Lazy::new(|| gst::Caps::builder("timestamp/x-ntp").build()); +static UNIX_CAPS: Lazy<gst::Caps> = Lazy::new(|| gst::Caps::builder("timestamp/x-unix").build()); #[glib::object_subclass] impl ObjectSubclass for OnvifAggregator { @@ -285,6 +286,9 @@ impl OnvifAggregator { if meta.reference().is_subset(&NTP_CAPS) { return Some(meta.timestamp()); } + if meta.reference().is_subset(&UNIX_CAPS) { + return Some(meta.timestamp() + PRIME_EPOCH_OFFSET); + } } None |