33#ifndef OPUS_MULTISTREAM_H
34#define OPUS_MULTISTREAM_H
47#define __opus_check_encstate_ptr(ptr) ((ptr) + ((ptr) - (OpusEncoder**)(ptr)))
48#define __opus_check_decstate_ptr(ptr) ((ptr) + ((ptr) - (OpusDecoder**)(ptr)))
55#define OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST 5120
56#define OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST 5122
86#define OPUS_MULTISTREAM_GET_ENCODER_STATE(x,y) OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST, __opus_check_int(x), __opus_check_encstate_ptr(y)
99#define OPUS_MULTISTREAM_GET_DECODER_STATE(x,y) OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST, __opus_check_int(x), __opus_check_decstate_ptr(y)
262 const unsigned char *mapping,
265) OPUS_ARG_NONNULL(5);
272 int *coupled_streams,
273 unsigned char *mapping,
276) OPUS_ARG_NONNULL(4) OPUS_ARG_NONNULL(5) OPUS_ARG_NONNULL(6);
332 const
unsigned char *mapping,
334) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
342 int *coupled_streams,
343 unsigned char *mapping,
345) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(5) OPUS_ARG_NONNULL(6) OPUS_ARG_NONNULL(7);
383) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
428) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
509 const
unsigned char *mapping,
511) OPUS_ARG_NONNULL(5);
553 const
unsigned char *mapping
554) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
587 const
unsigned char *data,
592) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
625 const
unsigned char *data,
630) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
int opus_multistream_decoder_init(OpusMSDecoder *st, opus_int32 Fs, int channels, int streams, int coupled_streams, const unsigned char *mapping)
Intialize a previously allocated decoder state object.
OpusMSDecoder * opus_multistream_decoder_create(opus_int32 Fs, int channels, int streams, int coupled_streams, const unsigned char *mapping, int *error)
Allocates and initializes a multistream decoder state.
opus_int32 opus_multistream_decoder_get_size(int streams, int coupled_streams)
Gets the size of an OpusMSDecoder structure.
int opus_multistream_decoder_ctl(OpusMSDecoder *st, int request,...)
Perform a CTL function on a multistream Opus decoder.
int opus_multistream_decode_float(OpusMSDecoder *st, const unsigned char *data, opus_int32 len, float *pcm, int frame_size, int decode_fec)
Decode a multistream Opus packet with floating point output.
OpusMSEncoder * opus_multistream_surround_encoder_create(opus_int32 Fs, int channels, int mapping_family, int *streams, int *coupled_streams, unsigned char *mapping, int application, int *error)
opus_int32 opus_multistream_encoder_get_size(int streams, int coupled_streams)
Gets the size of an OpusMSEncoder structure.
int opus_multistream_surround_encoder_init(OpusMSEncoder *st, opus_int32 Fs, int channels, int mapping_family, int *streams, int *coupled_streams, unsigned char *mapping, int application)
opus_int32 opus_multistream_surround_encoder_get_size(int channels, int mapping_family)
int opus_multistream_encode(OpusMSEncoder *st, const opus_int16 *pcm, int frame_size, unsigned char *data, opus_int32 max_data_bytes)
Encodes a multistream Opus frame.
int opus_multistream_decode(OpusMSDecoder *st, const unsigned char *data, opus_int32 len, opus_int16 *pcm, int frame_size, int decode_fec)
Decode a multistream Opus packet.
void opus_multistream_decoder_destroy(OpusMSDecoder *st)
Frees an OpusMSDecoder allocated by opus_multistream_decoder_create().
struct OpusMSDecoder OpusMSDecoder
Opus multistream decoder state.
Definition opus_multistream.h:183
int opus_multistream_encoder_ctl(OpusMSEncoder *st, int request,...)
Perform a CTL function on a multistream Opus encoder.
struct OpusMSEncoder OpusMSEncoder
Opus multistream encoder state.
Definition opus_multistream.h:175
int opus_multistream_encoder_init(OpusMSEncoder *st, opus_int32 Fs, int channels, int streams, int coupled_streams, const unsigned char *mapping, int application)
Initialize a previously allocated multistream encoder state.
void opus_multistream_encoder_destroy(OpusMSEncoder *st)
Frees an OpusMSEncoder allocated by opus_multistream_encoder_create().
OpusMSEncoder * opus_multistream_encoder_create(opus_int32 Fs, int channels, int streams, int coupled_streams, const unsigned char *mapping, int application, int *error)
Allocates and initializes a multistream encoder state.
int opus_multistream_encode_float(OpusMSEncoder *st, const float *pcm, int frame_size, unsigned char *data, opus_int32 max_data_bytes)
Encodes a multistream Opus frame from floating point input.
Opus reference implementation API.
int opus_int32
Definition opus_types.h:161
short opus_int16
Definition opus_types.h:159