Farsight2 Reference Manual | ||||
---|---|---|---|---|
#include <gst/farsight/fs-transmitter.h> FsTransmitter; 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
typedef struct { 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); } FsTransmitterClass;
You must override both methods in a subclass.
GObjectClass parent_class ; |
Our parent |
new_stream_transmitter () |
Creates a new FsStreamTransmitter |
get_stream_transmitter_type () |
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.
type : |
The type of transmitter to create |
components : |
The number of components to create |
tos : |
The Type of Service of the socket, max is 255 |
error : |
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
transmitter : |
a FsTranmitter |
participant : |
the FsParticipant for which the FsStream using this new FsStreamTransmitter is created |
n_parameters : |
The number of parameters to pass to the newly created FsStreamTransmitter |
parameters : |
an array of GParameter |
error : |
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.
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.
transmitter : |
FsTransmitter on which to emit the error signal |
error_no : |
The number of the error |
error_msg : |
Error message to be displayed to user |
debug_msg : |
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.
transmitter : |
A FsTransmitter object |
component : |
The component to get the filter for |
Returns : | a GstElement to use as the filter or NULL
|
"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.
"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
self : |
FsTransmitter that emitted the signal |
errorno : |
The number of the error |
error_msg : |
Error message to be displayed to user |
debug_msg : |
Debugging error message |
user_data : |
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
.
self : |
FsTransmitter that emitted the signal |
component : |
The component that the filter will be used for |
user_data : |
user data set when the signal handler was connected. |
Returns : | the GstElement to use as the filter, or NULL to drop everything
|