multiudpsink

## multiudpsink multiudpsink — Send data over the network via UDP |

## Synopsis

    struct              GstMultiUDPSink;

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GstObject
                   +----GstElement
                         +----GstBaseSink
                               +----GstMultiUDPSink
                                     +----GstUDPSink

## Properties

      "bytes-served"             guint64               : Read
      "bytes-to-serve"           guint64               : Read
      "clients"                  gchar*                : Read / Write
      "closefd"                  gboolean              : Read / Write
      "sock"                     gint                  : Read
      "sockfd"                   gint                  : Read / Write
      "auto-multicast"           gboolean              : Read / Write
      "loop"                     gboolean              : Read / Write
      "qos-dscp"                 gint                  : Read / Write
      "ttl"                      gint                  : Read / Write
      "ttl-mc"                   gint                  : Read / Write
      "send-duplicates"          gboolean              : Read / Write
      "buffer-size"              gint                  : Read / Write
      "close-socket"             gboolean              : Read / Write
      "socket"                   GSocket*              : Read / Write
      "used-socket"              GSocket*              : Read
      "force-ipv4"               gboolean              : Read / Write
      "multicast-iface"          gchar*                : Read / Write
      "bind-address"             gchar*                : Read / Write
      "bind-port"                gint                  : Read / Write
      "socket-v6"                GSocket*              : Read / Write
      "used-socket-v6"           GSocket*              : Read

## Signals

      "add"                                            : Action
      "clear"                                          : Action
      "client-added"                                   : Run Last
      "client-removed"                                 : Run Last
      "get-stats"                                      : Action
      "remove"                                         : Action

## Description

multiudpsink is a network sink that sends UDP packets to multiple clients. It can be combined with rtp payload encoders to implement RTP streaming.

## Synopsis

### Element Information

plugin | udp
author | Wim Taymans <wim.taymans@gmail.com>
class | Sink/Network

### Element Pads

name | sink
direction | sink
presence | always
details | ANY

## Details

### struct GstMultiUDPSink

    struct GstMultiUDPSink;

## Property Details

### The `"bytes-served"` property

      "bytes-served"             guint64               : Read

Total number of bytes sent to all clients.

Default value: 0

### The `"bytes-to-serve"` property

      "bytes-to-serve"           guint64               : Read

Number of bytes received to serve to clients.

Default value: 0

### The `"clients"` property

      "clients"                  gchar*                : Read / Write

A comma separated list of host:port pairs with destinations.

Default value: NULL

### The `"closefd"` property

      "closefd"                  gboolean              : Read / Write

Close sockfd if passed as property on state change.

Default value: TRUE

### The `"sock"` property

      "sock"                     gint                  : Read

Socket currently in use for UDP sending. (-1 == no socket).

Allowed values: >= G_MAXULONG

Default value: -1

### The `"sockfd"` property

      "sockfd"                   gint                  : Read / Write

Socket to use for UDP sending. (-1 == allocate).

Allowed values: >= G_MAXULONG

Default value: -1

### The `"auto-multicast"` property

      "auto-multicast"           gboolean              : Read / Write

Automatically join/leave the multicast groups, FALSE means user has to do it himself.

Default value: TRUE

### The `"loop"` property

      "loop"                     gboolean              : Read / Write

Used for setting the multicast loop parameter. TRUE = enable, FALSE = disable.

Default value: TRUE

### The `"qos-dscp"` property

      "qos-dscp"                 gint                  : Read / Write

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

Allowed values: [G_MAXULONG,63]

Default value: -1

### The `"ttl"` property

      "ttl"                      gint                  : Read / Write

Used for setting the unicast TTL parameter.

Allowed values: [0,255]

Default value: 64

### The `"ttl-mc"` property

      "ttl-mc"                   gint                  : Read / Write

Used for setting the multicast TTL parameter.

Allowed values: [0,255]

Default value: 1

### The `"send-duplicates"` property

      "send-duplicates"          gboolean              : Read / Write

When a distination/port pair is added multiple times, send packets multiple times as well.

Default value: TRUE

### The `"buffer-size"` property

      "buffer-size"              gint                  : Read / Write

Size of the kernel send buffer in bytes, 0=default.

Allowed values: >= 0

Default value: 0

### The `"close-socket"` property

      "close-socket"             gboolean              : Read / Write

Close socket if passed as property on state change.

Default value: TRUE

### The `"socket"` property

      "socket"                   GSocket*              : Read / Write

Socket to use for UDP sending. (NULL == allocate).

### The `"used-socket"` property

      "used-socket"              GSocket*              : Read

Socket currently in use for UDP sending. (NULL == no socket).

### The `"force-ipv4"` property

      "force-ipv4"               gboolean              : Read / Write

Forcing the use of an IPv4 socket (DEPRECATED, has no effect anymore).

Default value: FALSE

### The `"multicast-iface"` property

      "multicast-iface"          gchar*                : Read / Write

The network interface on which to join the multicast group.

Default value: NULL

### The `"bind-address"` property

      "bind-address"             gchar*                : Read / Write

Address to bind the socket to.

Default value: NULL

### The `"bind-port"` property

      "bind-port"                gint                  : Read / Write

Port to bind the socket to.

Allowed values: [0,65535]

Default value: 0

### The `"socket-v6"` property

      "socket-v6"                GSocket*              : Read / Write

Socket to use for UDPv6 sending. (NULL == allocate).

### The `"used-socket-v6"` property

      "used-socket-v6"           GSocket*              : Read

Socket currently in use for UDPv6 sending. (NULL == no socket).

## Signal Details

### The `"add"` signal

    void                user_function                      (GstMultiUDPSink *gstmultiudpsink,
                                                            gchar           *host,
                                                            gint             port,
                                                            gpointer         user_data)            : Action

Add a client with destination `host` and `port` to the list of clients. When the same host/port pair is added multiple times, the send-duplicates property defines if the packets are sent multiple times to the same host/port pair or not.

When a host/port pair is added multiple times, an equal amount of remove calls must be performed to actually remove the host/port pair from the list of destinations.

`gstmultiudpsink` : | the sink on which the signal is emitted
`host` : | the hostname/IP address of the client to add
`port` : | the port of the client to add
`user_data` : | user data set when the signal handler was connected.

### The `"clear"` signal

    void                user_function                      (GstMultiUDPSink *gstmultiudpsink,
                                                            gpointer         user_data)            : Action

Clear the list of clients.

`gstmultiudpsink` : | the sink on which the signal is emitted
`user_data` : | user data set when the signal handler was connected.

### The `"client-added"` signal

    void                user_function                      (GstMultiUDPSink *gstmultiudpsink,
                                                            gchar           *host,
                                                            gint             port,
                                                            gpointer         user_data)            : Run Last

Signal emited when a new client is added to the list of clients.

`gstmultiudpsink` : | the sink emitting the signal
`host` : | the hostname/IP address of the added client
`port` : | the port of the added client
`user_data` : | user data set when the signal handler was connected.

### The `"client-removed"` signal

    void                user_function                      (GstMultiUDPSink *gstmultiudpsink,
                                                            gchar           *host,
                                                            gint             port,
                                                            gpointer         user_data)            : Run Last

Signal emited when a client is removed from the list of clients.

`gstmultiudpsink` : | the sink emitting the signal
`host` : | the hostname/IP address of the removed client
`port` : | the port of the removed client
`user_data` : | user data set when the signal handler was connected.

### The `"get-stats"` signal

    GstStructure*       user_function                      (GstMultiUDPSink *gstmultiudpsink,
                                                            gchar           *host,
                                                            gint             port,
                                                            gpointer         user_data)            : Action

Get the statistics of the client with destination `host` and `port`.

`gstmultiudpsink` : | the sink on which the signal is emitted
`host` : | the hostname/IP address of the client to get stats on
`port` : | the port of the client to get stats on
`user_data` : | user data set when the signal handler was connected.
Returns : | a GstStructure: bytes_sent, packets_sent, connect_time (in epoch seconds), disconnect_time (in epoch seconds)

### The `"remove"` signal

    void                user_function                      (GstMultiUDPSink *gstmultiudpsink,
                                                            gchar           *host,
                                                            gint             port,
                                                            gpointer         user_data)            : Action

Remove the client with destination `host` and `port` from the list of clients.

`gstmultiudpsink` : | the sink on which the signal is emitted
`host` : | the hostname/IP address of the client to remove
`port` : | the port of the client to remove
`user_data` : | user data set when the signal handler was connected.

## See Also

udpsink, multifdsink