X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fbutler.h;h=c7e71658da25889107d033147e62b16897f92f4d;hb=9a97c1b4116d7fb80e8ab145c0cc738dbf14d617;hp=d31442f6c699b1096a52ba842d22043d571f2b44;hpb=7245e46453a82886739a45bd78fcdf9e8401367c;p=dcpomatic.git diff --git a/src/lib/butler.h b/src/lib/butler.h index d31442f6c..c7e71658d 100644 --- a/src/lib/butler.h +++ b/src/lib/butler.h @@ -45,8 +45,9 @@ public: int audio_channels, std::function pixel_format, VideoRange video_range, - bool aligned, - bool fast + Image::Alignment alignment, + bool fast, + bool prepare_only_proxy ); ~Butler (); @@ -58,31 +59,29 @@ public: class Error { public: - enum Code{ + enum class Code { NONE, AGAIN, DIED, FINISHED }; - Error() - : code (NONE) - {} - - Code code; + Code code = Code::NONE; std::string message; std::string summary () const; }; - std::pair, dcpomatic::DCPTime> get_video (bool blocking, Error* e = 0); - boost::optional get_audio (float* out, Frame frames); + enum class Behaviour { + BLOCKING, + NON_BLOCKING + }; + + std::pair, dcpomatic::DCPTime> get_video (Behaviour behaviour, Error* e = nullptr); + boost::optional get_audio (Behaviour behaviour, float* out, Frame frames); boost::optional get_closed_caption (); void disable_audio (); - void set_prepare_only_proxy (bool p) { - _prepare_only_proxy = p; - } std::pair memory_used () const; @@ -127,7 +126,7 @@ private: std::function _pixel_format; VideoRange _video_range; - bool _aligned; + Image::Alignment _alignment; bool _fast; /** true to ask PlayerVideo::prepare to only prepare the ImageProxy and not also