|
Opus audio codec (RFC 6716): API and operations manual
|
1.3.1
|
|
Go to the documentation of this file.
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);
opus_int32 opus_multistream_decoder_get_size(int streams, int coupled_streams)
Gets the size of an OpusMSDecoder structure.
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.
struct OpusMSEncoder OpusMSEncoder
Opus multistream encoder state.
Definition: opus_multistream.h:175
Opus reference implementation API.
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.
opus_int32 opus_multistream_surround_encoder_get_size(int channels, int mapping_family)
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.
struct OpusMSDecoder OpusMSDecoder
Opus multistream decoder state.
Definition: opus_multistream.h:183
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)
int opus_int32
Definition: opus_types.h:161
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.
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.
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.
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.
void opus_multistream_decoder_destroy(OpusMSDecoder *st)
Frees an OpusMSDecoder allocated by opus_multistream_decoder_create().
int opus_multistream_decoder_ctl(OpusMSDecoder *st, int request,...)
Perform a CTL function on a multistream Opus decoder.
void opus_multistream_encoder_destroy(OpusMSEncoder *st)
Frees an OpusMSEncoder allocated by opus_multistream_encoder_create().
short opus_int16
Definition: opus_types.h:159
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_encoder_ctl(OpusMSEncoder *st, int request,...)
Perform a CTL function on a multistream Opus encoder.
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.