opus_multistream.h(3)
πΈ opus_multistream.h πΈ
okay bestie, welcome to the Opus multistream header β this is the Opus reference implementation multistream API, and yes she is that girl π . Sit down, grab a boba, we're going through every single function together, no skips, no cap.
β¨ NAME β¨
opus_multistream.h β the Opus reference implementation multistream API. that's the whole vibe. it's a C header, it's giving "many streams, one file" π¦
π SYNOPSIS π
#include 'opus.h'
π Macros π
#define OPUS_MULTISTREAM_GET_ENCODER_STATE(x, y)β grabs the encoder state for one individual stream inside a multistream encoder. lowkey the key to the whole encoder kingdom π#define OPUS_MULTISTREAM_GET_DECODER_STATE(x, y)β same energy but for the decoder side: gets the decoder state for an individual stream of a multistream decoder π
π¦ Typedefs π¦
typedef struct OpusMSEncoder OpusMSEncoderβ the Opus multistream encoder state. she's the main character πtypedef struct OpusMSDecoder OpusMSDecoderβ the Opus multistream decoder state. the other main character, they're a duo fr fr β¨
π Functions π
π§ Multistream encoder functions π§
opus_int32 opus_multistream_encoder_get_size (int streams, int coupled_streams)β tells you how big anOpusMSEncoderstructure is, so you know how much room to set aside π«Άopus_int32 opus_multistream_surround_encoder_get_size (int channels, int mapping_family)β the surround-flavoured size-getter. it's thechannels+mapping_familyversion, and yes she exists, she's just chillin' in the list π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. one-stop shop, we love a two-for-one π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)β the surround encoder's create function. note she takesmapping_familyand hands you backstreams,coupled_streamsandmappingthrough pointers, so you get the deets after the fact πint opus_multistream_encoder_init (OpusMSEncoder *st, opus_int32 Fs, int channels, int streams, int coupled_streams, const unsigned char *mapping, int application)β initializes a multistream encoder state that you already allocated yourself. DIY girlies rise π§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)β the surround version of the init-you-already-allocated situation. same deal,mapping_familyin,streams/coupled_streams/mappingout through pointers β¨int opus_multistream_encode (OpusMSEncoder *st, const opus_int16 *pcm, int frame_size, unsigned char *data, opus_int32 max_data_bytes)β encodes one multistream Opus frame π₯int opus_multistream_encode24 (OpusMSEncoder *st, const opus_int32 *pcm, int frame_size, unsigned char *data, opus_int32 max_data_bytes)β also encodes a multistream Opus frame. yep, same description, different pcm type β she takesconst opus_int32 *pcmand that's the whole plot π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 πΈvoid opus_multistream_encoder_destroy (OpusMSEncoder *st)β frees anOpusMSEncoderthat was allocated byopus_multistream_encoder_create(). clean up after yourself bestie, we don't do leaks here π«§int opus_multistream_encoder_ctl (OpusMSEncoder *st, int request,...)β runs a CTL function on a multistream Opus encoder. variadic, mysterious, iconic π
πΆ Multistream decoder functions πΆ
opus_int32 opus_multistream_decoder_get_size (int streams, int coupled_streams)β tells you the size of anOpusMSDecoderstructure. same energy as her encoder sister, just decoder-flavoured π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. she's ready out the gate β¨int opus_multistream_decoder_init (OpusMSDecoder *st, opus_int32 Fs, int channels, int streams, int coupled_streams, const unsigned char *mapping)β initializes a decoder state object you already allocated. note: noapplicationarg here, decoders don't need one π¦int opus_multistream_decode (OpusMSDecoder *st, const unsigned char *data, opus_int32 len, opus_int16 *pcm, int frame_size, int decode_fec)β decodes a multistream Opus packet π₯int opus_multistream_decode24 (OpusMSDecoder *st, const unsigned char *data, opus_int32 len, opus_int32 *pcm, int frame_size, int decode_fec)β decodes a multistream Opus packet. again, same one-liner, different output type βopus_int32 *pcmthis time πint opus_multistream_decode_float (OpusMSDecoder *st, const unsigned char *data, opus_int32 len, float *pcm, int frame_size, int decode_fec)β decodes a multistream Opus packet with floating point output πΈint opus_multistream_decoder_ctl (OpusMSDecoder *st, int request,...)β runs a CTL function on a multistream Opus decoder πvoid opus_multistream_decoder_destroy (OpusMSDecoder *st)β frees anOpusMSDecoderallocated byopus_multistream_decoder_create(). say bye bye properly π«Ά
π« Detailed Description π«
Opus reference implementation multistream API.
that's it, that's the description. short, sweet, does exactly what it says on the tin β¨
π Author π
Generated automatically by Doxygen for Opus from the source code.
so technically no human author wrote this β Doxygen did, straight off the source. respect the automation honestly π€π
π SEE ALSO π
not a single SEE ALSO in sight, bestie. this page stands alone, independent, main character energy, no supporting cast needed π
okay that's the whole page, every macro, every typedef, every function signature, every one-liner, all of it, nothing dropped π«Ά
this was Opus version 1.6.1, dated Thu Jan 29 2026 14:35:32, and it's the opus_multistream.h(3) manual page β thanks for reading bestie, go encode some streams, mwah πβ¨
π¦ where this page comes from
- ubuntu resolute: libopus-doc 1.6.1-1 Β· BSD-3-Clause
- ubuntu stonking: libopus-doc 1.6.1-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms