diff options
author | dknn <yoann.blein@free.fr> | 2012-07-15 16:18:18 (GMT) |
---|---|---|
committer | dknn <yoann.blein@free.fr> | 2012-09-22 09:01:49 (GMT) |
commit | c9ba8e43fc23fccd47531ecea73224b3b9b552c3 (patch) | |
tree | 9d9953000cc4d76e798cd1967e8f1e76ff102100 /Swiften/Examples/ScreenSharing | |
parent | 70e395802de55b1d2eb9f92ad86349cd2d0d0575 (diff) | |
download | swift-contrib-c9ba8e43fc23fccd47531ecea73224b3b9b552c3.zip swift-contrib-c9ba8e43fc23fccd47531ecea73224b3b9b552c3.tar.bz2 |
Fix troubles in screen sharing example
Diffstat (limited to 'Swiften/Examples/ScreenSharing')
-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 @@ -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(); |