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 PtpClock
pub fn get_property_domain(&self) -> u32
[src]
pub fn get_property_domain(&self) -> u32
pub fn get_property_grandmaster_clock_id(&self) -> u64
[src]
pub fn get_property_grandmaster_clock_id(&self) -> u64
pub 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) -> u64
pub 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
) -> SignalHandlerId
pub 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
) -> SignalHandlerId
pub 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
) -> SignalHandlerId
pub 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
) -> SignalHandlerId
impl PtpClock
[src]
impl PtpClock
pub 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
) -> PtpClock
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 Clone for PtpClock
fn clone(&self) -> PtpClock
fn clone(&self) -> PtpClock
Returns 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 PtpClock
fn 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 PtpClock
fn cmp(&self, other: &PtpClock) -> Ordering
fn cmp(&self, other: &PtpClock) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl StaticType for PtpClock
impl StaticType for PtpClock
fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
impl<T: IsA<Object>> PartialEq<T> for PtpClock
impl<T: IsA<Object>> PartialEq<T> for PtpClock
fn eq(&self, other: &T) -> bool
fn eq(&self, other: &T) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for PtpClock
impl Eq for PtpClock
impl<T: IsA<Object>> PartialOrd<T> for PtpClock
impl<T: IsA<Object>> PartialOrd<T> for PtpClock
fn 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) -> bool
1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
This 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) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
This 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 PtpClock
impl IsA<Clock> for PtpClock
impl IsA<Clock> for PtpClock
impl IsA<Object> for PtpClock
impl IsA<Object> for PtpClock
impl IsA<Object> for PtpClock
impl IsA<Object> for PtpClock
impl Send for PtpClock
[src]
impl Send for PtpClock
impl Sync for PtpClock
[src]
impl Sync for PtpClock