summaryrefslogtreecommitdiff
path: root/src/lib/cpu_player_video_preparer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/cpu_player_video_preparer.h')
-rw-r--r--src/lib/cpu_player_video_preparer.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/lib/cpu_player_video_preparer.h b/src/lib/cpu_player_video_preparer.h
new file mode 100644
index 000000000..7cb46dc10
--- /dev/null
+++ b/src/lib/cpu_player_video_preparer.h
@@ -0,0 +1,33 @@
+#ifndef DCPOMATIC_CPU_PLAYER_VIDEO_PREPARER_H
+#define DCPOMATIC_CPU_PLAYER_VIDEO_PREPARER_H
+
+#include "player_video_preparer.h"
+extern "C" {
+#include <libavutil/pixfmt.h>
+}
+#include <boost/asio.hpp>
+#include <boost/thread.hpp>
+#include <boost/weak_ptr.hpp>
+
+
+class CPUPlayerVideoPreparer : public PlayerVideoPreparer
+{
+public:
+ CPUPlayerVideoPreparer (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast);
+ ~CPUPlayerVideoPreparer ();
+
+ void request (boost::shared_ptr<PlayerVideo> pv);
+
+private:
+ void prepare (boost::weak_ptr<PlayerVideo> pv);
+
+ boost::thread_group _pool;
+ boost::asio::io_service _service;
+ boost::shared_ptr<boost::asio::io_service::work> _work;
+
+ boost::function<AVPixelFormat (AVPixelFormat)> _pixel_format;
+ bool _aligned;
+ bool _fast;
+};
+
+#endif