GstSyncControlClient

GstSyncControlClient — Interface for the implementation of the network transport used by GstSyncClient.

Functions

Properties

gchar * address Read / Write / Construct
gint port Read / Write / Construct
GstSyncServerInfo * sync-info Read

Signals

Types and Values

Object Hierarchy

    GInterface
    ╰── GstSyncControlClient

Prerequisites

GstSyncControlClient requires GObject.

Description

The GstSyncControlClient interface allows users of this library to provide a custom implementation of the network transport that is used by clients to receive information required to set up synchronised playback.

The interface constists of:

  • The GstSyncControlClient:address and GstSyncControlClient:port properties to specify the network address for the client implementation to connect to.

  • The GstSyncControlServer:sync-info property which is first set up when the client connects, and then updated when updated information is received from the server.

  • The GstSyncControlClient::start and GstSyncControlClient::stop signals that are used to have the client connect to and disconnect from the server.

The specifics of how the connection to the server is established, and how data is received is entirely up to the implementation. It is expected that the server will use a corresponding GstSyncControlServer implementation.

Functions

gst_sync_control_client_get_address ()

gchar *
gst_sync_control_client_get_address (GstSyncControlClient *client);

Parameters

client

The GstSyncControlClient

 

Returns

The configured network address to connect to.


gst_sync_control_client_set_address ()

void
gst_sync_control_client_set_address (GstSyncControlClient *client,
                                     const gchar *address);

Sets the network address to connect to.

Parameters

client

The GstSyncControlClient

 

address

A network address.

[transfer none]

gst_sync_control_client_get_port ()

guint
gst_sync_control_client_get_port (GstSyncControlClient *client);

Parameters

client

The GstSyncControlClient

 

Returns

The configured network port to connect to.


gst_sync_control_client_set_port ()

void
gst_sync_control_client_set_port (GstSyncControlClient *client,
                                  guint port);

Sets the network port to connect to.

Parameters

client

The GstSyncControlClient

 

port

A network port.

[transfer none]

gst_sync_control_client_get_sync_info ()

GstSyncServerInfo *
gst_sync_control_client_get_sync_info (GstSyncControlClient *client);

Parameters

client

The GstSyncControlClient

 

Returns

The last received synchronisation information.

[transfer full]

Types and Values

GstSyncControlClient

typedef struct _GstSyncControlClient GstSyncControlClient;

Property Details

The “address” property

  “address”                  gchar *

The network address for the control client to connect to.

Flags: Read / Write / Construct

Default value: NULL


The “port” property

  “port”                     gint

The network port for the control client to connect to.

Flags: Read / Write / Construct

Allowed values: [0,65535]

Default value: 0


The “sync-info” property

  “sync-info”                GstSyncServerInfo *

Set when the client finishes connecting, and then whenever updated synchronisation information is received. The data is a GstSyncServerInfo, which is fairly easy to (de)serialise as JSON.

Flags: Read

Signal Details

The “start” signal

gboolean
user_function (GstSyncControlClient *arg0,
               gpointer              arg1,
               gpointer              user_data)

Connect to the specified server.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Action


The “stop” signal

void
user_function (GstSyncControlClient *arg0,
               gpointer              user_data)

Disconnect to the specified server.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Action