X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdecoder.h;h=10bb4531032e4d0068340b14c985d9b401ac2fb5;hb=accc190af4322fb3d75eaa6958d1e80eef867aba;hp=c5a359e1a86afd52a7750c90d662447d5ce42b7b;hpb=bdbfd6b08856a445446bfd845f1c43109d184250;p=dcpomatic.git diff --git a/src/lib/decoder.h b/src/lib/decoder.h index c5a359e1a..10bb45310 100644 --- a/src/lib/decoder.h +++ b/src/lib/decoder.h @@ -26,8 +26,6 @@ #include "types.h" #include "dcpomatic_time.h" -#include -#include #include class Decoded; @@ -40,9 +38,9 @@ class Decoder : public boost::noncopyable public: virtual ~Decoder () {} -protected: +protected: friend class AudioDecoderStream; - + /** 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 ensure that, at worst, @@ -53,7 +51,14 @@ protected: */ virtual void seek (ContentTime time, bool accurate) = 0; - virtual bool pass () = 0; + enum PassReason { + PASS_REASON_VIDEO, + PASS_REASON_AUDIO, + PASS_REASON_SUBTITLE + }; + + /** @return true if this decoder has already returned all its data and will give no more */ + virtual bool pass (PassReason, bool accurate) = 0; }; #endif