summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Examples/ScreenSharing/Host.cpp')
-rw-r--r--Swiften/Examples/ScreenSharing/Host.cpp5
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
@@ -78,6 +78,7 @@ class ScreenSharer {
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));
@@ -90,11 +91,11 @@ 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();