/* * Copyright (c) 2012 Yoann Blein * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #pragma once #include #include #include #include #include "vpx/vpx_encoder.h" namespace Swift { class VP8RTPPacketizer { public: VP8RTPPacketizer(); void packetizeFrame(const vpx_codec_cx_pkt_t* pkt); boost::signal&, bool marker)> onNewPayloadReady; private: static const uint8_t SBit = 1 << 4; static const uint8_t HBit = 1 << 4; static const uint8_t Size0BitMask = 7; static const uint8_t Size0BitShift = 5; static const size_t MaxRTPPayloadSize = 1300; // Replace with JRTPLIB's one; TODO: fix the issue with maximum size std::vector payloadBuffer; }; }