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/IncomingScreenSharing.cpp
parent054bf7baf02cf088930c340fead40b464c1ed015 (diff)
downloadswift-contrib-867a950d5b3eb1422051a57c2533509188014b1a.zip
swift-contrib-867a950d5b3eb1422051a57c2533509188014b1a.tar.bz2
Add error resilence (buggy)
Diffstat (limited to 'Swiften/ScreenSharing/IncomingScreenSharing.cpp')
-rw-r--r--Swiften/ScreenSharing/IncomingScreenSharing.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/Swiften/ScreenSharing/IncomingScreenSharing.cpp b/Swiften/ScreenSharing/IncomingScreenSharing.cpp
index fbd4b16..43e3fbc 100644
--- a/Swiften/ScreenSharing/IncomingScreenSharing.cpp
+++ b/Swiften/ScreenSharing/IncomingScreenSharing.cpp
@@ -82,7 +82,8 @@ void IncomingScreenSharing::accept()
decoder = new VP8Decoder;
parser = new VP8RTPParser(decoder);
rtpSession->onIncomingPacket.connect(boost::bind(&VP8RTPParser::newPayloadReceived, parser, _1, _2, _3));
- decoder->onNewImageDecoded.connect(boost::bind(&IncomingScreenSharing::handleNewImageDecoded, this, _1));
+ decoder->onNewFrameDecoded.connect(boost::bind(&IncomingScreenSharing::handleNewFrameDecoded, this, _1, _2));
+ decoder->onNewImageAvailable.connect(boost::bind(&IncomingScreenSharing::handleNewImageAvailable, this, _1));
}
onStateChange(ScreenSharing::Connecting);
@@ -115,7 +116,16 @@ JingleContentID IncomingScreenSharing::getContentID() const
return JingleContentID(initialContent->getName(), initialContent->getCreator());
}
-void IncomingScreenSharing::handleNewImageDecoded(const Image& image)
+void IncomingScreenSharing::handleNewFrameDecoded(int pictureID, bool success)
+{
+ if (success) {
+ rtpSession->sendRPSIFeedback(pictureID);
+ } else {
+ rtpSession->sendSLIFeedback(pictureID);
+ }
+}
+
+void IncomingScreenSharing::handleNewImageAvailable(const Image& image)
{
onStateChange(ScreenSharing::Receiving);
onNewImageReceived(image);