aboutsummaryrefslogtreecommitdiffstats
path: root/zmqoutput.h
blob: a4eb5560f8a61d90038a6e6429bbcb1e8b1c712b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#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));


int zmqoutput_open(Bit_stream_struc * bs, char* uri);

int zmqoutput_write_byte(Bit_stream_struc *bs, unsigned char data);

void zmqoutput_close(Bit_stream_struc *bs);

#endif