2
The oRTP library is an RTP (Realtime Transport Protocol - rfc3550) 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
23
#include <ortp/str_utils.h>
25
typedef mblk_t OrtpEvent;
27
typedef unsigned long OrtpEventType;
29
typedef struct RtpEndpoint{
31
struct sockaddr_storage addr;
39
struct _OrtpEventData{
40
mblk_t *packet; /* most events are associated to a received packet */
48
typedef struct _OrtpEventData OrtpEventData;
56
RtpEndpoint *rtp_endpoint_new(struct sockaddr *addr, socklen_t addrlen);
57
RtpEndpoint *rtp_endpoint_dup(const RtpEndpoint *ep);
59
OrtpEvent * ortp_event_new(OrtpEventType tp);
60
OrtpEventType ortp_event_get_type(const OrtpEvent *ev);
61
/* type is one of the following*/
62
#define ORTP_EVENT_STUN_PACKET_RECEIVED 1
63
#define ORTP_EVENT_PAYLOAD_TYPE_CHANGED 2
64
#define ORTP_EVENT_TELEPHONE_EVENT 3
65
#define ORTP_EVENT_RTCP_PACKET_RECEIVED 4
66
OrtpEventData * ortp_event_get_data(OrtpEvent *ev);
67
void ortp_event_destroy(OrtpEvent *ev);
68
OrtpEvent *ortp_event_dup(OrtpEvent *ev);
70
typedef struct OrtpEvQueue{
75
OrtpEvQueue * ortp_ev_queue_new(void);
76
void ortp_ev_queue_destroy(OrtpEvQueue *q);
77
OrtpEvent * ortp_ev_queue_get(OrtpEvQueue *q);
78
void ortp_ev_queue_flush(OrtpEvQueue * qp);