multiudpsink

multiudpsink

Properties

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

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBaseSink
                    ╰── GstMultiUDPSink
                        ╰── GstUDPSink

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

Functions

Types and Values

struct GstMultiUDPSink

struct GstMultiUDPSink;

Property Details

The “bytes-served” property

  “bytes-served”             guint64

Total number of bytes sent to all clients.

Flags: Read

Default value: 0


The “bytes-to-serve” property

  “bytes-to-serve”           guint64

Number of bytes received to serve to clients.

Flags: Read

Default value: 0


The “clients” property

  “clients”                  gchar *

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

Flags: Read / Write

Default value: NULL


The “closefd” property

  “closefd”                  gboolean

Close sockfd if passed as property on state change.

Flags: Read / Write

Default value: TRUE


The “sock” property

  “sock”                     gint

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

Flags: Read

Allowed values: >= G_MAXULONG

Default value: -1


The “sockfd” property

  “sockfd”                   gint

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

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: -1


The “auto-multicast” property

  “auto-multicast”           gboolean

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

Flags: Read / Write

Default value: TRUE


The “loop” property

  “loop”                     gboolean

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

Flags: Read / Write

Default value: TRUE


The “qos-dscp” property

  “qos-dscp”                 gint

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

Flags: Read / Write

Allowed values: [G_MAXULONG,63]

Default value: -1


The “ttl” property

  “ttl”                      gint

Used for setting the unicast TTL parameter.

Flags: Read / Write

Allowed values: [0,255]

Default value: 64


The “ttl-mc” property

  “ttl-mc”                   gint

Used for setting the multicast TTL parameter.

Flags: Read / Write

Allowed values: [0,255]

Default value: 1


The “send-duplicates” property

  “send-duplicates”          gboolean

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

Flags: Read / Write

Default value: TRUE


The “buffer-size” property

  “buffer-size”              gint

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

Flags: Read / Write

Allowed values: >= 0

Default value: 0


The “close-socket” property

  “close-socket”             gboolean

Close socket if passed as property on state change.

Flags: Read / Write

Default value: TRUE


The “socket” property

  “socket”                   GSocket *

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

Flags: Read / Write


The “used-socket” property

  “used-socket”              GSocket *

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

Flags: Read


The “force-ipv4” property

  “force-ipv4”               gboolean

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

Flags: Read / Write

Default value: FALSE


The “multicast-iface” property

  “multicast-iface”          gchar *

The network interface on which to join the multicast group.

Flags: Read / Write

Default value: NULL


The “bind-address” property

  “bind-address”             gchar *

Address to bind the socket to.

Flags: Read / Write

Default value: NULL


The “bind-port” property

  “bind-port”                gint

Port to bind the socket to.

Flags: Read / Write

Allowed values: [0,65535]

Default value: 0


The “socket-v6” property

  “socket-v6”                GSocket *

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

Flags: Read / Write


The “used-socket-v6” property

  “used-socket-v6”           GSocket *

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

Flags: Read

Signal Details

The “add” signal

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

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.

Parameters

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.

 

Flags: Action


The “clear” signal

void
user_function (GstMultiUDPSink *gstmultiudpsink,
               gpointer         user_data)

Clear the list of clients.

Parameters

gstmultiudpsink

the sink on which the signal is emitted

 

user_data

user data set when the signal handler was connected.

 

Flags: Action


The “client-added” signal

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

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

Parameters

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.

 

Flags: Run Last


The “client-removed” signal

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

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

Parameters

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.

 

Flags: Run Last


The “get-stats” signal

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

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

Parameters

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)

Flags: Action


The “remove” signal

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

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

Parameters

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.

 

Flags: Action

See Also

udpsink, multifdsink