oRTP: /usr/obj/ports_mfs/ortp-0.24.2/ortp-0.24.2/include/ortp/rtpsession.h Source File

oRTP 0.24.2

- Main Page
- Data Structures
- Files

- File List
- Globals

rtpsession.h
Go to the documentation of this file.
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
30 #ifndef RTPSESSION_H
31 #define RTPSESSION_H
32
33
34 #include <ortp/port.h>
35 #include <ortp/rtp.h>
36 #include <ortp/payloadtype.h>
37 #include <ortp/rtpprofile.h>
38 #include <ortp/sessionset.h>
39 #include <ortp/rtcp.h>
40 #include <ortp/str_utils.h>
41 #include <ortp/rtpsignaltable.h>
42 #include <ortp/event.h>
43
44
45 #define ORTP_AVPF_FEATURE_NONE 0
46 #define ORTP_AVPF_FEATURE_TMMBR (1 << 0)
47
48
49 typedef enum {
50 RTP_SESSION_RECVONLY,
51 RTP_SESSION_SENDONLY,
52 RTP_SESSION_SENDRECV
53 } RtpSessionMode;
54
55
58 typedef struct _JBParameters{
59 int min_size;
60 int nom_size;
61 int max_size;
62 bool_t adaptive;
63 bool_t pad[3];
64 int max_packets;
65 } JBParameters;
66
67 typedef struct _JitterControl
68 {
69 unsigned int count;
70 int jitt_comp; /* the user jitt_comp in miliseconds*/
71 int jitt_comp_ts; /* the jitt_comp converted in rtp time (same unit as timestamp) */
72 int adapt_jitt_comp_ts;
73 int64_t slide;
74 int64_t prev_slide;
75 float jitter;
76 int olddiff;
77 float inter_jitter; /* interarrival jitter as defined in the RFC */
78 int corrective_step;
79 int corrective_slide;
80 uint64_t cum_jitter_buffer_size; /*in timestamp units*/
81 unsigned int cum_jitter_buffer_count; /*used for computation of jitter buffer size*/
82 int clock_rate;
83 bool_t adaptive;
84 bool_t enabled;
85 } JitterControl;
86
87 typedef struct _WaitPoint
88 {
89 ortp_mutex_t lock;
90 ortp_cond_t cond;
91 uint32_t time;
92 bool_t wakeup;
93 } WaitPoint;
94
95 typedef struct _RtpTransportModifier
96 {
97 void *data;
98 struct _RtpSession *session;//<back pointer to the owning session, set by oRTP
99 int (*t_process_on_send)(struct _RtpTransportModifier *t, mblk_t *msg);
100 int (*t_process_on_receive)(struct _RtpTransportModifier *t, mblk_t *msg);
101 void (*t_process_on_schedule)(struct _RtpTransportModifier *t); /*invoked each time rtp_session_recvm even is no message are available*/
106 void (*t_destroy)(struct _RtpTransportModifier *transport);
107 } RtpTransportModifier;
108
109 typedef struct _RtpTransport
110 {
111 void *data;
112 struct _RtpSession *session;//<back pointer to the owning session, set by oRTP
113 ortp_socket_t (*t_getsocket)(struct _RtpTransport *t);
114 int (*t_sendto)(struct _RtpTransport *t, mblk_t *msg , int flags, const struct sockaddr *to, socklen_t tolen);
115 int (*t_recvfrom)(struct _RtpTransport *t, mblk_t *msg, int flags, struct sockaddr *from, socklen_t *fromlen);
116 void (*t_close)(struct _RtpTransport *transport, void *userData);
121 void (*t_destroy)(struct _RtpTransport *transport);
122 } RtpTransport;
123
124 typedef enum _OrtpNetworkSimulatorMode{
125 OrtpNetworkSimulatorInvalid=-1,
126 OrtpNetworkSimulatorInbound,
127 OrtpNetworkSimulatorOutbound,
128 OrtpNetworkSimulatorOutboundControlled
130 }OrtpNetworkSimulatorMode;
131
135 typedef struct _OrtpNetworkSimulatorParams{
136 int enabled;
137 float max_bandwidth;
138 int max_buffer_size;
139 float loss_rate;
140 uint32_t latency;
141 float consecutive_loss_probability;
142 float jitter_burst_density;
143 float jitter_strength;
144 OrtpNetworkSimulatorMode mode;
145 }OrtpNetworkSimulatorParams;
146
147 typedef struct _OrtpNetworkSimulatorCtx{
148 OrtpNetworkSimulatorParams params;
149 int bit_budget;
150 int qsize;
151 queue_t q;/*queue used for simulating bandwidth limit*/
152 queue_t latency_q;
153 queue_t send_q; /*used only for OrtpNetworkSimulatorOutbound direction*/
154 struct timeval last_check;
155 uint64_t last_jitter_event;
156 int consecutive_drops;
157 int drops_to_ignore;
158 int drop_by_congestion;
159 int drop_by_loss;
160 int total_count; /*total number of packets gone through the simulator*/
161 ortp_mutex_t mutex;
162 ortp_thread_t thread;
163 bool_t in_jitter_event;
164 bool_t thread_started;
165 }OrtpNetworkSimulatorCtx;
166
167 typedef struct OrtpRtcpSendAlgorithm {
168 uint64_t tn; /* Time of the next scheduled RTCP RR transmission in milliseconds. */
169 uint64_t tp; /* Time of the last scheduled RTCP RR transmission in milliseconds. */
170 uint64_t t_rr_last; /* Time of the last regular RTCP packet sent in milliseconds. */
171 uint32_t T_rr; /* Interval for the scheduling of the next regular RTCP packet. */
172 uint32_t T_max_fb_delay; /* Interval within which a feeback message is considered to be useful to the sender. */
173 uint32_t T_rr_interval; /* Minimal interval to be used between regular RTCP packets. */
174 uint32_t T_rr_current_interval;
175 uint32_t Tmin; /* Minimal interval between RTCP packets. */
176 float avg_rtcp_size;
177 mblk_t *fb_packets;
178 bool_t initialized; /* Whether the RTCP send algorithm is fully initialized. */
179 bool_t initial;
180 bool_t allow_early;
181 bool_t tmmbr_scheduled;
182 bool_t tmmbn_scheduled;
183 } OrtpRtcpSendAlgorithm;
184
185 #define ORTP_RTCP_XR_UNAVAILABLE_PARAMETER 127
186
187 typedef enum {
188 OrtpRtcpXrNoPlc,
189 OrtpRtcpXrSilencePlc,
190 OrtpRtcpXrEnhancedPlc
191 } OrtpRtcpXrPlcStatus;
192
193 typedef OrtpRtcpXrPlcStatus (*OrtpRtcpXrPlcCallback)(unsigned long userdata);
194 typedef int (*OrtpRtcpXrSignalLevelCallback)(unsigned long userdata);
195 typedef int (*OrtpRtcpXrNoiseLevelCallback)(unsigned long userdata);
196 typedef float (*OrtpRtcpXrAverageQualityIndicatorCallback)(unsigned long userdata);
197
198 typedef struct OrtpRtcpXrMediaCallbacks {
199 OrtpRtcpXrPlcCallback plc;
200 OrtpRtcpXrSignalLevelCallback signal_level;
201 OrtpRtcpXrNoiseLevelCallback noise_level;
202 OrtpRtcpXrAverageQualityIndicatorCallback average_qi;
203 OrtpRtcpXrAverageQualityIndicatorCallback average_lq_qi;
204 unsigned long userdata;
205 } OrtpRtcpXrMediaCallbacks;
206
207 typedef enum {
208 OrtpRtcpXrRcvrRttNone,
209 OrtpRtcpXrRcvrRttAll,
210 OrtpRtcpXrRcvrRttSender
211 } OrtpRtcpXrRcvrRttMode;
212
213 typedef enum {
214 OrtpRtcpXrStatSummaryLoss = (1 << 7),
215 OrtpRtcpXrStatSummaryDup = (1 << 6),
216 OrtpRtcpXrStatSummaryJitt = (1 << 5),
217 OrtpRtcpXrStatSummaryTTL = (1 << 3),
218 OrtpRtcpXrStatSummaryHL = (1 << 4)
219 } OrtpRtcpXrStatSummaryFlag;
220
221 typedef struct OrtpRtcpXrConfiguration {
222 bool_t enabled;
223 bool_t stat_summary_enabled;
224 bool_t voip_metrics_enabled;
225 OrtpRtcpXrRcvrRttMode rcvr_rtt_mode;
226 int rcvr_rtt_max_size;
227 OrtpRtcpXrStatSummaryFlag stat_summary_flags;
228 } OrtpRtcpXrConfiguration;
229
230 typedef struct OrtpRtcpXrStats {
231 uint32_t last_rcvr_rtt_ts; /* NTP timestamp (middle 32 bits) of last received XR rcvr-rtt */
232 struct timeval last_rcvr_rtt_time; /* Time at which last XR rcvr-rtt was received */
233 uint16_t rcv_seq_at_last_stat_summary; /* Received sequence number at last XR stat-summary sent */
234 uint32_t rcv_since_last_stat_summary; /* The number of packets received since last XR stat-summary was sent */
235 uint32_t dup_since_last_stat_summary; /* The number of duplicate packets received since last XR stat-summary was sent */
236 uint32_t min_jitter_since_last_stat_summary; /* The minimum value of jitter since last XR stat-summary was sent */
237 uint32_t max_jitter_since_last_stat_summary; /* The maximum value of jitter since last XR stat-summary was sent */
238 double olds_jitter_since_last_stat_summary;
239 double oldm_jitter_since_last_stat_summary;
240 double news_jitter_since_last_stat_summary;
241 double newm_jitter_since_last_stat_summary;
242 int64_t last_jitter_diff_since_last_stat_summary;
243 double olds_ttl_or_hl_since_last_stat_summary;
244 double oldm_ttl_or_hl_since_last_stat_summary;
245 double news_ttl_or_hl_since_last_stat_summary;
246 double newm_ttl_or_hl_since_last_stat_summary;
247 uint8_t min_ttl_or_hl_since_last_stat_summary; /* The minimum value of TTL/HL since last XR stat-summary was sent */
248 uint8_t max_ttl_or_hl_since_last_stat_summary; /* The maximum value of TTL/HL since last XR stat-summary was sent */
249 uint32_t first_rcv_seq;
250 uint32_t last_rcv_seq;
251 uint32_t rcv_count;
252 uint32_t discarded_count;
253 } OrtpRtcpXrStats;
254
255 typedef struct OrtpRtcpTmmbrInfo {
256 mblk_t *sent;
257 mblk_t *received;
258 } OrtpRtcpTmmbrInfo;
259
260 typedef struct _OrtpAddress{
261 struct sockaddr_storage addr;
262 socklen_t len;
263 }OrtpAddress;
264
265 typedef struct _OrtpStream {
266 ortp_socket_t socket;
267 int sockfamily;
268 int loc_port;
269 socklen_t rem_addrlen;
270 struct sockaddr_storage rem_addr;
271 socklen_t loc_addrlen;
272 struct sockaddr_storage loc_addr;
273 struct _RtpTransport *tr;
274 mblk_t *cached_mp;
275 struct timeval send_bw_start; /* used for bandwidth estimation */
276 struct timeval recv_bw_start; /* used for bandwidth estimation */
277 unsigned int sent_bytes; /* used for bandwidth estimation */
278 unsigned int recv_bytes; /* used for bandwidth estimation */
279 float upload_bw;
280 float download_bw;
281 OList *aux_destinations; /*list of OrtpAddress */
282 } OrtpStream;
283
284 typedef struct _RtpStream
285 {
286 OrtpStream gs;
287 int max_rq_size;
288 int time_jump;
289 uint32_t ts_jump;
290 queue_t rq;
291 queue_t tev_rq;
292 void *QoSHandle;
293 unsigned long QoSFlowID;
294 JitterControl jittctl;
295 uint32_t snd_time_offset;/*the scheduler time when the application send its first timestamp*/
296 uint32_t snd_ts_offset; /* the first application timestamp sent by the application */
297 uint32_t snd_rand_offset; /* a random number added to the user offset to make the stream timestamp*/
298 uint32_t snd_last_ts; /* the last stream timestamp sended */
299 uint32_t rcv_time_offset; /*the scheduler time when the application ask for its first timestamp*/
300 uint32_t rcv_ts_offset; /* the first stream timestamp */
301 uint32_t rcv_query_ts_offset; /* the first user timestamp asked by the application */
302 uint32_t rcv_last_ts; /* the last stream timestamp got by the application */
303 uint16_t rcv_last_seq; /* the last stream sequence number got by the application*/
304 uint16_t pad;
305 uint32_t rcv_last_app_ts; /* the last application timestamp asked by the application */
306 uint32_t rcv_last_ret_ts; /* the timestamp of the last sample returned (only for continuous audio)*/
307 uint32_t hwrcv_extseq; /* last received on socket extended sequence number */
308 uint32_t hwrcv_seq_at_last_SR;
309 uint32_t hwrcv_since_last_SR;
310 uint32_t last_rcv_SR_ts; /* NTP timestamp (middle 32 bits) of last received SR */
311 struct timeval last_rcv_SR_time; /* time at which last SR was received */
312 uint16_t snd_seq; /* send sequence number */
313 uint32_t last_rtcp_packet_count; /*the sender's octet count in the last sent RTCP SR*/
314 uint32_t sent_payload_bytes; /*used for RTCP sender reports*/
315 rtp_stats_t stats;
316 int recv_errno;
317 int send_errno;
318 int snd_socket_size;
319 int rcv_socket_size;
320 int ssrc_changed_thres;
321 jitter_stats_t jitter_stats;
322 }RtpStream;
323
324 typedef struct _RtcpStream
325 {
326 OrtpStream gs;
327 OrtpRtcpSendAlgorithm send_algo;
328 OrtpRtcpXrConfiguration xr_conf;
329 OrtpRtcpXrMediaCallbacks xr_media_callbacks;
330 OrtpRtcpTmmbrInfo tmmbr_info;
331 bool_t enabled; /*tells whether we can send RTCP packets */
332 bool_t rtcp_xr_dlrr_to_send;
333 uint8_t rtcp_fb_fir_seq_nr; /* The FIR command sequence number */
334 uint32_t last_rtcp_fb_pli_snt;
335 } RtcpStream;
336
337 typedef struct _RtpSession RtpSession;
338
339
348 struct _RtpSession
349 {
350 RtpSession *next; /* next RtpSession, when the session are enqueued by the scheduler */
351 int mask_pos; /* the position in the scheduler mask of RtpSession : do not move this field: it is part of the ABI since the session_set macros use it*/
352 struct {
353 RtpProfile *profile;
354 int pt;
355 unsigned int ssrc;
356 WaitPoint wp;
357 } snd,rcv;
358 unsigned int inc_ssrc_candidate;
359 int inc_same_ssrc_count;
360 int hw_recv_pt; /* recv payload type before jitter buffer */
361 int recv_buf_size;
362 int target_upload_bandwidth; /* Target upload bandwidth at nework layer (with IP and UDP headers) in bits/s */
363 RtpSignalTable on_ssrc_changed;
364 RtpSignalTable on_payload_type_changed;
365 RtpSignalTable on_telephone_event_packet;
366 RtpSignalTable on_telephone_event;
367 RtpSignalTable on_timestamp_jump;
368 RtpSignalTable on_network_error;
369 RtpSignalTable on_rtcp_bye;
370 struct _OList *signal_tables;
371 struct _OList *eventqs;
372 msgb_allocator_t allocator;
373 RtpStream rtp;
374 RtcpStream rtcp;
375 OrtpRtcpXrStats rtcp_xr_stats;
376 RtpSessionMode mode;
377 struct _RtpScheduler *sched;
378 uint32_t flags;
379 int dscp;
380 int multicast_ttl;
381 int multicast_loopback;
382 float duplication_ratio; /* Number of times a packet should be duplicated */
383 float duplication_left ; /* Remainder of the duplication ratio */
384 void * user_data;
385 /* FIXME: Should be a table for all session participants. */
386 struct timeval last_recv_time; /* Time of receiving the RTP/RTCP packet. */
387 mblk_t *pending;
388 /* telephony events extension */
389 mblk_t *current_tev; /* the pending telephony events */
390 mblk_t *minimal_sdes;
391 mblk_t *full_sdes;
392 queue_t contributing_sources;
393 int64_t lost_packets_test_vector;
394 unsigned int interarrival_jitter_test_vector;
395 unsigned int delay_test_vector;
396 float rtt;/*last round trip delay calculated*/
397 int cum_loss;
398 OrtpNetworkSimulatorCtx *net_sim_ctx;
399 bool_t symmetric_rtp;
400 bool_t permissive; /*use the permissive algorithm*/
401 bool_t use_connect; /* use connect() on the socket */
402 bool_t ssrc_set;
403 bool_t reuseaddr; /*setsockopt SO_REUSEADDR */
404 unsigned char avpf_features;
405 };
406
407
408
409
410 #ifdef __cplusplus
411 extern "C"
412 {
413 #endif
414
415 ORTP_PUBLIC const char *ortp_network_simulator_mode_to_string(OrtpNetworkSimulatorMode mode);
416 ORTP_PUBLIC OrtpNetworkSimulatorMode ortp_network_simulator_mode_from_string(const char *str);
417
418
419 /* public API */
420 ORTP_PUBLIC RtpSession *rtp_session_new(int mode);
421 ORTP_PUBLIC void rtp_session_set_scheduling_mode(RtpSession *session, int yesno);
422 ORTP_PUBLIC void rtp_session_set_blocking_mode(RtpSession *session, int yesno);
423 ORTP_PUBLIC void rtp_session_set_profile(RtpSession *session, RtpProfile *profile);
424 ORTP_PUBLIC void rtp_session_set_send_profile(RtpSession *session,RtpProfile *profile);
425 ORTP_PUBLIC void rtp_session_set_recv_profile(RtpSession *session,RtpProfile *profile);
426 ORTP_PUBLIC RtpProfile *rtp_session_get_profile(RtpSession *session);
427 ORTP_PUBLIC RtpProfile *rtp_session_get_send_profile(RtpSession *session);
428 ORTP_PUBLIC RtpProfile *rtp_session_get_recv_profile(RtpSession *session);
429 ORTP_PUBLIC int rtp_session_signal_connect(RtpSession *session,const char *signal_name, RtpCallback cb, void *user_data);
430 ORTP_PUBLIC int rtp_session_signal_disconnect_by_callback(RtpSession *session,const char *signal_name, RtpCallback cb);
431 ORTP_PUBLIC void rtp_session_set_ssrc(RtpSession *session, uint32_t ssrc);
432 ORTP_PUBLIC uint32_t rtp_session_get_send_ssrc(RtpSession* session);
433 ORTP_PUBLIC uint32_t rtp_session_get_recv_ssrc(RtpSession *session);
434 ORTP_PUBLIC void rtp_session_set_seq_number(RtpSession *session, uint16_t seq);
435 ORTP_PUBLIC uint16_t rtp_session_get_seq_number(RtpSession *session);
436 ORTP_PUBLIC uint32_t rtp_session_get_rcv_ext_seq_number(RtpSession *session);
437 ORTP_PUBLIC int rtp_session_get_cum_loss(RtpSession *session);
438 ORTP_PUBLIC void rtp_session_set_duplication_ratio(RtpSession *session, float ratio);
439
440 ORTP_PUBLIC void rtp_session_enable_jitter_buffer(RtpSession *session , bool_t enabled);
441 ORTP_PUBLIC bool_t rtp_session_jitter_buffer_enabled(const RtpSession *session);
442 ORTP_PUBLIC void rtp_session_set_jitter_buffer_params(RtpSession *session, const JBParameters *par);
443 ORTP_PUBLIC void rtp_session_get_jitter_buffer_params(RtpSession *session, JBParameters *par);
444
445 /*deprecated jitter control functions*/
446 ORTP_PUBLIC void rtp_session_set_jitter_compensation(RtpSession *session, int milisec);
447 ORTP_PUBLIC void rtp_session_enable_adaptive_jitter_compensation(RtpSession *session, bool_t val);
448 ORTP_PUBLIC bool_t rtp_session_adaptive_jitter_compensation_enabled(RtpSession *session);
449
450 ORTP_PUBLIC void rtp_session_set_time_jump_limit(RtpSession *session, int miliseconds);
451 ORTP_PUBLIC int rtp_session_join_multicast_group(RtpSession *session, const char *ip);
452 ORTP_PUBLIC int rtp_session_set_local_addr(RtpSession *session,const char *addr, int rtp_port, int rtcp_port);
453 ORTP_PUBLIC int rtp_session_get_local_port(const RtpSession *session);
454 ORTP_PUBLIC int rtp_session_get_local_rtcp_port(const RtpSession *session);
455
456 ORTP_PUBLIC int
457 rtp_session_set_remote_addr_full (RtpSession * session, const char * rtp_addr, int rtp_port, const char * rtcp_addr, int rtcp_port);
458 /*same as previous function, old name:*/
459 ORTP_PUBLIC int rtp_session_set_remote_addr_and_port (RtpSession * session, const char * addr, int rtp_port, int rtcp_port);
460 ORTP_PUBLIC int rtp_session_set_remote_addr(RtpSession *session,const char *addr, int port);
461 ORTP_PUBLIC int rtp_session_add_aux_remote_addr_full(RtpSession * session, const char * rtp_addr, int rtp_port, const char * rtcp_addr, int rtcp_port);
462 ORTP_PUBLIC void rtp_session_clear_aux_remote_addr(RtpSession * session);
463 /* alternatively to the set_remote_addr() and set_local_addr(), an application can give
464 a valid socket (potentially connect()ed )to be used by the RtpSession */
465 ORTP_PUBLIC void rtp_session_set_sockets(RtpSession *session, int rtpfd, int rtcpfd);
466
467 ORTP_PUBLIC void rtp_session_get_transports(const RtpSession *session, RtpTransport **rtptr, RtpTransport **rtcptr);
468 /*those methods are provided for people who wants to send non-RTP messages using the RTP/RTCP sockets */
469 ORTP_PUBLIC ortp_socket_t rtp_session_get_rtp_socket(const RtpSession *session);
470 ORTP_PUBLIC ortp_socket_t rtp_session_get_rtcp_socket(const RtpSession *session);
471
472
473 /* QOS / DSCP */
474 ORTP_PUBLIC int rtp_session_set_dscp(RtpSession *session, int dscp);
475 ORTP_PUBLIC int rtp_session_get_dscp(const RtpSession *session);
476
477
478 /* Packet info */
479 ORTP_PUBLIC int rtp_session_set_pktinfo(RtpSession *session, int activate);
480
481 /* Multicast methods */
482 ORTP_PUBLIC int rtp_session_set_multicast_ttl(RtpSession *session, int ttl);
483 ORTP_PUBLIC int rtp_session_get_multicast_ttl(RtpSession *session);
484
485 ORTP_PUBLIC int rtp_session_set_multicast_loopback(RtpSession *session, int yesno);
486 ORTP_PUBLIC int rtp_session_get_multicast_loopback(RtpSession *session);
487
488
489
490 ORTP_PUBLIC int rtp_session_set_send_payload_type(RtpSession *session, int paytype);
491 ORTP_PUBLIC int rtp_session_get_send_payload_type(const RtpSession *session);
492
493 ORTP_PUBLIC int rtp_session_get_recv_payload_type(const RtpSession *session);
494 ORTP_PUBLIC int rtp_session_set_recv_payload_type(RtpSession *session, int pt);
495
496 ORTP_PUBLIC int rtp_session_set_payload_type(RtpSession *session, int pt);
497
498 ORTP_PUBLIC void rtp_session_set_symmetric_rtp (RtpSession * session, bool_t yesno);
499
500 ORTP_PUBLIC bool_t rtp_session_get_symmetric_rtp (const RtpSession * session);
501
502 ORTP_PUBLIC void rtp_session_set_connected_mode(RtpSession *session, bool_t yesno);
503
504 ORTP_PUBLIC void rtp_session_enable_rtcp(RtpSession *session, bool_t yesno);
505
506 ORTP_PUBLIC void rtp_session_set_rtcp_report_interval(RtpSession *session, int value_ms);
507
508 ORTP_PUBLIC void rtp_session_set_target_upload_bandwidth(RtpSession *session, int target_bandwidth);
509
510 ORTP_PUBLIC void rtp_session_configure_rtcp_xr(RtpSession *session, const OrtpRtcpXrConfiguration *config);
511 ORTP_PUBLIC void rtp_session_set_rtcp_xr_media_callbacks(RtpSession *session, const OrtpRtcpXrMediaCallbacks *cbs);
512
513 ORTP_PUBLIC void rtp_session_set_ssrc_changed_threshold(RtpSession *session, int numpackets);
514
515 /*low level recv and send functions */
516 ORTP_PUBLIC mblk_t * rtp_session_recvm_with_ts (RtpSession * session, uint32_t user_ts);
517 ORTP_PUBLIC mblk_t * rtp_session_create_packet(RtpSession *session,int header_size, const uint8_t *payload, int payload_size);
518 ORTP_PUBLIC mblk_t * rtp_session_create_packet_raw(const uint8_t *packet, int packet_size);
519 ORTP_PUBLIC mblk_t * rtp_session_create_packet_with_data(RtpSession *session, uint8_t *payload, int payload_size, void (*freefn)(void*));
520 ORTP_PUBLIC mblk_t * rtp_session_create_packet_in_place(RtpSession *session,uint8_t *buffer, int size, void (*freefn)(void*) );
521 ORTP_PUBLIC int rtp_session_sendm_with_ts (RtpSession * session, mblk_t *mp, uint32_t userts);
522 /* high level recv and send functions */
523 ORTP_PUBLIC int rtp_session_recv_with_ts(RtpSession *session, uint8_t *buffer, int len, uint32_t ts, int *have_more);
524 ORTP_PUBLIC int rtp_session_send_with_ts(RtpSession *session, const uint8_t *buffer, int len, uint32_t userts);
525
526 /* event API*/
527 ORTP_PUBLIC void rtp_session_register_event_queue(RtpSession *session, OrtpEvQueue *q);
528 ORTP_PUBLIC void rtp_session_unregister_event_queue(RtpSession *session, OrtpEvQueue *q);
529
530
531 /* IP bandwidth usage estimation functions, returning bits/s*/
532 ORTP_PUBLIC float rtp_session_compute_send_bandwidth(RtpSession *session);
533 ORTP_PUBLIC float rtp_session_compute_recv_bandwidth(RtpSession *session);
534 ORTP_PUBLIC float rtp_session_get_send_bandwidth(RtpSession *session);
535 ORTP_PUBLIC float rtp_session_get_recv_bandwidth(RtpSession *session);
536 ORTP_PUBLIC float rtp_session_get_rtp_send_bandwidth(RtpSession *session);
537 ORTP_PUBLIC float rtp_session_get_rtp_recv_bandwidth(RtpSession *session);
538 ORTP_PUBLIC float rtp_session_get_rtcp_send_bandwidth(RtpSession *session);
539 ORTP_PUBLIC float rtp_session_get_rtcp_recv_bandwidth(RtpSession *session);
540
541 ORTP_PUBLIC void rtp_session_send_rtcp_APP(RtpSession *session, uint8_t subtype, const char *name, const uint8_t *data, int datalen);
542
543 ORTP_PUBLIC uint32_t rtp_session_get_current_send_ts(RtpSession *session);
544 ORTP_PUBLIC uint32_t rtp_session_get_current_recv_ts(RtpSession *session);
545 ORTP_PUBLIC void rtp_session_flush_sockets(RtpSession *session);
546 ORTP_PUBLIC void rtp_session_release_sockets(RtpSession *session);
547 ORTP_PUBLIC void rtp_session_resync(RtpSession *session);
548 ORTP_PUBLIC void rtp_session_reset(RtpSession *session);
549 ORTP_PUBLIC void rtp_session_destroy(RtpSession *session);
550
551 ORTP_PUBLIC const rtp_stats_t * rtp_session_get_stats(const RtpSession *session);
552 ORTP_PUBLIC const jitter_stats_t * rtp_session_get_jitter_stats( const RtpSession *session );
553 ORTP_PUBLIC void rtp_session_reset_stats(RtpSession *session);
554
555 ORTP_PUBLIC void rtp_session_set_data(RtpSession *session, void *data);
556 ORTP_PUBLIC void *rtp_session_get_data(const RtpSession *session);
557
558 ORTP_PUBLIC void rtp_session_set_recv_buf_size(RtpSession *session, int bufsize);
559 ORTP_PUBLIC void rtp_session_set_rtp_socket_send_buffer_size(RtpSession * session, unsigned int size);
560 ORTP_PUBLIC void rtp_session_set_rtp_socket_recv_buffer_size(RtpSession * session, unsigned int size);
561
562 /* in use with the scheduler to convert a timestamp in scheduler time unit (ms) */
563 ORTP_PUBLIC uint32_t rtp_session_ts_to_time(RtpSession *session,uint32_t timestamp);
564 ORTP_PUBLIC uint32_t rtp_session_time_to_ts(RtpSession *session, int millisecs);
565 /* this function aims at simulating senders with "imprecise" clocks, resulting in
566 rtp packets sent with timestamp uncorrelated with the system clock .
567 This is only availlable to sessions working with the oRTP scheduler */
568 ORTP_PUBLIC void rtp_session_make_time_distorsion(RtpSession *session, int milisec);
569
570 /*RTCP functions */
571 ORTP_PUBLIC void rtp_session_set_source_description(RtpSession *session, const char *cname,
572 const char *name, const char *email, const char *phone,
573 const char *loc, const char *tool, const char *note);
574 ORTP_PUBLIC void rtp_session_add_contributing_source(RtpSession *session, uint32_t csrc,
575 const char *cname, const char *name, const char *email, const char *phone,
576 const char *loc, const char *tool, const char *note);
577 /* DEPRECATED: Use rtp_session_remove_contributing_source instead of rtp_session_remove_contributing_sources */
578 #define rtp_session_remove_contributing_sources rtp_session_remove_contributing_source
579 ORTP_PUBLIC void rtp_session_remove_contributing_source(RtpSession *session, uint32_t csrc);
580 ORTP_PUBLIC mblk_t* rtp_session_create_rtcp_sdes_packet(RtpSession *session, bool_t full);
581
582 ORTP_PUBLIC void rtp_session_get_last_recv_time(RtpSession *session, struct timeval *tv);
583 ORTP_PUBLIC int rtp_session_bye(RtpSession *session, const char *reason);
584
585 ORTP_PUBLIC int rtp_session_get_last_send_error_code(RtpSession *session);
586 ORTP_PUBLIC void rtp_session_clear_send_error_code(RtpSession *session);
587 ORTP_PUBLIC int rtp_session_get_last_recv_error_code(RtpSession *session);
588 ORTP_PUBLIC void rtp_session_clear_recv_error_code(RtpSession *session);
589
590
591 ORTP_PUBLIC float rtp_session_get_round_trip_propagation(RtpSession *session);
592
593
594 ORTP_PUBLIC void rtp_session_enable_network_simulation(RtpSession *session, const OrtpNetworkSimulatorParams *params);
595
596 ORTP_PUBLIC void rtp_session_rtcp_set_lost_packet_value( RtpSession *session, const int64_t value );
597 ORTP_PUBLIC void rtp_session_rtcp_set_jitter_value(RtpSession *session, const unsigned int value );
598 ORTP_PUBLIC void rtp_session_rtcp_set_delay_value(RtpSession *session, const unsigned int value );
599 ORTP_PUBLIC mblk_t * rtp_session_pick_with_cseq (RtpSession * session, const uint16_t sequence_number);
600
601
602 ORTP_PUBLIC void rtp_session_send_rtcp_xr_rcvr_rtt(RtpSession *session);
603 ORTP_PUBLIC void rtp_session_send_rtcp_xr_dlrr(RtpSession *session);
604 ORTP_PUBLIC void rtp_session_send_rtcp_xr_stat_summary(RtpSession *session);
605 ORTP_PUBLIC void rtp_session_send_rtcp_xr_voip_metrics(RtpSession *session);
606
607
608 ORTP_PUBLIC bool_t rtp_session_avpf_enabled(RtpSession *session);
609 ORTP_PUBLIC bool_t rtp_session_avpf_payload_type_feature_enabled(RtpSession *session, unsigned char feature);
610 ORTP_PUBLIC bool_t rtp_session_avpf_feature_enabled(RtpSession *session, unsigned char feature);
611 ORTP_PUBLIC void rtp_session_enable_avpf_feature(RtpSession *session, unsigned char feature, bool_t enable);
612 ORTP_PUBLIC uint16_t rtp_session_get_avpf_rr_interval(RtpSession *session);
613 ORTP_PUBLIC bool_t rtp_session_rtcp_psfb_scheduled(RtpSession *session, rtcp_psfb_type_t type);
614 ORTP_PUBLIC bool_t rtp_session_rtcp_rtpfb_scheduled(RtpSession *session, rtcp_rtpfb_type_t type);
615 ORTP_PUBLIC void rtp_session_send_rtcp_fb_pli(RtpSession *session);
616 ORTP_PUBLIC void rtp_session_send_rtcp_fb_fir(RtpSession *session);
617 ORTP_PUBLIC void rtp_session_send_rtcp_fb_sli(RtpSession *session, uint16_t first, uint16_t number, uint8_t picture_id);
618 ORTP_PUBLIC void rtp_session_send_rtcp_fb_rpsi(RtpSession *session, uint8_t *bit_string, uint16_t bit_string_len);
619 ORTP_PUBLIC void rtp_session_send_rtcp_fb_tmmbr(RtpSession *session, uint64_t mxtbr);
620 ORTP_PUBLIC void rtp_session_send_rtcp_fb_tmmbn(RtpSession *session, uint32_t ssrc);
621
622
623 /*private */
624 ORTP_PUBLIC void rtp_session_init(RtpSession *session, int mode);
625 #define rtp_session_set_flag(session,flag) (session)->flags|=(flag)
626 #define rtp_session_unset_flag(session,flag) (session)->flags&=~(flag)
627 ORTP_PUBLIC void rtp_session_uninit(RtpSession *session);
628 ORTP_PUBLIC void rtp_session_dispatch_event(RtpSession *session, OrtpEvent *ev);
629
630 ORTP_PUBLIC void rtp_session_set_reuseaddr(RtpSession *session, bool_t yes);
631
632
633 ORTP_PUBLIC int meta_rtp_transport_modifier_inject_packet(const RtpTransport *t, RtpTransportModifier *tpm, mblk_t *msg , int flags);
645 ORTP_PUBLIC int meta_rtp_transport_modifier_inject_packet_to(const RtpTransport *t, RtpTransportModifier *tpm, mblk_t *msg , int flags,const struct sockaddr *to, socklen_t tolen) ;
646
653 ORTP_PUBLIC RtpTransport* meta_rtp_transport_get_endpoint(const RtpTransport *transport);
660 ORTP_PUBLIC void meta_rtp_transport_set_endpoint(RtpTransport *transport,RtpTransport *endpoint);
661
662 ORTP_PUBLIC void meta_rtp_transport_destroy(RtpTransport *tp);
663 ORTP_PUBLIC void meta_rtp_transport_append_modifier(RtpTransport *tp,RtpTransportModifier *tpm);
664 #ifdef __cplusplus
665 }
666 #endif
667
668 #endif
rtp_session_set_payload_type
ORTP_PUBLIC int rtp_session_set_payload_type(RtpSession *session, int pt)
Definition: rtpsession.c:750
rtp_session_get_send_profile
ORTP_PUBLIC RtpProfile * rtp_session_get_send_profile(RtpSession *session)
Definition: rtpsession.c:483
rtp_session_create_packet_with_data
ORTP_PUBLIC mblk_t * rtp_session_create_packet_with_data(RtpSession *session, uint8_t *payload, int payload_size, void(*freefn)(void *))
Definition: rtpsession.c:831
_RtcpStream
Definition: rtpsession.h:324
OrtpRtcpXrStats
Definition: rtpsession.h:230
OrtpRtcpXrConfiguration
Definition: rtpsession.h:221
rtp_session_rtcp_set_delay_value
ORTP_PUBLIC void rtp_session_rtcp_set_delay_value(RtpSession *session, const unsigned int value)
For test purpose only, simulates a constant RTT (Round Trip Time) value by setting the LSR field with...
Definition: rtpsession.c:1660
rtp_session_set_connected_mode
ORTP_PUBLIC void rtp_session_set_connected_mode(RtpSession *session, bool_t yesno)
Definition: rtpsession.c:1715
meta_rtp_transport_modifier_inject_packet_to
ORTP_PUBLIC int meta_rtp_transport_modifier_inject_packet_to(const RtpTransport *t, RtpTransportModifier *tpm, mblk_t *msg, int flags, const struct sockaddr *to, socklen_t tolen)
Definition: rtpsession.c:2075
rtp_session_get_multicast_ttl
ORTP_PUBLIC int rtp_session_get_multicast_ttl(RtpSession *session)
Definition: rtpsession_inet.c:510
rtp_session_rtcp_set_jitter_value
ORTP_PUBLIC void rtp_session_rtcp_set_jitter_value(RtpSession *session, const unsigned int value)
For test purpose only, sets a constant interarrival_jitter value within all RTCP output packets...
Definition: rtpsession.c:1634
_OrtpNetworkSimulatorParams
Definition: rtpsession.h:135
rtp_session_create_packet_raw
ORTP_PUBLIC mblk_t * rtp_session_create_packet_raw(const uint8_t *packet, int packet_size)
Definition: rtpsession.c:804
rtp_session_get_rcv_ext_seq_number
ORTP_PUBLIC uint32_t rtp_session_get_rcv_ext_seq_number(RtpSession *session)
Definition: rtpsession.c:623
_JBParameters::max_packets
int max_packets
Definition: rtpsession.h:64
rtp_session_get_dscp
ORTP_PUBLIC int rtp_session_get_dscp(const RtpSession *session)
Definition: rtpsession_inet.c:712
payloadtype.h
Definition of payload types.
rtp_session_set_remote_addr_full
ORTP_PUBLIC int rtp_session_set_remote_addr_full(RtpSession *session, const char *rtp_addr, int rtp_port, const char *rtcp_addr, int rtcp_port)
Definition: rtpsession_inet.c:769
rtp_session_get_recv_ssrc
ORTP_PUBLIC uint32_t rtp_session_get_recv_ssrc(RtpSession *session)
Definition: rtpsession.c:663
_RtpSession
Definition: rtpsession.h:348
rtp_session_flush_sockets
ORTP_PUBLIC void rtp_session_flush_sockets(RtpSession *session)
Definition: rtpsession_inet.c:979
msgb
Definition: str_utils.h:49
_OrtpAddress
Definition: rtpsession.h:260
rtp_session_get_recv_profile
ORTP_PUBLIC RtpProfile * rtp_session_get_recv_profile(RtpSession *session)
Definition: rtpsession.c:493
rtp_session_get_seq_number
ORTP_PUBLIC uint16_t rtp_session_get_seq_number(RtpSession *session)
Definition: rtpsession.c:616
rtp_session_set_recv_buf_size
ORTP_PUBLIC void rtp_session_set_recv_buf_size(RtpSession *session, int bufsize)
Definition: rtpsession.c:505
rtp_session_new
ORTP_PUBLIC RtpSession * rtp_session_new(int mode)
Definition: rtpsession.c:318
rtp_session_recvm_with_ts
ORTP_PUBLIC mblk_t * rtp_session_recvm_with_ts(RtpSession *session, uint32_t user_ts)
Definition: rtpsession.c:1083
rtp_session_set_multicast_loopback
ORTP_PUBLIC int rtp_session_set_multicast_loopback(RtpSession *session, int yesno)
Definition: rtpsession_inet.c:526
_OrtpNetworkSimulatorMode
_OrtpNetworkSimulatorMode
Definition: rtpsession.h:124
_RtpStream
Definition: rtpsession.h:284
rtp_session_set_local_addr
ORTP_PUBLIC int rtp_session_set_local_addr(RtpSession *session, const char *addr, int rtp_port, int rtcp_port)
Definition: rtpsession_inet.c:339
rtp_session_get_jitter_stats
ORTP_PUBLIC const jitter_stats_t * rtp_session_get_jitter_stats(const RtpSession *session)
Definition: rtpsession.c:1611
rtp_session_set_multicast_ttl
ORTP_PUBLIC int rtp_session_set_multicast_ttl(RtpSession *session, int ttl)
Definition: rtpsession_inet.c:459
_WaitPoint
Definition: rtpsession.h:87
_JBParameters::min_size
int min_size
Definition: rtpsession.h:59
_RtpTransport::t_destroy
void(* t_destroy)(struct _RtpTransport *transport)
Definition: rtpsession.h:121
rtp_session_destroy
ORTP_PUBLIC void rtp_session_destroy(RtpSession *session)
Definition: rtpsession.c:1828
OrtpRtcpSendAlgorithm
Definition: rtpsession.h:167
OrtpRtcpXrMediaCallbacks
Definition: rtpsession.h:198
_RtpSignalTable
Definition: rtpsignaltable.h:27
rtp_session_set_blocking_mode
ORTP_PUBLIC void rtp_session_set_blocking_mode(RtpSession *session, int yesno)
Definition: rtpsession.c:380
_queue
Definition: str_utils.h:78
rtp_session_get_send_bandwidth
ORTP_PUBLIC float rtp_session_get_send_bandwidth(RtpSession *session)
Definition: rtpsession.c:1771
rtp_session_get_local_port
ORTP_PUBLIC int rtp_session_get_local_port(const RtpSession *session)
Definition: rtpsession_inet.c:728
rtp_session_get_last_recv_time
ORTP_PUBLIC void rtp_session_get_last_recv_time(RtpSession *session, struct timeval *tv)
Definition: rtpsession.c:1919
_OrtpNetworkSimulatorParams::max_bandwidth
float max_bandwidth
Definition: rtpsession.h:137
rtp_session_get_cum_loss
ORTP_PUBLIC int rtp_session_get_cum_loss(RtpSession *session)
Definition: rtpsession.c:630
rtp_session_set_rtp_socket_recv_buffer_size
ORTP_PUBLIC void rtp_session_set_rtp_socket_recv_buffer_size(RtpSession *session, unsigned int size)
Definition: rtpsession.c:521
JBParameters
struct _JBParameters JBParameters
jitter_stats
Definition: rtp.h:79
_JBParameters::max_size
int max_size
Definition: rtpsession.h:61
rtp_session_get_multicast_loopback
ORTP_PUBLIC int rtp_session_get_multicast_loopback(RtpSession *session)
Definition: rtpsession_inet.c:582
rtp_session_signal_connect
ORTP_PUBLIC int rtp_session_signal_connect(RtpSession *session, const char *signal_name, RtpCallback cb, void *user_data)
Definition: rtpsession.c:559
rtp_session_get_send_ssrc
ORTP_PUBLIC uint32_t rtp_session_get_send_ssrc(RtpSession *session)
Definition: rtpsession.c:653
meta_rtp_transport_modifier_inject_packet
ORTP_PUBLIC int meta_rtp_transport_modifier_inject_packet(const RtpTransport *t, RtpTransportModifier *tpm, mblk_t *msg, int flags)
Definition: rtpsession.c:2053
OrtpNetworkSimulatorOutbound
Definition: rtpsession.h:127
rtp_session_set_time_jump_limit
ORTP_PUBLIC void rtp_session_set_time_jump_limit(RtpSession *session, int miliseconds)
Definition: rtpsession.c:1374
_RtpSession::avpf_features
unsigned char avpf_features
Definition: rtpsession.h:404
OrtpEvQueue
Definition: event.h:84
_OrtpNetworkSimulatorCtx
Definition: rtpsession.h:147
rtp_session_recv_with_ts
ORTP_PUBLIC int rtp_session_recv_with_ts(RtpSession *session, uint8_t *buffer, int len, uint32_t ts, int *have_more)
Definition: rtpsession.c:1273
_OList
Definition: utils.h:33
rtp_session_set_ssrc_changed_threshold
ORTP_PUBLIC void rtp_session_set_ssrc_changed_threshold(RtpSession *session, int numpackets)
Definition: rtpsession.c:1541
_RtpTransport
Definition: rtpsession.h:109
rtp_session_pick_with_cseq
ORTP_PUBLIC mblk_t * rtp_session_pick_with_cseq(RtpSession *session, const uint16_t sequence_number)
Definition: rtpsession.c:1040
rtp_session_set_recv_profile
ORTP_PUBLIC void rtp_session_set_recv_profile(RtpSession *session, RtpProfile *profile)
Definition: rtpsession.c:459
_OrtpNetworkSimulatorParams::consecutive_loss_probability
float consecutive_loss_probability
Definition: rtpsession.h:141
rtp_stats
Definition: rtp.h:63
rtp_session_reset
ORTP_PUBLIC void rtp_session_reset(RtpSession *session)
Definition: rtpsession.c:1575
rtp_session_get_recv_bandwidth
ORTP_PUBLIC float rtp_session_get_recv_bandwidth(RtpSession *session)
Definition: rtpsession.c:1763
rtp_session_set_pktinfo
ORTP_PUBLIC int rtp_session_set_pktinfo(RtpSession *session, int activate)
Definition: rtpsession_inet.c:399
rtp_session_set_seq_number
ORTP_PUBLIC void rtp_session_set_seq_number(RtpSession *session, uint16_t seq)
Definition: rtpsession.c:604
rtp_session_send_with_ts
ORTP_PUBLIC int rtp_session_send_with_ts(RtpSession *session, const uint8_t *buffer, int len, uint32_t userts)
Definition: rtpsession.c:1003
_OrtpNetworkSimulatorParams::mode
OrtpNetworkSimulatorMode mode
Definition: rtpsession.h:144
_OrtpNetworkSimulatorParams::max_buffer_size
int max_buffer_size
Definition: rtpsession.h:138
_OrtpStream
Definition: rtpsession.h:265
rtp_session_set_recv_payload_type
ORTP_PUBLIC int rtp_session_set_recv_payload_type(RtpSession *session, int pt)
Definition: rtpsession.c:720
rtp_session_add_aux_remote_addr_full
ORTP_PUBLIC int rtp_session_add_aux_remote_addr_full(RtpSession *session, const char *rtp_addr, int rtp_port, const char *rtcp_addr, int rtcp_port)
Definition: rtpsession_inet.c:930
meta_rtp_transport_get_endpoint
ORTP_PUBLIC RtpTransport * meta_rtp_transport_get_endpoint(const RtpTransport *transport)
Definition: rtpsession.c:2199
_OrtpNetworkSimulatorParams::jitter_strength
float jitter_strength
Definition: rtpsession.h:143
rtp_session_create_packet_in_place
ORTP_PUBLIC mblk_t * rtp_session_create_packet_in_place(RtpSession *session, uint8_t *buffer, int size, void(*freefn)(void *))
Definition: rtpsession.c:863
rtp_session_set_send_profile
ORTP_PUBLIC void rtp_session_set_send_profile(RtpSession *session, RtpProfile *profile)
Definition: rtpsession.c:441
_JBParameters
Definition: rtpsession.h:58
rtp_session_set_source_description
ORTP_PUBLIC void rtp_session_set_source_description(RtpSession *session, const char *cname, const char *name, const char *email, const char *phone, const char *loc, const char *tool, const char *note)
Definition: rtcp.c:128
_JBParameters::nom_size
int nom_size
Definition: rtpsession.h:60
OrtpNetworkSimulatorOutboundControlled
Definition: rtpsession.h:128
rtp_session_set_data
ORTP_PUBLIC void rtp_session_set_data(RtpSession *session, void *data)
Definition: rtpsession.c:1675
_msgb_allocator
Definition: str_utils.h:152
rtp_session_set_symmetric_rtp
ORTP_PUBLIC void rtp_session_set_symmetric_rtp(RtpSession *session, bool_t yesno)
Definition: rtpsession.c:1697
_RtpScheduler
Definition: scheduler.h:28
rtp_session_set_rtp_socket_send_buffer_size
ORTP_PUBLIC void rtp_session_set_rtp_socket_send_buffer_size(RtpSession *session, unsigned int size)
Definition: rtpsession.c:513
rtp_session_set_profile
ORTP_PUBLIC void rtp_session_set_profile(RtpSession *session, RtpProfile *profile)
Definition: rtpsession.c:399
rtp_session_enable_rtcp
ORTP_PUBLIC void rtp_session_enable_rtcp(RtpSession *session, bool_t yesno)
Definition: rtpsession.c:414
rtp_session_get_profile
ORTP_PUBLIC RtpProfile * rtp_session_get_profile(RtpSession *session)
Definition: rtpsession.c:472
rtp_session_get_stats
ORTP_PUBLIC const rtp_stats_t * rtp_session_get_stats(const RtpSession *session)
Definition: rtpsession.c:1604
rtp_session_get_current_recv_ts
ORTP_PUBLIC uint32_t rtp_session_get_current_recv_ts(RtpSession *session)
Definition: rtpsession.c:1347
rtp_session_set_send_payload_type
ORTP_PUBLIC int rtp_session_set_send_payload_type(RtpSession *session, int paytype)
Definition: rtpsession.c:693
sessionset.h
Sending and receiving multiple streams together with only one thread.
meta_rtp_transport_set_endpoint
ORTP_PUBLIC void meta_rtp_transport_set_endpoint(RtpTransport *transport, RtpTransport *endpoint)
Definition: rtpsession.c:2203
rtp_session_release_sockets
ORTP_PUBLIC void rtp_session_release_sockets(RtpSession *session)
Definition: rtpsession.c:1385
rtp_session_rtcp_set_lost_packet_value
ORTP_PUBLIC void rtp_session_rtcp_set_lost_packet_value(RtpSession *session, const int64_t value)
For test purpose only, sets a constant lost packet value within all RTCP output packets. .
Definition: rtpsession.c:1622
_OrtpNetworkSimulatorParams::jitter_burst_density
float jitter_burst_density
Definition: rtpsession.h:142
rtp_session_signal_disconnect_by_callback
ORTP_PUBLIC int rtp_session_signal_disconnect_by_callback(RtpSession *session, const char *signal_name, RtpCallback cb)
Definition: rtpsession.c:583
_OrtpNetworkSimulatorParams::enabled
int enabled
Definition: rtpsession.h:136
rtp_session_set_ssrc
ORTP_PUBLIC void rtp_session_set_ssrc(RtpSession *session, uint32_t ssrc)
Definition: rtpsession.c:642
_RtpTransportModifier::t_destroy
void(* t_destroy)(struct _RtpTransportModifier *transport)
Definition: rtpsession.h:106
rtp_session_get_recv_payload_type
ORTP_PUBLIC int rtp_session_get_recv_payload_type(const RtpSession *session)
Definition: rtpsession.c:737
rtp_session_get_round_trip_propagation
ORTP_PUBLIC float rtp_session_get_round_trip_propagation(RtpSession *session)
Definition: rtpsession.c:1818
rtpprofile.h
Using and creating standart and custom RTP profiles.
rtp_session_get_send_payload_type
ORTP_PUBLIC int rtp_session_get_send_payload_type(const RtpSession *session)
Definition: rtpsession.c:704
_RtpProfile
Definition: rtpprofile.h:41
rtp_session_set_dscp
ORTP_PUBLIC int rtp_session_set_dscp(RtpSession *session, int dscp)
Definition: rtpsession_inet.c:597
_JitterControl
Definition: rtpsession.h:67
OrtpNetworkSimulatorInbound
Definition: rtpsession.h:126
_OrtpNetworkSimulatorParams::loss_rate
float loss_rate
Definition: rtpsession.h:139
_RtpTransportModifier
Definition: rtpsession.h:95
rtp_session_create_packet
ORTP_PUBLIC mblk_t * rtp_session_create_packet(RtpSession *session, int header_size, const uint8_t *payload, int payload_size)
Definition: rtpsession.c:782
OrtpRtcpTmmbrInfo
Definition: rtpsession.h:255
rtp_session_bye
ORTP_PUBLIC int rtp_session_bye(RtpSession *session, const char *reason)
Definition: rtcp.c:638
rtp_session_set_scheduling_mode
ORTP_PUBLIC void rtp_session_set_scheduling_mode(RtpSession *session, int yesno)
Definition: rtpsession.c:345
rtp_session_set_jitter_compensation
ORTP_PUBLIC void rtp_session_set_jitter_compensation(RtpSession *session, int milisec)
Definition: jitterctl.c:164
rtp_session_set_remote_addr
ORTP_PUBLIC int rtp_session_set_remote_addr(RtpSession *session, const char *addr, int port)
Definition: rtpsession_inet.c:749
rtp_session_sendm_with_ts
ORTP_PUBLIC int rtp_session_sendm_with_ts(RtpSession *session, mblk_t *mp, uint32_t userts)
Definition: rtpsession.c:983
_OrtpNetworkSimulatorParams::latency
uint32_t latency
Definition: rtpsession.h:140
rtp_session_get_data
ORTP_PUBLIC void * rtp_session_get_data(const RtpSession *session)
Definition: rtpsession.c:1683
rtp_session_register_event_queue
ORTP_PUBLIC void rtp_session_register_event_queue(RtpSession *session, OrtpEvQueue *q)
Definition: rtpsession.c:1424
rtp_session_resync
ORTP_PUBLIC void rtp_session_resync(RtpSession *session)
Definition: rtpsession.c:1551
rtp_session_get_current_send_ts
ORTP_PUBLIC uint32_t rtp_session_get_current_send_ts(RtpSession *session)
Definition: rtpsession.c:1321
rtp_session_set_rtcp_report_interval
ORTP_PUBLIC void rtp_session_set_rtcp_report_interval(RtpSession *session, int value_ms)
Definition: rtpsession.c:422
OrtpNetworkSimulatorParams
struct _OrtpNetworkSimulatorParams OrtpNetworkSimulatorParams