Home Units Hierarchy Routines All identifiers

Class TunaIPReceiver

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TunaIPReceiver = class(unaIPStreamer)

Description

Basic IP receiving class.

Hierarchy

Overview

Methods

Protected function doGetRTCP(): unaRTCPstack; override;
Protected function doOpen(): bool; override;
Protected function doWrite(_data: pointer; _len: uint; provider: pointer = nil): uint; override;
Protected function isActive(): bool; override;
Protected function onNewData(_data: pointer; _len: uint; provider: pointer = nil): bool; override;
Public procedure AfterConstruction(); override;
Public procedure BeforeDestruction(); override;
Protected procedure doClose(); override;
Protected procedure needHoles(st: int; const host, portRTP: string; const portRTCP: string = ''); override;
Protected procedure onFormatChange(rate, channels, bits, encoding, bitrate: int); override;
Protected procedure onNewText(data: pointer; len: int); virtual;
Protected procedure onRTPHdr(hdr: prtp_hdr; data: pointer; len: int); virtual;
Protected procedure rtspGotError(const uri, control: string; req: int; errorCode: HRESULT); virtual;
Protected procedure rtspGotResponse(const uri, control: string; req: int; response: unaHTTPparser); virtual;
Protected procedure setupSessionParams(); override;

Properties

Published property CNresendInterval: int read getCNRI write setCNRI default c_def_CNresendInterval;
Public property mpegTS_demuxer: unaMpegTSDemuxer read getDemuxer;
Published property onAfterDecodeWrite: unavcIPDataWrite read f_onAfterDecodeWrite write f_onAfterDecodeWrite;
Published property onBeforeDecodeWrite: unavcIPDataWrite read f_onBeforeDecodeWrite write f_onBeforeDecodeWrite;
Published property onRTPHeader: unavcIPReceiverRTPHdr read f_onRTPHdr write f_onRTPHdr;
Published property onText: unavcIPReceiverTextEvent read f_onText write f_onText;
Public property rec: unaRTPReceiver read f_receiverRTP;
Published property reconnectIfNoData: boolean read f_rifnd write f_rifnd default true;
Published property STUNserver;
Published property URI;

Description

Methods

Protected function doGetRTCP(): unaRTCPstack; override;

Returns internal RTCP stack object.

Protected function doOpen(): bool; override;

Creates and opens internal receiver/decoder classes.

Protected function doWrite(_data: pointer; _len: uint; provider: pointer = nil): uint; override;

Passes compressed data to decoders according to encoding property.

Protected function isActive(): bool; override;

Returns component's active state.

Returns

True if component was activated succesfully.

Protected function onNewData(_data: pointer; _len: uint; provider: pointer = nil): bool; override;

Processes new data available from the pipe.

Returns

True if successfull.

Public procedure AfterConstruction(); override;

Creates encoders and decoders for receiver

Public procedure BeforeDestruction(); override;

Disposes receivers, encoders and decoders

Protected procedure doClose(); override;

Closes the receiver.

Protected procedure needHoles(st: int; const host, portRTP: string; const portRTCP: string = ''); override;

Sends RTCP and RTP packets to remote side to make holes in NAT

Protected procedure onFormatChange(rate, channels, bits, encoding, bitrate: int); override;

Applies new format on decoders.

Protected procedure onNewText(data: pointer; len: int); virtual;

Fired when new portion of text is received from remote side.

Protected procedure onRTPHdr(hdr: prtp_hdr; data: pointer; len: int); virtual;

Fired when new RTP header is received.

Protected procedure rtspGotError(const uri, control: string; req: int; errorCode: HRESULT); virtual;

RTSP error

Protected procedure rtspGotResponse(const uri, control: string; req: int; response: unaHTTPparser); virtual;

RTSP response

Protected procedure setupSessionParams(); override;

Applies required changes on RTCP object.

Properties

Published property CNresendInterval: int read getCNRI write setCNRI default c_def_CNresendInterval;

Resend interval for CN packets.

Public property mpegTS_demuxer: unaMpegTSDemuxer read getDemuxer;

MPEG TS demuxer.

Published property onAfterDecodeWrite: unavcIPDataWrite read f_onAfterDecodeWrite write f_onAfterDecodeWrite;

Fired when data is decoded and is about to be passed to consumer(s)

Published property onBeforeDecodeWrite: unavcIPDataWrite read f_onBeforeDecodeWrite write f_onBeforeDecodeWrite;

Fired before data received from network is about to be passed to decoders.

Published property onRTPHeader: unavcIPReceiverRTPHdr read f_onRTPHdr write f_onRTPHdr;

Fired when new RTP packet is received.

Published property onText: unavcIPReceiverTextEvent read f_onText write f_onText;

Fired when new text is received.

Public property rec: unaRTPReceiver read f_receiverRTP;

Low-level RTP receiver.

Published property reconnectIfNoData: boolean read f_rifnd write f_rifnd default true;

Reconnects to remote stream if no data is received for some time.

Published property STUNserver;

RTSP client should use it

Published property URI;

Possible values:

– RAW – udp://192.168.0.10:7654 - receive RAW unicast stream (set SDP to specify stream format) 192.168.0.10 - remote address 7654 - remote port

udp://224.0.1.2:7654 - receive RAW multicast stream (set SDP to specify stream format) 224.0.1.2 - join this multicast group 7654 - communicate on this port

tcp://192.168.0.170:5008 - RAW unicast TCP stream 192.168.0.170 - remote server address 5008 - remote server port

– RTP – rtp://192.168.0.12:1254 - receive RTP unicast stream (may need additional SDP in case of dynamic payload) 192.168.0.12 - use this IP for streaming 1254 - use this port for RTP (1255 will be used for RTCP)

rtp://224.0.1.2:1254 - receive RTP multicast stream (may need additional SDP in case of dynamic payload) 224.0.1.2 - join this multicast group 1254 - communicate on this port

– RTSP – rtsp://192.168.0.170/ - use RTSP streaming negotiation (check SDP for details) 192.168.0.170 - connect to this host for RTSP server Default port is 554

– SHOUTcast – http://87.98.132.103:8230 - receive SHOUTcast stream 87.98.132.103 - connect to this host for SHOUTcast stream 8230 - use this port for communication

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09