[][src]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

gst::ClockExt, gst::ObjectExt, glib::object::ObjectExt

Implementations

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]

pub fn connect_property_internal_clock_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
[src]

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[src]

impl Debug for PtpClock[src]

impl Eq for PtpClock[src]

impl Hash for PtpClock[src]

impl IsA<Clock> for PtpClock[src]

impl IsA<Object> for PtpClock[src]

impl Ord for PtpClock[src]

impl<T: ObjectType> PartialEq<T> for PtpClock[src]

impl<T: ObjectType> PartialOrd<T> for PtpClock[src]

impl Send for PtpClock[src]

impl StaticType for PtpClock[src]

impl Sync for PtpClock[src]

Auto Trait Implementations

impl RefUnwindSafe for PtpClock

impl Unpin for PtpClock

impl UnwindSafe for PtpClock

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 
[src]

impl<T> Cast for T where
    T: ObjectType
[src]

impl<O> ClockExt for O where
    O: IsA<Clock>, 
[src]

impl<O> ClockExtManual for O where
    O: IsA<Clock>, 
[src]

impl<T> From<T> for T[src]

impl<O> GObjectExtManualGst for O where
    O: IsA<Object>, 
[src]

impl<O> GstObjectExt for O where
    O: IsA<Object>, 
[src]

impl<O> GstObjectExtManual for O where
    O: IsA<Object>, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.