[−]Struct gstreamer_net::PtpClock
GstPtpClock implements a PTP (IEEE1588:2008) ordinary clock in slave-only mode, that allows a GStreamer pipeline to synchronize to a PTP network clock in some specific domain.
The PTP subsystem can be initialized with gst_ptp_init
, which then starts
a helper process to do the actual communication via the PTP ports. This is
required as PTP listens on ports < 1024 and thus requires special
privileges. Once this helper process is started, the main process will
synchronize to all PTP domains that are detected on the selected
interfaces.
PtpClock::new
then allows to create a GstClock that provides the PTP
time from a master clock inside a specific PTP domain. This clock will only
return valid timestamps once the timestamps in the PTP domain are known. To
check this, you can use gst::ClockExt::wait_for_sync
, the GstClock::synced
signal and gst::ClockExt::is_synced
.
To gather statistics about the PTP clock synchronization,
gst_ptp_statistics_callback_add
can be used. This gives the application
the possibility to collect all kinds of statistics from the clock
synchronization.
Implements
Methods
impl PtpClock
[src][−]
pub fn get_property_domain(&self) -> u32
[src]
pub fn get_property_grandmaster_clock_id(&self) -> u64
[src]
pub fn get_property_internal_clock(&self) -> Option<Clock>
[src]
pub fn get_property_master_clock_id(&self) -> u64
[src]
pub fn connect_property_grandmaster_clock_id_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_internal_clock_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_master_clock_id_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
impl PtpClock
[src][−]
pub fn new(name: Option<&str>, domain: u32) -> PtpClock
[src][−]
Creates a new PTP clock instance that exports the PTP time of the master
clock in domain
. This clock can be slaved to other clocks as needed.
If gst_ptp_init
was not called before, this will call gst_ptp_init
with
default parameters.
This clock only returns valid timestamps after it received the first
times from the PTP master clock on the network. Once this happens the
GstPtpClock::internal-clock property will become non-NULL. You can
check this with gst::ClockExt::wait_for_sync
, the GstClock::synced signal and
gst::ClockExt::is_synced
.
name
Name of the clock
domain
PTP domain
Returns
A new gst::Clock
Trait Implementations
impl Clone for PtpClock
[+]
impl Debug for PtpClock
[+]
impl Eq for PtpClock
impl Hash for PtpClock
[+]
impl IsA<Clock> for PtpClock
impl IsA<Object> for PtpClock
impl Ord for PtpClock
[+]
impl<T: ObjectType> PartialEq<T> for PtpClock
[+]
impl<T: ObjectType> PartialOrd<T> for PtpClock
[+]
impl Send for PtpClock
[src]
impl StaticType for PtpClock
[+]
impl Sync for PtpClock
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<Super, Sub> CanDowncast<Sub> for Super where
Sub: IsA<Super>,
Super: IsA<Super>,
[src]
Sub: IsA<Super>,
Super: IsA<Super>,
impl<T> Cast for T where
T: ObjectType,
[src][+]
T: ObjectType,
impl<O> ClockExt for O where
O: IsA<Clock>,
[src][+]
O: IsA<Clock>,
impl<O> ClockExtManual for O where
O: IsA<Clock>,
[src][+]
O: IsA<Clock>,
impl<T> From<T> for T
[src][+]
impl<O> GObjectExtManualGst for O where
O: IsA<Object>,
[src][+]
O: IsA<Object>,
impl<O> GstObjectExt for O where
O: IsA<Object>,
[src][+]
O: IsA<Object>,
impl<O> GstObjectExtManual for O where
O: IsA<Object>,
[src][+]
O: IsA<Object>,
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ObjectExt for T where
T: ObjectType,
[src][+]
T: ObjectType,
impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T> ToSendValue for T where
T: ToValue + SetValue + Send + ?Sized,
[src][+]
T: ToValue + SetValue + Send + ?Sized,
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src][+]
T: SetValue + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,