summaryrefslogtreecommitdiff
path: root/src/lib/decoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-05-05 22:27:01 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-07 09:29:59 +0200
commit1b998e92e4313e728389a39408bd67919649c5cb (patch)
tree58dffdfea4f1b9bfa5b2acc6b1126ad405de013d /src/lib/decoder.h
parentd067680769d0be2931605caeebc03ea9e77c6aa7 (diff)
fixup! WIP: allow Piece to take multiple content/decoder.
Diffstat (limited to 'src/lib/decoder.h')
-rw-r--r--src/lib/decoder.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/decoder.h b/src/lib/decoder.h
index 00d629f81..ed35662b3 100644
--- a/src/lib/decoder.h
+++ b/src/lib/decoder.h
@@ -63,10 +63,13 @@ public:
std::shared_ptr<TextDecoder> only_text () const;
- /** Do some decoding and perhaps emit video, audio or subtitle data.
- * @return true if this decoder will emit no more data unless a seek() happens.
- */
- virtual bool pass () = 0;
+ bool done () const {
+ return _done;
+ }
+
+ /** Do some decoding and perhaps emit video, audio or subtitle data */
+ void pass ();
+
virtual void seek (dcpomatic::ContentTime time, bool accurate);
virtual dcpomatic::ContentTime position () const;
@@ -76,6 +79,10 @@ public:
}
boost::signals2::signal<void ()> Flush;
+
+private:
+ virtual bool do_pass () = 0;
+ bool _done = false;
};