summaryrefslogtreecommitdiff
path: root/src/lib/decoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-05-13 10:15:26 +0100
committerCarl Hetherington <cth@carlh.net>2015-05-13 10:15:26 +0100
commit9922c1f2eaea674ba2ff6cce5f5853655fd8ad7a (patch)
tree9427c2cb655f8788c31bb5410d70451d11ae3665 /src/lib/decoder.h
parent83e5567530d0be24490abdda46d196e4279c5030 (diff)
Don't bother decoding video frames when we're seeking around trying to find subtitles.
Diffstat (limited to 'src/lib/decoder.h')
-rw-r--r--src/lib/decoder.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/decoder.h b/src/lib/decoder.h
index c1b859865..0703a5426 100644
--- a/src/lib/decoder.h
+++ b/src/lib/decoder.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,6 +41,7 @@ public:
virtual ~Decoder () {}
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 ensure that, at worst,
@@ -50,7 +51,14 @@ protected:
* it may seek to just the right spot.
*/
virtual void seek (ContentTime time, bool accurate) = 0;
- virtual bool pass () = 0;
+
+ enum PassReason {
+ PASS_REASON_VIDEO,
+ PASS_REASON_AUDIO,
+ PASS_REASON_SUBTITLE
+ };
+
+ virtual bool pass (PassReason reason) = 0;
};
#endif