aboutsummaryrefslogtreecommitdiff
path: root/src/QXmppRtpChannel.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-11-16 22:35:01 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-11-16 22:35:01 +0000
commit9bc8f336ae3a15d68bceff677919196686f32041 (patch)
treeacb55db496742b4a849af200639b181c59303f1e /src/QXmppRtpChannel.cpp
parent9e86da76e5b881fa4cba6b170573793b9b83a343 (diff)
downloadqxmpp-9bc8f336ae3a15d68bceff677919196686f32041.tar.gz
tweak RTP channel logging
Diffstat (limited to 'src/QXmppRtpChannel.cpp')
-rw-r--r--src/QXmppRtpChannel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/QXmppRtpChannel.cpp b/src/QXmppRtpChannel.cpp
index 43e58ff8..820be1b7 100644
--- a/src/QXmppRtpChannel.cpp
+++ b/src/QXmppRtpChannel.cpp
@@ -88,6 +88,11 @@ QXmppRtpChannel::QXmppRtpChannel(QObject *parent)
: QIODevice(parent),
d(new QXmppRtpChannelPrivate)
{
+ QXmppLoggable *logParent = qobject_cast<QXmppLoggable*>(parent);
+ if (logParent) {
+ connect(this, SIGNAL(logMessage(QXmppLogger::MessageType,QString)),
+ logParent, SIGNAL(logMessage(QXmppLogger::MessageType,QString)));
+ }
}
/// Destroys an RTP channel.
@@ -232,7 +237,9 @@ qint64 QXmppRtpChannel::readData(char * data, qint64 maxSize)
d->incomingBuffer.remove(0, readSize);
if (readSize < maxSize)
{
+#ifdef QXMPP_DEBUG_RTP
debug(QString("QXmppRtpChannel::readData missing %1 bytes").arg(QString::number(maxSize - readSize)));
+#endif
memset(data + readSize, 0, maxSize - readSize);
}
d->incomingStamp += readSize / SAMPLE_BYTES;