diff options
Diffstat (limited to 'Swiften/ScreenSharing/VP8Decoder.h')
-rw-r--r-- | Swiften/ScreenSharing/VP8Decoder.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Swiften/ScreenSharing/VP8Decoder.h b/Swiften/ScreenSharing/VP8Decoder.h new file mode 100644 index 0000000..8b2575a --- /dev/null +++ b/Swiften/ScreenSharing/VP8Decoder.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2012 Yoann Blein + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#pragma once + +#include <Swiften/ScreenSharing/VideoDecoder.h> + +#define VPX_CODEC_DISABLE_COMPAT 1 +#include "vpx/vpx_decoder.h" + +namespace Swift { + class Image; + + class VP8Decoder : public VideoDecoder { + public: + VP8Decoder(); + virtual ~VP8Decoder(); + + void updateCodecConfig(); + + virtual void decodeFrame(const std::vector<uint8_t>& frame); + + private: + Image convertYV12toRGB(const vpx_image_t* img); + + private: + vpx_codec_iface_t* codecInterface; + vpx_codec_ctx_t codecContext; + vpx_codec_flags_t codecFlags; + }; +} |