|
|
|
This page describes how to register an event for a callback function and how to handle them when the event occured.
Events can be registered for a session, a send source or a receive source
using RRtpXxx:RegisterEventCallbackL(), where Xxx can
be Session, SendSource or ReceiveSource,
for the respective source of events.
RegisterEventCallbackL(ERtpPacketReceived, GetPacket, aPtr, ERtpOneShot);
In the above call, the event ERtpPacketReceived is
registered to the callback function GetPacket().
ERtpOneShot indicates that the callback function can be called
only once.
TRtpEvent provides a handle to an RTP session, send stream
or receive stream event. The event types supported by
TRtpEventType are passed to RegisterEventCallbackL(),
so that the registered callback function is called for the specified event.
Some of the event types supported by TRtpEventType that may
be handled are given below:
ERtpAnyEvent: This is called for any event failures.
Session related event types:
ERtpSessionFail: Indicates a session-level error.
ERtpSessionEventEnd: Defines the upper limit for
session event type values.
Send stream related event types:
ERtpSendFail: Indicates an error has occurred while
sending a packet.
ERtpSendSucceeded: Indicates a send packet operation
has succeeded.
Receive stream related event types:
ERtpNewSource: Indicates that a new stream has been
received.
ERtpPacketReceived: Indicates that an in-sequence
packet has been received.