Blame docs/plugins/html/gst-plugins-base-plugins-multifdsink.html

Packit 971217
Packit 971217
<html>
Packit 971217
<head>
Packit 971217
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit 971217
<title>multifdsink: GStreamer Base Plugins 1.0 Plugins Reference Manual</title>
Packit 971217
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
Packit 971217
<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Plugins Reference Manual">
Packit 971217
<link rel="up" href="ch01.html" title="gst-plugins-base Elements">
Packit 971217
<link rel="prev" href="gst-plugins-base-plugins-glviewconvert.html" title="glviewconvert">
Packit 971217
<link rel="next" href="gst-plugins-base-plugins-multisocketsink.html" title="multisocketsink">
Packit 971217
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit 971217
<link rel="stylesheet" href="style.css" type="text/css">
Packit 971217
</head>
Packit 971217
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 971217
Packit 971217
Packit 971217
Top  | 
Packit 971217
                  Description  | 
Packit 971217
                  Object Hierarchy  | 
Packit 971217
                  Properties  | 
Packit 971217
                  Signals
Packit 971217
Packit 971217
Home
Packit 971217
Up
Packit 971217
Prev
Packit 971217
Next
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

multifdsink

Packit 971217

multifdsink

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Properties

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
gboolean
Packit 971217
handle-read
Packit 971217
Read / Write
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Signals

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
add
Packit 971217
Action
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
add-full
Packit 971217
Action
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
client-added
Packit 971217
Run Last
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
client-fd-removed
Packit 971217
Run Last
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
client-removed
Packit 971217
Run Last
Packit 971217
Packit 971217
Packit 971217
Packit 971217
GstStructure*
Packit 971217
get-stats
Packit 971217
Action
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
remove
Packit 971217
Action
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
remove-flush
Packit 971217
Action
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Types and Values

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
struct
Packit 971217
GstMultiFdSink
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Object Hierarchy

Packit 971217
    GObject
Packit 971217
    ╰── GInitiallyUnowned
Packit 971217
        ╰── GstObject
Packit 971217
            ╰── GstElement
Packit 971217
                ╰── GstBaseSink
Packit 971217
                    ╰── GstMultiHandleSink
Packit 971217
                        ╰── GstMultiFdSink
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Description

Packit 971217

This plugin writes incoming data to a set of file descriptors. The

Packit 971217
file descriptors can be added to multifdsink by emitting the “add” signal.
Packit 971217
For each descriptor added, the “client-added” signal will be called.

Packit 971217

The multifdsink element needs to be set into READY, PAUSED or PLAYING state

Packit 971217
before operations such as adding clients are possible.

Packit 971217

A client can also be added with the “add-full” signal

Packit 971217
that allows for more control over what and how much data a client
Packit 971217
initially receives.

Packit 971217

Clients can be removed from multifdsink by emitting the “remove” signal. For

Packit 971217
each descriptor removed, the “client-removed” signal will be called. The
Packit 971217
“client-removed” signal can also be fired when multifdsink decides that a
Packit 971217
client is not active anymore or, depending on the value of the
Packit 971217
“recover-policy” property, if the client is reading too slowly.
Packit 971217
In all cases, multifdsink will never close a file descriptor itself.
Packit 971217
The user of multifdsink is responsible for closing all file descriptors.
Packit 971217
This can for example be done in response to the “client-fd-removed” signal.
Packit 971217
Note that multifdsink still has a reference to the file descriptor when the
Packit 971217
“client-removed” signal is emitted, so that "get-stats" can be performed on
Packit 971217
the descriptor; it is therefore not safe to close the file descriptor in
Packit 971217
the “client-removed” signal handler, and you should use the
Packit 971217
“client-fd-removed” signal to safely close the fd.

Packit 971217

Multifdsink internally keeps a queue of the incoming buffers and uses a

Packit 971217
separate thread to send the buffers to the clients. This ensures that no
Packit 971217
client write can block the pipeline and that clients can read with different
Packit 971217
speeds.

Packit 971217

When adding a client to multifdsink, the “sync-method” property will define

Packit 971217
which buffer in the queued buffers will be sent first to the client. Clients
Packit 971217
can be sent the most recent buffer (which might not be decodable by the
Packit 971217
client if it is not a keyframe), the next keyframe received in
Packit 971217
multifdsink (which can take some time depending on the keyframe rate), or the
Packit 971217
last received keyframe (which will cause a simple burst-on-connect).
Packit 971217
Multifdsink will always keep at least one keyframe in its internal buffers
Packit 971217
when the sync-mode is set to latest-keyframe.

Packit 971217

There are additional values for the “sync-method”

Packit 971217
property to allow finer control over burst-on-connect behaviour. By selecting
Packit 971217
the 'burst' method a minimum burst size can be chosen, 'burst-keyframe'
Packit 971217
additionally requires that the burst begin with a keyframe, and
Packit 971217
'burst-with-keyframe' attempts to burst beginning with a keyframe, but will
Packit 971217
prefer a minimum burst size even if it requires not starting with a keyframe.

Packit 971217

Multifdsink can be instructed to keep at least a minimum amount of data

Packit 971217
expressed in time or byte units in its internal queues with the
Packit 971217
“time-min” and “bytes-min” properties respectively.
Packit 971217
These properties are useful if the application adds clients with the
Packit 971217
“add-full” signal to make sure that a burst connect can
Packit 971217
actually be honored.

Packit 971217

When streaming data, clients are allowed to read at a different rate than

Packit 971217
the rate at which multifdsink receives data. If the client is reading too
Packit 971217
fast, no data will be send to the client until multifdsink receives more
Packit 971217
data. If the client, however, reads too slowly, data for that client will be
Packit 971217
queued up in multifdsink. Two properties control the amount of data
Packit 971217
(buffers) that is queued in multifdsink: “buffers-max” and
Packit 971217
“buffers-soft-max”. A client that falls behind by
Packit 971217
“buffers-max” is removed from multifdsink forcibly.

Packit 971217

A client with a lag of at least “buffers-soft-max” enters the recovery

Packit 971217
procedure which is controlled with the “recover-policy” property.
Packit 971217
A recover policy of NONE will do nothing, RESYNC_LATEST will send the most recently
Packit 971217
received buffer as the next buffer for the client, RESYNC_SOFT_LIMIT
Packit 971217
positions the client to the soft limit in the buffer queue and
Packit 971217
RESYNC_KEYFRAME positions the client at the most recent keyframe in the
Packit 971217
buffer queue.

Packit 971217

multifdsink will by default synchronize on the clock before serving the

Packit 971217
buffers to the clients. This behaviour can be disabled by setting the sync
Packit 971217
property to FALSE. Multifdsink will by default not do QoS and will never
Packit 971217
drop late buffers.

Packit 971217
Packit 971217

Synopsis

Packit 971217
Packit 971217

Element Information

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

plugin

Packit 971217
Packit 971217
            tcp
Packit 971217
          
Packit 971217
Packit 971217
Packit 971217

author

Packit 971217
Thomas Vander Stichele <thomas at apestaart dot org>, Wim Taymans <wim@fluendo.com>
Packit 971217
Packit 971217
Packit 971217

class

Packit 971217
Sink/Network
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

Element Pads

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

name

Packit 971217
sink
Packit 971217
Packit 971217
Packit 971217

direction

Packit 971217
sink
Packit 971217
Packit 971217
Packit 971217

presence

Packit 971217
always
Packit 971217
Packit 971217
Packit 971217

details

Packit 971217
ANY
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Functions

Packit 971217

Packit 971217
Packit 971217
Packit 971217

Types and Values

Packit 971217
Packit 971217

struct GstMultiFdSink

Packit 971217
struct GstMultiFdSink;
Packit 971217

The multifdsink object structure.

Packit 971217
Packit 971217
Packit 971217
Packit 971217

Property Details

Packit 971217
Packit 971217

The “handle-read” property

Packit 971217
  “handle-read”              gboolean
Packit 971217

Handle client reads and discard the data.

Packit 971217

Flags: Read / Write

Packit 971217

Default value: TRUE

Packit 971217
Packit 971217
Packit 971217
Packit 971217

Signal Details

Packit 971217
Packit 971217

The “add” signal

Packit 971217
void
Packit 971217
user_function (GstMultiFdSink *gstmultifdsink,
Packit 971217
               gint            fd,
Packit 971217
               gpointer        user_data)
Packit 971217

Hand the given open file descriptor to multifdsink to write to.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

gstmultifdsink

Packit 971217

the multifdsink element to emit this signal on

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

fd

Packit 971217

the file descriptor to add to multifdsink

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

user_data

Packit 971217

user data set when the signal handler was connected.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Flags: Action

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “add-full” signal

Packit 971217
void
Packit 971217
user_function (GstMultiFdSink              *gstmultifdsink,
Packit 971217
               gint                         fd,
Packit 971217
               GstMultiHandleSinkSyncMethod sync,
Packit 971217
               GstFormat                    format_min,
Packit 971217
               guint64                      value_min,
Packit 971217
               GstFormat                    format_max,
Packit 971217
               guint64                      value_max,
Packit 971217
               gpointer                     user_data)
Packit 971217

Hand the given open file descriptor to multifdsink to write to and

Packit 971217
specify the burst parameters for the new connection.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

gstmultifdsink

Packit 971217

the multifdsink element to emit this signal on

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

fd

Packit 971217

the file descriptor to add to multifdsink

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

sync

Packit 971217

the sync method to use

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

format_min

Packit 971217

the format of value_min

Packit 971217

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

value_min

Packit 971217

the minimum amount of data to burst expressed in

Packit 971217
format_min
Packit 971217
units.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

format_max

Packit 971217

the format of value_max

Packit 971217

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

value_max

Packit 971217

the maximum amount of data to burst expressed in

Packit 971217
format_max
Packit 971217
units.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

user_data

Packit 971217

user data set when the signal handler was connected.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Flags: Action

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “client-added” signal

Packit 971217
void
Packit 971217
user_function (GstMultiFdSink *gstmultifdsink,
Packit 971217
               gint            fd,
Packit 971217
               gpointer        user_data)
Packit 971217

The given file descriptor was added to multifdsink. This signal will

Packit 971217
be emitted from the streaming thread so application should be prepared
Packit 971217
for that.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

gstmultifdsink

Packit 971217

the multifdsink element that emitted this signal

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

fd

Packit 971217

the file descriptor that was added to multifdsink

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

user_data

Packit 971217

user data set when the signal handler was connected.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Flags: Run Last

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “client-fd-removed” signal

Packit 971217
void
Packit 971217
user_function (GstMultiFdSink *gstmultifdsink,
Packit 971217
               gint            fd,
Packit 971217
               gpointer        user_data)
Packit 971217

The given file descriptor was removed from multifdsink. This signal will

Packit 971217
be emitted from the streaming thread so applications should be prepared
Packit 971217
for that.

Packit 971217

In this callback, gstmultifdsink

Packit 971217
 has removed all the information
Packit 971217
associated with fd
Packit 971217
 and it is therefore not possible to call get-stats
Packit 971217
with fd
Packit 971217
. It is however safe to close() and reuse fd
Packit 971217
 in the callback.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

gstmultifdsink

Packit 971217

the multifdsink element that emitted this signal

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

fd

Packit 971217

the file descriptor that was removed from multifdsink

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

user_data

Packit 971217

user data set when the signal handler was connected.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Flags: Run Last

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “client-removed” signal

Packit 971217
void
Packit 971217
user_function (GstMultiFdSink                *gstmultifdsink,
Packit 971217
               gint                           fd,
Packit 971217
               GstMultiHandleSinkClientStatus status,
Packit 971217
               gpointer                       user_data)
Packit 971217

The given file descriptor is about to be removed from multifdsink. This

Packit 971217
signal will be emitted from the streaming thread so applications should
Packit 971217
be prepared for that.

Packit 971217

gstmultifdsink

Packit 971217
 still holds a handle to fd
Packit 971217
 so it is possible to call
Packit 971217
the get-stats signal from this callback. For the same reason it is
Packit 971217
not safe to close() and reuse fd
Packit 971217
 in this callback.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

gstmultifdsink

Packit 971217

the multifdsink element that emitted this signal

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

fd

Packit 971217

the file descriptor that is to be removed from multifdsink

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

status

Packit 971217

the reason why the client was removed

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

user_data

Packit 971217

user data set when the signal handler was connected.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Flags: Run Last

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “get-stats” signal

Packit 971217
GstStructure*
Packit 971217
user_function (GstMultiFdSink *gstmultifdsink,
Packit 971217
               gint            fd,
Packit 971217
               gpointer        user_data)
Packit 971217

Get statistics about fd

Packit 971217
. This function returns a GstStructure to ease
Packit 971217
automatic wrapping for bindings.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

gstmultifdsink

Packit 971217

the multifdsink element to emit this signal on

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

fd

Packit 971217

the file descriptor to get stats of from multifdsink

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

user_data

Packit 971217

user data set when the signal handler was connected.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

a GstStructure with the statistics. The structures

Packit 971217
contains guint64 values that represent respectively: total
Packit 971217
number of bytes sent (bytes-sent), time when the client was
Packit 971217
added (connect-time), time when the client was
Packit 971217
disconnected/removed (disconnect-time), time the client
Packit 971217
is/was active (connect-duration), last activity time (in
Packit 971217
epoch seconds) (last-activity-time), number of buffers
Packit 971217
dropped (buffers-dropped), the timestamp of the first buffer
Packit 971217
(first-buffer-ts) and of the last buffer (last-buffer-ts).
Packit 971217
All times are expressed in nanoseconds (GstClockTime).  The
Packit 971217
structure can be empty if the client was not found.

Packit 971217
Packit 971217

Flags: Action

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “remove” signal

Packit 971217
void
Packit 971217
user_function (GstMultiFdSink *gstmultifdsink,
Packit 971217
               gint            fd,
Packit 971217
               gpointer        user_data)
Packit 971217

Remove the given open file descriptor from multifdsink.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

gstmultifdsink

Packit 971217

the multifdsink element to emit this signal on

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

fd

Packit 971217

the file descriptor to remove from multifdsink

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

user_data

Packit 971217

user data set when the signal handler was connected.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Flags: Action

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “remove-flush” signal

Packit 971217
void
Packit 971217
user_function (GstMultiFdSink *gstmultifdsink,
Packit 971217
               gint            fd,
Packit 971217
               gpointer        user_data)
Packit 971217

Remove the given open file descriptor from multifdsink after flushing all

Packit 971217
the pending data to the fd.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

gstmultifdsink

Packit 971217

the multifdsink element to emit this signal on

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

fd

Packit 971217

the file descriptor to remove from multifdsink

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

user_data

Packit 971217

user data set when the signal handler was connected.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Flags: Action

Packit 971217
Packit 971217
Packit 971217
Packit 971217

See Also

Packit 971217

tcpserversink

Packit 971217
Packit 971217
Packit 971217
Packit 971217

Generated by GTK-Doc V1.27
Packit 971217
</body>
Packit 971217
</html>