| Farsight Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | Signals | ||||
FarsightTransmitter; struct FarsightTransmitterClass; enum FarsightTransmitterError; enum FarsightTransmitterState; void farsight_transmitter_add_remote_candidates (FarsightTransmitter *self,const GList *remote_candidate_list); void farsight_transmitter_destroy (FarsightTransmitter *self); FarsightTransmitter * farsight_transmitter_factory_make (const gchar *transmitter_id); GstElement * farsight_transmitter_get_gst_sink (FarsightTransmitter *self); GstElement * farsight_transmitter_get_gst_src (FarsightTransmitter *self); gboolean farsight_transmitter_prepare (FarsightTransmitter *self); void farsight_transmitter_signal_connection_state_changed (FarsightTransmitter *self,FarsightTransmitterState state); void farsight_transmitter_signal_error (FarsightTransmitter *self,FarsightTransmitterError type,gchar *message); void farsight_transmitter_signal_native_candidates_prepared (FarsightTransmitter *self); void farsight_transmitter_signal_new_active_candidate_pair (FarsightTransmitter *self,const gchar *native_candidate_id,const gchar *remote_candidate_id); void farsight_transmitter_signal_new_native_candidate (FarsightTransmitter *self,const FarsightTransportInfo *candidate); gboolean farsight_transmitter_stop (FarsightTransmitter *self);
"connection-state-changed" :Run Last"error" :Run Last"native-candidates-prepared" :Run Last"new-active-candidate-pair" :Run Last"new-native-candidate" :Run Last
typedef struct _FarsightTransmitter FarsightTransmitter;
A network transmitter that farsight plugins can use to communicate on the network. These transmitter can contain advanced connectivity features such as STUN, TURN or can be plain UDP / TCP sockets.
struct FarsightTransmitterClass {
GObjectClass parent_class;
/*virtual methods */
gboolean (* prepare) (FarsightTransmitter *self);
gboolean (* stop) (FarsightTransmitter *self);
void (* add_remote_candidates) (FarsightTransmitter *self, const GList *remote_candidate_list);
GstElement * (* get_gst_src) (FarsightTransmitter *self);
GstElement * (* get_gst_sink) (FarsightTransmitter *self);
};
typedef enum {
FARSIGHT_TRANSMITTER_ERROR_UNKNOWN
} FarsightTransmitterError;
Enum used to indicate an error condition.
typedef enum {
FARSIGHT_TRANSMITTER_STATE_DISCONNECTED,
FARSIGHT_TRANSMITTER_STATE_CONNECTING,
FARSIGHT_TRANSMITTER_STATE_CONNECTED
} FarsightTransmitterState;
An enum used to signal the state of a FarsightTransmitter
void farsight_transmitter_add_remote_candidates (FarsightTransmitter *self,const GList *remote_candidate_list);
Tells the transmitter what the remote candidates are for transmission.
|
a FarsightTransmitter |
|
a GList of FarsightTransport of the remote candidates |
void farsight_transmitter_destroy (FarsightTransmitter *self);
Destroy this transmitter and all resources allocated by it. This function should be used instead of g_object_unref in order to destroy the transmitter.
|
a FarsightTransmitter |
FarsightTransmitter * farsight_transmitter_factory_make (const gchar *transmitter_id);
GstElement * farsight_transmitter_get_gst_sink (FarsightTransmitter *self);
Asks the transmitter to return the pointer to the gstreamer sink used by this transmitter.
|
a FarsightTransmitter |
Returns : |
a pointer a sink GstElement to use. |
GstElement * farsight_transmitter_get_gst_src (FarsightTransmitter *self);
Asks the transmitter to return the pointer to the gstreamer source used by this transmitter.
|
a FarsightTransmitter |
Returns : |
a pointer a source GstElement to use. |
gboolean farsight_transmitter_prepare (FarsightTransmitter *self);
This tells the transmitter to prepare itself for transmission. Basically it discovers local candidates, opens sockets and other specific operations.
|
a FarsightTransmitter |
Returns : |
FALSE if the preparation failed. |
void farsight_transmitter_signal_connection_state_changed (FarsightTransmitter *self,FarsightTransmitterState state);
Used by subclasses of FarsightTransmitter to emit an connection-state-changed signal
|
FarsightTransmitter that emitted the signal |
|
FarsighmTransmitterState of new state |
void farsight_transmitter_signal_error (FarsightTransmitter *self,FarsightTransmitterError type,gchar *message);
Used by subclasses of FarsightTransmitter to emit an error signal
|
FarsightTransmitter that emitted the signal |
|
FarsightTransmitterError type of error |
|
Error message |
void farsight_transmitter_signal_native_candidates_prepared
(FarsightTransmitter *self);
void farsight_transmitter_signal_new_active_candidate_pair (FarsightTransmitter *self,const gchar *native_candidate_id,const gchar *remote_candidate_id);
Used by subclasses of FarsightTransmitter to emit an new-active-candidate-pair signal
|
a FarsightTransmitter |
|
string identifier of native candidate that is now active |
|
string identifier of remote candidate that is now active |
void farsight_transmitter_signal_new_native_candidate (FarsightTransmitter *self,const FarsightTransportInfo *candidate);
gboolean farsight_transmitter_stop (FarsightTransmitter *self);
This tells the transmitter to stop transmitting and shutdown any sockets.
|
a FarsightTransmitter |
Returns : |
FALSE if the shutdown sequence fails. |
"connection-state-changed" signalvoid user_function (FarsightTransmitter *self,
gint state,
gpointer user_data) : Run Last
This signal is emitted when the connection state changes.
|
FarsightTransmitter that emitted the signal |
|
FarsightTransmitterState of new state |
|
user data set when the signal handler was connected. |
"error" signalvoid user_function (FarsightTransmitter *self,
gint type,
gchar *message,
gpointer user_data) : Run Last
This signal is emitted in any error condition
|
FarsightTransmitter that emitted the signal |
|
FarsightTransmitterError type of error |
|
Error message |
|
user data set when the signal handler was connected. |
"native-candidates-prepared" signalvoid user_function (FarsightTransmitter *self,
gpointer user_data) : Run Last
This signal is emitted when the native candidates have been prepared. This usually means all of the local ports have been opened, local interfaces have been found, and/or external ports have been found, and/or relay server has been setup, or anything else the protocol needs. After emission of this signal, farsight_transmitter_get_native_candidate_list should return meaningful data
|
FarsightTransmitter that emitted the signal |
|
user data set when the signal handler was connected. |
"new-active-candidate-pair" signalvoid user_function (FarsightTransmitter *self,
gchar *native_candidate_id,
gchar *remote_candidate_id,
gpointer user_data) : Run Last
Emitted when this FarsightTransmitter has chosen a new active candidate pair to use to connect to the remote client.
|
FarsightTransmitter that emitted the signal |
|
string identifier of native candidate that is now active |
|
string identifier of remote candidate that is now active |
|
user data set when the signal handler was connected. |
"new-native-candidate" signalvoid user_function (FarsightTransmitter *self,
gpointer candidate,
gpointer user_data) : Run Last
This signal is emitted when a new native candidate is found.
|
FarsightTransmitter that emitted the signal |
|
a FarsightTransportInfo of the new native candidate |
|
user data set when the signal handler was connected. |