GstNetClientClock

GstNetClientClock — Special clock that synchronizes to a remote time provider.

Functions

Properties

gchar * address Read / Write / Construct
guint64 base-time Read / Write / Construct Only
GstBus * bus Read / Write
GstClock * internal-clock Read
guint64 minimum-update-interval Read / Write
gint port Read / Write / Construct
gint qos-dscp Read / Write
guint64 round-trip-limit Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstClock
                ╰── GstSystemClock
                    ╰── GstNetClientClock
                        ╰── GstNtpClock

Includes

#include <gst/net/gstnet.h>

Description

GstNetClientClock implements a custom GstClock that synchronizes its time to a remote time provider such as GstNetTimeProvider. GstNtpClock implements a GstClock that synchronizes its time to a remote NTPv4 server.

A new clock is created with gst_net_client_clock_new() or gst_ntp_clock_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 GstClock "timeout", "window-size" and "window-threshold" object properties.

A GstNetClientClock and GstNtpClock is typically set on a GstPipeline with gst_pipeline_use_clock().

If you set a GstBus on the clock via the "bus" object property, it will send GST_MESSAGE_ELEMENT messages with an attached GstStructure containing statistics about clock accuracy and network traffic.

Functions

gst_net_client_clock_new ()

GstClock *
gst_net_client_clock_new (const gchar *name,
                          const gchar *remote_address,
                          gint remote_port,
                          GstClockTime base_time);

Create a new GstNetClientInternalClock that will report the time provided by the GstNetTimeProvider on remote_address and remote_port .

Parameters

name

a name for the clock

 

remote_address

the address or hostname of the remote clock provider

 

remote_port

the port of the remote clock provider

 

base_time

initial time of the clock

 

Returns

a new GstClock that receives a time from the remote clock.

[transfer full]


gst_ntp_clock_new ()

GstClock *
gst_ntp_clock_new (const gchar *name,
                   const gchar *remote_address,
                   gint remote_port,
                   GstClockTime base_time);

Create a new GstNtpClock that will report the time provided by the NTPv4 server on remote_address and remote_port .

Parameters

name

a name for the clock

 

remote_address

the address or hostname of the remote clock provider

 

remote_port

the port of the remote clock provider

 

base_time

initial time of the clock

 

Returns

a new GstClock that receives a time from the remote clock.

[transfer full]

Since: 1.6

Types and Values

struct GstNetClientClock

struct GstNetClientClock;

Opaque GstNetClientClock structure.


GstNtpClock

typedef struct _GstNetClientClock GstNtpClock;

Property Details

The “address” property

  “address”                  gchar *

The IP address of the machine providing a time server.

Flags: Read / Write / Construct

Default value: "127.0.0.1"


The “base-time” property

  “base-time”                guint64

Initial time that is reported before synchronization.

Flags: Read / Write / Construct Only

Default value: 0


The “bus” property

  “bus”                      GstBus *

A GstBus on which to send clock status information.

Flags: Read / Write


The “internal-clock” property

  “internal-clock”           GstClock *

Internal clock that directly slaved to the remote clock.

Flags: Read


The “minimum-update-interval” property

  “minimum-update-interval”  guint64

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

Flags: Read / Write

Default value: 50000000


The “port” property

  “port”                     gint

The port on which the remote server is listening.

Flags: Read / Write / Construct

Allowed values: [0,65535]

Default value: 5637


The “qos-dscp” property

  “qos-dscp”                 gint

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

Flags: Read / Write

Allowed values: [-1,63]

Default value: -1


The “round-trip-limit” property

  “round-trip-limit”         guint64

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

Flags: Read / Write

Default value: 1000000000

See Also

GstClock, GstNetTimeProvider, GstPipeline