diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2015-08-26 09:58:26 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2015-08-26 09:58:26 +0200 |
| commit | 2ab9a9b06f8e6e93c953a8be52e24969c599cd6c (patch) | |
| tree | ba5486dbd138ffdc2035731794410ea1d71d1827 /src/base/QXmppRtcpPacket.h | |
| parent | 3fa128ca62939dff7e161cc2ead6ade90f3c3578 (diff) | |
| download | qxmpp-2ab9a9b06f8e6e93c953a8be52e24969c599cd6c.tar.gz | |
RTCP: start decode sender reports
Diffstat (limited to 'src/base/QXmppRtcpPacket.h')
| -rw-r--r-- | src/base/QXmppRtcpPacket.h | 105 |
1 files changed, 75 insertions, 30 deletions
diff --git a/src/base/QXmppRtcpPacket.h b/src/base/QXmppRtcpPacket.h index 7787c737..9e682369 100644 --- a/src/base/QXmppRtcpPacket.h +++ b/src/base/QXmppRtcpPacket.h @@ -29,29 +29,13 @@ #include "QXmppGlobal.h" class QXmppRtcpPacketPrivate; +class QXmppRtcpReceiverReport; +class QXmppRtcpReceiverReportPrivate; +class QXmppRtcpSenderReport; +class QXmppRtcpSenderReportPrivate; +class QXmppRtcpSourceDescription; class QXmppRtcpSourceDescriptionPrivate; -class QXMPP_EXPORT QXmppRtcpSourceDescription -{ -public: - QXmppRtcpSourceDescription(); - QXmppRtcpSourceDescription(const QXmppRtcpSourceDescription &other); - ~QXmppRtcpSourceDescription(); - - QString cname() const; - void setCname(const QString &name); - - QString name() const; - void setName(const QString &name); - - quint32 ssrc() const; - void setSsrc(const quint32 ssrc); - -private: - friend class QXmppRtcpPacket; - QSharedDataPointer<QXmppRtcpSourceDescriptionPrivate> d; -}; - /// \brief The QXmppRtpPacket class represents an RTCP packet. /// @@ -67,9 +51,7 @@ public: QXmppRtcpPacket(); QXmppRtcpPacket(const QXmppRtcpPacket &other); - virtual ~QXmppRtcpPacket(); - - QXmppRtcpPacket& operator=(const QXmppRtcpPacket &other); + ~QXmppRtcpPacket(); bool decode(const QByteArray &ba); QByteArray encode() const; @@ -77,15 +59,15 @@ public: bool read(QDataStream &stream); void write(QDataStream &stream) const; - quint8 count() const; - void setCount(quint8 count); - - QByteArray payload() const; - void setPayload(const QByteArray &payload); - quint8 type() const; void setType(quint8 type); + QList<QXmppRtcpReceiverReport> receiverReports() const; + void setReceiverReports(const QList<QXmppRtcpReceiverReport> &reports); + + QXmppRtcpSenderReport senderReport() const; + void setSenderReport(const QXmppRtcpSenderReport &report); + QList<QXmppRtcpSourceDescription> sourceDescriptions() const; void setSourceDescriptions(const QList<QXmppRtcpSourceDescription> &descriptions); @@ -93,4 +75,67 @@ private: QSharedDataPointer<QXmppRtcpPacketPrivate> d; }; +class QXMPP_EXPORT QXmppRtcpReceiverReport +{ +public: + QXmppRtcpReceiverReport(); + QXmppRtcpReceiverReport(const QXmppRtcpReceiverReport &other); + ~QXmppRtcpReceiverReport(); + + quint32 ssrc() const; + void setSsrc(const quint32 ssrc); + +private: + friend class QXmppRtcpPacket; + QSharedDataPointer<QXmppRtcpReceiverReportPrivate> d; +}; + +class QXMPP_EXPORT QXmppRtcpSenderReport +{ +public: + QXmppRtcpSenderReport(); + QXmppRtcpSenderReport(const QXmppRtcpSenderReport &other); + ~QXmppRtcpSenderReport(); + + quint64 ntpStamp() const; + void setNtpStamp(quint64 ntpStamp); + + quint32 rtpStamp() const; + void setRtpStamp(quint32 rtpStamp); + + quint32 ssrc() const; + void setSsrc(quint32 ssrc); + + quint32 octetCount() const; + void setOctetCount(quint32 count); + + quint32 packetCount() const; + void setPacketCount(quint32 count); + +private: + friend class QXmppRtcpPacket; + QSharedDataPointer<QXmppRtcpSenderReportPrivate> d; +}; + +class QXMPP_EXPORT QXmppRtcpSourceDescription +{ +public: + QXmppRtcpSourceDescription(); + QXmppRtcpSourceDescription(const QXmppRtcpSourceDescription &other); + ~QXmppRtcpSourceDescription(); + + QString cname() const; + void setCname(const QString &name); + + QString name() const; + void setName(const QString &name); + + quint32 ssrc() const; + void setSsrc(const quint32 ssrc); + +private: + friend class QXmppRtcpPacket; + QSharedDataPointer<QXmppRtcpSourceDescriptionPrivate> d; +}; + #endif |
