summaryrefslogtreecommitdiff
path: root/src/codecs
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-11-20 11:04:20 +1100
committerjacqueline <me@jacqueline.id.au>2023-11-20 11:04:20 +1100
commitb3b512f10e0570f7dc8a04e1613f1234e5532728 (patch)
treed8861607af715c09321165b76d57a4c58e232088 /src/codecs
parentd36f314a57b5136f6a7dabfa6cb78a16f1994f4f (diff)
downloadtangara-fw-b3b512f10e0570f7dc8a04e1613f1234e5532728.tar.gz
Don't start readahead until parsing the stream's header is finished
...but also disable readahead for now anyway, since it's unstable
Diffstat (limited to 'src/codecs')
-rw-r--r--src/codecs/include/codec.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/codecs/include/codec.hpp b/src/codecs/include/codec.hpp
index 67358d54..87f6637c 100644
--- a/src/codecs/include/codec.hpp
+++ b/src/codecs/include/codec.hpp
@@ -49,6 +49,15 @@ class IStream {
virtual auto CurrentPosition() -> int64_t = 0;
+ /*
+ * Called by codecs to indicate that they've finished parsing any header data
+ * within this stream, and are about to begin decoding.
+ *
+ * Currently used as a hint to the readahead stream to begin prefetching file
+ * data.
+ */
+ virtual auto SetPreambleFinished() -> void {}
+
protected:
StreamType t_;
};