Home Units Hierarchy Routines All identifiers

Class unaRTPStreamer

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaRTPStreamer = class(unaThread)

Description

Basic RTP receiver (UDP only)

Hierarchy

Overview

Methods

Protected function grantStop(): bool; override;
Public procedure AfterConstruction(); override;
Public procedure BeforeDestruction(); override;
Public procedure rentSockets(doRent: bool);
Protected procedure onBye(si: prtp_site_info; soft: bool); virtual;
Protected procedure onDataSent(rtcp: bool; data: pointer; len: uint); virtual;
Protected procedure onIdle(rtcpIdle: bool); virtual;
Protected procedure onPayload(addr: PSockAddrIn; hdr: prtp_hdr; data: pointer; len, packetSize: uint); virtual;
Protected procedure onRTCPPacket(ssrc: u_int32; addr: PSockAddrIn; hdr: prtcp_common_hdr; packetSize: uint); virtual;
Protected procedure onSsrcCNAME(ssrc: u_int32; cname: prtcp_sdes_item); virtual;
Protected procedure pingsock();
Protected procedure pushRTCPPacket(packet: pointer; len: uint); virtual;
Protected procedure startIn(); override;

Properties

Public property active: bool read f_active;
Public property cname8: aString read f_cname8;
Public property isMulticast: bool read f_isMC;
Public property isRAW: bool read f_isRAW write f_isRAW;
Public property isUDP: bool read f_isUDP;
Public property noRTCP: bool read f_noRTCP write f_noRTCP;
Public property rtcp: unaRTCPstack read f_rtcp;
Public property socketError: int read f_socketError;
Protected property socketNoReading: bool read f_socketNoReading;
Protected property socketObjRTP: unaSocket read f_socket;
Public property ttl: int read f_ttl write f_ttl;
Public property userName: wString read f_userName write f_userName;
Public property _SSRC: u_int32 read f_ssrc;

Description

Methods

Protected function grantStop(): bool; override;

"Pings" main listening socket so it will return from select().

Public procedure AfterConstruction(); override;
 
Public procedure BeforeDestruction(); override;
 
Public procedure rentSockets(doRent: bool);

Disables or enables internal sockets from reading. Some clients (like STUN) may need to disable sockets for short time.

Protected procedure onBye(si: prtp_site_info; soft: bool); virtual;

Called from RTCP thread when BYE packet was received.

Protected procedure onDataSent(rtcp: bool; data: pointer; len: uint); virtual;

Called each time new packet is sent to remote side

Parameters
rtcp
true if that was RTCP payload
data
data sent
len
size of data sent
Protected procedure onIdle(rtcpIdle: bool); virtual;

Called from context of idle thread.

Protected procedure onPayload(addr: PSockAddrIn; hdr: prtp_hdr; data: pointer; len, packetSize: uint); virtual;

New RTP packed was received.

Parameters
addr
Remote address packet was received from.
hdr
RTP packet header.
data
Packet payload.
len
Payload size.
packetSize
Packet size including padding.
Protected procedure onRTCPPacket(ssrc: u_int32; addr: PSockAddrIn; hdr: prtcp_common_hdr; packetSize: uint); virtual;

Called from RTCP thread when new RTCP packed was received.

Parameters
ssrc
Generator of packet
addr
Remote address packet was received from.
hdr
RTCP packet header.
packetSize
Packet size including padding.
Protected procedure onSsrcCNAME(ssrc: u_int32; cname: prtcp_sdes_item); virtual;

Called from RTCP thread when SDES packet was received.

Protected procedure pingsock();

Sends 1 byte to main listening socket so it will return from select() immediately.

Protected procedure pushRTCPPacket(packet: pointer; len: uint); virtual;

Streamer (like transmitter) could have own set of destinations, give it a chance to push RTCP data over

Protected procedure startIn(); override;

Thread just started.

Properties

Public property active: bool read f_active;
 
Public property cname8: aString read f_cname8;

UTF8 version of CNAME

Public property isMulticast: bool read f_isMC;

True if multicast.

Public property isRAW: bool read f_isRAW write f_isRAW;

True if receiver is RAW (no RTP/RTCP will be used).

Public property isUDP: bool read f_isUDP;

True if receiver is RAW (no RTP/RTCP will be used).

Public property noRTCP: bool read f_noRTCP write f_noRTCP;

True if no RTCP support is required.

Public property rtcp: unaRTCPstack read f_rtcp;

RTCP stack. Could be nil.

Public property socketError: int read f_socketError;
 
Protected property socketNoReading: bool read f_socketNoReading;

Use rentSockets() to enable/disable

Protected property socketObjRTP: unaSocket read f_socket;

Internal socket.

Public property ttl: int read f_ttl write f_ttl;

TTL value

Public property userName: wString read f_userName write f_userName;

Default is className

Public property _SSRC: u_int32 read f_ssrc;

SSRC

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09