summaryrefslogtreecommitdiffstats
path: root/src/Outputs.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-06-12 14:46:50 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-06-24 09:32:13 +0200
commit2c41070f6691ed98a93b245b4ecb17fd898002ab (patch)
treebec929230e7dd88f7ab9f90bfcdd6b9b21b0b088 /src/Outputs.h
parent7102f830e01c3d4d695c0d36608cb09064e4aedc (diff)
downloadODR-AudioEnc-2c41070f6691ed98a93b245b4ecb17fd898002ab.tar.gz
ODR-AudioEnc-2c41070f6691ed98a93b245b4ecb17fd898002ab.tar.bz2
ODR-AudioEnc-2c41070f6691ed98a93b245b4ecb17fd898002ab.zip
Add EDI output and rework odr-audioenc.cpp
Diffstat (limited to 'src/Outputs.h')
-rw-r--r--src/Outputs.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/Outputs.h b/src/Outputs.h
index 30b20c8..297f926 100644
--- a/src/Outputs.h
+++ b/src/Outputs.h
@@ -25,6 +25,10 @@
#include <cstdio>
#include "common.h"
#include "zmq.hpp"
+#include "edi/TagItems.h"
+#include "edi/TagPacket.h"
+#include "edi/AFPacket.h"
+#include "edi/Transport.h"
extern "C" {
#include "encryption.h"
}
@@ -109,9 +113,6 @@ class ZMQ: public Base {
virtual bool write_frame(const uint8_t *buf, size_t len) override;
private:
- virtual bool write_toolame(const uint8_t *buf, size_t len);
- virtual bool send_frame(const uint8_t *buf, size_t len);
-
zmq::context_t m_ctx;
zmq::socket_t m_sock;
@@ -120,7 +121,28 @@ class ZMQ: public Base {
encoder_selection_t m_encoder = encoder_selection_t::fdk_dabplus;
using vec_u8 = std::vector<uint8_t>;
vec_u8 m_framebuf;
- std::deque<uint8_t> m_toolame_buffer;
+};
+
+
+class EDI: public Base {
+ public:
+ EDI();
+ EDI(const EDI&) = delete;
+ EDI& operator=(const EDI&) = delete;
+ virtual ~EDI() override;
+
+ void add_udp_destination(const std::string& host, int port);
+ void add_tcp_destination(const std::string& host, int port);
+
+ bool enabled() const;
+
+ virtual bool write_frame(const uint8_t *buf, size_t len) override;
+
+ // TODO audio levels metadata
+
+ private:
+ edi::configuration_t m_edi_conf;
+ std::shared_ptr<edi::Sender> m_edi_sender;
};
}