summaryrefslogtreecommitdiff
path: root/src/lib/decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/decoder.cc')
-rw-r--r--src/lib/decoder.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc
index 3f4cda6eb..7102f2aa4 100644
--- a/src/lib/decoder.cc
+++ b/src/lib/decoder.cc
@@ -23,6 +23,7 @@
#include "film.h"
#include "decoder.h"
+#include "decoded.h"
#include "i18n.h"
@@ -36,3 +37,29 @@ Decoder::Decoder (shared_ptr<const Film> f)
{
}
+
+shared_ptr<Decoded>
+Decoder::peek ()
+{
+ while (_pending.empty() && !pass ()) {}
+
+ if (_pending.empty ()) {
+ return shared_ptr<Decoded> ();
+ }
+
+ return _pending.front ();
+}
+
+void
+Decoder::consume ()
+{
+ if (!_pending.empty ()) {
+ _pending.pop_front ();
+ }
+}
+
+void
+Decoder::seek (ContentTime, bool)
+{
+ _pending.clear ();
+}