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

Methods

impl PtpClock
[src]

impl 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for PtpClock

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for PtpClock

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl StaticType for PtpClock

Returns the type identifier of Self.

impl<T: IsA<Object>> PartialEq<T> for PtpClock

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for PtpClock

impl<T: IsA<Object>> PartialOrd<T> for PtpClock

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Debug for PtpClock

Formats the value using the given formatter. Read more

impl IsA<Clock> for PtpClock

impl IsA<Object> for PtpClock

impl IsA<Object> for PtpClock

impl Send for PtpClock
[src]

impl Sync for PtpClock
[src]