summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/ScreenSharing/OutgoingScreenSharing.h')
-rw-r--r--Swiften/ScreenSharing/OutgoingScreenSharing.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/Swiften/ScreenSharing/OutgoingScreenSharing.h b/Swiften/ScreenSharing/OutgoingScreenSharing.h
index c00d11e..cacc715 100644
--- a/Swiften/ScreenSharing/OutgoingScreenSharing.h
+++ b/Swiften/ScreenSharing/OutgoingScreenSharing.h
@@ -10,41 +10,53 @@
#include <Swiften/Jingle/JingleContentID.h>
#include <Swiften/Elements/RTPPayloadType.h>
+#include <stdint.h>
+#include <vector>
+
namespace Swift {
class ConnectivityManager;
class JingleDescription;
class JingleTransportPayload;
class TimerFactory;
class Timer;
- class RTPSession;
+ class VideoEncoder;
+ class VP8RTPPacketizer;
+ class Image;
class OutgoingScreenSharing : public ScreenSharing {
public:
typedef boost::shared_ptr<OutgoingScreenSharing> ref;
public:
- OutgoingScreenSharing(boost::shared_ptr<JingleSession> session, UDPSocketFactory* udpSocketFactory, TimerFactory* timerFactory);
+ OutgoingScreenSharing(boost::shared_ptr<JingleSession> jingleSession, UDPSocketFactory* udpSocketFactory, TimerFactory* timerFactory);
virtual ~OutgoingScreenSharing();
virtual void cancel();
- void start();
+ void start(unsigned int width, unsigned int height);
+ void addImage(const Image& image);
+
+ public:
+ boost::signal<void ()> onReady;
private:
void handleSocketConnected();
void handleSessionAcceptReceived(const JingleContentID& /*id*/, boost::shared_ptr<JingleDescription> /*desc*/, boost::shared_ptr<JingleTransportPayload> /*transport*/);
void handleConnectionFailed();
void startRTPSession();
+ void handleNewPayloadReady(const std::vector<uint8_t>& data, bool marker);
private:
+ TimerFactory* timerFactory;
JingleContentID contentID;
bool canceled;
bool sessionAccepted;
bool socketConnected;
- RTPSession* rtpSession;
RTPPayloadType payloadTypeUsed;
-
- TimerFactory* timerFactory;
+ VideoEncoder* encoder;
+ VP8RTPPacketizer* packetizer;
+ unsigned int width;
+ unsigned int height;
boost::shared_ptr<Timer> connectionTimer;
};
}