summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordknn <yoann.blein@free.fr>2012-08-16 16:05:33 (GMT)
committerdknn <yoann.blein@free.fr>2012-09-22 09:32:38 (GMT)
commit867a950d5b3eb1422051a57c2533509188014b1a (patch)
tree01c9d7372c7e780aaa90456df2bac55082632dae /Swiften/ScreenSharing/RTPSessionImpl.h
parent054bf7baf02cf088930c340fead40b464c1ed015 (diff)
downloadswift-contrib-867a950d5b3eb1422051a57c2533509188014b1a.zip
swift-contrib-867a950d5b3eb1422051a57c2533509188014b1a.tar.bz2
Add error resilence (buggy)
Diffstat (limited to 'Swiften/ScreenSharing/RTPSessionImpl.h')
-rw-r--r--Swiften/ScreenSharing/RTPSessionImpl.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/Swiften/ScreenSharing/RTPSessionImpl.h b/Swiften/ScreenSharing/RTPSessionImpl.h
index 47af60b..2736605 100644
--- a/Swiften/ScreenSharing/RTPSessionImpl.h
+++ b/Swiften/ScreenSharing/RTPSessionImpl.h
@@ -34,10 +34,7 @@ namespace Swift {
jrtplib::RTPAddress* jRTPLocalAddress;
};
- class RTPSessionImpl : public RTPSession {
- public:
- typedef boost::shared_ptr<RTPSession> ref;
-
+ class RTPSessionImpl : public RTPSession, jrtplib::RTPSession {
public:
RTPSessionImpl(boost::shared_ptr<UDPSocket> udpSocket, const RTPPayloadType& payloadType);
virtual ~RTPSessionImpl();
@@ -48,21 +45,38 @@ namespace Swift {
virtual void injectData(const SafeByteArray &data);
virtual void stop(int maxWaitMs = 100);
+ virtual void sendSLIFeedback(int pictureID);
+ virtual void sendRPSIFeedback(int pictureID);
+
virtual size_t getMaxRTPPayloadSize() const;
public:
static jrtplib::RTPAddress* nativeAddressToJRTPAddress(const HostAddressPort& hostAddressPort);
+ protected:
+ void OnUnknownPacketType(jrtplib::RTCPPacket* rtcpPack, const jrtplib::RTPTime& /*receivetime*/, const jrtplib::RTPAddress* senderAddress);
+
+ private:
+ enum PacketType {
+ PSFB = 206,
+ };
+
+ enum SubPacketType {
+ PSFB_SLI = 2,
+ PSFB_RPSI = 3,
+ };
+
private:
void checkError(int rtperr) const;
void handleDataRead(boost::shared_ptr<SafeByteArray> data);
+ void parseSLIFeedBack(uint8_t* data, size_t len);
+ void parseRPSIFeedBack(uint8_t* data, size_t len);
private:
boost::shared_ptr<UDPSocket> udpSocket;
RTPPayloadType payloadType;
jrtplib::RTPAddress* jRTPRemotePeer;
Sender sender;
- jrtplib::RTPSession session;
jrtplib::RTPExternalPacketInjecter *packetInjecter;
};
}