aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/inputs.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-09-23 14:44:45 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-09-23 14:44:45 +0200
commit907534bccee046c0499e9f936873c229b247ef95 (patch)
tree07f6995d0c8614f80a920f86660809b2fbd79b2b /src/input/inputs.h
parent015427d9e74f34dc7d0f7fbad4ad1eaad6537cce (diff)
downloaddabmux-907534bccee046c0499e9f936873c229b247ef95.tar.gz
dabmux-907534bccee046c0499e9f936873c229b247ef95.tar.bz2
dabmux-907534bccee046c0499e9f936873c229b247ef95.zip
Add buffermanagement setting to RC
Diffstat (limited to 'src/input/inputs.h')
-rw-r--r--src/input/inputs.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/input/inputs.h b/src/input/inputs.h
index b99a88f..5d4fc60 100644
--- a/src/input/inputs.h
+++ b/src/input/inputs.h
@@ -35,6 +35,15 @@
namespace Inputs {
+enum class BufferManagement {
+ // Use a buffer in the input that doesn't consider timestamps
+ Prebuffering,
+
+ // Buffer incoming data until a given timestamp is reached
+ Timestamped,
+};
+
+
/* New input object base */
class InputBase {
public:
@@ -73,8 +82,14 @@ class InputBase {
virtual void close() = 0;
virtual ~InputBase() {}
+
+ void setBufferManagement(BufferManagement bm) { m_bufferManagement = bm; }
+ BufferManagement getBufferManagement() const { return m_bufferManagement; }
+
protected:
InputBase() {}
+
+ std::atomic<BufferManagement> m_bufferManagement = ATOMIC_VAR_INIT(BufferManagement::Prebuffering);
};
};