Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


RTPExample: RTP packet streaming

Found in examples\MultimediaProtocols\RTPExample\.

[Top]


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:

[Top]


Initialising

void CRtpFileStreamer::ConstructL();

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

[Top]


Sending an RTP packet

void CRtpFileSender::RunL();

Sends the RTP packet. This does the following:

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

[Top]


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.

[Top]


Class Summary

Related APIs

[Top]


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.

[Top]


See also

RTP overview