Description | Hierarchy | Fields | Methods | Properties |
type unaIPStreamer = class(unavclInOutPipe)
Basic IP streamer class. Contains code shared by IPReceiver and IPTransmitter.
function sendRTCPApp(subtype: byte; const cmd: aString; data: pointer = nil; len: uint = 0; sendCNAME: bool = false; toAddr: PSockAddrIn = nil): int; |
|
function doGetRTCP(): unaRTCPstack; virtual; abstract; |
|
function doOpen(): bool; override; |
|
function doRead(data: pointer; len: uint): uint; override; |
|
function getAvailableDataLen(index: integer): uint; override; |
|
function getFormatExchangeData(out data: pointer): uint; override; |
|
function isActive(): bool; override; |
|
procedure AfterConstruction(); override; |
|
procedure BeforeDestruction(); override; |
|
procedure doClose(); override; |
|
procedure needHoles(st: int; const host, portRTP: string; const portRTCP: string = ''); virtual; |
|
procedure onFormatChange(rate, channels, bits, encoding, bitrate: int); virtual; |
|
procedure onIdle(); virtual; |
|
procedure onRTCP(ssrc: u_int32; addr: PSockAddrIn; hdr: prtcp_common_hdr; packetSize: int); virtual; |
|
procedure onRTCPBye(si: prtp_site_info; soft: bool); virtual; |
|
procedure setupSessionParams(); virtual; |
|
procedure setURI(const value: string); virtual; |
property bind2ip: string read f_bind2ip write f_bind2ip; |
|
property bind2port: string read f_bind2port; |
|
property bitrate: int read f_br write f_br; |
|
property customPayloadAware: boolean read f_cpa write f_cpa default true; |
|
property descriptionError: string read f_descError; |
|
property descriptionInfo: string read f_descInfo; |
|
property doEncode: boolean read f_encode write f_encode default true; |
|
property enableRTCP: boolean read f_enableRTCP write f_enableRTCP default true; |
|
property exLib[index:unaKnownLibEnum]: string read getExLib write setExLib; |
|
property frameSize: int read f_frameSize write f_frameSize; |
|
property ignoreLocalIPs: boolean read f_ignoreLocalIPs write f_ignoreLocalIPs; |
|
property inBandwidth: int read f_bwIn; |
|
property isFormatProvider; |
|
property mapping: punaRTPMap read getMapping; |
|
property mpegTS_aware: boolean read f_mpegTS_aware write f_mpegTS_aware; |
|
property mpegTS_enabled: boolean read f_mpegTS_enabled; |
|
property mpegTS_PID: TPID read f_mpegTS_PID write f_mpegTS_PID; |
|
property onDataAvailable; |
|
property onFormatChangeAfter; |
|
property onFormatChangeBefore; |
|
property onRTCPApp: unavcIPStreamOnRTCPApp read f_onRTCPApp write f_onRTCPApp; |
|
property outBandwidth: int read f_bwOut; |
|
property protocol: int read f_protocol; |
|
property rtcp: unaRTCPstack read doGetRTCP; |
|
property rtcpTimeoutReports: int32 read getTR write setTR default 6; |
|
property SDP: string read f_SDP write setSDP; |
|
property SDPignorePort: boolean read f_SDPignoreP write f_SDPignoreP; |
|
property socketType: int read f_socketType; |
|
property STUNPort: string read f_STUNPort; |
|
property STUNserver: string read f_STUNserver write setSTUNserver; |
|
property swapRAWbytes: boolean read f_swrb write f_swrb; |
|
property TTL: int read f_ttl write f_ttl; |
|
property URI: string read f_URI write setURI; |
|
property uriHost: string read f_URIHost; |
|
property uriPort: string read f_URIPort; |
|
property URIuserName: string read f_URIuserName write f_URIuserName; |
|
property URIuserPass: string read f_URIuserPass write f_URIuserPass; |
|
property _SSRC: u_int32 read f_ssrc write f_ssrc; |
function sendRTCPApp(subtype: byte; const cmd: aString; data: pointer = nil; len: uint = 0; sendCNAME: bool = false; toAddr: PSockAddrIn = nil): int; |
|
Sends RTCP APP packet to remote side.
Parameters
Returns0 if data was sent successfully, or specific WSA error otherwise. |
function doGetRTCP(): unaRTCPstack; virtual; abstract; |
|
function doOpen(): bool; override; |
|
function doRead(data: pointer; len: uint): uint; override; |
|
Reads data from the pipe. |
function getAvailableDataLen(index: integer): uint; override; |
|
Returns data size available in the pipe (bytes). |
function getFormatExchangeData(out data: pointer): uint; override; |
|
function isActive(): bool; override; |
|
Returns component's active state. ReturnsTrue if component was activated succesfully. |
procedure AfterConstruction(); override; |
|
Sets initial properties values for streamer |
procedure BeforeDestruction(); override; |
|
Releases memory buffers, SDP parser and idle thread |
procedure doClose(); override; |
|
procedure needHoles(st: int; const host, portRTP: string; const portRTCP: string = ''); virtual; |
|
Makes holes in NAT.
Parameters
|
procedure onFormatChange(rate, channels, bits, encoding, bitrate: int); virtual; |
|
procedure onIdle(); virtual; |
|
Got idle, do something useful. Updates In/Out bandwidth. |
procedure onRTCP(ssrc: u_int32; addr: PSockAddrIn; hdr: prtcp_common_hdr; packetSize: int); virtual; |
|
Got new RTCP packet. |
procedure onRTCPBye(si: prtp_site_info; soft: bool); virtual; |
|
Some of destinations got BYE or timedout |
procedure setupSessionParams(); virtual; |
|
Assigns RTCP parameters (like timeouts, etc). Override if additional RTCP configuration is needed. |
procedure setURI(const value: string); virtual; |
|
Parses URI and assigns required properties. Parameters
|
property bind2ip: string read f_bind2ip write f_bind2ip; |
|
Bind internal socket to this IP. Default is '0.0.0.0', means bind to all. |
property bind2port: string read f_bind2port; |
|
Bind internal socket to this locat port. Default is '0', means use first available port. 2012.05.01: made read-only, use SDP to assign non-zero port |
property bitrate: int read f_br write f_br; |
|
Specifies bitrate to be used with encodings aware it. |
property customPayloadAware: boolean read f_cpa write f_cpa default true; |
|
When true the component will analyze custom payloads (such as c_ips_payload_speexNB and other) and initialize accordingly. Default is true. |
property descriptionError: string read f_descError; |
|
Stream error message (mostly for debugging). |
property descriptionInfo: string read f_descInfo; |
|
Stream description (usually received from remote side). |
property doEncode: boolean read f_encode write f_encode default true; |
|
Try to decode/encode supported payloads. Default is True. |
property enableRTCP: boolean read f_enableRTCP write f_enableRTCP default true; |
|
When true the component will use RTCP when applicable (for RTP streaming). Default is true. |
property exLib[index:unaKnownLibEnum]: string read getExLib write setExLib; |
|
External library name. |
property frameSize: int read f_frameSize write f_frameSize; |
|
Internal, do not use. |
property ignoreLocalIPs: boolean read f_ignoreLocalIPs write f_ignoreLocalIPs; |
|
Do not treat local IPs as special case. This allows debugging IPTransmitter and IPReceiver on same machine. |
property inBandwidth: int read f_bwIn; |
|
Input bandwidth. |
property isFormatProvider; |
|
property mapping: punaRTPMap read getMapping; |
|
RTP mapping used for dynamic payload. |
property mpegTS_aware: boolean read f_mpegTS_aware write f_mpegTS_aware; |
|
If True (default) - Reveiver: checks if payload is encapsulated in MPEG-TS stream and decode audio specifed by mpegTS_PID. Transmitter: encapsulate audio into MPEG-TS (not implemented yet). Applies to RAW and RTP MP2T payloads only. |
property mpegTS_enabled: boolean read f_mpegTS_enabled; |
|
True (default) if MPEG TS streaming is anabled Applies to RAW and RTP MP2T payloads only. |
property mpegTS_PID: TPID read f_mpegTS_PID write f_mpegTS_PID; |
|
MPEG TS PID to use. |
property onDataAvailable; |
|
property onFormatChangeAfter; |
|
property onFormatChangeBefore; |
|
property onRTCPApp: unavcIPStreamOnRTCPApp read f_onRTCPApp write f_onRTCPApp; |
|
property outBandwidth: int read f_bwOut; |
|
Output bandwidth. |
property protocol: int read f_protocol; |
|
Protocol to be used by streamer. See c_ips_protocol_XXX for valid values. |
property rtcp: unaRTCPstack read doGetRTCP; |
|
RTCP stack. Could be nil. |
property rtcpTimeoutReports: int32 read getTR write setTR default 6; |
|
RTCP stack timeout. Set to 0 to disable. Default is 6. |
property SDP: string read f_SDP write setSDP; |
|
Specifies additional parameters of audio stream. |
property SDPignorePort: boolean read f_SDPignoreP write f_SDPignoreP; |
|
Specifies whether port number from SDP will be ignored. Default is true. |
property socketType: int read f_socketType; |
|
Socket type to be used by streamer. See c_ips_socket_XXX for valid values. |
property STUNPort: string read f_STUNPort; |
|
Read-ony, set STUNServer to change it |
property STUNserver: string read f_STUNserver write setSTUNserver; |
|
STUN is needed for RTSP client, for example |
property swapRAWbytes: boolean read f_swrb write f_swrb; |
|
Swap bytes in 16bit words after receiving them from network before passing to consumer. Swap bytes in 16bit words before transmitting them into network. Applies for RAW protocol and uncompressed encodings only. Default is False. |
property TTL: int read f_ttl write f_ttl; |
|
TTL for multicast. |
property URI: string read f_URI write setURI; |
|
property uriHost: string read f_URIHost; |
|
Host name provided in URI. (In case of multicast - this is multicast group address). |
property uriPort: string read f_URIPort; |
|
Port number provided in URI. |
property URIuserName: string read f_URIuserName write f_URIuserName; |
|
User name (used as SDES in RTCP) |
property URIuserPass: string read f_URIuserPass write f_URIuserPass; |
|
User password |
property _SSRC: u_int32 read f_ssrc write f_ssrc; |
|
SSRC |
(c) 2012 Lake of Soft