Mercurial > pidgin
comparison libpurple/media/codec.h @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 02 Jun 2012 02:30:49 +0000 |
parents | 02a2e8183b1d |
children |
comparison
equal
deleted
inserted
replaced
32818:01ff09d4a463 | 32819:2c6510167895 |
---|---|
48 | 48 |
49 /** | 49 /** |
50 * Gets the type of the media codec structure. | 50 * Gets the type of the media codec structure. |
51 * | 51 * |
52 * @return The media codec's GType | 52 * @return The media codec's GType |
53 * | |
54 * @since 2.6.0 | |
55 */ | 53 */ |
56 GType purple_media_codec_get_type(void); | 54 GType purple_media_codec_get_type(void); |
57 | 55 |
58 /** | 56 /** |
59 * Creates a new PurpleMediaCodec instance. | 57 * Creates a new PurpleMediaCodec instance. |
62 * @param encoding_name Name of the media type this encodes. | 60 * @param encoding_name Name of the media type this encodes. |
63 * @param media_type PurpleMediaSessionType of this codec. | 61 * @param media_type PurpleMediaSessionType of this codec. |
64 * @param clock_rate The clock rate this codec encodes at, if applicable. | 62 * @param clock_rate The clock rate this codec encodes at, if applicable. |
65 * | 63 * |
66 * @return The newly created PurpleMediaCodec. | 64 * @return The newly created PurpleMediaCodec. |
67 * | |
68 * @since 2.6.0 | |
69 */ | 65 */ |
70 PurpleMediaCodec *purple_media_codec_new(int id, const char *encoding_name, | 66 PurpleMediaCodec *purple_media_codec_new(int id, const char *encoding_name, |
71 PurpleMediaSessionType media_type, guint clock_rate); | 67 PurpleMediaSessionType media_type, guint clock_rate); |
72 | 68 |
73 /** | 69 /** |
74 * Gets the codec id. | 70 * Gets the codec id. |
75 * | 71 * |
76 * @param The codec to get the id from. | 72 * @param The codec to get the id from. |
77 * | 73 * |
78 * @return The codec id. | 74 * @return The codec id. |
79 * | |
80 * @since 2.6.0 | |
81 */ | 75 */ |
82 guint purple_media_codec_get_id(PurpleMediaCodec *codec); | 76 guint purple_media_codec_get_id(PurpleMediaCodec *codec); |
83 | 77 |
84 /** | 78 /** |
85 * Gets the encoding name. | 79 * Gets the encoding name. |
86 * | 80 * |
87 * @param The codec to get the encoding name from. | 81 * @param The codec to get the encoding name from. |
88 * | 82 * |
89 * @return The encoding name. | 83 * @return The encoding name. |
90 * | |
91 * @since 2.6.0 | |
92 */ | 84 */ |
93 gchar *purple_media_codec_get_encoding_name(PurpleMediaCodec *codec); | 85 gchar *purple_media_codec_get_encoding_name(PurpleMediaCodec *codec); |
94 | 86 |
95 /** | 87 /** |
96 * Gets the clock rate. | 88 * Gets the clock rate. |
97 * | 89 * |
98 * @param The codec to get the clock rate from. | 90 * @param The codec to get the clock rate from. |
99 * | 91 * |
100 * @return The clock rate. | 92 * @return The clock rate. |
101 * | |
102 * @since 2.6.0 | |
103 */ | 93 */ |
104 guint purple_media_codec_get_clock_rate(PurpleMediaCodec *codec); | 94 guint purple_media_codec_get_clock_rate(PurpleMediaCodec *codec); |
105 | 95 |
106 /** | 96 /** |
107 * Gets the number of channels. | 97 * Gets the number of channels. |
108 * | 98 * |
109 * @param The codec to get the number of channels from. | 99 * @param The codec to get the number of channels from. |
110 * | 100 * |
111 * @return The number of channels. | 101 * @return The number of channels. |
112 * | |
113 * @since 2.6.0 | |
114 */ | 102 */ |
115 guint purple_media_codec_get_channels(PurpleMediaCodec *codec); | 103 guint purple_media_codec_get_channels(PurpleMediaCodec *codec); |
116 | 104 |
117 /** | 105 /** |
118 * Gets a list of the optional parameters. | 106 * Gets a list of the optional parameters. |
121 * | 109 * |
122 * @param The codec to get the optional parameters from. | 110 * @param The codec to get the optional parameters from. |
123 * | 111 * |
124 * @return The list of optional parameters. The list is owned by the codec and | 112 * @return The list of optional parameters. The list is owned by the codec and |
125 * should not be freed. | 113 * should not be freed. |
126 * | |
127 * @since 2.6.0 | |
128 */ | 114 */ |
129 GList *purple_media_codec_get_optional_parameters(PurpleMediaCodec *codec); | 115 GList *purple_media_codec_get_optional_parameters(PurpleMediaCodec *codec); |
130 | 116 |
131 /** | 117 /** |
132 * Adds an optional parameter to the codec. | 118 * Adds an optional parameter to the codec. |
133 * | 119 * |
134 * @param codec The codec to add the parameter to. | 120 * @param codec The codec to add the parameter to. |
135 * @param name The name of the parameter to add. | 121 * @param name The name of the parameter to add. |
136 * @param value The value of the parameter to add. | 122 * @param value The value of the parameter to add. |
137 * | |
138 * @since 2.6.0 | |
139 */ | 123 */ |
140 void purple_media_codec_add_optional_parameter(PurpleMediaCodec *codec, | 124 void purple_media_codec_add_optional_parameter(PurpleMediaCodec *codec, |
141 const gchar *name, const gchar *value); | 125 const gchar *name, const gchar *value); |
142 | 126 |
143 /** | 127 /** |
144 * Removes an optional parameter from the codec. | 128 * Removes an optional parameter from the codec. |
145 * | 129 * |
146 * @param codec The codec to remove the parameter from. | 130 * @param codec The codec to remove the parameter from. |
147 * @param param A pointer to the parameter to remove. | 131 * @param param A pointer to the parameter to remove. |
148 * | |
149 * @since 2.6.0 | |
150 */ | 132 */ |
151 void purple_media_codec_remove_optional_parameter(PurpleMediaCodec *codec, | 133 void purple_media_codec_remove_optional_parameter(PurpleMediaCodec *codec, |
152 PurpleKeyValuePair *param); | 134 PurpleKeyValuePair *param); |
153 | 135 |
154 /** | 136 /** |
157 * @param codec The codec to find the parameter in. | 139 * @param codec The codec to find the parameter in. |
158 * @param name The name of the parameter to search for. | 140 * @param name The name of the parameter to search for. |
159 * @param value The value to search for or NULL. | 141 * @param value The value to search for or NULL. |
160 * | 142 * |
161 * @return The value found or NULL. | 143 * @return The value found or NULL. |
162 * | |
163 * @since 2.6.0 | |
164 */ | 144 */ |
165 PurpleKeyValuePair *purple_media_codec_get_optional_parameter( | 145 PurpleKeyValuePair *purple_media_codec_get_optional_parameter( |
166 PurpleMediaCodec *codec, const gchar *name, | 146 PurpleMediaCodec *codec, const gchar *name, |
167 const gchar *value); | 147 const gchar *value); |
168 | 148 |
170 * Copies a PurpleMediaCodec object. | 150 * Copies a PurpleMediaCodec object. |
171 * | 151 * |
172 * @param codec The codec to copy. | 152 * @param codec The codec to copy. |
173 * | 153 * |
174 * @return The copy of the codec. | 154 * @return The copy of the codec. |
175 * | |
176 * @since 2.7.0 | |
177 */ | 155 */ |
178 PurpleMediaCodec *purple_media_codec_copy(PurpleMediaCodec *codec); | 156 PurpleMediaCodec *purple_media_codec_copy(PurpleMediaCodec *codec); |
179 | 157 |
180 /** | 158 /** |
181 * Copies a GList of PurpleMediaCodec and its contents. | 159 * Copies a GList of PurpleMediaCodec and its contents. |
182 * | 160 * |
183 * @param codecs The list of codecs to be copied. | 161 * @param codecs The list of codecs to be copied. |
184 * | 162 * |
185 * @return The copy of the GList. | 163 * @return The copy of the GList. |
186 * | |
187 * @since 2.6.0 | |
188 */ | 164 */ |
189 GList *purple_media_codec_list_copy(GList *codecs); | 165 GList *purple_media_codec_list_copy(GList *codecs); |
190 | 166 |
191 /** | 167 /** |
192 * Frees a GList of PurpleMediaCodec and its contents. | 168 * Frees a GList of PurpleMediaCodec and its contents. |
193 * | 169 * |
194 * @param codecs The list of codecs to be freed. | 170 * @param codecs The list of codecs to be freed. |
195 * | |
196 * @since 2.6.0 | |
197 */ | 171 */ |
198 void purple_media_codec_list_free(GList *codecs); | 172 void purple_media_codec_list_free(GList *codecs); |
199 | 173 |
200 /** | 174 /** |
201 * Creates a string representation of the codec. | 175 * Creates a string representation of the codec. |
202 * | 176 * |
203 * @param codec The codec to create the string of. | 177 * @param codec The codec to create the string of. |
204 * | 178 * |
205 * @return The new string representation. | 179 * @return The new string representation. |
206 * | |
207 * @since 2.6.0 | |
208 */ | 180 */ |
209 gchar *purple_media_codec_to_string(const PurpleMediaCodec *codec); | 181 gchar *purple_media_codec_to_string(const PurpleMediaCodec *codec); |
210 | 182 |
211 G_END_DECLS | 183 G_END_DECLS |
212 | 184 |