diff options
Diffstat (limited to 'Swiften/ScreenSharing/RTPSession.h')
-rw-r--r-- | Swiften/ScreenSharing/RTPSession.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Swiften/ScreenSharing/RTPSession.h b/Swiften/ScreenSharing/RTPSession.h new file mode 100644 index 0000000..225132b --- /dev/null +++ b/Swiften/ScreenSharing/RTPSession.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2012 Yoann Blein + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#pragma once + +#include <Swiften/Base/SafeByteArray.h> +#include <Swiften/Network/HostAddressPort.h> +#include <Swiften/Base/boost_bsignals.h> + +namespace Swift { + class RTPSession { + public: + enum PayloadType { + VP8 = 98, + }; + + public: + RTPSession(const HostAddressPort& remotePeer, PayloadType payloadType, int frequency); + virtual ~RTPSession(); + + virtual void poll() = 0; + virtual void checkIncomingPackets() = 0; + virtual void sendPacket(const SafeByteArray& data, int timestampinc, bool marker = false) = 0; + virtual void injectData(const SafeByteArray& data) = 0; + virtual void stop(int maxWaitMs = 100) = 0; + + public: + boost::signal<void (uint8_t* data, size_t len, bool marker)> onIncomingPacket; + + protected: + HostAddressPort remotePeer; + PayloadType payloadType; + int frequency; + }; +} |