diff options
author | dknn <yoann.blein@free.fr> | 2012-06-26 14:05:35 (GMT) |
---|---|---|
committer | dknn <yoann.blein@free.fr> | 2012-09-22 08:53:12 (GMT) |
commit | 39ac2af90938aec4f4e43b81a6e043e0ebcdd798 (patch) | |
tree | add99f9eb287778191ebde47917adbaa96a39b8a /Swiften/ScreenSharing/VP8RTPParser.h | |
parent | f374887e7a27831771304a09a74d6cd54f8ef4e4 (diff) | |
download | swift-contrib-39ac2af90938aec4f4e43b81a6e043e0ebcdd798.zip swift-contrib-39ac2af90938aec4f4e43b81a6e043e0ebcdd798.tar.bz2 |
Single threaded codec
Diffstat (limited to 'Swiften/ScreenSharing/VP8RTPParser.h')
-rw-r--r-- | Swiften/ScreenSharing/VP8RTPParser.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Swiften/ScreenSharing/VP8RTPParser.h b/Swiften/ScreenSharing/VP8RTPParser.h new file mode 100644 index 0000000..c88e2a6 --- /dev/null +++ b/Swiften/ScreenSharing/VP8RTPParser.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2012 Yoann Blein + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#pragma once + +#include <vector> +#include <stdint.h> +#include <stddef.h> + +namespace Swift { + class VP8Decoder; + + class VP8RTPParser { + public: + VP8RTPParser(VP8Decoder* decoder); + + void newPayloadReceived(const uint8_t* data, size_t len, bool hasMarker); + + private: + static const uint8_t SBit = 1 << 4; + static const uint8_t HBit = 1 << 4; + static const uint8_t Size0BitShift = 5; + + VP8Decoder* decoder; + + std::vector<uint8_t> buffer; + bool firstPacket; + size_t frameSize; + bool isKeyFrame; + bool showFrame; + }; +} |