GstSyncClient

GstSyncClient — Provides a client object to receive information from a GstSyncServer to play a synchronised stream.

Functions

Properties

gchar * control-address Read / Write / Construct
GObject * control-client Read / Write
gint control-port Read / Write / Construct
GstPipeline * pipeline Read

Types and Values

Object Hierarchy

    GObject
    ╰── GstSyncClient

Description

The GstSyncClient object provides API to connect to a GstSyncServer in order to receive and play back a stream synchronised with other clients on a network.

GstSyncClient itself does not implement the network transport for receiving messages from the server, but defers that to an object that implements the GstSyncControlClient interface. A default TCP-based implementation is provided with this library.

Functions

gst_sync_client_new ()

GstSyncClient *
gst_sync_client_new (const gchar *control_addr,
                     gint control_port);

Creates a new GstSyncClient object that will connect to a GstSyncServer on the given network address/port pair once started.

Parameters

control_addr

The network address that the client should connect to

 

control_port

The network port that the client should connect to

 

Returns

A new GstSyncServer object.

[transfer full]


gst_sync_client_start ()

gboolean
gst_sync_client_start (GstSyncClient *client,
                       GError **error);

Starts the GstSyncClient, connects to the configured server, and starts playback of the currently configured stream.

Parameters

client

The GstSyncClient object

 

error

If non-NULL, will be set to the appropriate GError if starting the server fails.

 

Returns

TRUE on success, and FALSE if the server could not be started.


gst_sync_client_stop ()

void
gst_sync_client_stop (GstSyncClient *client);

Disconnects from the server and stops playback.

Parameters

client

The GstSyncClient object

 

Types and Values

GstSyncClient

typedef struct _GstSyncClient GstSyncClient;

Property Details

The “control-address” property

  “control-address”          gchar *

The network address for the client to connect to.

Flags: Read / Write / Construct

Default value: NULL


The “control-client” property

  “control-client”           GObject *

The implementation of the control protocol that should be used to communicate with the server. This object must implement the GstSyncControlClient interface. If set to NULL, a built-in TCP implementation is used.

Flags: Read / Write


The “control-port” property

  “control-port”             gint

The network port for the client to connect to.

Flags: Read / Write / Construct

Allowed values: [0,65535]

Default value: 0


The “pipeline” property

  “pipeline”                 GstPipeline *

A GstPipeline object that is used for playing the synchronised stream. The object will provide the same interface as playbin, so that clients can be configured appropriately for the platform (such as selecting the video sink and setting it up, if required).

Flags: Read