GstNet.NetClientClock

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.Clock Gst.Clock Gst.SystemClock Gst.SystemClock Gst.Clock->Gst.SystemClock Gst.Object->Gst.Clock GstNet.NetClientClock GstNet.NetClientClock Gst.SystemClock->GstNet.NetClientClock

Subclasses:

GstNet.NtpClock

Methods

Inherited:

Gst.SystemClock (2), Gst.Clock (32), Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (name, remote_address, remote_port, base_time)

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

address

str

r/w/c

The IP address of the machine providing a time server

base-time

int

r/w/co

Initial time that is reported before synchronization

bus

Gst.Bus

r/w

A Gst.Bus on which to send clock status information

internal-clock

Gst.Clock

r

Internal clock that directly slaved to the remote clock

minimum-update-interval

int

r/w

Minimum polling interval for packets, in nanoseconds(0 = no limit)

port

int

r/w/c

The port on which the remote server is listening

qos-dscp

int

r/w

Quality of Service, differentiated services code point (-1 default)

round-trip-limit

int

r/w

Maximum tolerable round-trip interval for packets, in nanoseconds (0 = no limit)

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.NetClientClock(**kwargs)
Bases:

Gst.SystemClock

Abstract:

No

Structure:

GstNet.NetClientClockClass

GstNet.NetClientClock implements a custom Gst.Clock that synchronizes its time to a remote time provider such as GstNet.NetTimeProvider. GstNet.NtpClock implements a Gst.Clock that synchronizes its time to a remote NTPv4 server.

A new clock is created with GstNet.NetClientClock.new() or GstNet.NtpClock.new(), which takes the address and port of the remote time provider along with a name and an initial time.

This clock will poll the time provider and will update its calibration parameters based on the local and remote observations.

The “round-trip” property limits the maximum round trip packets can take.

Various parameters of the clock can be configured with the parent Gst.Clock “timeout”, “window-size” and “window-threshold” object properties.

A GstNet.NetClientClock and GstNet.NtpClock is typically set on a Gst.Pipeline with Gst.Pipeline.use_clock().

If you set a Gst.Bus on the clock via the “bus” object property, it will send Gst.MessageType.ELEMENT messages with an attached Gst.Structure containing statistics about clock accuracy and network traffic.

classmethod new(name, remote_address, remote_port, base_time)
Parameters:
  • name (str or None) – a name for the clock

  • remote_address (str) – the address or hostname of the remote clock provider

  • remote_port (int) – the port of the remote clock provider

  • base_time (int) – initial time of the clock

Returns:

a new Gst.Clock that receives a time from the remote clock.

Return type:

Gst.Clock

Create a new GstNet.NetClientClock that will report the time provided by the GstNet.NetTimeProvider on remote_address and remote_port.

Property Details

GstNet.NetClientClock.props.address
Name:

address

Type:

str

Default Value:

'127.0.0.1'

Flags:

READABLE, WRITABLE, CONSTRUCT

The IP address of the machine providing a time server

GstNet.NetClientClock.props.base_time
Name:

base-time

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Initial time that is reported before synchronization

GstNet.NetClientClock.props.bus
Name:

bus

Type:

Gst.Bus

Default Value:

None

Flags:

READABLE, WRITABLE

A Gst.Bus on which to send clock status information

GstNet.NetClientClock.props.internal_clock
Name:

internal-clock

Type:

Gst.Clock

Default Value:

None

Flags:

READABLE

Internal clock that directly slaved to the remote clock

GstNet.NetClientClock.props.minimum_update_interval
Name:

minimum-update-interval

Type:

int

Default Value:

50000000

Flags:

READABLE, WRITABLE

Minimum polling interval for packets, in nanoseconds(0 = no limit)

GstNet.NetClientClock.props.port
Name:

port

Type:

int

Default Value:

5637

Flags:

READABLE, WRITABLE, CONSTRUCT

The port on which the remote server is listening

GstNet.NetClientClock.props.qos_dscp
Name:

qos-dscp

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE

Quality of Service, differentiated services code point (-1 default)

GstNet.NetClientClock.props.round_trip_limit
Name:

round-trip-limit

Type:

int

Default Value:

1000000000

Flags:

READABLE, WRITABLE

Maximum tolerable round-trip interval for packets, in nanoseconds (0 = no limit)