![]() |
![]() |
![]() |
Farsight Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
struct FarsightCodec; struct FarsightCodecParameter; struct FarsightCodecPreference; enum FarsightMediaType; void farsight_codec_init (FarsightCodec *codec
,int id
,const char *encoding_name
,FarsightMediaType media_type
,guint clock_rate
); void farsight_codec_destroy (FarsightCodec *codec
); FarsightCodec * farsight_codec_copy (FarsightCodec *codec
); void farsight_codec_list_destroy (GList *codec_list
); GList * farsight_codec_list_copy (const GList *codec_list
); GList * farsight_codec_list_from_keyfile (const gchar *filename
); gchar * farsight_codec_to_string (FarsightCodec *codec
); const gchar * farsight_media_type_to_string (FarsightMediaType media_type
);
struct FarsightCodec { gint id; char *encoding_name; FarsightMediaType media_type; guint clock_rate; guint channels; GList *optional_params; };
numeric identifier for encoding, eg. PT for SDP | |
the name of the codec | |
FarsightMediaType |
type of media this codec is for |
clock rate of this stream | |
Number of channels codec should decode | |
key pairs of param name to param data |
struct FarsightCodecParameter { gchar *name; gchar *value; };
Used to store arbitary parameters for a codec
struct FarsightCodecPreference { gchar *encoding_name; gint clock_rate; };
Used to give a preferece for what type of codec to use.
typedef enum { FARSIGHT_MEDIA_TYPE_AUDIO, FARSIGHT_MEDIA_TYPE_VIDEO, FARSIGHT_MEDIA_TYPE_LAST = FARSIGHT_MEDIA_TYPE_VIDEO } FarsightMediaType;
Enum used to signify the media type of a codec or stream.
void farsight_codec_init (FarsightCodec *codec
,int id
,const char *encoding_name
,FarsightMediaType media_type
,guint clock_rate
);
Initialises a FarsightCodec structure
|
FarsightCodec structure to initialise |
|
codec identifier, if RTP this should be based on IETF RTP payload types |
|
Name of media type this encodes |
|
FarsightMediaType for type of codec |
|
The clock rate this codec encodes at, if applicable |
void farsight_codec_destroy (FarsightCodec *codec
);
Deletes a FarsightCodec structure and all its data
|
FarsightCodec structure to free |
FarsightCodec * farsight_codec_copy (FarsightCodec *codec
);
Copies a FarsightCodec structure.
|
codec to copy |
Returns : |
a copy of the codec |
void farsight_codec_list_destroy (GList *codec_list
);
Deletes a list of FarsightCodec structures and the list itself
|
a GList of FarsightCodec to delete |
GList * farsight_codec_list_copy (const GList *codec_list
);
Copies a list of FarsightCodec structures.
|
a GList of FarsightCodec to copy |
Returns : |
The new list. |
GList * farsight_codec_list_from_keyfile (const gchar *filename
);
Reads the content of a GKeyFile of the following format into a GList of FarsightCodec structures.
Example:
[audio/codec1] clock-rate=8000 [audio/codec1:1] clock-rate=16000 [audio/codec2] one_param=QCIF another_param=WOW [audio/codec3] id=-1
If "id" is set to a negative value, it means that it will prevent the system for auto-offering any codec matching the entry
|
Name of the GKeyFile to read the codecs parameters from |
Returns : |
The read GList of FarsightCodec or NULL if an error appended |
gchar * farsight_codec_to_string (FarsightCodec *codec
);
Returns a newly-allocated string representing the codec
|
A farsight codec |
Returns : |
the newly-allocated string |
const gchar * farsight_media_type_to_string (FarsightMediaType media_type
);