onvifmetadataparse: use NTP epoch everywhere instead of mixing UNIX/NTP epochs

This commit is contained in:
Sebastian Dröge 2022-08-16 14:14:24 +03:00
parent 23098a98ab
commit be56991b73

View file

@ -56,7 +56,13 @@ impl OnvifMetadataParse {
element: &super::OnvifMetadataParse,
buffer: gst::Buffer,
) -> Result<gst::FlowSuccess, gst::FlowError> {
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,