aboutsummaryrefslogtreecommitdiffstats
path: root/lib/edi/STIDecoder.hpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-09-18 11:49:11 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-09-18 11:49:11 +0200
commit015427d9e74f34dc7d0f7fbad4ad1eaad6537cce (patch)
tree01ae9249194fbff234e32b59c07f7894aef16878 /lib/edi/STIDecoder.hpp
parent9c2e691744f96ae7ace8b82385b080ee9d858906 (diff)
downloaddabmux-015427d9e74f34dc7d0f7fbad4ad1eaad6537cce.tar.gz
dabmux-015427d9e74f34dc7d0f7fbad4ad1eaad6537cce.tar.bz2
dabmux-015427d9e74f34dc7d0f7fbad4ad1eaad6537cce.zip
EDI in: add audio levels metadata and source version
Diffstat (limited to 'lib/edi/STIDecoder.hpp')
-rw-r--r--lib/edi/STIDecoder.hpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/edi/STIDecoder.hpp b/lib/edi/STIDecoder.hpp
index 3f6f729..e2aa850 100644
--- a/lib/edi/STIDecoder.hpp
+++ b/lib/edi/STIDecoder.hpp
@@ -53,6 +53,12 @@ struct sti_payload_data {
uint16_t stl(void) const { return istd.size(); }
};
+struct audio_level_data {
+ int16_t left = 0;
+ int16_t right = 0;
+};
+
+
/* A class that receives STI data must implement the interface described
* in the STIDataCollector. This can be e.g. a converter to ETI, or something that
* prepares data structures for a modulator.
@@ -78,6 +84,9 @@ class STIDataCollector {
virtual void add_payload(sti_payload_data&& payload) = 0;
+ virtual void update_audio_levels(const audio_level_data& data) = 0;
+ virtual void update_odr_version(const odr_version_data& data) = 0;
+
virtual void assemble() = 0;
};
@@ -113,11 +122,13 @@ class STIDecoder {
bool decode_ssn(const std::vector<uint8_t> &value, uint16_t n);
bool decode_stardmy(const std::vector<uint8_t> &value, uint16_t);
+ bool decode_odraudiolevel(const std::vector<uint8_t> &value, uint16_t);
+ bool decode_odrversion(const std::vector<uint8_t> &value, uint16_t);
+
void packet_completed();
STIDataCollector& m_data_collector;
TagDispatcher m_dispatcher;
-
};
}