summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/ScreenSharing/RTPSessionImpl.cpp')
-rw-r--r--Swiften/ScreenSharing/RTPSessionImpl.cpp10
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)