Typedefs | Functions

opus.h File Reference

Opus reference implementation API. More...

#include "opus_types.h"
#include "opus_defines.h"

Go to the source code of this file.

Typedefs

typedef struct OpusEncoder OpusEncoder
 Opus encoder state.
typedef struct OpusDecoder OpusDecoder
 Opus decoder state.
typedef struct OpusRepacketizer OpusRepacketizer

Functions

int opus_encoder_get_size (int channels)
OpusEncoderopus_encoder_create (opus_int32 Fs, int channels, int application, int *error)
 Allocates and initializes an encoder state.
int opus_encoder_init (OpusEncoder *st, opus_int32 Fs, int channels, int application)
 Initializes a previously allocated encoder state The memory pointed to by st must be the size returned by opus_encoder_get_size.
int opus_encode (OpusEncoder *st, const opus_int16 *pcm, int frame_size, unsigned char *data, int max_data_bytes)
 Encodes an Opus frame.
int opus_encode_float (OpusEncoder *st, const float *pcm, int frame_size, unsigned char *data, int max_data_bytes)
 Encodes an Opus frame from floating point input.
void opus_encoder_destroy (OpusEncoder *st)
 Frees an OpusEncoder allocated by opus_encoder_create.
int opus_encoder_ctl (OpusEncoder *st, int request,...)
 Perform a CTL function on an Opus encoder.
int opus_decoder_get_size (int channels)
 Gets the size of an OpusDecoder structure.
OpusDecoderopus_decoder_create (opus_int32 Fs, int channels, int *error)
 Allocates and initializes a decoder state.
int opus_decoder_init (OpusDecoder *st, opus_int32 Fs, int channels)
 Initializes a previously allocated decoder state.
int opus_decode (OpusDecoder *st, const unsigned char *data, int len, opus_int16 *pcm, int frame_size, int decode_fec)
 Decode an Opus frame.
int opus_decode_float (OpusDecoder *st, const unsigned char *data, int len, float *pcm, int frame_size, int decode_fec)
 Decode an opus frame with floating point output.
int opus_decoder_ctl (OpusDecoder *st, int request,...)
 Perform a CTL function on an Opus decoder.
void opus_decoder_destroy (OpusDecoder *st)
 Frees an OpusDecoder allocated by opus_decoder_create.
int opus_packet_parse (const unsigned char *data, int len, unsigned char *out_toc, const unsigned char *frames[48], short size[48], int *payload_offset)
 Parse an opus packet into one or more frames.
int opus_packet_get_bandwidth (const unsigned char *data)
 Gets the bandwidth of an Opus packet.
int opus_packet_get_samples_per_frame (const unsigned char *data, opus_int32 Fs)
 Gets the number of samples per frame from an Opus packet.
int opus_packet_get_nb_channels (const unsigned char *data)
 Gets the number of channels from an Opus packet.
int opus_packet_get_nb_frames (const unsigned char packet[], int len)
 Gets the number of frames in an Opus packet.
int opus_decoder_get_nb_samples (const OpusDecoder *dec, const unsigned char packet[], int len)
 Gets the number of samples of an Opus packet.
int opus_repacketizer_get_size (void)
OpusRepacketizeropus_repacketizer_init (OpusRepacketizer *rp)
OpusRepacketizeropus_repacketizer_create (void)
void opus_repacketizer_destroy (OpusRepacketizer *rp)
int opus_repacketizer_cat (OpusRepacketizer *rp, const unsigned char *data, int len)
opus_int32 opus_repacketizer_out_range (OpusRepacketizer *rp, int begin, int end, unsigned char *data, int maxlen)
int opus_repacketizer_get_nb_frames (OpusRepacketizer *rp)
opus_int32 opus_repacketizer_out (OpusRepacketizer *rp, unsigned char *data, int maxlen)

Detailed Description

Opus reference implementation API.

 All Files Functions Typedefs Defines