aboutsummaryrefslogtreecommitdiffstats
path: root/src/Outputs.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-03-25 15:13:43 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-03-25 15:22:48 +0100
commit8df764af13e71062f24f60c08a1dc3e3c0d2e371 (patch)
tree1a84497ead9b98d3e553ebc2a1cbb58d5c7586b8 /src/Outputs.cpp
parent94bcb7587c267c33dc54ceff98c90fe24612fa0c (diff)
downloadODR-AudioEnc-8df764af13e71062f24f60c08a1dc3e3c0d2e371.tar.gz
ODR-AudioEnc-8df764af13e71062f24f60c08a1dc3e3c0d2e371.tar.bz2
ODR-AudioEnc-8df764af13e71062f24f60c08a1dc3e3c0d2e371.zip
Add --identifer option to specify content of EDI ODRv TAG
Diffstat (limited to 'src/Outputs.cpp')
-rw-r--r--src/Outputs.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/Outputs.cpp b/src/Outputs.cpp
index 97caaee..01156ce 100644
--- a/src/Outputs.cpp
+++ b/src/Outputs.cpp
@@ -1,6 +1,6 @@
/* ------------------------------------------------------------------
* Copyright (C) 2011 Martin Storsjo
- * Copyright (C) 2019 Matthias P. Braendli
+ * Copyright (C) 2020 Matthias P. Braendli
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -141,6 +141,11 @@ EDI::EDI() :
EDI::~EDI() { }
+void EDI::set_odr_version_tag(const std::string& odr_version_tag)
+{
+ m_odr_version_tag = odr_version_tag;
+}
+
void EDI::add_udp_destination(const std::string& host, unsigned int port)
{
auto dest = make_shared<edi::udp_destination_t>();
@@ -224,15 +229,7 @@ bool EDI::write_frame(const uint8_t *buf, size_t len)
edi::TagODRAudioLevels edi_tagAudioLevels(m_audio_left, m_audio_right);
- stringstream ss;
- ss << PACKAGE_NAME << " " <<
-#if defined(GITVERSION)
- GITVERSION;
-#else
- PACKAGE_VERSION;
-#endif
- edi::TagODRVersion edi_tagVersion(ss.str(), m_num_seconds_sent);
-
+ edi::TagODRVersion edi_tagVersion(m_odr_version_tag, m_num_seconds_sent);
// The above Tag Items will be assembled into a TAG Packet
edi::TagPacket edi_tagpacket(m_edi_conf.tagpacket_alignment);