projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Report better errors when the butler dies.
[dcpomatic.git]
/
src
/
lib
/
butler.h
diff --git
a/src/lib/butler.h
b/src/lib/butler.h
index 6263d61431d6e9fff81d7886d5e134d3a1a00c18..e13843c90e9c14833704cde408e65de072e8e5c9 100644
(file)
--- a/
src/lib/butler.h
+++ b/
src/lib/butler.h
@@
-49,11
+49,23
@@
public:
void seek (dcpomatic::DCPTime position, bool accurate);
void seek (dcpomatic::DCPTime position, bool accurate);
- enum Error {
- NONE,
- AGAIN,
- DIED,
- FINISHED
+ class Error {
+ public:
+ enum Code{
+ NONE,
+ AGAIN,
+ DIED,
+ FINISHED
+ };
+
+ Error()
+ : code (NONE)
+ {}
+
+ Code code;
+ std::string message;
+
+ std::string summary () const;
};
std::pair<boost::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> get_video (bool blocking, Error* e = 0);
};
std::pair<boost::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> get_video (bool blocking, Error* e = 0);
@@
-94,6
+106,7
@@
private:
int _suspended;
bool _finished;
bool _died;
int _suspended;
bool _finished;
bool _died;
+ std::string _died_message;
bool _stop_thread;
AudioMapping _audio_mapping;
bool _stop_thread;
AudioMapping _audio_mapping;