~ubuntu-branches/ubuntu/saucy/sflphone/saucy

« back to all changes in this revision

Viewing changes to sflphone-client-gnome/src/codeclist.h

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2010-12-24 16:33:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101224163355-tkvvikqxbrbav6up
Tags: 0.9.11-1
* New upstream release
* Add new build dependencies on libwebkit-dev and libyaml-dev

* Bump Standards-Version up to 3.9.1
* Bump debhelper compatibility to 8
* Patch another typo in the upstream code (lintian notice)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
3
3
 *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.net>
4
 
 *                                                                              
 
4
 *
5
5
 *  This program is free software; you can redistribute it and/or modify
6
6
 *  it under the terms of the GNU General Public License as published by
7
7
 *  the Free Software Foundation; either version 3 of the License, or
8
8
 *  (at your option) any later version.
9
 
 *                                                                                
 
9
 *
10
10
 *  This program is distributed in the hope that it will be useful,
11
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
13
 *  GNU General Public License for more details.
14
 
 *                                                                              
 
14
 *
15
15
 *  You should have received a copy of the GNU General Public License
16
16
 *  along with this program; if not, write to the Free Software
17
17
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
38
38
  */
39
39
 
40
40
typedef struct {
41
 
  /** Payload of the codec */
42
 
  gint _payload;
43
 
  /** Tells if the codec has been activated */
44
 
  gboolean is_active;
45
 
  /** String description */
46
 
  gchar * name;
47
 
  /** Sample rate */
48
 
  int sample_rate;
49
 
  /** Bitrate */
50
 
  gdouble _bitrate;
51
 
  /** Bandwidth */
52
 
  gdouble _bandwidth;
53
 
}codec_t;
 
41
    /** Payload of the codec */
 
42
    gint _payload;
 
43
    /** Tells if the codec has been activated */
 
44
    gboolean is_active;
 
45
    /** String description */
 
46
    gchar * name;
 
47
    /** Sample rate */
 
48
    int sample_rate;
 
49
    /** Bitrate */
 
50
    gdouble _bitrate;
 
51
    /** Bandwidth */
 
52
    gdouble _bandwidth;
 
53
} codec_t;
54
54
 
55
55
/** @struct codec_t
56
56
  * @brief Codec information.
58
58
  * This match how the server internally works and the dbus API to save and retrieve the codecs details.
59
59
  */
60
60
 
61
 
/** 
62
 
 * This function initialize a specific codec list. 
 
61
/**
 
62
 * This function initialize a specific codec list.
63
63
 */
64
64
void codec_list_init (GQueue **q);
65
65
 
66
 
/** 
67
 
 * This function initialize the system wide codec list. 
 
66
/**
 
67
 * This function initialize the system wide codec list.
68
68
 */
69
69
void codec_capabilities_load (void);
70
70
 
71
 
/** 
72
 
 * This function empty and free a specific codec list. 
 
71
/**
 
72
 * This function empty and free a specific codec list.
73
73
 */
74
74
void codec_list_clear (GQueue **q);
75
75
 
76
 
/** 
77
 
 * This function empty and free the system wide codec list. 
 
76
/**
 
77
 * This function empty and free the system wide codec list.
78
78
 */
79
79
void system_codec_list_clear (void);
80
80
 
81
 
/** 
82
 
 * This function append an codec to list. 
83
 
 * @param c The codec you want to add 
 
81
/**
 
82
 * This function append an codec to list.
 
83
 * @param c The codec you want to add
84
84
 */
85
85
void codec_list_add (codec_t * c, GQueue **q);
86
86
 
94
94
 * Set a codec inactive. An active codec won't be used for codec negociation
95
95
 * @param name The string description of the codec
96
96
 */
97
 
void codec_set_inactive(codec_t **c);
 
97
void codec_set_inactive (codec_t **c);
98
98
 
99
 
/** 
 
99
/**
100
100
 * Return the number of codecs in the list
101
 
 * @return guint The number of codecs in the list 
 
101
 * @return guint The number of codecs in the list
102
102
 */
103
103
guint codec_list_get_size();
104
104
 
105
 
/** 
106
 
 * Return the codec structure that corresponds to the string description 
 
105
/**
 
106
 * Return the codec structure that corresponds to the string description
107
107
 * @param name The string description of the codec
108
 
 * @return codec_t* A codec or NULL 
 
108
 * @return codec_t* A codec or NULL
109
109
 */
110
 
codec_t * codec_list_get_by_name(gconstpointer name, GQueue *q);
 
110
codec_t * codec_list_get_by_name (gconstpointer name, GQueue *q);
111
111
 
112
 
/** 
 
112
/**
113
113
 * Return the codec at the nth position in the list
114
114
 * @param index The position of the codec you want
115
 
 * @return codec_t* A codec or NULL 
 
115
 * @return codec_t* A codec or NULL
116
116
 */
117
117
codec_t* codec_list_get_nth (guint index, GQueue *q);
118
118
codec_t* capabilities_get_nth (guint index);
120
120
/**
121
121
 * Set the prefered codec first in the codec list
122
122
 * @param index The position in the list of the prefered codec
123
 
 */ 
 
123
 */
124
124
void codec_set_prefered_order (guint index, GQueue *q);
125
125
 
126
 
/** 
 
126
/**
127
127
 * Move the codec from an unit up in the codec_list
128
128
 * @param index The current index in the list
129
129
 */
130
130
void codec_list_move_codec_up (guint index, GQueue **q);
131
131
 
132
 
/** 
 
132
/**
133
133
 * Move the codec from an unit down in the codec_list
134
134
 * @param index The current index in the list
135
135
 */
145
145
GQueue* get_system_codec_list (void);
146
146
 
147
147
/**
148
 
 * Instanciate a new codecs with the given payload. 
 
148
 * Instanciate a new codecs with the given payload.
149
149
 * Fetches codec specification through D-Bus
150
150
 *
151
151
 * @param payload               The unique RTP payload