summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/ScreenSharing/VideoEncoder.h')
-rw-r--r--Swiften/ScreenSharing/VideoEncoder.h33
1 files changed, 6 insertions, 27 deletions
diff --git a/Swiften/ScreenSharing/VideoEncoder.h b/Swiften/ScreenSharing/VideoEncoder.h
index d98b854..718b59f 100644
--- a/Swiften/ScreenSharing/VideoEncoder.h
+++ b/Swiften/ScreenSharing/VideoEncoder.h
@@ -4,41 +4,20 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
-#ifndef VIDEOENCODER_H
-#define VIDEOENCODER_H
+#pragma once
-#include <Swiften/ScreenSharing/VideoFrame.h>
-#include <boost/thread/thread.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/condition_variable.hpp>
#include <stdint.h>
-#include <queue>
-
+#include <boost/shared_ptr.hpp>
namespace Swift {
+ class Image;
+ class Packetizer;
+
class VideoEncoder {
public:
VideoEncoder() {}
virtual ~VideoEncoder() {}
- void addFrame(VideoFrame::ref frame);
-
- void startEncoding();
- void stopEncoding();
-
- protected:
- virtual void encodingLoop() = 0;
- VideoFrame::ref popWhenFrameIsAvailable();
-
- protected:
- bool stop;
-
- private:
- std::queue<VideoFrame::ref> frames;
- boost::mutex queueMutex;
- boost::condition_variable queueCondVar;
- boost::thread encodingThread;
+ virtual void encodeImage(const Image& frame) = 0;
};
}
-
-#endif // VIDEOENCODER_H