oRTP  0.23.0
rtpsession_priv.h
1 /*
2  The oRTP library is an RTP (Realtime Transport Protocol - rfc3550) stack.
3  Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org
4 
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.
9 
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.
14 
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
18 */
19 
20 #ifndef rtpsession_priv_h
21 #define rtpsession_priv_h
22 
23 #include "ortp/rtpsession.h"
24 
25 typedef enum {
26  RTP_SESSION_RECV_SYNC=1, /* the rtp session is synchronising in the incoming stream */
27  RTP_SESSION_FIRST_PACKET_DELIVERED=1<<1,
28  RTP_SESSION_SCHEDULED=1<<2,/* the scheduler controls this session*/
29  RTP_SESSION_BLOCKING_MODE=1<<3, /* in blocking mode */
30  RTP_SESSION_RECV_NOT_STARTED=1<<4, /* the application has not started to try to recv */
31  RTP_SESSION_SEND_NOT_STARTED=1<<5, /* the application has not started to send something */
32  RTP_SESSION_IN_SCHEDULER=1<<6, /* the rtp session is in the scheduler list */
33  RTP_SESSION_USING_EXT_SOCKETS=1<<7, /* the session is using externaly supplied sockets */
34  RTP_SOCKET_CONNECTED=1<<8,
35  RTCP_SOCKET_CONNECTED=1<<9,
36  RTP_SESSION_USING_TRANSPORT=1<<10,
37  RTCP_OVERRIDE_LOST_PACKETS=1<11,
38  RTCP_OVERRIDE_JITTER=1<<12,
39  RTCP_OVERRIDE_DELAY=1<<13
40 }RtpSessionFlags;
41 
42 #define rtp_session_using_transport(s, stream) (((s)->flags & RTP_SESSION_USING_TRANSPORT) && (s->stream.tr != 0))
43 
44 int rtp_session_rtp_recv_abstract(ortp_socket_t socket, mblk_t *msg, int flags, struct sockaddr *from, socklen_t *fromlen);
45 
46 void rtp_session_update_payload_type(RtpSession * session, int pt);
47 void rtp_putq(queue_t *q, mblk_t *mp);
48 mblk_t * rtp_getq(queue_t *q, uint32_t ts, int *rejected);
49 int rtp_session_rtp_recv(RtpSession * session, uint32_t ts);
50 int rtp_session_rtcp_recv(RtpSession * session);
51 int rtp_session_rtp_send (RtpSession * session, mblk_t * m);
52 int rtp_session_rtcp_send (RtpSession * session, mblk_t * m);
53 
54 void rtp_session_rtp_parse(RtpSession *session, mblk_t *mp, uint32_t local_str_ts, struct sockaddr *addr, socklen_t addrlen);
55 void rtp_session_rtcp_parse(RtpSession *session, mblk_t *mp);
56 
57 mblk_t * rtp_session_network_simulate(RtpSession *session, mblk_t *input);
58 void ortp_network_simulator_destroy(OrtpNetworkSimulatorCtx *sim);
59 
60 #endif
Definition: rtpsession.h:201
Definition: str_utils.h:49
Definition: str_utils.h:75
Definition: rtpsession.h:109
The RtpSession api.