Creating the receive stream

This page describes how to create a receive source.

The RRtpReceiveSource class represents the stream of data on a single SSRC (synchronised source) and delivers the RTP packets and RTCP information in the order they arrive.

RRtpSession allows you to create a new receive stream. NewReceiveSourceLC() and NewReceiveSourceL() create a new receive stream and return a handle to an RRtpReceiveSource .

Receiving the packet

RRtpReceivePacket is derived from RRtpPacket and provides a handle to a received RTP packet. To access the packet information, use the functions listed in Preparing the packet .

RRtpReceiveSource provides the following functionality:

IsOpen returns ETrue if the stream is open.

GetByeReason : Retrieves the reason for terminating the session

GetLastApp : Retrieves the parameters from the last APP packet. You must specify the application name, application data, and sub-type of the APP packet.

Packet : Gets the packet that has just arrived, or a closed packet if there is not one.

GetSDES : Gets the data associated with the SDES (Source Description) item such as CNAME, NAME and so on.

SSRC : Gets the source of stream of the RTP packets.

Close : Closes the receive stream and releases all its resources.

To register for events from a stream, refer to the section Registering for and handling events .

Note : Before receiving an RTP packet you must set the bandwidth for the RTP session. The following code snippet shows how to set the bandwidth for an RTP session.

       
        
       
       IMPORT_C void SetBandwidth(TUint aBandwidth)