![]() |
![]() |
![]() |
Farsight Reference Manual | ![]() |
---|---|---|---|---|
FarsightCodec; FarsightCodecParameter; 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);
typedef struct { gint id; char *encoding_name; FarsightMediaType media_type; guint clock_rate; guint channels; GList *optional_params; } FarsightCodec;
gint |
numeric identifier for encoding, eg. PT for SDP |
char * |
the name of the codec |
FarsightMediaType |
type of media this codec is for |
guint |
clock rate of this stream |
guint |
Number of channels codec should decode |
GList * |
key pairs of param name to param data |
typedef struct { gchar *name; gchar *value; } FarsightCodecParameter;
Used to store arbitary parameters for a codec
gchar * |
paramter name. |
gchar * |
parameter value. |
typedef struct { gchar *encoding_name; gint clock_rate; } FarsightCodecPreference;
Used to give a preferece for what type of codec to use.
gchar * |
name of encoding preferred |
gint |
rate of codec preffered |
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
|
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);
|
|
Returns : |