CRtpAPI Class Reference
class CRtpAPI : public CBase |
API (Application Programming Interface) class for RTP (Real-time Transport Protocol) library.
RtpService.dll
Public Member Functions |
---|
| ~CRtpAPI() |
IMPORT_C void | CancelSend(TRtpId) |
IMPORT_C void | CancelStart() |
IMPORT_C void | Close() |
IMPORT_C void | CloseSession(TRtpId) |
IMPORT_C void | CloseStream(TRtpId) |
IMPORT_C TRtpId | CreateReceiveStreamL(TRtpId, const TRcvStreamParams &) |
IMPORT_C TRtpId | CreateSessionL(const TCreateSessionParams &, TUint &, TBool, const TRtcpParams *) |
IMPORT_C TRtpId | CreateSessionL(const TCreateSessionParams &, TUint &, TBool, const TRtcpParams *, CSRTPSession &) |
IMPORT_C TRtpId | CreateTransmitStreamExtL(TRtpId, const TTranStreamParams &, const TRtpSSRC) |
IMPORT_C TRtpId | CreateTransmitStreamL(TRtpId, const TTranStreamParams &, TRtpSSRC &) |
IMPORT_C TInt | CustomCommandAsync(TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &) |
IMPORT_C TInt | CustomCommandSync(TInt, const TDesC8 &, const TDesC8 &, TDes8 &) |
IMPORT_C TInetAddr & | GetLocalIPAddressL() |
IMPORT_C RSocket * | GetRtcpSocket(TRtpId) |
IMPORT_C RSocket * | GetRtpSocket(TRtpId) |
IMPORT_C TUint32 | GetSamplingRate(TUint8) |
IMPORT_C TRtpId | GetSessionId(TRtpId) |
IMPORT_C TInt | GetStreamStatistics(TRtpId, TRtpPeerStat &) |
IMPORT_C TInt | IsRtcpSendingSuspended(TRtpId, TBool &) |
IMPORT_C CRtpAPI * | NewL(MRtpErrNotify &) |
IMPORT_C TInt | NotInUseSetNonRTPDataObserver() |
IMPORT_C TInt | OpenL(const TRtpSdesParams &, const TDesC *, const RSocketServ *, const RConnection *) |
IMPORT_C TInt | RegisterRtcpObserver(TRtpId, MRtcpObserver &) |
IMPORT_C TInt | RegisterRtpObserver(TRtpId, MRtpObserver &) |
IMPORT_C void | SendDataL(TRtpId, TBool, const TDesC8 &, TRequestStatus &) |
IMPORT_C TInt | SendRtcpAppPacket(TRtpId, const TRtcpApp &) |
IMPORT_C TInt | SendRtcpByePacket(TRtpId, const TDesC8 &) |
IMPORT_C TInt | SendRtcpRrPacket(TRtpId) |
IMPORT_C TInt | SendRtcpSrPacket(TRtpId) |
IMPORT_C TInt | SendRtpPacket(TRtpId, const TRtpSendHeader &, const TDesC8 &) |
IMPORT_C TInt | SendRtpPacket(TRtpId, const TRtpSendHeader &, const TDesC8 &, TRequestStatus &) |
IMPORT_C TInt | SendRtpPacket(TRtpId, TRtpSequence, const TRtpSendHeader &, const TDesC8 &, TRequestStatus &) |
IMPORT_C void | SetLocalSdes(const TRtpSdesParams &) |
IMPORT_C TInt | SetNonRTPDataObserver(TRtpId, MNonRTPDataObserver *) |
IMPORT_C TInt | SetRemoteAddress(TRtpId, const TInetAddr &) |
IMPORT_C TInt | SetRemoteRtcpAddress(TRtpId, const TInetAddr &) |
IMPORT_C TInt | SetRtcpParameters(TRtpId, const TRtcpParams &) |
IMPORT_C TInt | SetSamplingRate(TUint8, TUint32) |
IMPORT_C TInt | StartConnection(TInt) |
IMPORT_C TInt | StartConnection(TRequestStatus &, TInt) |
IMPORT_C TInt | StartSession(TRtpId) |
IMPORT_C TInt | SuspendRtcpSending(TRtpId, TBool) |
IMPORT_C void | UnregisterRtcpObserver(TRtpId) |
IMPORT_C void | UnregisterRtpObserver(TRtpId) |
IMPORT_C TVersion | Version() |
Constructor & Destructor Documentation
Member Functions Documentation
CancelSend(TRtpId)
IMPORT_C void | CancelSend | ( | TRtpId | aSessionId | ) | |
CancelStart()
IMPORT_C void | CancelStart | ( | ) | |
Cancels asynchoronous start of connection. Any open requests will be completed with KErrCancel.
CloseSession(TRtpId)
IMPORT_C void | CloseSession | ( | TRtpId | aSessionId | ) | |
Parameters
TRtpId aSessionId | - [input] Session ID |
CloseStream(TRtpId)
IMPORT_C void | CloseStream | ( | TRtpId | aStreamId | ) | |
Close a Transmit or Receive stream.
ConstructL(MRtpErrNotify &)
By default Symbian 2nd phase constructor is private.
CreateReceiveStreamL(TRtpId, const TRcvStreamParams &)
Create a Receive stream for an RTP Session and return the stream ID which is unique for all RTP Sessions.
CreateSessionL(const TCreateSessionParams &, TUint &, TBool, const TRtcpParams *)
Create a new RTP Session and return the Session ID as well as the local port number assigned for RTP. RTP uses an even port number and RTCP, if enabled, uses the next higher (odd) port number.
Parameters
const TCreateSessionParams & aSessionParams | - [input] Session parameters |
TUint & aPort | - [input] Local port number to use for RTP; 0 to use default port number[output] port number assigned for RTP |
TBool aEnableRtcp | - [input] ETrue to enable RTCP; EFalse to disable |
const TRtcpParams * aRtcpParams | - [input] RTCP parameters to use; NULL to use default RTCP parameters |
CreateSessionL(const TCreateSessionParams &, TUint &, TBool, const TRtcpParams *, CSRTPSession &)
Create a new, secure RTP Session and return the Session ID as well as the local port number assigned for RTP. RTP uses an even port number and RTCP, if enabled, uses the next higher (odd) port number. User is expected to create corresponding SRTP session prior to calling this function.
Parameters
const TCreateSessionParams & aSessionParams | - [input] Session parameters |
TUint & aPort | - [input] Local port number to use for RTP; 0 to use default port number[output] port number assigned for RTP |
TBool aEnableRtcp | - [input] ETrue to enable RTCP; EFalse to disable |
const TRtcpParams * aRtcpParams | - [input] RTCP parameters to use; NULL to use default RTCP parameters |
CSRTPSession & aSession | - [input] SRTP session to be used by this RTP session. |
CreateTransmitStreamExtL(TRtpId, const TTranStreamParams &, const TRtpSSRC)
Create a Transmit stream, with a given SSRC value, for an RTP Session and return the stream ID which is unique for all RTP Sessions. This extended function is used for a special case where a specific SSRC value needs to be associated with the transmit stream being created, e.g. for retransmission purpose.
CreateTransmitStreamL(TRtpId, const TTranStreamParams &, TRtpSSRC &)
Create a Transmit stream for an RTP Session and return the stream ID which is unique for all RTP Sessions. SSRC value assigned for the very first Transmit stream will be the same as the default SSRC value reserved internally by CreateSession function. This function is normally used to create a transmit stream where SSRC value is randomly generated.
Parameters
TRtpId aSessionId | - [input] RTP Session ID |
const TTranStreamParams & aParams | - [input] Transmit stream parameters |
TRtpSSRC & aSSRC | - [output] SSRC value assigned |
CustomCommandAsync(TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
ASynchronous custom command interface for future extensions. Input/output data and return value are defined by each custom command
Parameters
TInt aFunction | - [input] Function ID |
const TDesC8 & aInputData1 | - [input] Input data #1; NULL if not used |
const TDesC8 & aInputData2 | - [input] Input data #2; NULL if not used |
TDes8 & aOutputData | - [output] Output data; NULL if not used |
TRequestStatus & aStatus | - [output] On completion, will contain a status code: KErrNone if successful; system wide error code otherwise |
CustomCommandSync(TInt, const TDesC8 &, const TDesC8 &, TDes8 &)
Synchronous custom command interface for future extensions. Input/output data and return value are defined by each custom command
Parameters
TInt aFunction | - [input] Function ID |
const TDesC8 & aInputData1 | - [input] Input data #1; NULL if not used |
const TDesC8 & aInputData2 | - [input] Input data #2; NULL if not used |
TDes8 & aOutputData | - [output] Output data; NULL if not used |
GetRtcpSocket(TRtpId)
Get address of Socket object used by a given RTP Session to send/receive RTCP control packets.
Parameters
TRtpId aSessionId | - [input] RTP Session ID |
GetRtpSocket(TRtpId)
Get address of Socket object used by a given RTP Session to send/receive RTP data packets.
Parameters
TRtpId aSessionId | - [input] RTP Session ID |
GetSamplingRate(TUint8)
Get sampling rate setting for a payload type.
Parameters
TUint8 aPayloadType | - [input] Payload type |
GetSessionId(TRtpId)
Get the session ID of a stream, which belongs to that session.
Parameters
TRtpId aStreamId | - [input] ID of a stream |
GetStreamStatistics(TRtpId, TRtpPeerStat &)
Retrieve statistical information for a stream based on the reports from RTCP SR & RR packets.
Parameters
TRtpId aStreamId | - [input] ID of stream |
TRtpPeerStat & aStat | - [output] Statistical information |
IsRtcpSendingSuspended(TRtpId, TBool &)
IMPORT_C TInt | IsRtcpSendingSuspended | ( | TRtpId | aSessionId, |
| TBool & | aAutoSending |
| ) | |
Gets the status of automatic RTCP sending.
NotInUseSetNonRTPDataObserver()
IMPORT_C TInt | NotInUseSetNonRTPDataObserver | ( | ) | |
Dummy function to fix Raptor error
OpenL(const TRtpSdesParams &, const TDesC *, const RSocketServ *, const RConnection *)
Open and initialize the CRtpAPI object.
Parameters
const TRtpSdesParams & aSdesInfo | - [input] SDES (Source Description) of the local participant (CName, Username, etc.) |
const TDesC * aRtpPacketDll | - [input] Path+file name of RTP packet formatting DLL to use; NULL to use standard RTP packet format Ownership is transfered. |
const RSocketServ * aSocketServPtr | |
const RConnection * aConnPtr | |
RegisterRtcpObserver(TRtpId, MRtcpObserver &)
Register a callback object for receiving RTCP packets associated with a given RTP Session. Only one observer callback object is allowed to be registered. One of aRtcpObserver object's callback functions is called when an RTCP packet of that type is received.
RegisterRtpObserver(TRtpId, MRtpObserver &)
Register a callback object for receiving RTP data packets from an RTP Session. Only one receiver callback object is allowed to be registered for one Session. MRtpObserver::RtpPacketReceived function from aRtpObserver object is called when an RTP data packet is received.
Parameters
TRtpId aSessionId | - [input] RTP Session ID |
MRtpObserver & aRtpObserver | - [input] Callback object to receive RTP packets |
SendDataL(TRtpId, TBool, const TDesC8 &, TRequestStatus &)
Send a non-RTP (control) data packet asynchronously
Parameters
TRtpId aSessionId | - [input] RTP Session ID |
TBool aUseRTPSocket | - [input] use RTP/RTCP socket |
const TDesC8 & aData | - [input] non-RTP data packet to send |
TRequestStatus & aStatus | - [output] On completion, will contain a status code: KErrNone if successful; system wide error code otherwise |
SendRtcpAppPacket(TRtpId, const TRtcpApp &)
Send an RTCP APP packet for a Transmit stream.
SendRtcpByePacket(TRtpId, const TDesC8 &)
Send an RTCP BYE packet for a Transmit stream.
Parameters
TRtpId aTranStreamId | - [input] Transmit stream ID |
const TDesC8 & aReason | - [input] Reason for leaving |
SendRtcpRrPacket(TRtpId)
Send an RTCP RR packet for a Reception stream.
SendRtcpSrPacket(TRtpId)
IMPORT_C TInt | SendRtcpSrPacket | ( | TRtpId | aTranStreamId | ) | |
Send an RTCP SR packet for a Transmit stream.
SendRtpPacket(TRtpId, const TRtpSendHeader &, const TDesC8 &)
Send an RTP data packet in a Transmit stream synchronously.
Parameters
TRtpId aTranStreamId | - [input] ID of Transmit stream |
const TRtpSendHeader & aHeaderInfo | - [input] Header information of RTP data packet |
const TDesC8 & aPayloadData | - [input] Payload data of RTP data packet |
SendRtpPacket(TRtpId, const TRtpSendHeader &, const TDesC8 &, TRequestStatus &)
Send an RTP data packet in a Transmit stream asynchronously.
Parameters
TRtpId aTranStreamId | |
const TRtpSendHeader & aHeaderInfo | - [input] Header information of RTP data packet to send |
const TDesC8 & aPayloadData | - [input] Payload data of RTP data packet to send |
TRequestStatus & aStatus | - [output] On completion, will contain a status code: KErrNone if successful; system wide error code otherwise |
SendRtpPacket(TRtpId, TRtpSequence, const TRtpSendHeader &, const TDesC8 &, TRequestStatus &)
Send an RTP data packet asynchronously, with a given sequence number, in a Transmit stream mainly for retransmission purpose.
Parameters
TRtpId aTranStreamId | - [input] ID of Transmit stream |
TRtpSequence aSequenceNum | - [input] Sequence number to use |
const TRtpSendHeader & aHeaderInfo | - [input] Header information of RTP data packet |
const TDesC8 & aPayloadData | - [input] Payload data of RTP data packet to send |
TRequestStatus & aStatus | - [output] On completion, will contain a status code: KErrNone if successful; system wide error code otherwise |
SetLocalSdes(const TRtpSdesParams &)
Set SDES (Source Description) information of the local participant. Participant is defined as an application program and only one local participant is allowed.
Parameters
const TRtpSdesParams & aSdesInfo | - [input] SDES of the local participant (CName, Username, etc.). |
SetNonRTPDataObserver(TRtpId, MNonRTPDataObserver *)
Sets/resets the observer for the non-RTP data. Only one receiver callback object is allowed to be registered for one Session. MNonRTPDataObserver::NonRTPDataReceived or MNonRTPDataObserver::NonRTCPDataReceived from aNonRTPDataObserver object is called when a non-RTP data packet is received.
SetRemoteAddress(TRtpId, const TInetAddr &)
Set remote IP address and port number to RTP Session. Port number for RTP must be an even number and the corresponding RTCP, if enabled, will be set to use the next higher (odd) port.
Parameters
TRtpId aSessionId | - [input] RTP Session ID |
const TInetAddr & aRemoteAddr | - [input] Remote IP address & port number for RTP |
SetRemoteRtcpAddress(TRtpId, const TInetAddr &)
Set remote RTCP IP address and port number to RTP Session accoring to RFC 3605 i.e. this should be used if RTCP port is different than RTP port + 1
SetRtcpParameters(TRtpId, const TRtcpParams &)
Set RTCP parameters for a given RTP Session. This function does nothing if RTCP was not enabled previously.
Parameters
TRtpId aSessionId | - [input] RTP Session ID |
const TRtcpParams & aRtcpParams | - [input] RTCP parameters to use |
SetSamplingRate(TUint8, TUint32)
Set sampling rate for a payload type.
Parameters
TUint8 aPayloadType | - [input] Payload type |
TUint32 aSamplingRate | - [input] Sampling rate in Hz |
StartConnection(TInt)
IMPORT_C TInt | StartConnection | ( | TInt | aIapId = -1 | ) | |
Open and initialize the CRtpAPI object.
Parameters
TInt aIapId = -1 | - [input] IAP ID. If -1, no IAP selection dialog will pop up. Instead, the default IAP will be used. |
StartConnection(TRequestStatus &, TInt)
Open and initialize the CRtpAPI object in asynchronous mode
Parameters
TRequestStatus & aStatus | - [output] On completion, will contain a status code: KErrNone if successful; system wide error code otherwise. |
TInt aIapId = -1 | - [input] IAP ID. If -1, no IAP selection dialog will pop up. Instead, the default IAP will be used. |
StartSession(TRtpId)
Start an RTP Session. If enabled, RTCP associated with the given session is also started.
Parameters
TRtpId aSessionId | - [input] Session ID |
SuspendRtcpSending(TRtpId, TBool)
Suspend RTCP sending on/off, calculations will continue.
UnregisterRtcpObserver(TRtpId)
IMPORT_C void | UnregisterRtcpObserver | ( | TRtpId | aSessionId | ) | |
Unregister RTCP observer callback object associated with an RTP session.
Parameters
TRtpId aSessionId | - [input] RTP Session ID |
UnregisterRtpObserver(TRtpId)
IMPORT_C void | UnregisterRtpObserver | ( | TRtpId | aSessionId | ) | |
Unregister RTP observer callback object associated with an RTP session.
Parameters
TRtpId aSessionId | - [input] RTP Session ID |
Version()
Version of RtpService.dll
Member Data Documentation
TAny * iReserved1
TAny * | iReserved1 | [private] |
TAny * iReserved2
TAny * | iReserved2 | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.