X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdecoder.h;h=38556c8188a3932a319c5c3c3a7e463fa0fde435;hb=9c5a7319d807063c22d6bc165ee414ce82e26965;hp=654cacad4bc63d71131483422fcb231fe9a0729a;hpb=a5b59faff75265d3256ad0dbd9f0c69e51e31ce4;p=dcpomatic.git diff --git a/src/lib/decoder.h b/src/lib/decoder.h index 654cacad4..38556c818 100644 --- a/src/lib/decoder.h +++ b/src/lib/decoder.h @@ -28,9 +28,10 @@ #include #include #include "types.h" +#include "dcpomatic_time.h" -class Film; class Decoded; +class Film; /** @class Decoder. * @brief Parent class for decoders of content. @@ -38,34 +39,18 @@ class Decoded; class Decoder : public boost::noncopyable { public: - Decoder (boost::shared_ptr); virtual ~Decoder () {} - /** Seek so that the next get_*() will yield the next thing +protected: + /** Seek so that the next pass() will yield the next thing * (video/sound frame, subtitle etc.) at or after the requested * time. Pass accurate = true to try harder to get close to - * the request. - */ - virtual void seek (ContentTime time, bool accurate); - - boost::shared_ptr peek (); - boost::shared_ptr get (); - -protected: - - /** Perform one decode pass of the content, which may or may not - * result in a complete quantum (Decoded object) of decoded stuff - * being made ready. - * @return true if the decoder is done (i.e. no more data will be - * produced by any future calls to pass() without a seek() first). + * the request. Note that seeking to time t may mean that + * the next pass() yields, for example, audio at time t and then + * video before it. */ + virtual void seek (ContentTime time, bool accurate) = 0; virtual bool pass () = 0; - virtual void flush () {}; - - /** The Film that we are decoding in */ - boost::weak_ptr _film; - - std::list > _pending; }; #endif