GstSyncControlServer

GstSyncControlServer — Interface for the implementation of the network transport used by GstSyncServer.

Functions

Properties

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

Signals

Types and Values

Object Hierarchy

    GInterface
    ╰── GstSyncControlServer

Prerequisites

GstSyncControlServer requires GObject.

Description

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

The interface constists of:

  • The GstSyncControlServer:address and GstSyncControlServer:port properties to specify the network address for the server implementation to listen on.

  • The GstSyncControlServer:sync-info property which is set by GstSyncServer every time new information needs to be sent to clients (both existing, and ones that join later).

  • The GstSyncControlServer::start and GstSyncControlServer::stop signals that are used to have the server start/stop listening for connections and sending information.

The specifics of how connections from clients are received, and how data is sent is entirely up to the implementation. It is expected that clients will use a corresponding GstSyncControlClient implementation.

Functions

gst_sync_control_server_get_address ()

gchar *
gst_sync_control_server_get_address (GstSyncControlServer *server);

Parameters

server

The GstSyncControlServer

 

Returns

The configured network address to listen on.


gst_sync_control_server_set_address ()

void
gst_sync_control_server_set_address (GstSyncControlServer *server,
                                     const gchar *address);

Sets the network address for server to listen on.

Parameters

server

The GstSyncControlServer

 

address

A network address for the server.

[transfer none]

gst_sync_control_server_get_port ()

guint
gst_sync_control_server_get_port (GstSyncControlServer *server);

Parameters

server

The GstSyncControlServer

 

Returns

The configured network port to listen on.


gst_sync_control_server_set_port ()

void
gst_sync_control_server_set_port (GstSyncControlServer *server,
                                  guint port);

Sets the network port for server to listen on.

Parameters

server

The GstSyncControlServer

 

port

A network port for the server.

[transfer none]

gst_sync_control_server_set_sync_info ()

void
gst_sync_control_server_set_sync_info (GstSyncControlServer *server,
                                       const GstSyncServerInfo *info);

Provides an updated GstSyncServerInfo to server to distribute to all connected clients (and new clients when they connect).

Parameters

server

The GstSyncControlServer

 

info

(transfer none) The GstSyncServerInfo to set

 

Types and Values

GstSyncControlServer

typedef struct _GstSyncControlServer GstSyncControlServer;

Property Details

The “address” property

  “address”                  gchar *

The network address for the control server to listen on.

Flags: Read / Write / Construct

Default value: NULL


The “port” property

  “port”                     gint

The network port for the control server to listen on.

Flags: Read / Write / Construct

Allowed values: [0,65535]

Default value: 0


The “sync-info” property

  “sync-info”                GstSyncServerInfo *

Set whenever updated synchronisation information should be sent. The data is a GstSyncServerInfo, which is fairly easy to serialise as JSON.

Flags: Read / Write / Construct

Signal Details

The “start” signal

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

Start listening for connections from clients.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Action


The “stop” signal

void
user_function (GstSyncControlServer *arg0,
               gpointer              user_data)

Disconnect all clients and stop listening for new connections.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Action