diff options
author | dknn <yoann.blein@free.fr> | 2012-07-14 08:00:24 (GMT) |
---|---|---|
committer | dknn <yoann.blein@free.fr> | 2012-09-22 09:01:48 (GMT) |
commit | 51958a50e31b483aa932aac8d696b229ba66b5cb (patch) | |
tree | 559c19451c2d53a1ee72113154aa187060680f3c /Swiften/ScreenSharing/OutgoingScreenSharing.h | |
parent | ce9a3d75677f08af0a226bb3d2bf02c28c938c33 (diff) | |
download | swift-contrib-51958a50e31b483aa932aac8d696b229ba66b5cb.zip swift-contrib-51958a50e31b483aa932aac8d696b229ba66b5cb.tar.bz2 |
Fixes to make classes working together
Diffstat (limited to 'Swiften/ScreenSharing/OutgoingScreenSharing.h')
-rw-r--r-- | Swiften/ScreenSharing/OutgoingScreenSharing.h | 24 |
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; }; } |