shithub: opus-tools

ref: 05a089c892a6d298b26f353adcdb3a0581767f48
dir: /src/opus_header.h/

View raw version
#ifndef OPUS_HEADER_H
#define OPUS_HEADER_H

#include "opus_types.h"

typedef struct {
   int version;
   int channels; /* Number of channels: 1..255 */
   int preskip;
   opus_uint32 input_sample_rate;
   int channel_mapping;
   /* The rest is only used if channel_mapping != 0 */
   int nb_streams;
   int nb_coupled;
   unsigned char stream_map[255];
} OpusHeader;

int opus_header_parse(const unsigned char *header, int len, OpusHeader *h);
int opus_header_to_packet(const OpusHeader *h, unsigned char *packet, int len);

#endif