- void seek (DCPTime position, bool accurate);
- std::pair<boost::shared_ptr<PlayerVideo>, DCPTime> get_video ();
- bool get_audio (float* out, Frame frames);
+ Butler (Butler const&) = delete;
+ Butler& operator= (Butler const&) = delete;
+
+ void seek (dcpomatic::DCPTime position, bool accurate);
+
+ class Error {
+ public:
+ enum class Code {
+ NONE,
+ AGAIN,
+ DIED,
+ FINISHED
+ };
+
+ Code code = Code::NONE;
+ std::string message;
+
+ std::string summary () const;
+ };
+
+ enum class Behaviour {
+ BLOCKING,
+ NON_BLOCKING
+ };
+
+ std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> get_video (Behaviour behaviour, Error* e = nullptr);
+ boost::optional<dcpomatic::DCPTime> get_audio (Behaviour behaviour, float* out, Frame frames);
+ boost::optional<TextRingBuffers::Data> get_closed_caption ();