]> sjero.net Git - linphone/blob - media_api/media_api.c
8746e9b0cd0175bd4ac0d658834addd5b964ca53
[linphone] / media_api / media_api.c
1 /*\r
2         The objective of the media_api is to construct and run the necessary processing \r
3         on audio and video data flows for a given call (two party call) or conference.\r
4         Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
5 \r
6         This library is free software; you can redistribute it and/or\r
7         modify it under the terms of the GNU Lesser General Public\r
8         License as published by the Free Software Foundation; either\r
9         version 2.1 of the License, or (at your option) any later version.\r
10 \r
11         This library is distributed in the hope that it will be useful,\r
12         but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
14         Lesser General Public License for more details.\r
15 \r
16         You should have received a copy of the GNU Lesser General Public\r
17         License along with this library; if not, write to the Free Software\r
18         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
19 */\r
20
21 #include "media_api.h"
22
23 /* non-standard payload types for oRTP */
24 PayloadType lpc1015={
25     PAYLOAD_AUDIO_PACKETIZED,
26     8000,
27     0,
28     NULL,
29     0,
30     2400,
31     "1015/8000/1"
32 };
33
34 PayloadType speex_nb={
35     PAYLOAD_AUDIO_PACKETIZED,
36     8000,
37     0,
38     NULL,
39     0,
40     15000,
41     "speex/8000/1"
42 };
43
44 PayloadType speex_nb_lbr={
45     PAYLOAD_AUDIO_PACKETIZED,
46     8000,
47     0,
48     NULL,
49     0,
50     8000,
51     "speex-lbr/8000/1"
52 };
53
54 void media_api_init()
55 {
56         ortp_init();
57         ortp_set_debug_file("oRTP",NULL);
58         rtp_profile_set_payload(&av_profile,115,&lpc1015);
59         rtp_profile_set_payload(&av_profile,110,&speex_nb);
60         rtp_profile_set_payload(&av_profile,111,&speex_nb_lbr);
61         rtp_profile_set_payload(&av_profile,101,&telephone_event);
62         ms_init();
63         ms_speex_codec_init();
64 #ifdef HAVE_AVCODEC
65         ms_AVCodec_init();
66 #endif
67 }
68
69