diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-21 18:04:02 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-21 18:04:02 +0200 |
| commit | 255c1aabcd8d4e881f06ac55eadfc20274936df0 (patch) | |
| tree | ebfa868b619610566ae335d713df9c4487ecc355 /src/base | |
| parent | 9935bb73743760a8cb3526f9c608f03c733c6191 (diff) | |
| download | qxmpp-255c1aabcd8d4e881f06ac55eadfc20274936df0.tar.gz | |
documentation fixes
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/QXmppCodec.cpp | 6 | ||||
| -rw-r--r-- | src/base/QXmppResultSet.cpp | 12 | ||||
| -rw-r--r-- | src/base/QXmppRtpChannel.cpp | 13 | ||||
| -rw-r--r-- | src/base/QXmppRtpChannel.h | 38 |
4 files changed, 52 insertions, 17 deletions
diff --git a/src/base/QXmppCodec.cpp b/src/base/QXmppCodec.cpp index 345044b3..e54f4f9f 100644 --- a/src/base/QXmppCodec.cpp +++ b/src/base/QXmppCodec.cpp @@ -248,20 +248,14 @@ static qint16 ulaw2linear(quint8 u_val) return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS)); } -/// Destroys an audio codec. - QXmppCodec::~QXmppCodec() { } -/// Destroys a video decoder. - QXmppVideoDecoder::~QXmppVideoDecoder() { } -/// Destroys a video encoder. - QXmppVideoEncoder::~QXmppVideoEncoder() { } diff --git a/src/base/QXmppResultSet.cpp b/src/base/QXmppResultSet.cpp index 25b1e9b6..7013a956 100644 --- a/src/base/QXmppResultSet.cpp +++ b/src/base/QXmppResultSet.cpp @@ -109,6 +109,8 @@ void QXmppResultSetQuery::setAfter(const QString& after) m_after=after; } +/// Returns true if no result set information is present. + bool QXmppResultSetQuery::isNull() const { return m_max == -1 && m_index == -1 && m_after.isNull() && m_before.isNull(); @@ -196,16 +198,26 @@ void QXmppResultSetReply::setCount(int count) m_count = count; } +/// Returns the index for the first result in the set. +/// +/// This is used for retrieving pages out of order. + int QXmppResultSetReply::index() const { return m_index; } +/// Sets the index for the first result in the set. +/// +/// This is used for retrieving pages out of order. + void QXmppResultSetReply::setIndex(int index) { m_index = index; } +/// Returns true if no result set information is present. + bool QXmppResultSetReply::isNull() const { return m_count == -1 && m_index == -1 && m_first.isNull() && m_last.isNull(); diff --git a/src/base/QXmppRtpChannel.cpp b/src/base/QXmppRtpChannel.cpp index dcea48e2..93d38b97 100644 --- a/src/base/QXmppRtpChannel.cpp +++ b/src/base/QXmppRtpChannel.cpp @@ -367,15 +367,13 @@ QXmppRtpAudioChannel::~QXmppRtpAudioChannel() } /// Returns the number of bytes that are available for reading. -/// qint64 QXmppRtpAudioChannel::bytesAvailable() const { return QIODevice::bytesAvailable() + d->incomingBuffer.size(); } -/// Closes the RTP channel. -/// +/// Closes the RTP audio channel. void QXmppRtpAudioChannel::close() { @@ -906,8 +904,7 @@ QXmppRtpVideoChannel::~QXmppRtpVideoChannel() delete d; } -/// Closes the RTP channel. -/// +/// Closes the RTP video channel. void QXmppRtpVideoChannel::close() { @@ -934,6 +931,8 @@ void QXmppRtpVideoChannel::datagramReceived(const QByteArray &ba) d->frames << decoder->handlePacket(packet); } +/// Returns the video format used by the encoder. + QXmppVideoFormat QXmppRtpVideoChannel::decoderFormat() const { if (d->decoders.isEmpty()) @@ -942,11 +941,15 @@ QXmppVideoFormat QXmppRtpVideoChannel::decoderFormat() const return d->decoders.value(key)->format(); } +/// Returns the video format used by the encoder. + QXmppVideoFormat QXmppRtpVideoChannel::encoderFormat() const { return d->outgoingFormat; } +/// Sets the video format used by the encoder. + void QXmppRtpVideoChannel::setEncoderFormat(const QXmppVideoFormat &format) { if (d->encoder && !d->encoder->setFormat(format)) diff --git a/src/base/QXmppRtpChannel.h b/src/base/QXmppRtpChannel.h index cd74c758..1511e597 100644 --- a/src/base/QXmppRtpChannel.h +++ b/src/base/QXmppRtpChannel.h @@ -45,13 +45,21 @@ public: QByteArray encode() const; QString toString() const; + /// RTP version. quint8 version; + /// Marker flag. bool marker; + /// Payload type. quint8 type; + /// Synchronization source. quint32 ssrc; + /// Contributing sources. QList<quint32> csrc; + /// Sequence number. quint16 sequence; + /// Timestamp. quint32 stamp; + /// Raw payload data. QByteArray payload; }; @@ -60,17 +68,21 @@ class QXMPP_EXPORT QXmppRtpChannel public: QXmppRtpChannel(); + /// Closes the RTP channel. virtual void close() = 0; + /// Returns the RTP channel's current read/write mode. virtual QIODevice::OpenMode openMode() const = 0; QList<QXmppJinglePayloadType> localPayloadTypes(); void setRemotePayloadTypes(const QList<QXmppJinglePayloadType> &remotePayloadTypes); protected: + /// \cond virtual void payloadTypesChanged(); QList<QXmppJinglePayloadType> m_incomingPayloadTypes; QList<QXmppJinglePayloadType> m_outgoingPayloadTypes; bool m_outgoingPayloadNumbered; + /// \endcond }; /// \brief The QXmppRtpAudioChannel class represents an RTP audio channel to a remote party. @@ -175,13 +187,25 @@ private: class QXMPP_EXPORT QXmppVideoFrame { public: + /// This enum describes a pixel format. enum PixelFormat { - Format_Invalid = 0, - Format_RGB32 = 3, - Format_RGB24 = 4, - Format_YUV420P = 18, - Format_UYVY = 20, - Format_YUYV = 21, + Format_Invalid = 0, ///< The frame is invalid. + Format_RGB32 = 3, ///< The frame stored using a 32-bit RGB format (0xffRRGGBB). + Format_RGB24 = 4, ///< The frame is stored using a 24-bit RGB format (8-8-8). + Format_YUV420P = 18, ///< The frame is stored using an 8-bit per component planar + ///< YUV format with the U and V planes horizontally and + ///< vertically sub-sampled, i.e. the height and width of the + ///< U and V planes are half that of the Y plane. + Format_UYVY = 20, ///< The frame is stored using an 8-bit per component packed + ///< YUV format with the U and V planes horizontally + ///< sub-sampled (U-Y-V-Y), i.e. two horizontally adjacent + ///< pixels are stored as a 32-bit macropixel which has a Y + ///< value for each pixel and common U and V values. + Format_YUYV = 21, ///< The frame is stored using an 8-bit per component packed + ///< YUV format with the U and V planes horizontally + ///< sub-sampled (Y-U-Y-V), i.e. two horizontally adjacent + ///< pixels are stored as a 32-bit macropixel which has a Y + ///< value for each pixel and common U and V values. }; QXmppVideoFrame(); @@ -268,8 +292,10 @@ public: void setEncoderFormat(const QXmppVideoFormat &format); void writeFrame(const QXmppVideoFrame &frame); + /// \cond QIODevice::OpenMode openMode() const; void close(); + /// \endcond signals: /// \brief This signal is emitted when a datagram needs to be sent. |
