QXmpp: QXmppRtpAudioChannel Class Reference

QXmpp Version:0.7.5

- Main Page
- Modules
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Functions Variables Enumerations Enumerator Properties Groups
Public Types | Public Slots | Signals | Public Member Functions | Friends | List of all members
QXmppRtpAudioChannel Class Reference

The QXmppRtpAudioChannel class represents an RTP audio channel to a remote party. More...

`#include <QXmppRtpChannel.h>`

Inherits QXmppRtpChannel.

## Public Types
enum | Tone { Tone_0 = 0, Tone_1, Tone_2, Tone_3, Tone_4, Tone_5, Tone_6, Tone_7, Tone_8, Tone_9, Tone_Star, Tone_Pound, Tone_A, Tone_B, Tone_C, Tone_D }
| This enum is used to describe a DTMF tone. More...

## Public Slots
void | datagramReceived (const QByteArray &ba)
void | startTone (QXmppRtpAudioChannel::Tone tone)
void | stopTone (QXmppRtpAudioChannel::Tone tone)

## Signals
void | sendDatagram (const QByteArray &ba)
| This signal is emitted when a datagram needs to be sent.
void | logMessage (QXmppLogger::MessageType type, const QString &msg)
| This signal is emitted to send logging messages.

## Public Member Functions
| QXmppRtpAudioChannel (QObject *parent=0)
| Constructs a new RTP audio channel with the given parent.
| ~QXmppRtpAudioChannel ()
qint64 | bytesAvailable () const
| Returns the number of bytes that are available for reading.
void | close ()
| Closes the RTP audio channel.
bool | isSequential () const
QIODevice::OpenMode | openMode () const
| Returns the mode in which the channel has been opened.
QXmppJinglePayloadType | payloadType () const
qint64 | pos () const
| Returns the position in the received audio data.
bool | seek (qint64 pos)
Public Member Functions inherited from QXmppRtpChannel
| QXmppRtpChannel ()
| Creates a new RTP channel.
virtual void | close ()=0
| Closes the RTP channel.
virtual QIODevice::OpenMode | openMode () const =0
| Returns the mode in which the channel has been opened.
QList< QXmppJinglePayloadType > | localPayloadTypes ()
void | setRemotePayloadTypes (const QList< QXmppJinglePayloadType > &remotePayloadTypes)

## Friends
class | QXmppRtpAudioChannelPrivate

## Detailed Description

The QXmppRtpAudioChannel class represents an RTP audio channel to a remote party.

It acts as a QIODevice so that you can read / write audio samples, for instance using a QAudioOutput and a QAudioInput.

Note
  THIS API IS NOT FINALIZED YET

## Member Enumeration Documentation

enum QXmppRtpAudioChannel::Tone

This enum is used to describe a DTMF tone.

Enumerator:

  Tone_0 | Tone for the 0 key.
  Tone_1 | Tone for the 1 key.
  Tone_2 | Tone for the 2 key.
  Tone_3 | Tone for the 3 key.
  Tone_4 | Tone for the 4 key.
  Tone_5 | Tone for the 5 key.
  Tone_6 | Tone for the 6 key.
  Tone_7 | Tone for the 7 key.
  Tone_8 | Tone for the 8 key.
  Tone_9 | Tone for the 9 key.
  Tone_Star | Tone for the * key.
  Tone_Pound | Tone for the # key.
  Tone_A | Tone for the A key.
  Tone_B | Tone for the B key.
  Tone_C | Tone for the C key.
  Tone_D | Tone for the D key.

## Constructor & Destructor Documentation

QXmppRtpAudioChannel::~QXmppRtpAudioChannel | ( |  | ) |

Destroys an RTP audio channel.

## Member Function Documentation

void QXmppRtpAudioChannel::datagramReceived | ( | const QByteArray & | ba | ) |
| slot

Processes an incoming RTP packet.

Parameters

  ba |

bool QXmppRtpAudioChannel::isSequential | ( |  | ) | const

Returns true, as the RTP channel is a sequential device.

QXmppJinglePayloadType QXmppRtpAudioChannel::payloadType | ( |  | ) | const

Returns the RTP channel's payload type.

You can use this to determine the QAudioFormat to use with your QAudioInput/QAudioOutput.

bool QXmppRtpAudioChannel::seek | ( | qint64 | pos | ) |

Seeks in the received audio data.

Seeking backwards will result in empty samples being added at the start of the buffer.

Parameters

  pos |

void QXmppRtpAudioChannel::startTone | ( | QXmppRtpAudioChannel::Tone | tone | ) |
| slot

Starts sending the specified DTMF tone.

Parameters

  tone |

void QXmppRtpAudioChannel::stopTone | ( | QXmppRtpAudioChannel::Tone | tone | ) |
| slot

Stops sending the specified DTMF tone.

Parameters

  tone |

The documentation for this class was generated from the following files:

- QXmppRtpChannel.h
- QXmppRtpChannel.cpp