Description | Hierarchy | Fields | Methods | Properties |
type unaRTPReceiver = class(unaRTPStreamer)
Basic RTP receiver (UDP only)
constructor create(isRAW: bool = false); overload; |
|
constructor create(const bind2addr: TSockAddrIn; remoteAddr: PSockAddrIn = nil; noRTCP: bool = false; transmitter: unaRTPTransmitter = nil; ttl: int = -1; isUDP: bool = true; isRAW: bool = false); overload; |
|
function sendRTP_CN_To(addr: PSockAddrIn): int; |
|
function execute(threadID: unsigned): int; override; |
|
procedure AfterConstruction(); override; |
|
procedure setNewSSRC(newssrc: u_int32); |
|
procedure onBye(si: prtp_site_info; soft: bool); override; |
|
procedure onIdle(rtcpIdle: bool); override; |
|
procedure onNeedRTPHole(si: prtp_site_info); virtual; |
|
procedure onPayload(addr: PSockAddrIn; hdr: prtp_hdr; data: pointer; len, packetSize: uint); override; |
|
procedure onRTCPPacket(ssrc: u_int32; addr: PSockAddrIn; hdr: prtcp_common_hdr; packetSize: uint); override; |
|
procedure onSsrcCNAME(ssrc: u_int32; cname: prtcp_sdes_item); override; |
|
procedure pushRTCPPacket(packet: pointer; len: uint); override; |
|
procedure startIn(); override; |
|
procedure startOut(); override; |
|
procedure weSent(addr: PSockAddrIn; data: pointer; len: uint); |
property bind2ip: string read f_bind2ip; |
|
property bind2port: string read f_bind2port; |
|
property CN_resendInterval: int read f_CN_resendInterval write f_CN_resendInterval; |
|
property ip: string read f_ip; |
|
property isServer: bool read f_isServer; |
|
property portLocal: string read f_portL; |
constructor create(isRAW: bool = false); overload; |
|
Creates a new instance without a socket. |
constructor create(const bind2addr: TSockAddrIn; remoteAddr: PSockAddrIn = nil; noRTCP: bool = false; transmitter: unaRTPTransmitter = nil; ttl: int = -1; isUDP: bool = true; isRAW: bool = false); overload; |
|
Creates a new receiver instance.
Parameters
|
function sendRTP_CN_To(addr: PSockAddrIn): int; |
|
Sends RTP CN (comfort noise) packet (payload = c_rtpPTa_CN) to remote side. Used mostly at beginning of streaming to make holes in NAT.
Parameters
Returns0 if successfull or winsock error code otherwise. |
function execute(threadID: unsigned): int; override; |
|
procedure AfterConstruction(); override; |
|
Initializes required fields |
procedure setNewSSRC(newssrc: u_int32); |
|
Not everyday function. |
procedure onBye(si: prtp_site_info; soft: bool); override; |
|
procedure onIdle(rtcpIdle: bool); override; |
|
Called from context of idle thread. |
procedure onNeedRTPHole(si: prtp_site_info); virtual; |
|
procedure onPayload(addr: PSockAddrIn; hdr: prtp_hdr; data: pointer; len, packetSize: uint); override; |
|
procedure onRTCPPacket(ssrc: u_int32; addr: PSockAddrIn; hdr: prtcp_common_hdr; packetSize: uint); override; |
|
New RTCP packed was received.
Parameters
|
procedure onSsrcCNAME(ssrc: u_int32; cname: prtcp_sdes_item); override; |
|
procedure pushRTCPPacket(packet: pointer; len: uint); override; |
|
Notify transmitter (if any) of new RTCP packet |
procedure startIn(); override; |
|
procedure startOut(); override; |
|
procedure weSent(addr: PSockAddrIn; data: pointer; len: uint); |
|
Should be called just after new RTP packet was sent. |
property bind2ip: string read f_bind2ip; |
|
Bind to this interface (default is 0.0.0.0 means bind to all interfaces). |
property bind2port: string read f_bind2port; |
|
Port number (to receive RTP payload on). In case of TCP socket - remote port number to connect to. |
property CN_resendInterval: int read f_CN_resendInterval write f_CN_resendInterval; |
|
Re-send interval for CN packets |
property ip: string read f_ip; |
|
In case of multicast - group IP In case of unicast UDP/TCP sockets - remote host IP (set to '0.0.0.0' for TCP server) |
property isServer: bool read f_isServer; |
|
True if TCP server. |
property portLocal: string read f_portL; |
|
Actual local RTP port number used in this session. Could be used to get port number assigned by system when bind2port property is 0. |
(c) 2012 Lake of Soft