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.cpp
parentf374887e7a27831771304a09a74d6cd54f8ef4e4 (diff)
downloadswift-contrib-39ac2af90938aec4f4e43b81a6e043e0ebcdd798.zip
swift-contrib-39ac2af90938aec4f4e43b81a6e043e0ebcdd798.tar.bz2
Single threaded codec
Diffstat (limited to 'Swiften/ScreenSharing/VideoEncoder.cpp')
-rw-r--r--Swiften/ScreenSharing/VideoEncoder.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/Swiften/ScreenSharing/VideoEncoder.cpp b/Swiften/ScreenSharing/VideoEncoder.cpp
deleted file mode 100644
index 40d9bef..0000000
--- a/Swiften/ScreenSharing/VideoEncoder.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2012 Yoann Blein
- * Licensed under the simplified BSD license.
- * See Documentation/Licenses/BSD-simplified.txt for more information.
- */
-
-#include <Swiften/ScreenSharing/VideoEncoder.h>
-
-namespace Swift {
-
-void VideoEncoder::addFrame(VideoFrame::ref frame)
-{
- boost::mutex::scoped_lock lock(queueMutex);
- frames.push(frame);
- lock.unlock();
- queueCondVar.notify_one();
-}
-
-void VideoEncoder::startEncoding()
-{
- stop = false;
- encodingThread = boost::thread(&VideoEncoder::encodingLoop, this);
-}
-
-void VideoEncoder::stopEncoding()
-{
- stop = true;
- encodingThread.join();
-}
-
-VideoFrame::ref VideoEncoder::popWhenFrameIsAvailable()
-{
- boost::mutex::scoped_lock lock(queueMutex);
- while (frames.empty()) {
- queueCondVar.wait(lock);
- }
- VideoFrame::ref popped = frames.front();
- frames.pop();
- return popped;
-}
-
-}