Location:
rtp.h
class RRtpSession;
A handle to an RTP session.
This is the interface to the socket-level RTP service, and provides additional facilities such as header parsing, re-ordering out-of-order packets, demultiplexing multiple sources etc.
The class abstracts all RTP information going to/from a RTP socket, and its corresponding RTCP data.
Each RTP endpoint on a device needs its own RTP session.
Multiple hosts streaming to a port on this device correspond to different RRtpReceiveSource
objects associated with the session.
The class behaviour assumes that an active scheduler has already been created and started; the class does not function correctly if not.
Defined in RRtpSession
:
Close()
, ERtcpPacketCNAME
, ERtcpPacketEMAIL
, ERtcpPacketLOC
, ERtcpPacketNAME
, ERtcpPacketNOTE
, ERtcpPacketPHONE
, ERtcpPacketPRIV
, ERtcpPacketTOOL
, IsOpen()
, MaxRXSize()
, NewReceiveSourceL()
, NewReceiveSourceLC()
, OpenL()
, OpenL()
, OpenL()
, RRtpSession()
, RegisterEventCallbackL()
, RegisterEventCallbackL()
, SetMaxRXSize()
, TRtpSendPacketType
, operator!=()
, operator==()
inline TBool IsOpen() const;
Tests whether the RTP session represented by this handle is open.
|
IMPORT_C void OpenL(RSocketServ &aServer, TSockAddr &aLocalAddr, TSockAddr &aRemoteAddr, TInt aMaxRXSize, RConnection &aConnection,
TInt aPriority=EPriorityNormal, const TDesC8 &aCNAME=KNullDesC8);
Opens the RTP session and initialises it.
No events will be generated until after control returns to the active scheduler. After successfully opening the session, the client has the opportunity to initialise the object by adding the event callbacks, that it requires.
|
IMPORT_C void OpenL(RSocketServ &aServer, TSockAddr &aLocalAddr, TSockAddr &aRemoteAddr, TInt aMaxRXSize, TInt aPriority=EPriorityNormal,
const TDesC8 &aCNAME=KNullDesC8);
Opens the RTP session and initialises it.
No events will be generated until after control returns to the active scheduler. After successfully opening the session, the client has the opportunity to initialise the object by adding the event callbacks, that it requires.
|
IMPORT_C void OpenL(RSocket &aSocket, TInt aMaxRXSize, TInt aPriority=EPriorityNormal);
Opens the session and initialises it without RTCP.
No events will be generated until after control returns to the active scheduler. After successfully opening the session, the client has the opportunity to initialise the object by adding the event callbacks, that it requires.
|
IMPORT_C void Close();
Closes the session.
All RRtpSendSource
and RRtpReceiveSource
objects associated with this session are closed.
IMPORT_C void SetMaxRXSize(TInt aMaxRXSize);
Sets the expected maximum size of a received packet.
This does not affect the packet that is being downloaded or is being waited for, so it is entirely possible that the first packet received after correctly setting the receive packet size will still overflow.
|
|
IMPORT_C TInt MaxRXSize();
Gets the current expected maximum size of a received packet.
|
|
IMPORT_C RRtpReceiveSource NewReceiveSourceL();
Creates a new receive stream, and returns the receive stream handle.
This function should only be called in response to an ERtpNewSource event.
|
|
IMPORT_C RRtpReceiveSource NewReceiveSourceLC();
Creates a new receive stream, puts a pointer to the receive stream object onto the cleanup stack, and returns the receive stream handle.
This function should only be called in response to an ERtpNewSource event.
Note that the function does not put a pointer to the RRtpReceiveSource
object onto the cleanup stack as you might normally expect, but puts a pointer to the receive stream object for which the
returned RRtpReceiveSource
is the handle.
Note also that the API does not give you access to the receive stream object for which the returned RRtpReceiveSource
is the handle.
|
|
inline void RegisterEventCallbackL(TRtpEventType aType, void(*aCallback)(T *, const TRtpEvent &), T *aPtr, TRtpOneShotness
aOneShot, TInt aParameter);
Registers a callback for the specified event.
Some compilers may not support templated member functions. A static version of this function is available that offers the
same behaviour: RegisterEventCallbackL(RRtpSession,TRtpEventType,void (*aCallback)(T*, const TRtpEvent
&),T*,TRtpOneShotness,TInt)
|
inline void RegisterEventCallbackL(TRtpEventType aType, void(*aCallback)(T *, const TRtpEvent &), T *aPtr, TRtpOneShotness
aOneShot=ERtpNotOneShot);
Registers a callback for the specified event.
Some compilers may not support templated member functions. A static version of this function is available that offers the
same behaviour: RegisterEventCallbackL(RRtpSession,TRtpEventType,void (*aCallback)(T*, const TRtpEvent
&),T*,TRtpOneShotness)
|
inline TBool operator==(RRtpSession aThat) const;
Tests whether this session handle represents the same session as the one represented by the specified handle.
|
|
inline TBool operator!=(RRtpSession aThat) const;
Tests whether this session handle represents a different session to the one represented by the specified handle.
|
|
TRtpSendPacketType
A set of bit values passed as a parameter to RRtpSession::SendRTCPPacketL()
to specify the SDES (Source Description) items that are to be sent with the packet. One or more of these may be set.
|