/* * 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 namespace Swift { class VideoDecoder; class VP8RTPParser { public: VP8RTPParser(VideoDecoder* decoder); void newPayloadReceived(const uint8_t* data, size_t len, bool hasMarker); private: static const uint8_t SBit = 1 << 4; static const uint8_t XBit = 1 << 7; static const uint8_t IBit = 1 << 7; static const uint8_t HBit = 1 << 4; static const uint8_t Size0BitShift = 5; VideoDecoder* decoder; std::vector buffer; bool firstPacket; size_t frameSize; bool isKeyFrame; bool showFrame; int pictureID; }; }