gstnet.ptp_clock

Module for PtpClock class

Types 3

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 gstnet.global.ptpInit, 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.

gstnet.ptp_clock.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.clock.Clock.waitForSync, the GstClock::synced signal and gst.clock.Clock.isSynced.

To gather statistics about the PTP clock synchronization, gstnet.global.ptpStatisticsCallbackAdd can be used. This gives the application the possibility to collect all kinds of statistics from the clock synchronization.

Methods
GType _gType() @property
PtpClock self()Returns `this`, for use in `with` statements.
PtpClockGidBuilder builder()Get builder for [gstnet.ptp_clock.PtpClock] Returns: New builder object
uint domain() @property
ulong grandmasterClockId() @property
ulong masterClockId() @property
Constructors
this(void * ptr, Flag!"Take" take)
this(string name, uint domain)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.

Fluent builder implementation template for gstnet.ptp_clock.PtpClock

Methods
T domain(uint propval)

Fluent builder for gstnet.ptp_clock.PtpClock

Methods
PtpClock build()Create object from builder. Returns: New object