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);
typedef struct { gint id; char *encoding_name; FarsightMediaType media_type; guint clock_rate; guint channels; GList *optional_params; } FarsightCodec;
gint id ; |
numeric identifier for encoding, eg. PT for SDP |
char *encoding_name ; |
the name of the codec |
FarsightMediaType media_type ; |
type of media this codec is for |
guint clock_rate ; |
clock rate of this stream |
guint channels ; |
Number of channels codec should decode |
GList *optional_params ; |
key pairs of param name to param data |
typedef struct { gchar *name; gchar *value; } FarsightCodecParameter;
Used to store arbitary parameters for a codec
typedef struct { gchar *encoding_name; gint clock_rate; } FarsightCodecPreference;
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
codec : |
FarsightCodec structure to initialise |
id : |
codec identifier, if RTP this should be based on IETF RTP payload types |
encoding_name : |
Name of media type this encodes |
media_type : |
FarsightMediaType for type of codec |
clock_rate : |
The clock rate this codec encodes at, if applicable |
void farsight_codec_destroy (FarsightCodec *codec);
Deletes a FarsightCodec structure and all its data
codec : |
FarsightCodec structure to free |
FarsightCodec* farsight_codec_copy (FarsightCodec *codec);
Copies a FarsightCodec structure.
codec : |
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
codec_list : |
a GList of FarsightCodec to delete |
GList* farsight_codec_list_copy (const GList *codec_list);
Copies a list of FarsightCodec structures.
codec_list : |
a GList of FarsightCodec to copy |
Returns : | The new list. |