aboutsummaryrefslogtreecommitdiffstats
path: root/libtoolame-dab/zmqoutput.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-02-15 02:44:20 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-02-15 02:44:20 +0100
commit22f1fce330059ef8a383cf327a023d6a9da5ad3e (patch)
tree6893f158dcaaaa1b9f1317923c32a841ba31f768 /libtoolame-dab/zmqoutput.h
parent891bb2592944aa2be2d81e1583e73e632e70537f (diff)
downloadODR-AudioEnc-22f1fce330059ef8a383cf327a023d6a9da5ad3e.tar.gz
ODR-AudioEnc-22f1fce330059ef8a383cf327a023d6a9da5ad3e.tar.bz2
ODR-AudioEnc-22f1fce330059ef8a383cf327a023d6a9da5ad3e.zip
Include toolame-dab as library
Diffstat (limited to 'libtoolame-dab/zmqoutput.h')
-rw-r--r--libtoolame-dab/zmqoutput.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/libtoolame-dab/zmqoutput.h b/libtoolame-dab/zmqoutput.h
new file mode 100644
index 0000000..7f4eb59
--- /dev/null
+++ b/libtoolame-dab/zmqoutput.h
@@ -0,0 +1,37 @@
+#ifndef _ZMQOUTPUT_H_
+#define _ZMQOUTPUT_H_
+
+#include <stdint.h>
+#include "common.h"
+
+#define ZMQ_ENCODER_TOOLAME 2
+
+struct zmq_frame_header
+{
+ uint16_t version; // we support version=1 now
+ uint16_t encoder; // see ZMQ_ENCODER_XYZ
+
+ /* length of the 'data' field */
+ uint32_t datasize;
+
+ /* Audio level, peak, linear PCM */
+ int16_t audiolevel_left;
+ int16_t audiolevel_right;
+
+ /* Data follows this header */
+} __attribute__ ((packed));
+
+
+/* Open the zmq socket and connect it to all URIs in the list.
+ * The URIs are semicolon delimited
+ */
+int zmqoutput_open(Bit_stream_struc * bs, const char* uri_list);
+
+int zmqoutput_write_byte(Bit_stream_struc *bs, unsigned char data);
+
+void zmqoutput_close(Bit_stream_struc *bs);
+
+void zmqoutput_set_peaks(int left, int right);
+
+#endif
+