Farsight2 Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
#include <gst/farsight/fs-transmitter.h> FsTransmitter; struct FsTransmitterClass; FsTransmitter * fs_transmitter_new (const gchar *type
,guint components
,guint tos
,GError **error
); FsStreamTransmitter * fs_transmitter_new_stream_transmitter (FsTransmitter *transmitter
,FsParticipant *participant
,guint n_parameters
,GParameter *parameters
,GError **error
); GType fs_transmitter_get_stream_transmitter_type (FsTransmitter *transmitter
); void fs_transmitter_emit_error (FsTransmitter *transmitter
,gint error_no
,const gchar *error_msg
,const gchar *debug_msg
); GstElement * fs_transmitter_get_recvonly_filter (FsTransmitter *transmitter
,guint component
); char ** fs_transmitter_list_available (void
);
"components" guint : Read / Write / Construct Only "gst-sink" GstElement* : Read "gst-src" GstElement* : Read "tos" guint : Read / Write
This object is the base implementation of a Farsight Transmitter. It needs to be derived and implement by a Farsight transmitter. A Farsight Transmitter provides a GStreamer network sink and source to be used for the Farsight Session. It creates FsStreamTransmitter objects which are used to set the different per-stream properties
typedef struct _FsTransmitter FsTransmitter;
All members are private, access them using methods and properties
struct FsTransmitterClass { GObjectClass parent_class; /*virtual functions */ FsStreamTransmitter *(*new_stream_transmitter) (FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error); GType (*get_stream_transmitter_type) (FsTransmitter *transmitter); };
You must override both methods in a subclass.
GObjectClass |
Our parent |
Creates a new FsStreamTransmitter | |
Returns the GType of the stream transmitter created by this class (useful for bindings) |
FsTransmitter * fs_transmitter_new (const gchar *type
,guint components
,guint tos
,GError **error
);
This function creates a new transmitter of the requested type. It will load the appropriate plugin as required.
|
The type of transmitter to create |
|
The number of components to create |
|
The Type of Service of the socket, max is 255 |
|
location of a GError, or NULL if no error occured |
Returns : |
a newly-created FsTransmitter of the requested type (or NULL if there is an error) |
FsStreamTransmitter * fs_transmitter_new_stream_transmitter (FsTransmitter *transmitter
,FsParticipant *participant
,guint n_parameters
,GParameter *parameters
,GError **error
);
This function will create a new FsStreamTransmitter element for a specific participant for this FsTransmitter
|
a FsTranmitter |
|
the FsParticipant for which the FsStream using this new FsStreamTransmitter is created |
|
The number of parameters to pass to the newly created FsStreamTransmitter |
|
an array of GParameter |
|
location of a GError, or NULL if no error occured |
Returns : |
a new FsStreamTransmitter, or NULL if there is an error |
GType fs_transmitter_get_stream_transmitter_type
(FsTransmitter *transmitter
);
This function returns the GObject type for the stream transmitter. This is meant for bindings that need to introspect the type of arguments that can be passed to the _new_stream_transmitter.
|
A FsTransmitter object |
Returns : |
the GType |
void fs_transmitter_emit_error (FsTransmitter *transmitter
,gint error_no
,const gchar *error_msg
,const gchar *debug_msg
);
This function emit the "error" signal on a FsTransmitter, it should only be called by subclasses.
|
FsTransmitter on which to emit the error signal |
|
The number of the error |
|
Error message to be displayed to user |
|
Debugging error message |
GstElement * fs_transmitter_get_recvonly_filter (FsTransmitter *transmitter
,guint component
);
Get the filter to add on the send pipeline if sending is disabled.
Only for use by subclasses.
|
A FsTransmitter object |
|
The component to get the filter for |
Returns : |
a GstElement to use as the filter or NULL
|
char ** fs_transmitter_list_available (void
);
Get the list of all available transmitters
Returns : |
a newly allocated array of strings containing the list of all
available transmitters or NULL if there are none. It should
be freed with g_strfreev() . |
"components"
property"components" guint : Read / Write / Construct Only
The number of components to create
Allowed values: [1,255]
Default value: 1
"gst-sink"
property"gst-sink" GstElement* : Read
A network source GstElement to be used by the FsSession These element's sink must have async=FALSE This element MUST provide a pad named "sink%d" per component. These pads number must start at 1 (the %d corresponds to the component number). These pads MUST be static pads.
"gst-src"
property"gst-src" GstElement* : Read
A network source GstElement to be used by the FsSession
This element MUST provide a source pad named "srcd
" per component.
These pads number must start at 1 (the d
corresponds to the component
number).
These pads MUST be static pads.
"tos"
property"tos" guint : Read / Write
Sets the IP ToS field (and if possible the IPv6 TCLASS field
Allowed values: <= 255
Default value: 0
"error"
signalvoid user_function (FsTransmitter *self,
FsError errorno,
gchar *error_msg,
gchar *debug_msg,
gpointer user_data) : Run Last
This signal is emitted in any error condition
|
FsTransmitter that emitted the signal |
|
The number of the error |
|
Error message to be displayed to user |
|
Debugging error message |
|
user data set when the signal handler was connected. |
"get-recvonly-filter"
signalGstElement* user_function (FsTransmitter *self,
guint component,
gpointer user_data) : Run Last
This signal is emitted when the transmitter wants to get a filter for to use if sending is disabled. If you want to drop all buffers, just don't listen to the signal.
This element should have a "sending" property that can be changed with the
sending state of the stream. It should default to TRUE
.
|
FsTransmitter that emitted the signal |
|
The component that the filter will be used for |
|
user data set when the signal handler was connected. |
Returns : |
the GstElement to use as the filter, or NULL to drop everything |