Struct gstreamer_net::PtpClock [−]
pub struct 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]
impl PtpClockpub fn get_property_domain(&self) -> u32[src]
pub fn get_property_domain(&self) -> u32pub fn get_property_grandmaster_clock_id(&self) -> u64[src]
pub fn get_property_grandmaster_clock_id(&self) -> u64pub fn get_property_internal_clock(&self) -> Option<Clock>[src]
pub fn get_property_internal_clock(&self) -> Option<Clock>pub fn get_property_master_clock_id(&self) -> u64[src]
pub fn get_property_master_clock_id(&self) -> u64pub fn connect_property_domain_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_domain_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_grandmaster_clock_id_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_grandmaster_clock_id_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_internal_clock_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_internal_clock_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_master_clock_id_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_master_clock_id_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdimpl PtpClock[src]
impl PtpClockpub fn new<'a, P: Into<Option<&'a str>>>(
name: P,
remote_address: &str,
remote_port: i32,
base_time: ClockTime
) -> PtpClock[src]
pub fn new<'a, P: Into<Option<&'a str>>>(
name: P,
remote_address: &str,
remote_port: i32,
base_time: ClockTime
) -> PtpClockCreates 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 Clone for PtpClockfn clone(&self) -> PtpClock
fn clone(&self) -> PtpClockReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Hash for PtpClock
impl Hash for PtpClockfn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Ord for PtpClock
impl Ord for PtpClockfn cmp(&self, other: &PtpClock) -> Ordering
fn cmp(&self, other: &PtpClock) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl StaticType for PtpClock
impl StaticType for PtpClockfn static_type() -> Type
fn static_type() -> TypeReturns the type identifier of Self.
impl<T: IsA<Object>> PartialEq<T> for PtpClock
impl<T: IsA<Object>> PartialEq<T> for PtpClockfn eq(&self, other: &T) -> bool
fn eq(&self, other: &T) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Eq for PtpClock
impl Eq for PtpClockimpl<T: IsA<Object>> PartialOrd<T> for PtpClock
impl<T: IsA<Object>> PartialOrd<T> for PtpClockfn partial_cmp(&self, other: &T) -> Option<Ordering>
fn partial_cmp(&self, other: &T) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Debug for PtpClock
impl Debug for PtpClockimpl IsA<Clock> for PtpClock
impl IsA<Clock> for PtpClockimpl IsA<Object> for PtpClock
impl IsA<Object> for PtpClockimpl IsA<Object> for PtpClock
impl IsA<Object> for PtpClockimpl Send for PtpClock[src]
impl Send for PtpClockimpl Sync for PtpClock[src]
impl Sync for PtpClock