diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-59230503-7E2E-505D-9BC9-C2D2DB96B3E9.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-59230503-7E2E-505D-9BC9-C2D2DB96B3E9.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,55 @@ + + + + + +RTPExample: +RTP Packet Streaming Example +
Description

This example code demonstrates RTP +packet streaming. It uses CRtpFileSender to send RTP packets +and CRtpFileStreamer to receive RTP packets. The example +opens an RTP session using the pre-connected socket and initialises new send +and receive sources on the RTP session. It registers the callback functions +when an RTP packet is successfully sent by a send source or received by a +receive source, to receive notifications whenever an RTP packet is sent or +received.

The RTPExample example code provides +the following functionality:

+
Download

Click +on the following link to download the example: RTPExample.zip

Click browse to view the example code.

+
Initialising void CRtpFileStreamer::ConstructL();

Opens an RTP session using the pre-connected socket and initialises new send +sources on the RTP session.

+
Sending an RTP packet void CRtpFileSender::RunL();

Sends the RTP packet. This does the following:

    +
  • gets a new RTP packet +to send from the send source

  • +
  • sets the RTP timestamp +of the RTP packet

  • +
  • reads a block of data +from the source file

  • +
  • creates an RTP packet +using the block of data

  • +
  • sends the RTP packet

  • +
  • closes the source file.

  • +

CRtpFileSender::PacketSent() is called to notify +that the RTP packet has been successfully sent.

+
Receiving an RTP packet void CRtpFileStreamer::NewSource();

When an RTP packet with a new receive source arrives, this callback function +is called, which registers the packet. This can be used for different types +of RTP packets such as APP, BYE, SDES, SR and RR.

void CRtpFileStreamer::PacketArrived();

Whenever an RTP packet arrives, this callback function is called. The +function retrieves the payload from the packet received and writes it to the +target file.

+
Class summary

RSocket RSocketServ RConnection RRtpSession RRtpSendSource RRtpReceiveSource RRtpSendPacket RRtpReceivePacket RFs RFile

+
Usage

The Symbian +OS build process describes how to build an application.

This +is a console application, so does not have a GUI. It builds an executable +called RTPExample.exe in the standard location (\epoc32\release\winscw\ <build_variant> for +CodeWarrior). After launching the executable, depending on the emulator you +are using, you may need to task away from the app launcher/shell screen to +view the console.

+
See also

RTP +overview

+
\ No newline at end of file