CBTAudioStreamer Class Reference

class CBTAudioStreamer : public CBase

BT Audio Streamer class.

This class implements the audio streaming over A2DP. It acts as an interface between the controller, BT Audio Adaptation and RTP API. It uses helper class CBTAudioStreamSender to handle the frame contruction and sending.

btaudiostreamer.lib
Since
S60 v3.1

Inherits from

Constructor & Destructor Documentation

CBTAudioStreamer()

CBTAudioStreamer()[private]

~CBTAudioStreamer()

~CBTAudioStreamer()[virtual]

Member Functions Documentation

ConstructL()

voidConstructL()[private]

NewL()

IMPORT_C CBTAudioStreamer *NewL()[static]

NotifyBufferSent(const TDesC8 &)

voidNotifyBufferSent(const TDesC8 &aBuffer)

From MBTAudioStreamSenderObserver. This method is used for reporting that the referred buffer has been sent. This tells the data producer that we're ready to receive more data.

Since
S60 v3.1

Parameters

const TDesC8 & aBufferrefers to the original bufffer that we received in Receive method.

NotifyErrorSending(const TDesC8 &)

voidNotifyErrorSending(const TDesC8 &aBuffer)

From MBTAudioStreamSenderObserver. This method is used for reporting that the buffer wasn't sent because of an error. This method then informs the error observer class.

Since
S60 v3.1

Parameters

const TDesC8 & aBufferrefers to the original bufffer that we received in Receive method.

Receive(const TDesC8 &)

TInt Receive(const TDesC8 &aBuffer)

From MBTAudioStreamObserver. This method receives data from the data producer.

Since
S60 v3.1

Parameters

const TDesC8 & aBuffercontains the audio data frames.

Receive(const TDesC8 &, TTimeIntervalMicroSeconds)

TInt Receive(const TDesC8 &aBuffer,
TTimeIntervalMicroSecondsaTimestamp
)

From MBTAudioStreamObserver. This method receives data and timestamps from the data producer.

Since
S60 v3.1

Parameters

const TDesC8 & aBuffercontains the audio data frames.
TTimeIntervalMicroSeconds aTimestampThe timestamp of the audio data frames. 34 minutes max. interval should not be a problem to us.

SetNewFrameLength(const TUint, const TUint)

IMPORT_C TIntSetNewFrameLength(const TUintaFrameLength,
const TUintaTargetBitrate
)

A method for preparing the BT Audio Streamer for incoming data.

Since
S60 v3.1

Parameters

const TUint aFrameLengthLength of a single audio data frame, needed for calculating the send packet size.
const TUint aTargetBitrate

StartL(RSocket &, const TUint, CBTAudioStreamInputBase *, const TUint)

IMPORT_C voidStartL(RSocket &aSocket,
const TUintaFrameLength,
CBTAudioStreamInputBase *aAudioInput,
const TUintaTargetBitrate
)

A method for preparing the BT Audio Streamer for incoming data.

Since
S60 v3.1

Parameters

RSocket & aSocketBluetooth socket instance, needed for getting the RTP sending class instance.
const TUint aFrameLengthLength of a single audio data frame, needed for calculating the send packet size.
CBTAudioStreamInputBase * aAudioInputThe API where the data is received and where the sending of packets will be confirmed.
const TUint aTargetBitrate

Stop()

IMPORT_C voidStop()

A method for cleaning up the BT Audio Streamer after streaming data.

Since
S60 v3.1

Member Data Documentation

CBTAudioStreamInputBase * iAudioInput

CBTAudioStreamInputBase *iAudioInput[private]

This stores a pointer to the audio input interface. After a buffer has been processed, this interface must be informed.

RRtpSession iRtpSession

RRtpSession iRtpSession[private]

RTP session object that is needed for sending RTP frames.

CBTAudioStreamSender * iSender

CBTAudioStreamSender *iSender[private]

This points to a helper class that handles the sending of a frame. Own.

TBool iStarted

TBool iStarted[private]

This stores the state of the streamer.