Home Units Hierarchy Routines All identifiers

Unit unaIPStreaming

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

Basic IP Streaming classes.

1.0 first release

Jun 11: [+] bitrate property now works with CELT codec

Oct/Nov 11: [+] G7221, GSM codecs

Feb 12: [+] RTSP Server

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TunaIPDuplex Transmitter and receiver, two in one.
Class TunaIPReceiver Basic IP receiving class.
Class TunaIPTransmitter Basic IP transmitting class.
Class TunaRTPTunnel RTP Tunnel.
Class unaIPStreamer Basic IP streamer class.
record unaIPStreamOnRTCPAppParams  
Class unaIPTransRTSPSession RTSP Sessions
Class unaIPTransRTSPSessionList List of RTSP Sessions
Class unaRTSPDestLinked List of RTSP destinations linked to RTSP connection

Functions and Procedures

function index2sdp(index: int; out pt, sps, nch: int; bitrate: int = -1; const ip: string = ''; ttl: int = -1): string;
function getFormatsList(): string;
procedure Register();

Types

unaKnownLibEnum = (...);
punaIPStreamOnRTCPAppParams = ˆunaIPStreamOnRTCPAppParams;
unavcIPStreamOnRTCPApp = procedure(sender: unavclInOutPipe; const params: unaIPStreamOnRTCPAppParams) of object;
unavcIPReceiverTextEvent = procedure(sender: unavclInOutPipe; const data: pwChar) of object;
unavcIPReceiverRTPHdr = procedure(sender: unavclInOutPipe; hdr: prtp_hdr; data: pointer; len: integer) of object;
unavcIPDataWrite = procedure(sender: unavclInOutPipe; data: pointer; len: integer; out newData: pointer; out newLen: integer) of object;
unavcIPTransmitterExTransCmd = procedure(sender: unavclInOutPipe; udata: uint32; cmd: int32; var data: string) of object;
unaClassOfTransmitter = class of unaRTPTransmitter;

Constants

C_FALLBACK_DEF_CMD = 'C4E23FE4-9E62-4D3A-814C-295E6B67DA73';
c_ips_payload_celt_16000m = 116;
c_ips_payload_celt_24000m = 117;
c_ips_payload_celt_48000s = 118;
c_ips_payload_G7221_24 = 120;
c_ips_payload_G7221_48 = 121;
c_ips_payload_GSM49 = 119;
c_ips_payload_speexNB = 110;
c_ips_payload_speexUWB = 112;
c_ips_payload_speexWB = 111;
c_ips_payload_text = 113;
c_ips_payload_vdvi = 115;
c_ips_payload_vorbis = 114;
c_ips_protocol_ERROR = -1;
c_ips_protocol_RAW = 1;
c_ips_protocol_RTP = 2;
c_ips_protocol_RTSP = 3;
c_ips_protocol_SHOUT = 5;
c_ips_protocol_SIP = 4;
c_ips_socket_TCP = 4;
c_ips_socket_UDP_broadcast = 3;
c_ips_socket_UDP_multicast = 2;
c_ips_socket_UDP_unicast = 1;
c_receiver_noDataWatchDogTimeout = 20000;
C_RE_URL_SESSION_DEST = '\*(.*)\*(.*)\*(.*)';
C_UNA_TRANS_DEST_ADD = 4;
C_UNA_TRANS_DEST_PAUSE = 6;
C_UNA_TRANS_DEST_PLAY = 7;
C_UNA_TRANS_DEST_REMOVE = 5;
C_UNA_TRANS_GET_SDP = 3;
C_UNA_TRANS_PREPARE = 1;

Description

Functions and Procedures

function index2sdp(index: int; out pt, sps, nch: int; bitrate: int = -1; const ip: string = ''; ttl: int = -1): string;

Constructs SDP from specified format index.

Assumes the following indexes: 0 - PCM 8000/1 1 - PCM 16000/1 2 - PCM 32000/1 3 - PCM 44100/1 4 - PCM 48000/1 // – 5 - uLaw 8000/1 6 - ALaw 8000/1 // – 7 - Speex 8000/1 8 - Speex 16000/1 9 - Speex 32000/1 // – 10 - MPEG Audio/2 // – 11 - DVI4 8000/1 12 - DVI4 16000/1 13 - VDVI 8000/1 // – 14 - CELT 16000/1 15 - CELT 24000/1 16 - CELT 48000/2 // – 17 - G.722 16000/1 @ 24kbps 18 - G.722 32000/1 @ 48kbps // – 19 - GSM 8000/1 @ 13 kbps 20 - GSM49 8000/1 @ 13 kbps

Parameters
index
format index
pt
[out] payload
sps
[out] sampling rate
nch
[out] number of channels
ip
optional IP address to include
ttl
optional TTL parameter to add to IP address
Returns

SDP format description

function getFormatsList(): string;
 
Returns

string list of known formats supported by index2sdp() routine.

procedure Register();

IDE integration.

Types

unaKnownLibEnum = (...);

known libraries

Values
  • c_lib_lame: lame_enc.dll
  • c_lib_celt: libcelt.dll
  • c_lib_mpg: libmpg123-0.dll
  • c_lib_speex: libspeex.dll
  • c_lib_speexDSP: libspeexdsp.dll
punaIPStreamOnRTCPAppParams = ˆunaIPStreamOnRTCPAppParams;

Parameters passed to onIPStreamOnRTCPApp event

unavcIPStreamOnRTCPApp = procedure(sender: unavclInOutPipe; const params: unaIPStreamOnRTCPAppParams) of object;

Event fired when new RTCP APP packet is received

unavcIPReceiverTextEvent = procedure(sender: unavclInOutPipe; const data: pwChar) of object;

20 sec

unavcIPReceiverRTPHdr = procedure(sender: unavclInOutPipe; hdr: prtp_hdr; data: pointer; len: integer) of object;
 
unavcIPDataWrite = procedure(sender: unavclInOutPipe; data: pointer; len: integer; out newData: pointer; out newLen: integer) of object;
 
unavcIPTransmitterExTransCmd = procedure(sender: unavclInOutPipe; udata: uint32; cmd: int32; var data: string) of object;
 
unaClassOfTransmitter = class of unaRTPTransmitter;
 

Constants

C_FALLBACK_DEF_CMD = 'C4E23FE4-9E62-4D3A-814C-295E6B67DA73';
 
c_ips_payload_celt_16000m = 116;

CELT 16000 mono

c_ips_payload_celt_24000m = 117;

CELT 24000 mono

c_ips_payload_celt_48000s = 118;

CELT 48000 stereo

c_ips_payload_G7221_24 = 120;

G.722.1 (24kbps)

c_ips_payload_G7221_48 = 121;

G.722.1 (48kbps)

c_ips_payload_GSM49 = 119;

GSM49 - MS GSM

c_ips_payload_speexNB = 110;

known additional payloads (defined as 'dynamic') Speex NB (8000)

c_ips_payload_speexUWB = 112;

Speex UWB (32000)

c_ips_payload_speexWB = 111;

Speex WB (16000)

c_ips_payload_text = 113;

t140 text

c_ips_payload_vdvi = 115;

VDVI

c_ips_payload_vorbis = 114;

OGG/Vorbis

c_ips_protocol_ERROR = -1;

general classes pipes various audio decoders and encoders even more audio decoders and encoders low-level wave routines MPEG-TS demuxer sockets and protocols known protocols

c_ips_protocol_RAW = 1;

no protocol

c_ips_protocol_RTP = 2;

RTP

c_ips_protocol_RTSP = 3;

RTSP

c_ips_protocol_SHOUT = 5;

SHOUTcast/IceCast

c_ips_protocol_SIP = 4;

not yet

c_ips_socket_TCP = 4;

TCP socket

c_ips_socket_UDP_broadcast = 3;

broadcast UDP

c_ips_socket_UDP_multicast = 2;

multicast UDP

c_ips_socket_UDP_unicast = 1;

known socket types unicast UDP

c_receiver_noDataWatchDogTimeout = 20000;

time interval to wait for before re-connecting receiver in case of no data

C_RE_URL_SESSION_DEST = '\*(.*)\*(.*)\*(.*)';

resume streaming to dest data IN = session OUT = <not used> RE for C_UNA_TRANS_DEST_ADD data parsing

C_UNA_TRANS_DEST_ADD = 4;

get SDP from transmitter data IN = local_resource_path OUT = SDP for transmitter assigned to local path

C_UNA_TRANS_DEST_PAUSE = 6;

remove destination from transmitter data IN = session OUT = <not used>

C_UNA_TRANS_DEST_PLAY = 7;

pauses streaming to dest data IN = session OUT = <not used>

C_UNA_TRANS_DEST_REMOVE = 5;

add destination for transmitter udata = recSSRC data IN = '*' + local_resource_path + '*' + session + '*' + destURI OUT = <not used>

C_UNA_TRANS_GET_SDP = 3;

prepare & open transmitter udata = c_ips_socket_UDP_unicast/c_ips_socket_UDP_multicast data IN = local_resource_path OUT = local_RTP_port + '-' + local_RTCP_port C_UNA_TRANS_REMOVE = 2; /// destroy transmitter - THIS COMMAND IS NOT USED data IN = <not used> OUT = <not used>

C_UNA_TRANS_PREPARE = 1;

extrans event commands

Author

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09