X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fbutler.h;h=c7e71658da25889107d033147e62b16897f92f4d;hb=a382bddc798c2699c816d92a46718b44485f8889;hp=cd3891754be508c51603b8b343e3069a3a95481a;hpb=3799e91d126d243d41c44dcb0ca1bfa66b53a57e;p=dcpomatic.git diff --git a/src/lib/butler.h b/src/lib/butler.h index cd3891754..c7e71658d 100644 --- a/src/lib/butler.h +++ b/src/lib/butler.h @@ -59,25 +59,26 @@ 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 ();