Description | Hierarchy | Fields | Methods | Properties |
type TunaIPTransmitter = class(unaIPStreamer)
Basic IP transmitting class.
function destAdd(dstatic: bool; const URI: string; enabled: bool = true; const session: string = ''; recSSRC: uint32 = 0; ttl: int = -1): int; |
|
function destEnable(const URI: string; const session: string = ''; doEnable: bool = true): bool; overload; |
|
function destEnable(index: int; doEnable: bool = true): bool; overload; |
|
function destRemove(index: int): bool; overload; |
|
function destRemove(const URI: string; const session: string = ''): bool; overload; |
|
function sendText(const text: wString): HRESULT; |
|
function doGetRTCP(): unaRTCPstack; override; |
|
function doOpen(): bool; override; |
|
function doWrite(_data: pointer; _len: uint; provider: pointer = nil): uint; override; |
|
function ExTransCmd(cmd: int32; var data: string; udata: uint32 = 0): HRESULT; virtual; |
|
function hasSession(const session: string): bool; |
|
function sessionAcqByDestURI(const destURI: string; ro: bool = true): unaIPTransRTSPSession; |
|
function sessionAcqByIndex(index: int; ro: bool = true): unaIPTransRTSPSession; |
|
function sessionAcqBySession(const session: string; ro: bool = true): unaIPTransRTSPSession; |
|
procedure AfterConstruction(); override; |
|
procedure BeforeDestruction(); override; |
|
procedure doClose(); override; |
|
procedure onDataEncoded(sampleDelta: uint; _data: pointer; _len: int; provider: pointer = nil; marker: bool = false; tpayload: int = -1); virtual; |
|
procedure onFormatChange(rate, channels, bits, encoding, bitrate: int); override; |
|
procedure onIdle(); override; |
|
procedure onPayload(addr: PSockAddrIn; hdr: prtp_hdr; data: pointer; len, packetSize: uint); virtual; |
|
procedure onRTCPBye(si: prtp_site_info; soft: bool); override; |
|
procedure RTSPSrvReqest(reqInt: int; const fromIP: string; request: unaRTSPServerParser; var headers, body, msg: string; var respcode: int); virtual; |
|
procedure setupSessionParams(); override; |
|
procedure setURI(const value: string); override; |
property autoAddDestFromHolePacket: bool read f_autoAddDestFromHolePacket write f_autoAddDestFromHolePacket; |
|
property bitrate; |
|
property destCount: int read getDestCount; |
|
property frameSize; |
|
property onAfterEncodeWrite: unavcIPDataWrite read f_onAfterEncodeWrite write f_onAfterEncodeWrite; |
|
property onBeforeEncodeWrite: unavcIPDataWrite read f_onBeforeEncodeWrite write f_onBeforeEncodeWrite; |
|
property onExTransCmd: unavcIPTransmitterExTransCmd read f_onExTransCmd write f_onExTransCmd; |
|
property srvRTSP: unaRTSPServer read f_transRTSP; |
|
property srvSHOUT: unaSHOUTtransmitter read f_transSHOUT; |
|
property transRoot: unaRTPTransmitter read f_transRTP_root; |
|
property URI; |
function destAdd(dstatic: bool; const URI: string; enabled: bool = true; const session: string = ''; recSSRC: uint32 = 0; ttl: int = -1): int; |
|
Adds new destination/session for transmitter.
Parameters
Returnsdestination index |
function destEnable(const URI: string; const session: string = ''; doEnable: bool = true): bool; overload; |
|
Enables or disables streaming to specified destination.
Parameters
ReturnsTrue if successfull |
function destEnable(index: int; doEnable: bool = true): bool; overload; |
|
Enables or disables streaming to specified destination.
Parameters
ReturnsTrue if successfull |
function destRemove(index: int): bool; overload; |
|
Removes destination.
Parameters
ReturnsTrue if successfull |
function destRemove(const URI: string; const session: string = ''): bool; overload; |
|
Removes destination.
Parameters
ReturnsTrue if successfull |
function sendText(const text: wString): HRESULT; |
|
Sends text to remote side. |
function doGetRTCP(): unaRTCPstack; override; |
|
Returns RTCP stack object. |
function doOpen(): bool; override; |
|
function doWrite(_data: pointer; _len: uint; provider: pointer = nil): uint; override; |
|
Writes data into transmitter. |
function ExTransCmd(cmd: int32; var data: string; udata: uint32 = 0): HRESULT; virtual; |
|
Prepares transmitter for streaming |
function hasSession(const session: string): bool; |
|
ReturnsTrue if this transmitter has specified session |
function sessionAcqByDestURI(const destURI: string; ro: bool = true): unaIPTransRTSPSession; |
|
Acquires session object by destination URI |
function sessionAcqByIndex(index: int; ro: bool = true): unaIPTransRTSPSession; |
|
Acquires session object by session name |
function sessionAcqBySession(const session: string; ro: bool = true): unaIPTransRTSPSession; |
|
Acquires session object by session name |
procedure AfterConstruction(); override; |
|
Creates transmitter and assigns unaRTPTransmitter as transmitter class |
procedure BeforeDestruction(); override; |
|
Disposes various transmitters and encoders. |
procedure doClose(); override; |
|
procedure onDataEncoded(sampleDelta: uint; _data: pointer; _len: int; provider: pointer = nil; marker: bool = false; tpayload: int = -1); virtual; |
|
procedure onFormatChange(rate, channels, bits, encoding, bitrate: int); override; |
|
procedure onIdle(); override; |
|
procedure onPayload(addr: PSockAddrIn; hdr: prtp_hdr; data: pointer; len, packetSize: uint); virtual; |
|
Transmitter can also receive data in some cases. |
procedure onRTCPBye(si: prtp_site_info; soft: bool); override; |
|
Some of destinations got BYE or timedout |
procedure RTSPSrvReqest(reqInt: int; const fromIP: string; request: unaRTSPServerParser; var headers, body, msg: string; var respcode: int); virtual; |
|
Handle RTSP Server request |
procedure setupSessionParams(); override; |
|
Sets user name, SSRC, session destinations. |
procedure setURI(const value: string); override; |
|
Assigns unicast bind2ip/bind2port. |
property autoAddDestFromHolePacket: bool read f_autoAddDestFromHolePacket write f_autoAddDestFromHolePacket; |
|
Automatically add destinations gathered from RTP "hole" packets. Default is True |
property bitrate; |
|
Bitrate for codecs that support it (like MPEG Audio codec) |
property destCount: int read getDestCount; |
|
Number of sessions/destinations |
property frameSize; |
|
Frame size (in samples) for transmitter. Usually used when doEncode is false. |
property onAfterEncodeWrite: unavcIPDataWrite read f_onAfterEncodeWrite write f_onAfterEncodeWrite; |
|
Fired when data is encoded and is about to be passed to network |
property onBeforeEncodeWrite: unavcIPDataWrite read f_onBeforeEncodeWrite write f_onBeforeEncodeWrite; |
|
Fired before data received from provider is about to be passed to encoders |
property onExTransCmd: unavcIPTransmitterExTransCmd read f_onExTransCmd write f_onExTransCmd; |
|
Fired when RTSP server needs some action on exteranl RTP Transmitters. |
property srvRTSP: unaRTSPServer read f_transRTSP; |
|
Internal RTSP server |
property srvSHOUT: unaSHOUTtransmitter read f_transSHOUT; |
|
Internal SHOUTcast stream "pusher" |
property transRoot: unaRTPTransmitter read f_transRTP_root; |
|
Low-level "root" RTP transmitter. May be nil. |
property URI; |
|
Transmitter network options. Possible values: ——– RAW ——– udp://0.0.0.0:7654 - RAW unicast stream (set SDP to specify stream format) 0.0.0.0 - bind to this IP 7654 - bind to this Port udp://224.0.1.2:7654 - RAW multicast stream (set SDP to specify stream format) 224.0.1.2 - join this multicast group 7654 - use this port ——– RTP ——– rtp://username@0.0.0.0:1254 - RTP unicast stream (may need additional SDP in case of dynamic payload) username - assign this user name (optional) 0.0.0.0 - bind to this IP 1254 - bind to this port rtp://username@192.168.0.200:1254 - RTP unicast stream (may need additional SDP in case of dynamic payload) username - assign this user name (optional) 192.168.0.200 - "push" RTP stream to this destination 1254 - destination port port rtp://username@224.0.1.2:1254 - RTP multicast stream (may need additional SDP in case of dynamic payload) username - assign this user name (optional) 224.0.1.2 - join this multicast group 1254 - use this port ——– RTSP ——– rtsp://username@0.0.0.0:15000 - RTSP server username - assign this user name to internal RTP transmitter (optional) 0.0.0.0 - bind to this IP 15000 - use this port ——– SHOUTcast ——– http://source:hackme@192.168.0.174:8000/stream_name - streams audio to IceCast/DNAS server source – user/source name hackme – password 192.168.0.174 – server IP/name 8000 – port stream_name – name of stream |
(c) 2012 Lake of Soft