diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-08-12 01:12:31 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-13 20:22:44 +0200 |
| commit | f5f14a6422ddd68a52dd14686c1bd49159dbaa74 (patch) | |
| tree | 69b5ca05de568ae133d221484af7c463d68b903d /src/lib/cpu_player_video_preparer.h | |
| parent | fba17cbd0be154e7e89b7fe9a1d5a68b4a5ff279 (diff) | |
wip: hacks which at least get GPU-decoded image on screen
Diffstat (limited to 'src/lib/cpu_player_video_preparer.h')
| -rw-r--r-- | src/lib/cpu_player_video_preparer.h | 33 |
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 |
