2
The oRTP library is an RTP (Realtime Transport Protocol - rfc1889) stack.
3
Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
15
You should have received a copy of the GNU Lesser General Public
16
License along with this library; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
PAYLOAD_TYPE_ALLOCATED = 1
31
#define PAYLOAD_AUDIO_CONTINUOUS 0
32
#define PAYLOAD_AUDIO_PACKETIZED 1
33
#define PAYLOAD_VIDEO 2
34
#define PAYLOAD_OTHER 3 /* ?? */
36
double bytes_per_sample; /* in case of continuous audio data */
39
/* other usefull information */
40
gint normal_bitrate; /*in bit/s */
42
PayloadTypeFlags flags;
46
#ifndef PayloadType_defined
47
#define PayloadType_defined
48
typedef struct _PayloadType PayloadType;
51
PayloadType *payload_type_new();
52
PayloadType *payload_type_clone(PayloadType *payload);
53
void payload_type_destroy(PayloadType *pt);
54
#define payload_type_set_flag(pt,flag) (pt)->flags|=(flag)
55
#define payload_type_unset_flag(pt,flag) (pt)->flags&=(~flag)
60
PayloadType *payload[127];
64
typedef struct _RtpProfile RtpProfile;
67
extern RtpProfile av_profile;
69
#define payload_type_set_user_data(pt,p) (pt)->user_data=(p)
70
#define payload_type_get_user_data(pt) ((pt)->user_data)
74
#define rtp_profile_get_name(profile) (profile)->name
75
#define rtp_profile_set_name(profile,nm) (profile)->name=(nm)
76
#define rtp_profile_set_payload(profile,index,pt) (profile)->payload[(index)]=(pt)
77
#define rtp_profile_clear_payload(profile,index) (profile)->payload[(index)]=NULL
78
#define rtp_profile_clear_all(profile) memset((void*)(profile),0,sizeof(RtpProfile))
79
#define rtp_profile_get_payload(profile,index) ((profile)->payload[(index)])
80
PayloadType * rtp_profile_get_payload_from_mime(RtpProfile *profile,const char *mime);
81
PayloadType * rtp_profile_get_payload_from_rtpmap(RtpProfile *profile, const char *rtpmap);
82
gint rtp_profile_get_payload_number_from_mime(RtpProfile *profile,const char *mime);
83
gint rtp_profile_get_payload_number_from_rtpmap(RtpProfile *profile, const char *rtpmap);
84
gint rtp_profile_find_payload_number(RtpProfile *prof,const gchar *mime,int rate);
85
PayloadType * rtp_profile_find_payload(RtpProfile *prof,const gchar *mime,int rate);
86
gint rtp_profile_move_payload(RtpProfile *prof,int oldpos,int newpos);
88
RtpProfile * rtp_profile_new(char *name);
89
/*clone a profile and its payloads */
90
RtpProfile * rtp_profile_clone_full(RtpProfile *prof);
91
void rtp_profile_destroy(RtpProfile *prof);
93
/* some payload types */
95
extern PayloadType pcmu8000;
96
extern PayloadType pcma8000;
97
extern PayloadType pcm8000;
98
extern PayloadType lpc1016;
99
extern PayloadType gsm;
100
extern PayloadType lpc1015;
101
extern PayloadType speex_nb;
102
extern PayloadType speex_wb;
103
extern PayloadType truespeech;
106
extern PayloadType mpv;
107
extern PayloadType h261;