summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordknn <yoann.blein@free.fr>2012-06-26 14:05:35 (GMT)
committerdknn <yoann.blein@free.fr>2012-09-22 08:53:12 (GMT)
commit39ac2af90938aec4f4e43b81a6e043e0ebcdd798 (patch)
treeadd99f9eb287778191ebde47917adbaa96a39b8a /Swiften/ScreenSharing/VideoEncoder.h
parentf374887e7a27831771304a09a74d6cd54f8ef4e4 (diff)
downloadswift-contrib-39ac2af90938aec4f4e43b81a6e043e0ebcdd798.zip
swift-contrib-39ac2af90938aec4f4e43b81a6e043e0ebcdd798.tar.bz2
Single threaded codec
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