00001
00002
00003
00004
00005
00006
00007 #ifndef _RTP_API_H
00008 #define _RTP_API_H
00009
00010 #define BITFIELD(field, mask, shift) \
00011 (((field) & (mask)) >> (shift))
00012 #define SET_BITFIELD(field, val, mask, shift) \
00013 do { \
00014 (field) &= ~(mask); \
00015 (field) |= (((val) << (shift)) & (mask)); \
00016 } while (0)
00017
00018
00019
00020 #define RTCP_PACKET_SR 200
00021 #define RTCP_PACKET_RR 201
00022 #define RTCP_PACKET_SDES 202
00023 #define RTCP_PACKET_BYE 203
00024 #define RTCP_PACKET_APP 204
00025
00026 typedef long int context;
00027 typedef long int person;
00028
00029
00030 typedef long int int32;
00031 typedef short int int16;
00032 typedef signed char int8;
00033
00034 typedef unsigned long int u_int32;
00035 typedef unsigned short int u_int16;
00036 typedef unsigned char u_int8;
00037
00038
00039
00040
00041 typedef enum {
00042 RTP_MEMBER_PENDING,
00043 RTP_MEMBER_CONFIRMED,
00044 RTP_MEMBER_EXPIRED,
00045 RTP_MEMBER_PENDING_CONTRIBUTOR,
00046 RTP_MEMBER_CONFIRMED_CONTRIBUTOR,
00047 RTP_MEMBER_EXPIRED_CONTRIBUTOR
00048 } memberstatus;
00049
00050
00051
00052
00053
00054
00055
00056
00057 typedef enum {
00058 RTP_SENDER_NOT,
00059 RTP_SENDER_PURPORTED,
00060 RTP_SENDER_CONFIRMED,
00061 } senderstatus;
00062
00063 typedef struct {
00064 u_int32 secs;
00065 u_int32 frac;
00066 } ntp64;
00067
00068
00069 typedef struct {
00070 u_int8 flags;
00071
00072 u_int8 mpt;
00073 u_int16 seq;
00074 u_int32 ts;
00075 u_int32 ssrc;
00076 u_int32 csrc[1];
00077 } rtp_hdr_t;
00078
00079
00080 #define RTP_VERSION(hdr) BITFIELD((hdr).flags, 0xC0, 6)
00081 #define SET_RTP_VERSION(hdr, val) SET_BITFIELD((hdr).flags, (val), 0xC0, 6)
00082
00083
00084 #define RTP_P(hdr) BITFIELD((hdr).flags, 0x20, 5)
00085 #define SET_RTP_P(hdr, val) SET_BITFIELD((hdr).flags, (val), 0x20, 5)
00086
00087
00088 #define RTP_X(hdr) BITFIELD((hdr).flags, 0x10, 4)
00089 #define SET_RTP_X(hdr, val) SET_BITFIELD((hdr).flags, (val), 0x10, 4)
00090
00091
00092 #define RTP_CC(hdr) BITFIELD((hdr).flags, 0x0F, 0)
00093 #define SET_RTP_CC(hdr, val) SET_BITFIELD((hdr).flags, (val), 0x0F, 0)
00094
00095
00096 #define RTP_M(hdr) BITFIELD((hdr).mpt, 0x80, 7)
00097 #define SET_RTP_M(hdr, val) SET_BITFIELD((hdr).mpt, (val), 0x80, 7)
00098
00099
00100 #define RTP_PT(hdr) BITFIELD((hdr).mpt, 0x7F, 0)
00101 #define SET_RTP_PT(hdr, val) SET_BITFIELD((hdr).mpt, (val), 0x7F, 0)
00102
00103
00104 typedef struct {
00105 u_int16 etype;
00106 u_int16 elen;
00107 char epayload[1];
00108 } rtp_hdr_ext;
00109
00110
00111
00112 typedef struct {
00113 rtp_hdr_t *RTP_header;
00114 rtp_hdr_ext *RTP_extension;
00115 char *payload;
00116 long payload_len;
00117 } rtp_packet;
00118
00119
00120
00121 typedef struct {
00122 u_int32 ssrc;
00123 unsigned int frac_lost:8;
00124 unsigned int cum_lost:24;
00125 u_int32 highest_seqno;
00126 u_int32 jitter;
00127 u_int32 lsr;
00128 u_int32 dlsr;
00129 } rtcp_report_block;
00130
00131 #define RTCP_REPORT_BLOCK_SIZE (6 * 4)
00132
00133
00134
00135 typedef struct {
00136 u_int32 ssrc;
00137 int chunkno;
00138 u_int8 type;
00139 u_int8 len;
00140 char *description;
00141 int offset;
00142
00143
00144 } rtcp_sdes_item;
00145
00146
00147
00148 typedef struct {
00149 u_int32 ssrccsrc;
00150 } rtcp_bye_block;
00151
00152 #define RTCP_BYE_BLOCK_SIZE 4
00153
00154
00155 typedef struct {
00156 u_int8 flags;
00157
00158 u_int8 pt;
00159 u_int16 len;
00160 } rtcp_common;
00161
00162 #define RTCP_COMMON_SIZE 4
00163
00164 #define RTCP_VERSION(com) BITFIELD((com).flags, 0xC0, 6)
00165 #define SET_RTCP_VERSION(com, val) SET_BITFIELD((com).flags, (val), 0xC0, 6)
00166
00167 #define RTCP_P(com) BITFIELD((com).flags, 0x20, 5)
00168 #define SET_RTCP_P(com, val) SET_BITFIELD((com).flags, (val), 0x20, 5)
00169
00170 #define RTCP_RC(com) BITFIELD((com).flags, 0x1F, 0)
00171 #define SET_RTCP_RC(com, val) SET_BITFIELD((com).flags, (val), 0x1F, 0)
00172
00173 typedef struct {
00174 u_int32 ssrc;
00175 u_int32 ntp_secs;
00176 u_int32 ntp_frac;
00177 u_int32 rtp_stamp;
00178 u_int32 pkt_count;
00179 u_int32 oct_count;
00180 } rtcp_sr;
00181
00182 #define RTCP_SR_SIZE (6 * 4)
00183
00184
00185 typedef struct {
00186 u_int32 ssrc;
00187 } rtcp_rr;
00188
00189 #define RTCP_RR_SIZE 4
00190
00191
00192 typedef struct {
00193 u_int32 ssrccsrc;
00194 u_int32 name;
00195 } rtcp_app;
00196
00197 #define RTCP_APP_SIZE (2 * 4)
00198
00199
00200
00201
00202 typedef struct {
00203 rtcp_common *common;
00204
00205 union {
00206 struct {
00207 rtcp_sr *sr_fixed;
00208 rtcp_report_block *rblock[32];
00209 char* extension;
00210 } sr;
00211
00212 struct {
00213 rtcp_rr *rr_fixed;
00214 rtcp_report_block *rblock[32];
00215 char* extension;
00216 } rr;
00217
00218 struct {
00219 char *remainder;
00220 } sdes;
00221
00222 struct {
00223 rtcp_bye_block *byeblock[32];
00224 u_int8 reason_length;
00225 char* reason;
00226 } bye;
00227
00228 struct {
00229 rtcp_app *app_fixed;
00230 char *appdata;
00231 } app;
00232
00233 struct {
00234 char *data;
00235 } unknown;
00236
00237 } variant;
00238 } rtcp_packet;
00239
00240 struct link;
00241
00242 typedef struct {
00243 struct link *cur_link;
00244 int go_forward;
00245 } member_iterator;
00246
00247
00248
00249
00250
00251
00252
00253
00254 typedef struct {
00255 person reporter;
00256 u_int8 fraction_lost;
00257 u_int32 cum_lost;
00258 u_int32 highest_seqno;
00259 u_int32 jitter;
00260 u_int32 last_sr;
00261
00262 u_int32 delay_last_sr;
00263
00264
00265 } receiver_report;
00266
00267
00268
00269
00270 typedef struct hashsearch {
00271 void *table;
00272 int nextbucket;
00273 void *nextentry;
00274 } receiver_report_iterator;
00275
00276
00277
00278 typedef u_int8 memberinfo;
00279
00280
00281
00282 enum {
00283 RTP_MI_CNAME = 1,
00284 RTP_MI_NAME = 2,
00285 RTP_MI_EMAIL = 3,
00286 RTP_MI_PHONE = 4,
00287 RTP_MI_LOC = 5,
00288 RTP_MI_TOOL = 6,
00289 RTP_MI_NOTE = 7,
00290 RTP_MI_PRIV = 8,
00291 RTP_MI_H323_CADDR = 9,
00292 };
00293
00294
00295
00296
00297
00298
00299
00300 typedef enum {
00301 RTP_RECONSIDERATION_UNCONDITIONAL,
00302 RTP_RECONSIDERATION_CONDITIONAL,
00303 RTP_RECONSIDERATION_OFF,
00304 } reconsideration_t;
00305
00306
00307
00308
00309
00310 typedef enum {
00311 RTP_ENCRYPTION_FULL,
00312 RTP_ENCRYPTION_PARTIAL,
00313 RTP_ENCRYPTION_NONE,
00314 } encryption_t;
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347 #define EM_MASK(BITS,SHIFT) (((1U << (BITS)) - 1) << (SHIFT))
00348
00349 #define EM_CODE_SHIFT 0U
00350 #define EM_CODE_BITS 16U
00351 #define EM_CODE_MASK EM_MASK(EM_CODE_BITS,EM_CODE_SHIFT)
00352
00353 #define EM_FACILITY_SUB_CODE_SHIFT 16U
00354 #define EM_FACILITY_SUB_CODE_BITS 8U
00355 #define EM_FACILITY_SUB_CODE_MASK EM_MASK(EM_FACILITY_SUB_CODE_BITS,\
00356 EM_FACILITY_SUB_CODE_SHIFT)
00357 #define EM_FACILITY_CODE_SHIFT 24U
00358 #define EM_FACILITY_CODE_BITS 6U
00359 #define EM_FACILITY_CODE_MASK EM_MASK(EM_FACILITY_CODE_BITS,\
00360 EM_FACILITY_CODE_SHIFT)
00361 #define EM_SEVERITY_SHIFT 30U
00362 #define EM_SEVERITY_BITS 2U
00363 #define EM_SEVERITY_MASK EM_MASK(EM_SEVERITY_BITS,\
00364 EM_SEVERITY_SHIFT)
00365
00366
00367
00368 #define EM_SEVERITY_SUCCESS 0U
00369 #define EM_SEVERITY_INFORMATIONAL 1U
00370 #define EM_SEVERITY_WARNING 2U
00371 #define EM_SEVERITY_ERROR 3U
00372
00373
00374
00375 #define EM_PENDING 1U
00376 #define EM_INVALID_PARAM 2U
00377 #define EM_NOT_IMPLEMENTED 3U
00378 #define EM_MEM_ALLOC_FAILED 4U
00379 #define EM_UNKNOWN_ERROR 5U
00380 #define EM_NOT_SUPPORTED 6U
00381 #define EM_NOT_PRESENT 7U
00382 #define EM_BUFFER_TOO_SMALL 8U
00383 #define EM_SOFTWARE_EXPIRED 9U
00384 #define EM_INVALID_FSM_STIMULUS 10U
00385 #define EM_INVALID_RESULT_ARG 11U
00386 #define EM_LIBRARY_NOT_INTIALIZED 12U
00387 #define EM_INSUFFICIENT_INFO 13U
00388 #define EM_INVALID_SEQ_NUMBER 14U
00389 #define EM_FSM_NO_OPERATION 15U
00390 #define EM_CODE_MAX 256U
00391
00392
00393
00394
00395
00396 #define FACILITY_RTP 3U
00397
00398 #define EM_STATUS(SEV,FAC,SUB,CODE)\
00399 (((SEV) << EM_SEVERITY_SHIFT) & EM_SEVERITY_MASK) |\
00400 (((FAC) << EM_FACILITY_CODE_SHIFT) & EM_FACILITY_CODE_MASK) |\
00401 (((SUB) << EM_FACILITY_SUB_CODE_SHIFT) & EM_FACILITY_SUB_CODE_MASK) |\
00402 (((CODE) << EM_CODE_SHIFT) & EM_CODE_MASK)
00403
00404 #define RTP_SUCC(CODE) EM_STATUS(EM_SEVERITY_SUCCESS, FACILITY_RTP, 0, CODE)
00405 #define RTP_WARN(CODE) EM_STATUS(EM_SEVERITY_SUCCESS, FACILITY_RTP, 0, CODE)
00406 #define RTP_INFO(CODE) EM_STATUS(EM_SEVERITY_SUCCESS, FACILITY_RTP, 0, CODE)
00407 #define RTP_ERR(CODE) EM_STATUS(EM_SEVERITY_SUCCESS, FACILITY_RTP, 0, CODE)
00408
00409
00410
00411 #define EM_RTP_TOO_MANY_CONTEXTS (EM_CODE_MAX + 1)
00412 #define EM_RTP_UNKNOWN_CONTEXT (EM_CODE_MAX + 2)
00413 #define EM_RTP_NOSOCKET (EM_CODE_MAX + 3)
00414 #define EM_RTP_CANT_GET_SOCKET (EM_CODE_MAX + 4)
00415 #define EM_RTP_CANT_BIND_SOCKET (EM_CODE_MAX + 5)
00416 #define EM_RTP_CANT_SET_SOCKOPT (EM_CODE_MAX + 6)
00417 #define EM_RTP_SOCKET_WRITE_FAILURE (EM_CODE_MAX + 7)
00418 #define EM_RTP_SOCKET_READ_FAILURE (EM_CODE_MAX + 8)
00419 #define EM_RTP_SOCKET_MISMATCH (EM_CODE_MAX + 9)
00420 #define EM_RTP_FIXED_WHEN_OPEN (EM_CODE_MAX + 10)
00421 #define EM_RTP_BAD_ADDR (EM_CODE_MAX + 11)
00422 #define EM_RTP_BAD_PORT (EM_CODE_MAX + 12)
00423 #define EM_RTP_CANT_SEND (EM_CODE_MAX + 13)
00424 #define EM_RTP_CANT_CLOSE_SESSION (EM_CODE_MAX + 14)
00425 #define EM_RTP_BAD_MI (EM_CODE_MAX + 15)
00426 #define EM_RTP_BAD_PROFILE (EM_CODE_MAX + 16)
00427 #define EM_RTP_SOCKET_EMPTY (EM_CODE_MAX + 17)
00428 #define EM_RTP_PACKET_LOOPBACK (EM_CODE_MAX + 18)
00429 #define EM_RTP_CSRC_LIST_NOT_SET (EM_CODE_MAX + 19)
00430 #define EM_RTP_CSRC_APPEARS_TWICE (EM_CODE_MAX + 20)
00431 #define EM_RTP_BAD_PACKET_FORMAT (EM_CODE_MAX + 21)
00432 #define EM_RTP_NO_SUCH_PERSON (EM_CODE_MAX + 22)
00433 #define EM_RTP_PERSON_DATA_PROTECTED (EM_CODE_MAX + 23)
00434 #define EM_RTP_NO_SUCH_SENDER (EM_CODE_MAX + 24)
00435 #define EM_RTP_NO_SUCH_SDES (EM_CODE_MAX + 25)
00436 #define EM_RTP_CANT_USE_ENCRYPTION (EM_CODE_MAX + 26)
00437 #define EM_RTP_DECRYPTION_FAILURE (EM_CODE_MAX + 27)
00438 #define EM_RTP_END_OF_LIST (EM_CODE_MAX + 28)
00439 #define EM_RTP_CANT_CALL_FUNCTION (EM_CODE_MAX + 29)
00440 #define EM_RTP_SSRC_IN_USE (EM_CODE_MAX + 30)
00441 #define EM_RTP_CANT_GETSOCKNAME (EM_CODE_MAX + 31)
00442 #define EM_RTP_NO_SUCH_CONTRIBUTOR (EM_CODE_MAX + 32)
00443 #define EM_RTP_CSRC_LIST_FULL (EM_CODE_MAX + 33)
00444 #define EM_RTP_DONT_SEND_NOW (EM_CODE_MAX + 34)
00445 #define EM_RTP_CANT_SEND_BYE (EM_CODE_MAX + 35)
00446
00447
00448
00449 typedef enum {
00450 RTP_OK = 0,
00451 RTP_CANT_ALLOC_MEM = RTP_ERR(EM_MEM_ALLOC_FAILED),
00452 RTP_TOO_MANY_CONTEXTS = RTP_ERR(EM_RTP_TOO_MANY_CONTEXTS),
00453 RTP_UNKNOWN_CONTEXT = RTP_ERR(EM_RTP_UNKNOWN_CONTEXT),
00454 RTP_NOSOCKET = RTP_ERR(EM_RTP_NOSOCKET),
00455 RTP_CANT_GET_SOCKET = RTP_ERR(EM_RTP_CANT_GET_SOCKET),
00456 RTP_CANT_BIND_SOCKET = RTP_ERR(EM_RTP_CANT_BIND_SOCKET),
00457 RTP_CANT_SET_SOCKOPT = RTP_ERR(EM_RTP_CANT_SET_SOCKOPT),
00458 RTP_SOCKET_WRITE_FAILURE = RTP_ERR(EM_RTP_SOCKET_WRITE_FAILURE),
00459 RTP_SOCKET_READ_FAILURE = RTP_ERR(EM_RTP_SOCKET_READ_FAILURE),
00460 RTP_SOCKET_MISMATCH = RTP_ERR(EM_RTP_SOCKET_MISMATCH),
00461 RTP_FIXED_WHEN_OPEN = RTP_ERR(EM_RTP_FIXED_WHEN_OPEN),
00462 RTP_BAD_ADDR = RTP_ERR(EM_RTP_BAD_ADDR),
00463 RTP_BAD_PORT = RTP_ERR(EM_RTP_BAD_PORT),
00464 RTP_CANT_SEND = RTP_ERR(EM_RTP_CANT_SEND),
00465
00466 RTP_CANT_CLOSE_SESSION = RTP_ERR(EM_RTP_CANT_CLOSE_SESSION),
00467 RTP_BAD_MI = RTP_ERR(EM_RTP_BAD_MI),
00468 RTP_BAD_PROFILE = RTP_ERR(EM_RTP_BAD_PROFILE),
00469 RTP_SOCKET_EMPTY = RTP_WARN(EM_RTP_SOCKET_EMPTY),
00470 RTP_PACKET_LOOPBACK = RTP_WARN(EM_RTP_PACKET_LOOPBACK),
00471
00472
00473
00474
00475
00476 RTP_INSUFFICIENT_BUFFER = RTP_ERR(EM_BUFFER_TOO_SMALL),
00477 RTP_CSRC_LIST_NOT_SET = RTP_ERR(EM_RTP_CSRC_LIST_NOT_SET),
00478 RTP_CSRC_APPEARS_TWICE= RTP_WARN(EM_RTP_CSRC_APPEARS_TWICE),
00479 RTP_BAD_PACKET_FORMAT = RTP_WARN(EM_RTP_BAD_PACKET_FORMAT),
00480 RTP_NO_SUCH_PERSON = RTP_ERR(EM_RTP_NO_SUCH_PERSON),
00481 RTP_PERSON_DATA_PROTECTED =RTP_ERR(EM_RTP_PERSON_DATA_PROTECTED) ,
00482
00483 RTP_NO_SUCH_SENDER = RTP_ERR(EM_RTP_NO_SUCH_SENDER),
00484 RTP_NO_SUCH_SDES = RTP_ERR(EM_RTP_NO_SUCH_SDES),
00485 RTP_CANT_USE_ENCRYPTION = RTP_ERR(EM_RTP_CANT_USE_ENCRYPTION),
00486
00487
00488 RTP_DECRYPTION_FAILURE = RTP_ERR(EM_RTP_DECRYPTION_FAILURE),
00489 RTP_END_OF_LIST = RTP_INFO(EM_RTP_END_OF_LIST),
00490
00491 RTP_CANT_CALL_FUNCTION = RTP_WARN(EM_RTP_CANT_CALL_FUNCTION),
00492
00493
00494 RTP_SSRC_IN_USE = RTP_WARN(EM_RTP_SSRC_IN_USE),
00495
00496
00497 RTP_CANT_GETSOCKNAME = RTP_ERR(EM_RTP_CANT_GETSOCKNAME),
00498 RTP_BAD_VALUE = RTP_ERR(EM_INVALID_PARAM),
00499 RTP_NO_SUCH_CONTRIBUTOR = RTP_ERR(EM_RTP_NO_SUCH_CONTRIBUTOR),
00500
00501 RTP_CSRC_LIST_FULL = RTP_ERR(EM_RTP_CSRC_LIST_FULL),
00502 RTP_DONT_SEND_NOW = RTP_INFO(EM_RTP_DONT_SEND_NOW),
00503
00504 RTP_ERROR_CANT_SEND_BYE = RTP_INFO(EM_RTP_CANT_SEND_BYE)
00505
00506 } rtperror;
00507
00508
00509 typedef enum {
00510 RTP_FLAG_NEW_MEMBER,
00511 RTP_FLAG_NEW_SENDER,
00512 RTP_FLAG_EXPIRED_MEMBER,
00513 RTP_FLAG_EXPIRED_SENDER,
00514
00515 RTP_FLAG_MEMBER_LEAVES,
00516 RTP_FLAG_OBSERVE_COLLISION,
00517 RTP_FLAG_A_CSRC_COLLIDES,
00518
00519 RTP_FLAG_UNIQUE_ID_REMAP,
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530 RTP_FLAG_MEMBER_INFO_CHANGES,
00531
00532 RTP_FLAG_MEMBER_ALIVE,
00533
00534 RTP_FLAG_MEMBER_CONFIRMED,
00535
00536 RTP_FLAG_DELETED_PENDING,
00537
00538 RTP_FLAG_DELETED_MEMBER,
00539 RTP_FLAG_ADDRESS_CHANGES,
00540 RTP_FLAG_COLLIDE_WITH_ME,
00541
00542 RTP_FLAG_PURPORTED_SENDER,
00543
00544
00545 RTP_FLAG_DELETED_SENDER,
00546
00547 RTP_FLAG_NONE
00548 } rtpflag;
00549
00550 rtperror RTPSessionSetRTPStampRate(context cid, int32 payload_type,
00551 int32 usec);
00552 rtperror RTPSessionGetRTPStampRate(context cid, int32 payload_type,
00553 int32 *usec);
00554
00555 rtperror RTPSessionSetKey(context cid, void* value);
00556 rtperror RTPSessionGetKey(context cid, void** value);
00557
00558 rtperror RTPSessionSetReconsideration(context cid, reconsideration_t value);
00559 rtperror RTPSessionGetReconsideration(context cid, reconsideration_t *value);
00560
00561 rtperror RTPSessionSetExtension(context cid, rtp_hdr_ext *the_ext);
00562 rtperror RTPSessionGetExtension(context cid, rtp_hdr_ext **the_ext);
00563
00564 rtperror RTPSessionSetBandwidth(context cid, float session_bwidth,
00565 float rtcp_fraction);
00566 rtperror RTPSessionGetBandwidth(context cid, float *session_bwidth,
00567 float *rtcp_fraction);
00568
00569 rtperror RTPSessionSetUserInfo(context cid, void* info);
00570 rtperror RTPSessionGetUserInfo(context cid, void** info);
00571
00572 rtperror RTPSessionAddToCSRCList(context cid, u_int32 ssrc);
00573 rtperror RTPSessionRemoveFromCSRCList(context cid, u_int32 ssrc);
00574 rtperror RTPSessionAddToContributorList(context cid, u_int32 ssrc);
00575
00576
00577 rtperror RTPSessionGetCSRCList(context cid, u_int32 *value, int32 *size);
00578
00579 rtperror RTPSessionGetUniqueIDForCSRC(context cid, u_int32 ssrc, person *p);
00580
00581 rtperror RTPSessionGetMemberList(context cid, member_iterator *iter);
00582 rtperror RTPSessionGetMemberListLen(context cid, long *the_len);
00583
00584 rtperror RTPSetUpdateMemberCallBack(context cid,
00585 void (*f)(context, person, rtpflag, char *));
00586
00587 rtperror RTPSetChangedMemberInfoCallBack(context cid,
00588 void (*f)(context, person, memberinfo, char*, rtpflag));
00589
00590 rtperror RTPSetCollidedMemberCallBack(context cid,
00591 void (*f)(context, person, person, rtpflag));
00592
00593 rtperror RTPSetRevertingIDCallBack(context cid,
00594 void (*f)(context, person, person, void*, rtpflag));
00595
00596 rtperror RTPCurrentMember(context cid, member_iterator *iter,
00597 person *the_member);
00598 rtperror RTPNextMember(context cid, member_iterator *iter,
00599 person *the_member);
00600
00601
00602
00603
00604 rtp_packet RTPGetRTPPacket(char *rtppacket, long pktlen);
00605 u_int32 RTPPacketGetCSRC(rtp_packet *rtppkt, int csrc_no);
00606
00607 int RTPSplitCompoundRTCP(char *rtcppacket, char *indpkts[], long len);
00608 rtcp_packet RTPGetRTCPPacket(char *rtcppacket);
00609 void GetFirstSDESItemForSSRC(rtcp_sdes_item *the_item, char* startpoint);
00610 rtcp_sdes_item InitSDESItemIter(rtcp_packet *rtcpsdes);
00611 rtcp_sdes_item GetNextItem(rtcp_sdes_item *prev_item);
00612
00613
00614 rtcp_report_block RTPGetReportBlock(rtcp_packet *rtcprrsr, int blockno);
00615
00616 rtcp_bye_block RTPGetByeBlock(rtcp_packet *rtcpbye, int blockno);
00617
00618 rtperror RTPMemberInfoGetStatus(context cid, person p, memberstatus *s, senderstatus *sender );
00619
00620 rtperror RTPMemberInfoSetSDES(context cid, person p, memberinfo SDES_field,
00621 char *the_info);
00622 rtperror RTPMemberInfoGetSDES(context cid, person p, memberinfo SDES_field,
00623 char *the_info);
00624
00625
00626
00627 rtperror RTPMemberInfoSetNTP(context cid, person p,
00628 ntp64 NTP_time);
00629
00630 rtperror RTPMemberInfoGetNTP(context cid, person p,
00631 ntp64 *NTP_time);
00632
00633
00634 rtperror RTPMemberInfoSetRTP(context cid, person p,
00635 int32 rtp_stamp);
00636
00637 rtperror RTPMemberInfoGetRTP(context cid, person p,
00638 int32 *RTP_time);
00639
00640
00641 rtperror RTPMemberInfoSetPktCount(context cid, person p,
00642 int32 count);
00643
00644 rtperror RTPMemberInfoGetPktCount(context cid, person p,
00645 int32 *count);
00646
00647
00648 rtperror RTPMemberInfoSetRTCPPktCount(context cid, person p, int32 count);
00649
00650 rtperror RTPMemberInfoGetRTCPPktCount(context cid, person p, int32 *count);
00651
00652
00653 rtperror RTPMemberInfoSetOctCount(context cid, person p,
00654 int32 count);
00655
00656 rtperror RTPMemberInfoGetOctCount(context cid, person p,
00657 int32 *count);
00658
00659 rtperror RTPMemberInfoSetSSRC(context cid, u_int32 ssrc, u_int32 mask);
00660
00661 rtperror RTPMemberInfoGetSSRC(context cid, person p,
00662 u_int32 *ssrc);
00663
00664 rtperror RTPMemberInfoSetUserInfo(context cid, person p,
00665 void* info);
00666
00667 rtperror RTPMemberInfoGetUserInfo(context cid, person p,
00668 void** info);
00669
00670
00671
00672 rtperror RTPSenderInfoGetFirstReceiverReport(context cid, person p,
00673 receiver_report_iterator *the_iterator, receiver_report *report);
00674
00675 rtperror RTPSenderInfoGetNextReceiverReport(context cid, person p,
00676 receiver_report_iterator *the_iterator, receiver_report *report);
00677
00678
00679 rtperror RTPSenderInfoGetLocalReception(context cid, person p,
00680 receiver_report *report);
00681
00682
00683 rtperror RTPFindMember(context cid, memberinfo mi, char *sdes_field,
00684 person *p);
00685
00686
00687 rtperror RTPMostRecentRTPTime(context cid, person p,
00688 struct timeval *the_time);
00689 rtperror RTPMostRecentRTCPTime(context cid, person p,
00690 struct timeval *the_time);
00691 rtperror RTPMostRecentRTPPerson(context cid, person *p);
00692 rtperror RTPMostRecentRTCPPerson(context cid, person *p);
00693
00694
00695
00696 char *RTPStrError(rtperror err);
00697
00698 char *RTPDebugStr(void);
00699 #endif
00700