+
+class PixelFormatError : public StringError
+{
+public:
+ PixelFormatError (std::string o, AVPixelFormat f);
+};
+
+class ExceptionStore
+{
+public:
+ bool thrown () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _exception;
+ }
+
+ void rethrow () {
+ boost::mutex::scoped_lock lm (_mutex);
+ boost::rethrow_exception (_exception);
+ }
+
+protected:
+
+ void store_current () {
+ boost::mutex::scoped_lock lm (_mutex);
+ _exception = boost::current_exception ();
+ }
+
+private:
+ boost::exception_ptr _exception;
+ mutable boost::mutex _mutex;
+};
+
+
+
+#endif