![]() |
![]() |
![]() |
Farsight2 Reference Manual | ![]() |
---|---|---|---|---|
FsStreamTransmitterFsStreamTransmitter — A stream transmitter object used to convey per-stream information to a transmitter. |
FsStreamTransmitter; FsStreamTransmitterClass; gboolean fs_stream_transmitter_add_remote_candidate (FsStreamTransmitter *streamtransmitter, FsCandidate *candidate, GError **error); void fs_stream_transmitter_remote_candidates_added (FsStreamTransmitter *streamtransmitter); gboolean fs_stream_transmitter_select_candidate_pair (FsStreamTransmitter *streamtransmitter, gchar *lfoundation, gchar *rfoundation, GError **error); void fs_stream_transmitter_emit_error (FsStreamTransmitter *streamtransmitter, gint error_no, gchar *error_msg, gchar *debug_msg);
"preferred-local-candidates" FsCandidateList : Read / Write / Construct Only "sending" gboolean : Read / Write
"error" : Run Last "local-candidates-prepared" : Run Last "new-active-candidate-pair" : Run Last "new-local-candidate" : 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
typedef struct { GObjectClass parent_class; /*virtual functions */ gboolean (*add_remote_candidate) (FsStreamTransmitter *streamtransmitter, FsCandidate *candidate, GError **error); void (*remote_candidates_added) (FsStreamTransmitter *streamtransmitter); gboolean (*select_candidate_pair) (FsStreamTransmitter *streamtransmitter, gchar *lfoundation, gchar *rfoundation, GError **error); } FsStreamTransmitterClass;
You must override the add_remote_candidate in a subclass
GObjectClass |
Our parent |
|
Sets the remote candidate |
|
Tell the stream to start the connectivity checks |
|
Select the candidate pair |
gboolean fs_stream_transmitter_add_remote_candidate (FsStreamTransmitter *streamtransmitter, FsCandidate *candidate, GError **error);
This function is used to add remote candidates to the transmitter
|
a FsStreamTranmitter |
|
a remote FsCandidate to add |
|
location of a GError, or NULL if no error occured |
Returns : |
TRUE of the candidate could be added, FALSE if it couldnt (and the GError will be set) |
void fs_stream_transmitter_remote_candidates_added (FsStreamTransmitter *streamtransmitter);
Call this function when the remotes candidates have been set and the checks can start. More candidates can be added afterwards
|
a FsStreamTransmitter |
gboolean fs_stream_transmitter_select_candidate_pair (FsStreamTransmitter *streamtransmitter, gchar *lfoundation, gchar *rfoundation, GError **error);
This function selects one pair of candidates to be selected to start sending media on.
|
a FsStreamTransmitter |
|
The foundation of the local candidate to be selected |
|
The foundation of the remote candidate to be selected |
|
location of a GErrorh, or NULL if no error occured |
Returns : |
TRUE if the candidate pair could be selected, FALSE otherwise |
void fs_stream_transmitter_emit_error (FsStreamTransmitter *streamtransmitter, gint error_no, gchar *error_msg, 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 |
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
void user_function (FsStreamTransmitter *self, gint 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. |
void 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.
|
FsStream that emitted the signal |
|
user data set when the signal handler was connected. |
void 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.
|
FsStream 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. |
void 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. |