?? manual.tex
字號:
modified with AddToAcceptList, DeleteFromAcceptList and ClearAcceptList. \item {\tt int AddToIgnoreList(unsigned long remoteIP,bool allports,int portbase)}\\ Adds an origin to the ignore list. If 'allports' is true, all data from address 'remoteIP' is ignored, no matter what port it came from. This function will have no noticable effect until the receive mode is set to RECEIVEMODE\_IGNORESOME.\item {\tt int DeleteFromIgnoreList(unsigned long remoteIP,bool allports,int portbase)}\\ Deletes an entry from the ignore list with the specified parameters. \item {\tt void ClearIgnoreList()} Clears the ignore list.\item {\tt int AddToAcceptList(unsigned long remoteIP,bool allports,int portbase)}\\ Adds an origin to the accept list. If 'allports' is true, all data from address 'remoteIP' is accepted, no matter what port it came from. This function will have no noticable effect until the receive mode is set to RECEIVEMODE\_ACCEPTSOME.\item {\tt int DeleteFromAcceptList(unsigned long remoteIP,bool allports,int portbase)}\\ Deletes an entry with the specified parameters from the accept list.\item {\tt void ClearAcceptList()}\\ Clears the accept list.\item {\tt int SetMaxPacketSize(int m)}\\ Sets the maximum size that a RTP or RTCP packet can have. This size does not include IP or UDP header sizes. It defaults to 1100.\item {\tt void SetSessionBandwidth(double bw)}\\ Sets the bandwidth the session is supposed to use. The parameter is treated in units of bits per second (bps). This value is used to calculate the interval at which RTCP packets should be sent. The default value is 64000 bps. \item {\tt void SetTimestampUnit(double t)}\\ Sets the value in seconds to which one timestamp unit corresponds. The default is 1/8000 sec.\item {\tt void SetControlTrafficFragment(double frag)}\\ Sets the fragment of the session bandwidth that the RTCP packets may occupy. This value is used to calculate the the interval at which RTCP packets should be sent. The default value is 5/100. \item {\tt int SetLocalName(char *s,int len)}\\ Sets the name of the local participant. The name is specified in parameter 's' and has length 'len'. \item {\tt int SetLocalEMail(char *s,int len)}\\ Sets the e-mail address of the local participant. The address is specified in parameter 's' and has length 'len'.\item {\tt int SetLocalLocation(char *s,int len)}\\ Sets the location of the local participant. The location is specified in parameter 's' and has length 'len'.\item {\tt int SetLocalPhone(char *s,int len)}\\ Sets the telephone number of the local participant. The number is specified in parameter 's' and has length 'len'.\item {\tt int SetLocalTool(char *s,int len)}\\ Sets the tool name for the local participant. The tool is specified in parameter 's' and has length 'len'.\item {\tt int SetLocalNote(char *s,int len)}\\ Sets a note for the local participant. The note is specified in parameter 's' and has length 'len'.\item {\tt int SetCSRC\_CNAME(unsigned long csrc,char *s,int len)}\\ Sets the canonical name (CNAME) for the contributing source with identifier 'csrc'. The name is specified by 's' and has length 'len'.\item {\tt int SetCSRCName(unsigned long csrc,char *s,int len)}\\ Sets the name for the contributing source with identifier 'csrc'. The name is specified by 's' and has length 'len'.\item {\tt int SetCSRCEMail(unsigned long csrc,char *s,int len)}\\ Sets the e-mail address for the contributing source with identifier 'csrc'. The address is specified by 's' and has length 'len'.\item {\tt int SetCSRCLocation(unsigned long csrc,char *s,int len)}\\ Sets the location for the contributing source with identifier 'csrc'. The location is specified by 's' and has length 'len'.\item {\tt int SetCSRCPhone(unsigned long csrc,char *s,int len)}\\ Sets the telephone number for the contributing source with identifier 'csrc'. The number is specified by 's' and has length 'len'.\item {\tt int SetCSRCTool(unsigned long csrc,char *s,int len)}\\ Specifies a tool for the contributing source with identifier 'csrc'. The tool name is specified by 's' and has length 'len'.\item {\tt int SetCSRCNote(unsigned long csrc,char *s,int len)}\\ Sets a note for the contributing source with identifier 'csrc'. The note is specified by 's' and has length 'len'.\item {\tt void EnableSendName(bool val)}\\ Specifies if the name (either local or for a CSRC) should be sent to other participants. \item {\tt void EnableSendEMail(bool val)}\\ Specifies if the e-mail address (either local or for a CSRC) should be sent to other participants. \item {\tt void EnableSendLocation(bool val)}\\ Specifies if the location (either local or for a CSRC) should be sent to other participants. \item {\tt void EnableSendPhone(bool val)}\\ Specifies if the phone number (either local or for a CSRC) should be sent to other participants. \item {\tt void EnableSendTool(bool val)}\\ Specifies if tool information (either local or from a CSRC) should be sent to other participants. \item {\tt void EnableSendNote(bool val)}\\ Specifies if notes (either local or from a CSRC) should be sent to other participants. \item {\tt void SetLocalSSRCCollisionHandler(RTPExceptionHandler handler,void *usrdata)}\\ Sets the handler for collisions with the local SSRC identifier. The parameter 'usrdata' will be passed when calling this handler. Set the handler to NULL to disable.\item {\tt void SetSSRCCollisionHandler(RTPExceptionHandler handler,void *usrdata)}\\ Sets the handler for collisions between SSRC identifiers, other than the local SSRC identifier. The parameter 'usrdata' will be passed when calling this handler. Set the handler to NULL to disable.\item {\tt void SetNewSourceHandler(RTPExceptionHandler handler,void *usrdata)}\\ Sets the handler to call when a source has joined the session. The parameter 'usrdata' will be passed when calling this handler. Set the handler to NULL to disable.\item {\tt void SetInvalidSDESTypeHandler(RTPExceptionHandler handler,void *usrdata)}\\ Sets the handler that will be called when a RTCP packet with an illegal SDES type arrives. The parameter 'usrdata' will be passed when calling this handler. Set the handler to NULL to disable.\item {\tt void SetSSRCDepartureHandler(RTPExceptionHandler handler,void *usrdata)}\\ Sets the handler to call when a source leaves the session. The parameter 'usrdata' will be passed when calling this handler. Set the handler to NULL to disable. \item {\tt void SetSSRCTimeoutHandler(RTPExceptionHandler handler,void *usrdata)}\\ Sets the handler to call when a source leaves the session due to a timeout. The parameter 'usrdata' will be passed when calling this handler. Set the handler to NULL to disable.\item {\tt void SetReceiveRTCPAPPHandler(RTPExceptionHandler handler,void *usrdata)}\\ Sets the handler to call when application specific data arrives. The parameter 'usrdata' will be passed when calling this handler. Set the handler to NULL to disable.\item {\tt void SetTransmitRTCPAPPHandler(RTPExceptionHandler handler,void *usrdata)}\\ Sets the handler to call when the library will send RTCP data. Using this handler you can then pass application specific data to be included in the RTCP packet. The parameter 'usrdata' will be passed when calling this handler. Set the handler to NULL to disable.\item {\tt void SetRTCPPacketHandler(RTPExceptionHandler handler,void *usrdata)}\\ Sets the handler to be called for each incoming RTCP packet (also invalid ones!). The parameter 'usrdata' will be passed when calling this handler. Set the handler to NULL to disable. \item {\tt void ClearHandlers()}\\ Clears all handlers.\item {\tt void SetAcceptOwnPackets(bool accept)}\\ Specifies if received packets which originated from your own session should be accepted or discarded. Accepting them can be useful for debugging purposes: you can make the session send packets to itself. By default, the packets are discarded. Note that own RTCP packets currently are always discarded.\item {\tt bool GetAcceptOwnPackets()}\\ Returns true if own packets are accepted, false otherwise.\end{itemize} \section{class RTPPacket}\subsection{Description}Instances of this class contain RTP packet data. They are returned by a callto the member function GetNextPacket of the class RTPSession or by a call tothe member function ExtractPacket of the class RTPSourceData.\subsection{Member functions}\begin{itemize}\item {\tt unsigned long GetSSRC()}\\ Gets the synchronization source identifier from the origin of this packet.\item {\tt unsigned long GetExtendedSequenceNumber()}\\ Gets the extended sequence number of the packet. Note that the sequence numbers start from a random offset, as speficied in RFC 1889.\item {\tt unsigned long GetTimeStamp()}\\ Gets the timestamp of the packet. The timestamp starts at a random offset.\item {\tt int GetPayloadLength()}\\ Gets the length of the payload (the actual data contained in the RTP packet)\item {\tt unsigned char *GetRawPacket()}\\ Returns a pointer to the raw packet data.\item {\tt unsigned char *GetPayload()}\\ Returns a pointer to the payload, the actual data of the RTP packet.\item {\tt unsigned char GetPayloadType()}\\ Returns the payload type of the packet.\item {\tt bool IsMarked()}\\ Returns 'true' if the marker bit in the RTP header was set, 'false' otherwise. \item {\tt int GetNumberOfCSRCs()}\\ Returns the number of CSRC identifiers contained in the packet. \item {\tt unsigned long GetCSRC(int pos)}\\ Returns a CSRC identifier which was contained in the packet. 'pos' is valid if it is greater or equal to zero and smaller than the value returned by a call to 'GetNumberOfCSRCs'.\item {\tt bool HasHeaderExtension()}\\ Returns 'true' if the RTP packet has a header extension, 'false' otherwise.\item {\tt unsigned short GetHeaderExtensionID()}\\ If the packet has a header extension, this function returns the identifier of the header extension.\item {\tt int GetHeaderExtensionLength()}\\ Returns the length, in number of bytes, of the header extension data.\item {\tt unsigned char *GetHeaderExtensionData()}\\ Returns the data contained in the header extension.\end{itemize} \section{class RTPSourceData}\subsection{Description}This class contains information about a participating source. A packet thatis returned by the member functions GetCurrentSourceInfo or GetSourceInfoof the class RTPSession, must NOT be deleted.\subsection{Member functions}\begin{itemize}\item {\tt RTPPacket *ExtractPacket()}\\ Extracts a packet from the packet queue of this source. If no packets are available, NULL is returned. If a packet is returned, it must be destroyed by a call to 'delete' when it is no longer needed.\item {\tt void FlushPackets()}\\ Deletes all pending packets on the queue.\item {\tt unsigned long GetSSRC()}\\ Returns the synchronization source identifier of this source.\item {\tt bool HasData()}\\ Returns 'true' if there are any packets on the packet queue. Otherwise 'false' is returned.\item {\tt void SetTimestampUnit(double tsunit)}\\ Sets the timestamp unit for the RTP packets coming from this source.\item {\tt double GetTimestampUnit()}\\ Retrieves the value of the timestamp unit which is used for calculations involving this source. When a new source had joined in, its timestamp unit is initialized to that of the local session. \item {\tt bool SR\_HasInfo()}\\ Returns 'true' if there were sender reports received from this source. If the participating source is not a sender of RTP data, this will always return 'false'.\item {\tt void SR\_GetNTPTimestamp(unsigned long *msw,unsigned long *lsw)}\\ Gets the NTP timestamp that was specified in the last received sender report.\item {\tt unsigned long SR\_GetRTPTimestamp()}\\ Gets the timestamp that was last mentioned in a sender report.\item {\tt unsigned long SR\_GetPacketCount()}\\ Gets the packet count of this source according to the information from the last sender report.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -