diff options
Diffstat (limited to 'Swiften/Examples/ScreenSharing/Host.cpp')
| -rw-r--r-- | Swiften/Examples/ScreenSharing/Host.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Swiften/Examples/ScreenSharing/Host.cpp b/Swiften/Examples/ScreenSharing/Host.cpp index 44f72d4..5d67de0 100644 --- a/Swiften/Examples/ScreenSharing/Host.cpp +++ b/Swiften/Examples/ScreenSharing/Host.cpp @@ -77,8 +77,9 @@ class ScreenSharer { std::cout << "Recipient found" << std::endl; outgoingScreenSharing = client->getScreenSharingManager()->createOutgoingScreenSharing(recipient); if (outgoingScreenSharing) { + client->getEntityCapsProvider()->onCapsChanged.disconnect(boost::bind(&ScreenSharer::handleCapsChanged, this, _1)); std::cout << "started screen sharing" << std::endl; outgoingScreenSharing->onReady.connect(boost::bind(&ScreenSharer::handleRTPReady, this)); outgoingScreenSharing->onFinished.connect(boost::bind(&ScreenSharer::handleScreenSharingFinished, this)); outgoingScreenSharing->start(200, 200); @@ -89,13 +90,13 @@ class ScreenSharer { } } void handleRTPReady() { - uint8_t *data = new uint8_t[200*200*3]; + uint8_t data[200*200*3]; data[0] = 0; data[1] = 128; data[2] = 255; - Image img(200, 200, data); + Image img(200, 200, (const uint8_t*)data); for (int i = 0; i < 10; ++i) outgoingScreenSharing->addImage(img); outgoingScreenSharing->stop(); |
Swift