RRtpSendSource Class Reference

#include <mw/rtp.h>

Link against: rtpremoved.lib

class RRtpSendSource

Detailed Description

A handle to a send stream.

Use this class to manage the creation and sending of packets. A session can have only one send stream.

Only one packet can be sent at any one time. Once a packet has been sent, the packet cannot be closed and no further packets can be sent until an event signalling the completion of the send operation has occurred. This will be one of the events defined by the enum values: ERtpSendSucceeded and ERtpSendFail.

A client must monitor these events so that it can schedule the sending of subsequent packets. It does this by implementing and registering callback functions that handle these events.

See also: TRtpEventType

Constructor & Destructor Documentation

RRtpSendSource ( )

RRtpSendSource()[inline]

Default constructor

Member Function Documentation

Alignment ( )

IMPORT_C TIntAlignment()const

Gets the alignment value.

See also: RRtpSendSource::SetAlignment()

Returns: The alignment value.

ByeL ( TDesC8 & )

IMPORT_C voidByeL(TDesC8 &aReason)

Sends a Bye RTCP packet.

ParameterDescription
aReasonThe reason for sending the Bye RTCP packet.

Cancel ( )

IMPORT_C voidCancel()

Cancels the outstanding send on the send Stream

The send object must be cancelled if a send request is outstanding

Close ( )

IMPORT_C voidClose()

Closes the send stream.

The send stream object cannot be closed if an event is currently being handled, i.e. a call back into client code is currently in progress.

GetLocalSSRC ( )

IMPORT_C TUint32GetLocalSSRC()

IsOpen ( )

TBool IsOpen()const [inline]

Tests whether the send stream represented by this handle is open.

Returns: ETrue, if the send stream is open, false otherwise.

IsSending ( )

IMPORT_C TBoolIsSending()

Tests whether the send stream is currently sending an RTP packet.

Returns: ETrue, if a send operation is in progress, EFalse, otherwise.

NewSendPacketL ( TInt, TInt )

IMPORT_C RRtpSendPacketNewSendPacketL(TIntaPayloadSize = 0,
TIntaHeaderExtensionSize = KRtpNoExtension
)

Creates a new RTP send packet, and returns the RTP send packet handle.

On return from this call, the packet is open but uninitialised, except for the payload type which is set to the default value set by a previous call to SetPayloadType()

The returned packet is owned by the caller of this function; it is not owned by the send stream. It must be explicitly closed by a call to RRtpSendPacket::Close()

See also: RRtpSendPacket::SetPayloadType() RRtpSendPacket::SetDefaultPayloadSize() RRtpSendPacket::Close() KRtpNoExtension

ParameterDescription
aPayloadSizeThe size of the payload. If not explicitly specified, i.e. the default value of 0 is passed to the function, then the size actually used is the value set by a previous call to SetDefaultPayloadSize().
aHeaderExtensionSizeThe size of the extension specified as the number of 4-byte words. This value must exclude the length of the extension header. Zero is a permissible value. If unspecified, i.e. the default value of KRtpNoExtension is passed to the function, then the packet will have no extension.

Returns: The new RTP send packet handle.

NewSendPacketLC ( TInt, TInt )

IMPORT_C RRtpSendPacketNewSendPacketLC(TIntaPayloadSize = 0,
TIntaHeaderExtensionSize = KRtpNoExtension
)

Creates a new RTP send packet, puts a pointer to the RTP send packet object onto the cleanup stack, and returns the RTP send packet handle.

On return from this call, the packet is open but uninitialised, except for the payload type which is set to the default value set by a previous call to SetPayloadType()

The returned packet is owned by the caller of this function; it is not owned by the send stream. It must be explicitly closed by a call to RRtpSendPacket::Close().

Note that the function does not put a pointer to the RRtpSendPacket object onto the cleanup stack as you might normally expect, but puts a pointer to the RTP send packet object for which the returned RRtpSendPacket is the handle.

See also: RRtpSendPacket::SetPayloadType() RRtpSendPacket::SetDefaultPayloadSize() RRtpSendPacket::Close() KRtpNoExtension

ParameterDescription
aPayloadSizeThe size of the payload. If unspecified, i.e. the default value of 0 is passed to the function, then the size actually used is the value set by a previous call to SetDefaultPayloadSize().
aHeaderExtensionSizeThe size of the extension specified as the number of 4-byte words. This value must exclude the length of the extension header. Zero is a permissible value. If unspecified, i.e. the default value of KRtpNoExtension is passed to the function, then the packet will have no extension.

Returns: The new RTP send packet.

PrivRegisterEventCallbackL ( TUint, TRtpCallbackFunction, TAny *, TInt )

IMPORT_C voidPrivRegisterEventCallbackL(TUintaType,
TRtpCallbackFunctionaCallback,
TAny *aPtr,
TIntaParameter
)

The event manager contains a number of callback registrations, each of which binds a function and pointer (normally an object) to a particular kind of event. Registrations can be bound to all events on a stream.

If a function is registered for a particular event, it will be called when that event occurs. One callback function can be associated with more than 1 callback registration. Callback functions take a pointer argument which was supplied as part of the registration

ParameterDescription
aTypeEvent type
aCallbackCallback object
aPtrPointer to data that needs to be passed to the callback function
aParameterParameter to be passed to internal callback subsystem

PrivRegisterEventCallbackL ( TUint, TRtpCallbackFunction, TAny * )

IMPORT_C voidPrivRegisterEventCallbackL(TUintaType,
TRtpCallbackFunctionaCallback,
TAny *aPtr
)

The event manager contains a number of callback registrations, each of which binds a function and pointer (normally an object) to a particular kind of event. Registrations can be bound to all events on a stream.

If a function is registered for a particular event, it will be called when that event occurs. One callback function can be associated with more than 1 callback registration. Callback functions take a pointer argument which was supplied as part of the registration

ParameterDescription
aTypeEvent type
aCallbackCallback object
aPtrPointer to data that needs to be passed to the callback function

RegisterEventCallbackL ( TRtpEventType, void(*)(T *, const TRtpEvent &), T *, TRtpOneShotness, TInt )

voidRegisterEventCallbackL(TRtpEventTypeaType,
void(*)(T *, const TRtpEvent &)aCallback,
T *aPtr,
TRtpOneShotnessaOneShot,
TIntaParameter
)[inline]

RegisterEventCallbackL ( TRtpEventType, void(*)(T *, const TRtpEvent &), T *, TRtpOneShotness )

voidRegisterEventCallbackL(TRtpEventTypeaType,
void(*)(T *, const TRtpEvent &)aCallback,
T *aPtr,
TRtpOneShotnessaOneShot = ERtpNotOneShot
)[inline]

SetAlignment ( TInt )

IMPORT_C voidSetAlignment(TIntaAlignment)

Sets the alignment required for padding.

After padding, all blocks will be a multiple of this length.

See also: RRtpSendSource::Alignment()

ParameterDescription
aAlignmentThe padding value. This must be in the range: 1-255. A value of 1 means don't pad and is the default value.

SetDefaultPayloadSize ( TInt )

IMPORT_C voidSetDefaultPayloadSize(TIntaPayloadSize)

Sets the default payload size for packets that are to be sent.

This is the default payload size used when a new RTP send packet is created in calls to: RRtpSendSource::NewSendPacketL() and RRtpSendSource::NewSendPacketLC().

See also: RRtpSendSource::NewSendPacketLC() RRtpSendSource::NewSendPacketL()

ParameterDescription
aPayloadSizeThe payload size.

SetPayloadType ( TUint )

IMPORT_C voidSetPayloadType(TUintaPayloadType)

Sets the default payload type for packets that are to be sent.

This is the payload type used when a new RTP send packet is created in calls to: RRtpSendSource::NewSendPacketL() and RRtpSendSource::NewSendPacketLC().

See also: RRtpSendSource::NewSendPacketLC() RRtpSendSource::NewSendPacketL()

ParameterDescription
aPayloadTypeThe payload type.

operator!= ( RRtpSendSource )

TBool operator!=(RRtpSendSourceaThat)const [inline]

Tests whether this send stream handle represents a different send stream to the one represented by the specified handle.

ParameterDescription
aThatThe handle of the send stream to be compared.

Returns: ETrue, if the represented send streams are different, false otherwise.

operator== ( RRtpSendSource )

TBool operator==(RRtpSendSourceaThat)const [inline]

Tests whether this send stream handle represents the same send stream as the one represented by the specified handle.

ParameterDescription
aThatThe handle of the send stream to be compared.

Returns: ETrue, if the represented send streams are the same, false otherwise.