Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QMediaRtpPayload Class Reference
[QtMediaModule]

The QMediaRtpPayload class describes an RTP payload type. More...

    #include <QMediaRtpPayload>

Public Functions

Static Public Members


Detailed Description

The QMediaRtpPayload class describes an RTP payload type.

Payloads describe the encoding of RTP streams. They can be divided into two categories; well know payloads with IDs between 0 and 95, and undefined payloads with IDs between 96 and 127.

The encoding information associated with well known payload IDs is pre-defined and often no more information is given. If the ID is supported by an RTP provider it already knows the encoding and so the payload can be identified on the basis of the ID alone.

Undefined payloads are allocated their IDs dynamically and so the ID alone cannot be used to identify the payload. In this case the full details of the payload must be shared and the payload ID is simply used in the RTP stream to identify a shared payload. The isEquivalent() function can be used to determine if two payloads with different IDs refer to the same encoding.


Member Function Documentation

QMediaRtpPayload::QMediaRtpPayload ()

Constructs a null RTP payload descriptor.

QMediaRtpPayload::QMediaRtpPayload ( int id, QMediaRtpStream::Type type )

Constructs an RTP payload descriptor for a well known payload with the given id and stream type.

The id of a well known type must be between 0 and 95.

QMediaRtpPayload::QMediaRtpPayload ( int id, QMediaRtpStream::Type type, const QString & encodingName, int clockRate, int channels )

Constructs an RTP payload descriptor for a payload with a given id, stream type, encodingName, clockRate, and number of channels.

QMediaRtpPayload::QMediaRtpPayload ( int id, QMediaRtpStream::Type type, const QString & encodingName, int clockRate, int channels, const QMap<QString, QString> & parameters )

Constructs an RTP payload descriptor for a payload with a given id, stream type, encodingName, clockRate, number of channels and a list of type specific parameters.

QMediaRtpPayload::QMediaRtpPayload ( const QMediaRtpPayload & other )

Constructs a copy of the the RTP payload descriptor other.

QMediaRtpPayload::~QMediaRtpPayload ()

Destroys an RTP payload descriptor.

int QMediaRtpPayload::channels () const

Returns the number of channels of the payload or 0 if none has been specified.

int QMediaRtpPayload::clockRate () const

Returns the clock rate of the payload.

QList<QMediaRtpPayload> QMediaRtpPayload::commonPayloads ( const QList<QMediaRtpPayload> & localPayloads, const QList<QMediaRtpPayload> & remotePayloads )   [static]

Returns a list of payload descriptors that are common to both localPayloads and remotePayloads.

Where a two payloads are equivalent but not equal the remote payload is returned.

QString QMediaRtpPayload::encodingName () const

Returns the encoding name of the payload.

int QMediaRtpPayload::id () const

Returns the id of the payload.

bool QMediaRtpPayload::isEquivalent ( const QMediaRtpPayload & other ) const

Compares other to an RTP payload descriptor and return true if they represent the same payload and false otherwise.

Two descriptors represent the same payload of they share a common well known payload id() (<= 95) or both have a dynamic payload id() (>95) and all their parameters are equal.

bool QMediaRtpPayload::isNull () const

Returns true if the payload is null and false otherwise.

QString QMediaRtpPayload::parameter ( const QString & key ) const

Returns the additional payload parameter value associated with the given key.

QMap<QString, QString> QMediaRtpPayload::parameters () const

Returns all the additional payload parameters.

QList<QString> QMediaRtpPayload::parametersKeys () const

Returns a list of the payload's additional parameter keys.

QMediaRtpStream::Type QMediaRtpPayload::type () const

Returns the stream type of the payload.

bool QMediaRtpPayload::operator!= ( const QMediaRtpPayload & other ) const

Compares other to an RTP payload descriptor and return true if they are not equal and false otherwise.

This may fail for descriptors representing the same payload but with conflicting fields, ie comparison between well known payloads with incomplete and complete sets of parameters, or comparison of dynamic payloads with different payload ids). To determine if two descriptors represent the same payload use isEquivalent() instead.

See also isEquivalent().

QMediaRtpPayload & QMediaRtpPayload::operator= ( const QMediaRtpPayload & other )

Assigns the value of other to an RTP payload descriptor.

bool QMediaRtpPayload::operator== ( const QMediaRtpPayload & other ) const

Compares other to an RTP payload descriptor and return true if they are equal and false otherwise.

This may fail for descriptors representing the same payload but with conflicting fields, ie comparison between well known payloads with incomplete and complete sets of parameters, or comparison of dynamic payloads with different payload ids). To determine if two descriptors represent the same payload use isEquivalent() instead.

See also isEquivalent().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3