![]() |
![]() |
![]() |
Farstream Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <farstream/fs-conference.h> struct FsCandidate; enum FsCandidateType; enum FsNetworkProtocol; enum FsComponentType; FsCandidate * fs_candidate_new (const gchar *foundation
,guint component_id
,FsCandidateType type
,FsNetworkProtocol proto
,const gchar *ip
,guint port
); FsCandidate * fs_candidate_new_full (const gchar *foundation
,guint component_id
,const gchar *ip
,guint16 port
,const gchar *base_ip
,guint16 base_port
,FsNetworkProtocol proto
,guint32 priority
,FsCandidateType type
,const gchar *username
,const gchar *password
,guint ttl
); void fs_candidate_destroy (FsCandidate *cand
); FsCandidate * fs_candidate_copy (const FsCandidate *cand
); void fs_candidate_list_destroy (GList *candidate_list
); GList * fs_candidate_list_copy (const GList *candidate_list
);
An FsCandidate is a way to exchange candidate information between the client and Farstream. This description is compatible with ICE-13. It can also be a multicast address. Candidates are linked to streams. The information specified in this structure is usually representative of the codec information exchanged in the signaling.
struct FsCandidate { gchar *foundation; guint component_id; gchar *ip; guint16 port; gchar *base_ip; guint16 base_port; FsNetworkProtocol proto; guint32 priority; FsCandidateType type; gchar *username; gchar *password; guint ttl; };
Struct to hold information about ICE-19 compliant candidates
a string representing the foundation of this candidate (maximum 32 chars) | |
value between 1 and 256 indicating which component this candidate represents (1 is RTP, 2 is RTCP, FsComponentType can be used here) | |
IP in dotted format | |
Port to use | |
IP of base in dotted format as defined in ICE-19. | |
Port of base as defined in ICE-19. | |
FsNetworkProtocol |
FsNetworkProtocol for ip protocol to use as candidate |
Value between 0 and (2^31 - 1) representing the priority | |
FsCandidateType |
The FsCandidateType of the candidate |
Username to use to connect to client if necessary, NULL otherwise | |
Username to use to connect to client if necessary, NULL otherwise | |
The TTL used when sending Multicast packet (0 = auto) |
typedef enum { FS_CANDIDATE_TYPE_HOST, FS_CANDIDATE_TYPE_SRFLX, FS_CANDIDATE_TYPE_PRFLX, FS_CANDIDATE_TYPE_RELAY, /* An external stream relay */ FS_CANDIDATE_TYPE_MULTICAST } FsCandidateType;
An enum for the type of candidate used/reported
typedef enum { FS_NETWORK_PROTOCOL_UDP, FS_NETWORK_PROTOCOL_TCP } FsNetworkProtocol;
An enum for the base IP protocol
typedef enum { FS_COMPONENT_NONE = 0, FS_COMPONENT_RTP = 1, FS_COMPONENT_RTCP = 2 } FsComponentType;
This enum contains the component IDs defined in ICE-19
FsCandidate * fs_candidate_new (const gchar *foundation
,guint component_id
,FsCandidateType type
,FsNetworkProtocol proto
,const gchar *ip
,guint port
);
Allocates a new FsCandidate, the rest of the fields can be optionally
filled manually. See also fs_candidate_new_full()
|
The foundation of the candidate |
|
The component this candidate is for |
|
The type of candidate |
|
The protocol this component is for |
|
The IP address of this component (can be NULL for local candidate to mean any address) |
|
the UDP/TCP port |
Returns : |
a newly-allocated FsCandidate |
FsCandidate * fs_candidate_new_full (const gchar *foundation
,guint component_id
,const gchar *ip
,guint16 port
,const gchar *base_ip
,guint16 base_port
,FsNetworkProtocol proto
,guint32 priority
,FsCandidateType type
,const gchar *username
,const gchar *password
,guint ttl
);
Allocates a new FsCandidate, filling all the fields. See also
fs_candidate_new()
|
The foundation of the candidate |
|
The component this candidate is for |
|
The IP address of this component (can be NULL for local candidate to mean any address) |
|
the UDP/TCP port |
|
IP of base in dotted format as defined in ICE-19. |
|
Port of base as defined in ICE-19. |
|
The protocol this component is for |
|
Value between 0 and (2^31 - 1) representing the priority |
|
The type of candidate |
|
Username to use to connect to client if necessary, NULL otherwise |
|
Username to use to connect to client if necessary, NULL otherwise |
|
The TTL used when sending Multicast packet (0 = auto) |
Returns : |
a newly-allocated FsCandidate |
void fs_candidate_destroy (FsCandidate *cand
);
Frees a FsCandidate and all its contents
|
a FsCandidate to delete |
FsCandidate * fs_candidate_copy (const FsCandidate *cand
);
Copies a FsCandidate and its contents.
|
a FsCandidate to copy |
Returns : |
a new FsCandidate |
void fs_candidate_list_destroy (GList *candidate_list
);
Deletes a GList of FsCandidate and its contents
|
A GList of FsCandidate |
GList * fs_candidate_list_copy (const GList *candidate_list
);
Copies a GList of FsCandidate and its contents
|
A GList of FsCandidate. [element-type FsCodec] |
Returns : |
a new GList of FsCandidate. [element-type FsCodec][transfer full] |