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
@@ -87,15 +87,15 @@ 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();
}
@@ -104,8 +104,14 @@ void RTPSessionImpl::stop(int maxWaitMs)
session.BYEDestroy(jrtplib::RTPTime(0, maxWaitMs * 1000), "", 0);
udpSocket->close();
}
+size_t RTPSessionImpl::getMaxRTPPayloadSize() const
+{
+ jrtplib::RTPSessionParams sessparams;
+ return sessparams.GetMaximumPacketSize();
+}
+
void RTPSessionImpl::checkError(int rtperr) const
{
if (rtperr < 0)
throw RTPException(jrtplib::RTPGetErrorString(rtperr));