Farsight2 Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
FsStreamTransmitterFsStreamTransmitter — A stream transmitter object used to convey per-stream information to a transmitter. |
#include <gst/farsight/fs-transmitter.h> FsStreamTransmitter; struct FsStreamTransmitterClass; gboolean fs_stream_transmitter_set_remote_candidates (FsStreamTransmitter *streamtransmitter
,GList *candidates
,GError **error
); gboolean fs_stream_transmitter_gather_local_candidates (FsStreamTransmitter *streamtransmitter
,GError **error
); gboolean fs_stream_transmitter_force_remote_candidates (FsStreamTransmitter *streamtransmitter
,GList *remote_candidates
,GError **error
); void fs_stream_transmitter_stop (FsStreamTransmitter *streamtransmitter
); void fs_stream_transmitter_emit_error (FsStreamTransmitter *streamtransmitter
,gint error_no
,const gchar *error_msg
,const gchar *debug_msg
);
"associate-on-source" gboolean : Read / Write / Construct Only "preferred-local-candidates" FsCandidateList* : Read / Write / Construct Only "sending" gboolean : Read / Write
"error" :Run Last
"known-source-packet-received" :Run Last
"local-candidates-prepared" :Run Last
"new-active-candidate-pair" :Run Last
"new-local-candidate" :Run Last
"state-changed" :Run Last
This object is the base implementation of a Farsight Stream Transmitter. It needs to be derived and implement by a Farsight transmitter. A Farsight Stream transmitter is used to convery per-stream information to a transmitter, this is mostly local and remote candidates
typedef struct _FsStreamTransmitter FsStreamTransmitter;
All members are private, access them using methods and properties
struct FsStreamTransmitterClass { GObjectClass parent_class; /*virtual functions */ gboolean (*set_remote_candidates) (FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error); gboolean (*force_remote_candidates) (FsStreamTransmitter *streamtransmitter, GList *remote_candidates, GError **error); gboolean (*gather_local_candidates) (FsStreamTransmitter *streamtransmitter, GError **error); void (*stop) (FsStreamTransmitter *streamtransmitter); };
You must override the add_remote_candidate in a subclass
GObjectClass |
Our parent |
Sets the remote candidates | |
Forces certain remote candidates | |
Starts the gathering of local candidates | |
Stop the stream transmitter synchronously (does any Gst stopping that needs to be done) |
gboolean fs_stream_transmitter_set_remote_candidates (FsStreamTransmitter *streamtransmitter
,GList *candidates
,GError **error
);
This function is used to set the remote candidates to the transmitter
gboolean fs_stream_transmitter_gather_local_candidates (FsStreamTransmitter *streamtransmitter
,GError **error
);
This function tells the transmitter to start gathering local candidates, signals for new candidates and newly active candidates can be emitted during the call to this function.
|
a FsStreamTransmitter |
|
location of a GErrorh, or NULL if no error occured |
Returns : |
TRUE if it succeeds (or is not implemented), FALSE otherwise |
gboolean fs_stream_transmitter_force_remote_candidates (FsStreamTransmitter *streamtransmitter
,GList *remote_candidates
,GError **error
);
This function forces data to be sent immediately to the selected remote candidate, by-passing any connectivity checks. There should be at most one candidate per component.
|
a FsStreamTransmitter |
|
a GList of FsCandidate to force |
|
location of a GError, or NULL if no error occured |
Returns : |
TRUE if the candidates could be forced, FALSE otherwise |
void fs_stream_transmitter_stop (FsStreamTransmitter *streamtransmitter
);
This functions stops the FsStreamTransmitter, it must be called before the last reference is dropped.
|
a FsStreamTransmitter |
void fs_stream_transmitter_emit_error (FsStreamTransmitter *streamtransmitter
,gint error_no
,const gchar *error_msg
,const gchar *debug_msg
);
This function emit the "error" signal on a FsStreamTransmitter, it should only be called by subclasses.
|
FsStreamTransmitter on which to emit the error signal |
|
The number of the error |
|
Error message to be displayed to user |
|
Debugging error message |
"associate-on-source"
property"associate-on-source" gboolean : Read / Write / Construct Only
This tells the stream transmitter to associate incoming data with this based on the source without looking at the content if possible.
Default value: TRUE
"preferred-local-candidates"
property "preferred-local-candidates" FsCandidateList* : Read / Write / Construct Only
A GList of FsCandidates.
"sending"
property"sending" gboolean : Read / Write
A network source GstElement to be used by the FsSession
Default value: TRUE
"error"
signalvoid user_function (FsStreamTransmitter *self,
FsError errorno,
gchar *error_msg,
gchar *debug_msg,
gpointer user_data) : Run Last
This signal is emitted in any error condition
|
FsStreamTransmitter 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. |
"known-source-packet-received"
signalvoid user_function (FsStreamTransmitter *self,
guint component,
gpointer buffer,
gpointer user_data) : Run Last
This signal is emitted when a buffer coming from a confirmed known source is received.
|
FsStreamTransmitter that emitted the signal |
|
The Component on which this buffer was received |
|
the GstBuffer coming from the known source |
|
user data set when the signal handler was connected. |
"local-candidates-prepared"
signalvoid user_function (FsStreamTransmitter *self,
gpointer user_data) : Run Last
This signal is emitted when all local candidates have been prepared, an ICE implementation would send its SDP offer or answer.
|
FsStreamTransmitter that emitted the signal |
|
user data set when the signal handler was connected. |
"new-active-candidate-pair"
signalvoid user_function (FsStreamTransmitter *self,
FsCandidate *local_candidate,
FsCandidate *remote_candidate,
gpointer user_data) : Run Last
This signal is emitted when there is a new active chandidate pair that has been established. This is specially useful for ICE where the active candidate pair can change automatically due to network conditions. The user must not modify the candidates and must copy them if he wants to use them outside the callback scope.
|
FsStreamTransmitter that emitted the signal |
|
FsCandidate of the local candidate being used |
|
FsCandidate of the remote candidate being used |
|
user data set when the signal handler was connected. |
"new-local-candidate"
signalvoid user_function (FsStreamTransmitter *self,
FsCandidate *local_candidate,
gpointer user_data) : Run Last
This signal is emitted when a new local candidate is discovered.
|
FsStream that emitted the signal |
|
FsCandidate of the local candidate |
|
user data set when the signal handler was connected. |
"state-changed"
signalvoid user_function (FsStreamTransmitter *self,
guint component,
FsStreamState state,
gpointer user_data) : Run Last
This signal is emitted when the ICE state (or equivalent) of the component changes
|
FsStreamTransmitter that emitted the signal |
|
the id of the component which state has changed |
|
the new state of the component |
|
user data set when the signal handler was connected. |