pidgin  2.13.0
About: Pidgin is a chat program (multi-protocol instant messaging client) which lets you log in to accounts on multiple chat networks simultaneously (old name "gaim").
  Fossies Dox: pidgin-2.13.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

codec.h File Reference
#include "enum-types.h"
#include "../util.h"
#include <glib-object.h>
Include dependency graph for codec.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PURPLE_TYPE_MEDIA_CODEC   (purple_media_codec_get_type())
 
#define PURPLE_IS_MEDIA_CODEC(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_CODEC))
 
#define PURPLE_IS_MEDIA_CODEC_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_CODEC))
 
#define PURPLE_MEDIA_CODEC(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))
 
#define PURPLE_MEDIA_CODEC_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))
 
#define PURPLE_MEDIA_CODEC_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))
 

Typedefs

typedef struct _PurpleMediaCodec PurpleMediaCodec
 

Functions

GType purple_media_codec_get_type (void)
 
PurpleMediaCodecpurple_media_codec_new (int id, const char *encoding_name, PurpleMediaSessionType media_type, guint clock_rate)
 
guint purple_media_codec_get_id (PurpleMediaCodec *codec)
 
gchar * purple_media_codec_get_encoding_name (PurpleMediaCodec *codec)
 
guint purple_media_codec_get_clock_rate (PurpleMediaCodec *codec)
 
guint purple_media_codec_get_channels (PurpleMediaCodec *codec)
 
GList * purple_media_codec_get_optional_parameters (PurpleMediaCodec *codec)
 
void purple_media_codec_add_optional_parameter (PurpleMediaCodec *codec, const gchar *name, const gchar *value)
 
void purple_media_codec_remove_optional_parameter (PurpleMediaCodec *codec, PurpleKeyValuePair *param)
 
PurpleKeyValuePairpurple_media_codec_get_optional_parameter (PurpleMediaCodec *codec, const gchar *name, const gchar *value)
 
PurpleMediaCodecpurple_media_codec_copy (PurpleMediaCodec *codec)
 
GList * purple_media_codec_list_copy (GList *codecs)
 
void purple_media_codec_list_free (GList *codecs)
 
gchar * purple_media_codec_to_string (const PurpleMediaCodec *codec)
 

Detailed Description

Codec for Media API

Definition in file codec.h.

Macro Definition Documentation

◆ PURPLE_IS_MEDIA_CODEC

#define PURPLE_IS_MEDIA_CODEC (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_CODEC))

Definition at line 42 of file codec.h.

◆ PURPLE_IS_MEDIA_CODEC_CLASS

#define PURPLE_IS_MEDIA_CODEC_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_CODEC))

Definition at line 43 of file codec.h.

◆ PURPLE_MEDIA_CODEC

#define PURPLE_MEDIA_CODEC (   obj)    (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))

Definition at line 44 of file codec.h.

◆ PURPLE_MEDIA_CODEC_CLASS

#define PURPLE_MEDIA_CODEC_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))

Definition at line 45 of file codec.h.

◆ PURPLE_MEDIA_CODEC_GET_CLASS

#define PURPLE_MEDIA_CODEC_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))

Definition at line 46 of file codec.h.

◆ PURPLE_TYPE_MEDIA_CODEC

#define PURPLE_TYPE_MEDIA_CODEC   (purple_media_codec_get_type())

Definition at line 41 of file codec.h.

Typedef Documentation

◆ PurpleMediaCodec

An opaque structure representing an audio or video codec.

Definition at line 33 of file codec.h.

Function Documentation

◆ purple_media_codec_add_optional_parameter()

void purple_media_codec_add_optional_parameter ( PurpleMediaCodec codec,
const gchar *  name,
const gchar *  value 
)

Adds an optional parameter to the codec.

Parameters
codecThe codec to add the parameter to.
nameThe name of the parameter to add.
valueThe value of the parameter to add.
Since
2.6.0

Definition at line 277 of file codec.c.

References _PurpleKeyValuePair::key, name, NULL, _PurpleMediaCodecPrivate::optional_params, PURPLE_MEDIA_CODEC_GET_PRIVATE, _PurpleKeyValuePair::value, and value.

Referenced by purple_media_codec_copy().

◆ purple_media_codec_copy()

◆ purple_media_codec_get_channels()

guint purple_media_codec_get_channels ( PurpleMediaCodec codec)

Gets the number of channels.

Parameters
Thecodec to get the number of channels from.
Returns
The number of channels.
Since
2.6.0

Definition at line 259 of file codec.c.

References NULL, and PURPLE_IS_MEDIA_CODEC.

◆ purple_media_codec_get_clock_rate()

guint purple_media_codec_get_clock_rate ( PurpleMediaCodec codec)

Gets the clock rate.

Parameters
Thecodec to get the clock rate from.
Returns
The clock rate.
Since
2.6.0

Definition at line 250 of file codec.c.

References NULL, and PURPLE_IS_MEDIA_CODEC.

◆ purple_media_codec_get_encoding_name()

gchar* purple_media_codec_get_encoding_name ( PurpleMediaCodec codec)

Gets the encoding name.

Parameters
Thecodec to get the encoding name from.
Returns
The encoding name.
Since
2.6.0

Definition at line 241 of file codec.c.

References name, NULL, and PURPLE_IS_MEDIA_CODEC.

◆ purple_media_codec_get_id()

guint purple_media_codec_get_id ( PurpleMediaCodec codec)

Gets the codec id.

Parameters
Thecodec to get the id from.
Returns
The codec id.
Since
2.6.0

Definition at line 232 of file codec.c.

References NULL, and PURPLE_IS_MEDIA_CODEC.

◆ purple_media_codec_get_optional_parameter()

PurpleKeyValuePair* purple_media_codec_get_optional_parameter ( PurpleMediaCodec codec,
const gchar *  name,
const gchar *  value 
)

Gets an optional parameter based on the values given.

Parameters
codecThe codec to find the parameter in.
nameThe name of the parameter to search for.
valueThe value to search for or NULL.
Returns
The value found or NULL.
Since
2.6.0

Definition at line 314 of file codec.c.

References _PurpleKeyValuePair::key, name, NULL, _PurpleMediaCodecPrivate::optional_params, PURPLE_MEDIA_CODEC_GET_PRIVATE, _PurpleKeyValuePair::value, and value.

◆ purple_media_codec_get_optional_parameters()

GList* purple_media_codec_get_optional_parameters ( PurpleMediaCodec codec)

Gets a list of the optional parameters.

The list consists of PurpleKeyValuePair's.

Parameters
Thecodec to get the optional parameters from.
Returns
The list of optional parameters. The list is owned by the codec and should not be freed.
Since
2.6.0

Definition at line 268 of file codec.c.

References NULL, and PURPLE_IS_MEDIA_CODEC.

◆ purple_media_codec_get_type()

GType purple_media_codec_get_type ( void  )

Gets the type of the media codec structure.

Returns
The media codec's GType
Since
2.6.0

◆ purple_media_codec_list_copy()

GList* purple_media_codec_list_copy ( GList *  codecs)

Copies a GList of PurpleMediaCodec and its contents.

Parameters
codecsThe list of codecs to be copied.
Returns
The copy of the GList.
Since
2.6.0

Definition at line 363 of file codec.c.

References new_list(), NULL, and purple_media_codec_copy().

◆ purple_media_codec_list_free()

void purple_media_codec_list_free ( GList *  codecs)

Frees a GList of PurpleMediaCodec and its contents.

Parameters
codecsThe list of codecs to be freed.
Since
2.6.0

Definition at line 377 of file codec.c.

◆ purple_media_codec_new()

PurpleMediaCodec* purple_media_codec_new ( int  id,
const char *  encoding_name,
PurpleMediaSessionType  media_type,
guint  clock_rate 
)

Creates a new PurpleMediaCodec instance.

Parameters
idCodec identifier.
encoding_nameName of the media type this encodes.
media_typePurpleMediaSessionType of this codec.
clock_rateThe clock rate this codec encodes at, if applicable.
Returns
The newly created PurpleMediaCodec.
Since
2.6.0

Definition at line 219 of file codec.c.

References NULL, and PURPLE_TYPE_MEDIA_CODEC.

Referenced by purple_media_codec_copy().

◆ purple_media_codec_remove_optional_parameter()

void purple_media_codec_remove_optional_parameter ( PurpleMediaCodec codec,
PurpleKeyValuePair param 
)

Removes an optional parameter from the codec.

Parameters
codecThe codec to remove the parameter from.
paramA pointer to the parameter to remove.
Since
2.6.0

Definition at line 296 of file codec.c.

References _PurpleKeyValuePair::key, NULL, _PurpleMediaCodecPrivate::optional_params, PURPLE_MEDIA_CODEC_GET_PRIVATE, and _PurpleKeyValuePair::value.

◆ purple_media_codec_to_string()

gchar* purple_media_codec_to_string ( const PurpleMediaCodec codec)