42
V. Liberatore
Pervasive Computing
RTPlib
*Get session information
nRTPMemberInfoGetStatus();
nRTPMemberInfoGetRTPAddr();
nRTPMemeberInfoGetPktCnt();
nRTPMemberInfoGetUserInfo();
nRTPSessionGetBandwidth();
nRTPFindMember();
*Advanced functions
nRTPSplitCompoundRTCP();
GET SESSION INFORMATION

RTPMemberInfoGetStatus()
The function retrieves the member and sender status for a particular user.

RTPMemberInfoGetRTPAddr()
The function returns the address and port a user is sending RTP packets from. If the user is a contributor, the address is that of the mixer sending the packets.

RTPMemberInfoGetPktCnt()
This function returns the packet count reported in the last sender report from the given user. This function should only be called for users who are CONFIRMED senders. Operation on non-confirmed senders is undefined.

RTPMemberInfoGetUserInfo()
This function retrieves the user info field for a particular member. This field is never used by the library. It is provided as a convenience to application developers, allowing them to use the library's member management structures to store application specific information.

RTPSessionGetBandwidth()
This function writes the value of the session bandwidth and RTCP fraction into the given variables.

RTPFindMember()
This function is used to obtain a handle to a person by searching based on a specific criteria, such as email, phone, cname, etc. It is useful mostly for finding users based on CNAME for correlation across multiple sessions. Member lists can be generically obtained by using the RTPSessionGetMemberList() function.

ADVANCED FUNCTIONS

RTPSplitCompoundRTCP()
The function “int RTPSplitCompoundRTCP (char *rtcppacket, char *indpkts[], long len)” takes the raw RTCP packet received on the socket, and splits it into the individual RTCP packets (this is because an RTCP data packet can contain many RTCP packets inside of it).

RTPGetRTCPPacket()
The function “rtcp_packet RTPGetRTCPPacket (char *rtcppacket)” takes a pointer to an individual RTCP packet character string that composes the RTCP packet. It returns a pointer to an rtcp_packet. This is a structure which contains the various common header fields (version, type, count, etc.) and the parts specific to the particular RTCP packet.