diff options
Diffstat (limited to 'Swiften/ScreenSharing/VP8Encoder.h')
-rw-r--r-- | Swiften/ScreenSharing/VP8Encoder.h | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/Swiften/ScreenSharing/VP8Encoder.h b/Swiften/ScreenSharing/VP8Encoder.h index b512058..0a343bb 100644 --- a/Swiften/ScreenSharing/VP8Encoder.h +++ b/Swiften/ScreenSharing/VP8Encoder.h @@ -4,47 +4,39 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ -#ifndef VP8ENCODER_H -#define VP8ENCODER_H - #pragma once #include <Swiften/ScreenSharing/VideoEncoder.h> -#include <Swiften/Base/boost_bsignals.h> - #define VPX_CODEC_DISABLE_COMPAT 1 // Recomended #include "vpx/vpx_encoder.h" namespace Swift { + class Image; + class VP8RTPPacketizer; + class VP8Encoder : public VideoEncoder { public: - VP8Encoder(unsigned int width, unsigned int height); + VP8Encoder(VP8RTPPacketizer* packetizer, unsigned int width, unsigned int height); virtual ~VP8Encoder(); void updateCodecConfig(); - public: - boost::signal<void (const vpx_codec_cx_pkt_t *)> onNewFrameEncoded; - - protected: - virtual void encodingLoop(); + virtual void encodeImage(const Image& frame); private: - bool convertRGB24toYV12inBuffer(const VideoFrame::ref frame); + bool convertRGB24toYV12inBuffer(const Image& frame); private: + VP8RTPPacketizer* packetizer; vpx_codec_iface_t* codecInterface; vpx_codec_ctx_t codecContext; vpx_codec_enc_cfg_t codecConfig; - vpx_image_t *imageBuffer; + vpx_image_t* imageBuffer; vpx_codec_flags_t codecFlags; vpx_enc_frame_flags_t frameFlags; int frameNumber; }; } - - -#endif // VP8ENCODER_H |