summaryrefslogtreecommitdiffstats
path: root/lib/edi/STIWriter.cpp
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/STIWriter.cpp
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/STIWriter.cpp')
-rw-r--r--lib/edi/STIWriter.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/edi/STIWriter.cpp b/lib/edi/STIWriter.cpp
index 399922a..ea3bfe8 100644
--- a/lib/edi/STIWriter.cpp
+++ b/lib/edi/STIWriter.cpp
@@ -53,6 +53,7 @@ void STIWriter::reinit()
m_stat_valid = false;
m_time_valid = false;
m_payload_valid = false;
+ m_audio_levels = audio_level_data();
m_stiFrame.frame.clear();
}
@@ -84,6 +85,16 @@ void STIWriter::add_payload(sti_payload_data&& payload)
m_payload_valid = true;
}
+void STIWriter::update_audio_levels(const audio_level_data& data)
+{
+ m_audio_levels = data;
+}
+
+void STIWriter::update_odr_version(const odr_version_data& data)
+{
+ m_version_data = data;
+}
+
void STIWriter::update_edi_time(
uint32_t utco,
uint32_t seconds)
@@ -118,6 +129,8 @@ void STIWriter::assemble()
// Do copies so as to preserve existing payload data
m_stiFrame.frame = m_payload.istd;
+ m_stiFrame.audio_levels = m_audio_levels;
+ m_stiFrame.version_data = m_version_data;
m_stiFrame.timestamp.seconds = m_seconds;
m_stiFrame.timestamp.utco = m_utco;
m_stiFrame.timestamp.tsta = m_management_data.tsta;