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.c File Reference
#include "codec.h"
Include dependency graph for codec.c:

Go to the source code of this file.

Data Structures

struct  _PurpleMediaCodecClass
 
struct  _PurpleMediaCodec
 
struct  _PurpleMediaCodecPrivate
 

Macros

#define PURPLE_MEDIA_CODEC_GET_PRIVATE(obj)
 

Typedefs

typedef struct _PurpleMediaCodecClass PurpleMediaCodecClass
 
typedef struct _PurpleMediaCodecPrivate PurpleMediaCodecPrivate
 

Enumerations

enum  {
  PROP_CODEC_0, PROP_ID, PROP_ENCODING_NAME, PROP_MEDIA_TYPE,
  PROP_CLOCK_RATE, PROP_CHANNELS, PROP_OPTIONAL_PARAMS
}
 

Functions

 G_DEFINE_TYPE (PurpleMediaCodec, purple_media_codec, G_TYPE_OBJECT)
 
static void purple_media_codec_init (PurpleMediaCodec *info)
 
static void purple_media_codec_finalize (GObject *info)
 
static void purple_media_codec_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 
static void purple_media_codec_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 
static void purple_media_codec_class_init (PurpleMediaCodecClass *klass)
 
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.c.

Macro Definition Documentation

◆ PURPLE_MEDIA_CODEC_GET_PRIVATE

#define PURPLE_MEDIA_CODEC_GET_PRIVATE (   obj)
Value:
(G_TYPE_INSTANCE_GET_PRIVATE((obj), \
#define PURPLE_TYPE_MEDIA_CODEC
Definition: codec.h:41

Definition at line 34 of file codec.c.

Typedef Documentation

◆ PurpleMediaCodecClass

Definition at line 30 of file codec.c.

◆ PurpleMediaCodecPrivate

Definition at line 32 of file codec.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PROP_CODEC_0 
PROP_ID 
PROP_ENCODING_NAME 
PROP_MEDIA_TYPE 
PROP_CLOCK_RATE 
PROP_CHANNELS 
PROP_OPTIONAL_PARAMS 

Definition at line 60 of file codec.c.

Function Documentation

◆ G_DEFINE_TYPE()

G_DEFINE_TYPE ( PurpleMediaCodec  ,
purple_media_codec  ,
G_TYPE_OBJECT   
)

◆ 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().

Here is the caller graph for this function:

◆ purple_media_codec_class_init()

◆ purple_media_codec_copy()

◆ purple_media_codec_finalize()

◆ 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_property()

◆ purple_media_codec_init()

static void purple_media_codec_init ( PurpleMediaCodec info)
static

◆ 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().

Here is the caller graph for this function:

◆ 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_set_property()

◆ purple_media_codec_to_string()

gchar* purple_media_codec_to_string ( const PurpleMediaCodec codec)