Mercurial > pidgin
annotate src/mediastreamer/mscodec.h @ 12749:13276711babc
[gaim-migrate @ 15096]
This allows us to access the errors, I might need to do something with the blocking for this.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Sat, 07 Jan 2006 06:30:27 +0000 |
parents | fc464a0abccc |
children |
rev | line source |
---|---|
12024 | 1 /* |
2 The mediastreamer library aims at providing modular media processing and I/O | |
3 for linphone, but also for any telephony application. | |
4 Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org | |
5 | |
6 This library is free software; you can redistribute it and/or | |
7 modify it under the terms of the GNU Lesser General Public | |
8 License as published by the Free Software Foundation; either | |
9 version 2.1 of the License, or (at your option) any later version. | |
10 | |
11 This library is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 Lesser General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU Lesser General Public | |
17 License along with this library; if not, write to the Free Software | |
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 */ | |
20 | |
21 #ifndef MSCODEC_H | |
22 #define MSCODEC_H | |
23 | |
24 #include "msfilter.h" | |
25 | |
26 struct _MSCodecInfo | |
27 { | |
28 MSFilterInfo info; | |
29 MSFilterNewFunc encoder; | |
30 MSFilterNewFunc decoder; | |
31 gint fr_size; /* size in char of the uncompressed frame */ | |
32 gint dt_size; /* size in char of the compressed frame */ | |
33 gint bitrate; /* the minimum bit rate in bits/second */ | |
34 gint rate; /*frequency */ | |
35 gint pt; /* the payload type number associated with this codec*/ | |
36 gchar *description; /* a rtpmap field to describe the codec */ | |
37 guint is_usable:1; /* linphone set this flag to remember if it can use this codec considering the total bandwidth*/ | |
38 guint is_selected:1; /* linphone (user) set this flag if he allows this codec to be used*/ | |
39 }; | |
40 | |
41 typedef struct _MSCodecInfo MSCodecInfo; | |
42 | |
43 MSFilter * ms_encoder_new(gchar *name); | |
44 MSFilter * ms_decoder_new(gchar *name); | |
45 | |
46 MSFilter * ms_encoder_new_with_pt(gint pt); | |
47 MSFilter * ms_decoder_new_with_pt(gint pt); | |
48 | |
49 MSFilter * ms_encoder_new_with_string_id(gchar *id); | |
50 MSFilter * ms_decoder_new_with_string_id(gchar *id); | |
51 | |
52 /* return 0 if codec can be used with bandwidth, -1 else*/ | |
53 int ms_codec_is_usable(MSCodecInfo *codec,double bandwidth); | |
54 | |
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
12024
diff
changeset
|
55 GList * ms_codec_get_all_audio(void); |
12024 | 56 |
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
12024
diff
changeset
|
57 GList * ms_codec_get_all_video(void); |
12024 | 58 |
59 MSCodecInfo * ms_audio_codec_info_get(gchar *name); | |
60 MSCodecInfo * ms_video_codec_info_get(gchar *name); | |
61 | |
62 /* register all statically linked codecs */ | |
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
12024
diff
changeset
|
63 void ms_codec_register_all(void); |
12024 | 64 |
65 #define MS_CODEC_INFO(codinfo) ((MSCodecInfo*)codinfo) | |
66 | |
67 #endif |