GstNet.PtpClock¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | Gst.SystemClock (2), Gst.Clock (32), Gst.Object (27), GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(name, domain) | 
Virtual Methods¶
| Inherited: | Gst.Clock (6), Gst.Object (1), GObject.Object (7) | 
|---|
Properties¶
| Inherited: | Gst.SystemClock (1), Gst.Clock (3), Gst.Object (2) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| domain | int | r/w/co | The PTP domain | 
| grandmaster-clock-id | int | r | Grand Master Clock ID | 
| internal-clock | Gst.Clock | r | Internal clock | 
| master-clock-id | int | r | Master Clock ID | 
Signals¶
| Inherited: | Gst.Clock (1), Gst.Object (1), GObject.Object (1) | 
|---|
Fields¶
| Inherited: | Gst.Clock (1), Gst.Object (1), GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| clock | Gst.SystemClock | r | 
Class Details¶
- 
class GstNet.PtpClock(**kwargs)¶
- Bases: - Gst.SystemClock- Abstract: - No - Structure: - GstNet.PtpClockClass- GstNet.PtpClockimplements 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.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.- GstNet.PtpClock.new() then allows to create a- Gst.Clockthat 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.wait_for_sync(), the- Gst.Clock- ::syncedsignal and- Gst.Clock.is_synced().- To gather statistics about the PTP clock synchronization, - GstNet.ptp_statistics_callback_add() can be used. This gives the application the possibility to collect all kinds of statistics from the clock synchronization.- New in version 1.6. - 
classmethod new(name, domain)[source]¶
- Parameters: - Returns: - A new - Gst.Clock- Return type: - 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 - GstNet.ptp_init() was not called before, this will call- GstNet.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 - GstNet.PtpClock- ::internal-clockproperty will become non-- None. You can check this with- Gst.Clock.wait_for_sync(), the- Gst.Clock- ::syncedsignal and- Gst.Clock.is_synced().- New in version 1.6. 
 
- 
classmethod 
Property Details¶
- 
GstNet.PtpClock.props.domain¶
- Name: - domain- Type: - int- Default Value: - 0- Flags: - READABLE,- WRITABLE,- CONSTRUCT_ONLY- The PTP domain 
- 
GstNet.PtpClock.props.grandmaster_clock_id¶
- Name: - grandmaster-clock-id- Type: - int- Default Value: - 0- Flags: - READABLE- Grand Master Clock ID