diff options
Diffstat (limited to 'Swiften/ScreenSharing/IncomingScreenSharing.cpp')
-rw-r--r-- | Swiften/ScreenSharing/IncomingScreenSharing.cpp | 14 |
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); |