diff options
author | dknn <yoann.blein@free.fr> | 2012-07-15 16:18:18 (GMT) |
---|---|---|
committer | dknn <yoann.blein@free.fr> | 2012-09-22 09:01:49 (GMT) |
commit | c9ba8e43fc23fccd47531ecea73224b3b9b552c3 (patch) | |
tree | 9d9953000cc4d76e798cd1967e8f1e76ff102100 /Swiften/ScreenSharing/RTPSessionImpl.cpp | |
parent | 70e395802de55b1d2eb9f92ad86349cd2d0d0575 (diff) | |
download | swift-contrib-c9ba8e43fc23fccd47531ecea73224b3b9b552c3.zip swift-contrib-c9ba8e43fc23fccd47531ecea73224b3b9b552c3.tar.bz2 |
Fix troubles in screen sharing example
Diffstat (limited to 'Swiften/ScreenSharing/RTPSessionImpl.cpp')
-rw-r--r-- | Swiften/ScreenSharing/RTPSessionImpl.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Swiften/ScreenSharing/RTPSessionImpl.cpp b/Swiften/ScreenSharing/RTPSessionImpl.cpp index 94641ff..bbd3d72 100644 --- a/Swiften/ScreenSharing/RTPSessionImpl.cpp +++ b/Swiften/ScreenSharing/RTPSessionImpl.cpp @@ -88,13 +88,13 @@ void RTPSessionImpl::checkIncomingPackets() void RTPSessionImpl::sendPacket(const SafeByteArray& data, int timestampinc, bool marker) { - checkError(session.SendPacket((void*)(&data[0]), data.size(), payloadType.getID(), marker, timestampinc)); + checkError(session.SendPacket((void*)(data.data()), data.size(), payloadType.getID(), marker, timestampinc)); poll(); } void RTPSessionImpl::injectData(const SafeByteArray& data) { - packetInjecter->InjectRTPorRTCP((void*)(&data[0]), data.size(), jRTPRemotePeer); + packetInjecter->InjectRTPorRTCP((void*)(data.data()), data.size(), jRTPRemotePeer); checkIncomingPackets(); poll(); } @@ -105,6 +105,12 @@ void RTPSessionImpl::stop(int maxWaitMs) udpSocket->close(); } +size_t RTPSessionImpl::getMaxRTPPayloadSize() const +{ + jrtplib::RTPSessionParams sessparams; + return sessparams.GetMaximumPacketSize(); +} + void RTPSessionImpl::checkError(int rtperr) const { if (rtperr < 0) |