From be56991b7316f175d623047168745930a1821678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 16 Aug 2022 14:14:24 +0300 Subject: [PATCH] onvifmetadataparse: use NTP epoch everywhere instead of mixing UNIX/NTP epochs --- net/onvif/src/onvifmetadataparse/imp.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net/onvif/src/onvifmetadataparse/imp.rs b/net/onvif/src/onvifmetadataparse/imp.rs index ee9a2bac..85b02c78 100644 --- a/net/onvif/src/onvifmetadataparse/imp.rs +++ b/net/onvif/src/onvifmetadataparse/imp.rs @@ -56,7 +56,13 @@ impl OnvifMetadataParse { element: &super::OnvifMetadataParse, buffer: gst::Buffer, ) -> Result { - gst::log!(CAT, obj: element, "Handling buffer {:?}", buffer); + gst::log!( + CAT, + obj: element, + "Handling buffer {:?} with UTC time {}", + buffer, + crate::lookup_reference_timestamp(&buffer).display() + ); let mut state = self.state.lock().unwrap(); @@ -151,7 +157,8 @@ impl OnvifMetadataParse { gst::FlowError::Error })?; - let dt_unix_ns = gst::ClockTime::from_nseconds(dt.timestamp_nanos() as u64); + let dt_unix_ns = gst::ClockTime::from_nseconds(dt.timestamp_nanos() as u64) + + crate::PRIME_EPOCH_OFFSET; gst::trace!( CAT,