mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 21:41:03 +00:00
onvifaggregator: Add support for UNIX reference timestamp metadata
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/780>
This commit is contained in:
parent
939f37dec5
commit
dfa5b9d8bb
1 changed files with 4 additions and 0 deletions
|
@ -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 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]
|
#[glib::object_subclass]
|
||||||
impl ObjectSubclass for OnvifAggregator {
|
impl ObjectSubclass for OnvifAggregator {
|
||||||
|
@ -285,6 +286,9 @@ impl OnvifAggregator {
|
||||||
if meta.reference().is_subset(&NTP_CAPS) {
|
if meta.reference().is_subset(&NTP_CAPS) {
|
||||||
return Some(meta.timestamp());
|
return Some(meta.timestamp());
|
||||||
}
|
}
|
||||||
|
if meta.reference().is_subset(&UNIX_CAPS) {
|
||||||
|
return Some(meta.timestamp() + PRIME_EPOCH_OFFSET);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
Loading…
Reference in a new issue