public interface Opus
extends com.sun.jna.Library
| Modifier and Type | Interface and Description |
|---|---|
static class |
Opus.OpusCustomDecoder |
static class |
Opus.OpusCustomEncoder |
static class |
Opus.OpusCustomMode |
static class |
Opus.OpusDecoder |
static class |
Opus.OpusEncoder |
static class |
Opus.OpusMSDecoder |
static class |
Opus.OpusMSEncoder |
static class |
Opus.OpusRepacketizer |
| Modifier and Type | Field and Description |
|---|---|
static Opus |
INSTANCE |
static String |
JNA_LIBRARY_NAME |
static com.sun.jna.NativeLibrary |
JNA_NATIVE_LIB |
static int |
OPUS_ALLOC_FAIL
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_APPLICATION_AUDIO
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_APPLICATION_RESTRICTED_LOWDELAY
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_APPLICATION_VOIP
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_AUTO
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_BAD_ARG
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_BANDWIDTH_FULLBAND
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_BANDWIDTH_MEDIUMBAND
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_BANDWIDTH_NARROWBAND
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_BANDWIDTH_SUPERWIDEBAND
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_BANDWIDTH_WIDEBAND
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_BITRATE_MAX
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_BUFFER_TOO_SMALL
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_FRAMESIZE_10_MS
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_FRAMESIZE_2_5_MS
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_FRAMESIZE_20_MS
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_FRAMESIZE_40_MS
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_FRAMESIZE_5_MS
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_FRAMESIZE_60_MS
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_FRAMESIZE_ARG
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_APPLICATION_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_BANDWIDTH_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_BITRATE_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_COMPLEXITY_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_DTX_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_EXPERT_FRAME_DURATION_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_FINAL_RANGE_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_FORCE_CHANNELS_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_GAIN_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_INBAND_FEC_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_LAST_PACKET_DURATION_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_LOOKAHEAD_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_LSB_DEPTH_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_MAX_BANDWIDTH_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_PACKET_LOSS_PERC_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_PITCH_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_PREDICTION_DISABLED_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_SAMPLE_RATE_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_SIGNAL_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_VBR_CONSTRAINT_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_GET_VBR_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_INTERNAL_ERROR
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_INVALID_PACKET
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_INVALID_STATE
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST
native declaration : /tmp/opus_multistream.h
|
static int |
OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST
native declaration : /tmp/opus_multistream.h
|
static int |
OPUS_OK
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_RESET_STATE
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_APPLICATION_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_BANDWIDTH_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_BITRATE_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_COMPLEXITY_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_DTX_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_EXPERT_FRAME_DURATION_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_FORCE_CHANNELS_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_GAIN_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_INBAND_FEC_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_LSB_DEPTH_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_MAX_BANDWIDTH_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_PACKET_LOSS_PERC_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_PREDICTION_DISABLED_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_SIGNAL_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_VBR_CONSTRAINT_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SET_VBR_REQUEST
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SIGNAL_MUSIC
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_SIGNAL_VOICE
native declaration : /tmp/opus_defines.h
|
static int |
OPUS_UNIMPLEMENTED
native declaration : /tmp/opus_defines.h
|
| Modifier and Type | Method and Description |
|---|---|
int |
opus_custom_decode_float(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
FloatBuffer pcm,
int frame_size)
Decode an opus custom frame with floating point output
|
int |
opus_custom_decode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size)
Decode an opus custom frame with floating point output
|
int |
opus_custom_decode(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
ShortBuffer pcm,
int frame_size)
Decode an opus custom frame
|
int |
opus_custom_decode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size)
Decode an opus custom frame
|
com.sun.jna.ptr.PointerByReference |
opus_custom_decoder_create(com.sun.jna.ptr.PointerByReference mode,
int channels,
IntBuffer error)
Creates a new decoder state.
|
com.sun.jna.ptr.PointerByReference |
opus_custom_decoder_create(com.sun.jna.ptr.PointerByReference mode,
int channels,
com.sun.jna.ptr.IntByReference error)
Creates a new decoder state.
|
int |
opus_custom_decoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
Perform a CTL function on an Opus custom decoder.
* Generally the request and subsequent arguments are generated by a convenience macro. |
void |
opus_custom_decoder_destroy(com.sun.jna.ptr.PointerByReference st)
Destroys a an decoder state.
|
int |
opus_custom_decoder_get_size(com.sun.jna.ptr.PointerByReference mode,
int channels)
Gets the size of an OpusCustomDecoder structure.
|
int |
opus_custom_decoder_init(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.PointerByReference mode,
int channels)
Initializes a previously allocated decoder state
The memory pointed to by st must be the size returned by opus_custom_decoder_get_size. This is intended for applications which use their own allocator instead of malloc. |
int |
opus_custom_encode_float(com.sun.jna.ptr.PointerByReference st,
float[] pcm,
int frame_size,
ByteBuffer compressed,
int maxCompressedBytes)
Encodes a frame of audio.
|
int |
opus_custom_encode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size,
com.sun.jna.Pointer compressed,
int maxCompressedBytes)
Encodes a frame of audio.
|
int |
opus_custom_encode(com.sun.jna.ptr.PointerByReference st,
ShortBuffer pcm,
int frame_size,
ByteBuffer compressed,
int maxCompressedBytes)
Encodes a frame of audio.
|
int |
opus_custom_encode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size,
com.sun.jna.Pointer compressed,
int maxCompressedBytes)
Encodes a frame of audio.
|
com.sun.jna.ptr.PointerByReference |
opus_custom_encoder_create(com.sun.jna.ptr.PointerByReference mode,
int channels,
IntBuffer error)
Creates a new encoder state.
|
com.sun.jna.ptr.PointerByReference |
opus_custom_encoder_create(com.sun.jna.ptr.PointerByReference mode,
int channels,
com.sun.jna.ptr.IntByReference error)
Creates a new encoder state.
|
int |
opus_custom_encoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
Perform a CTL function on an Opus custom encoder.
* Generally the request and subsequent arguments are generated by a convenience macro. |
void |
opus_custom_encoder_destroy(com.sun.jna.ptr.PointerByReference st)
Destroys a an encoder state.
|
int |
opus_custom_encoder_get_size(com.sun.jna.ptr.PointerByReference mode,
int channels)
Gets the size of an OpusCustomEncoder structure.
|
com.sun.jna.ptr.PointerByReference |
opus_custom_mode_create(int Fs,
int frame_size,
IntBuffer error)
Creates a new mode struct.
|
void |
opus_custom_mode_destroy(com.sun.jna.ptr.PointerByReference mode)
Destroys a mode struct.
|
int |
opus_decode_float(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
FloatBuffer pcm,
int frame_size,
int decode_fec)
Decode an Opus packet with floating point output.
|
int |
opus_decode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size,
int decode_fec)
Decode an Opus packet with floating point output.
|
int |
opus_decode(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
ShortBuffer pcm,
int frame_size,
int decode_fec)
Decode an Opus packet.
|
int |
opus_decode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size,
int decode_fec)
Decode an Opus packet.
|
com.sun.jna.ptr.PointerByReference |
opus_decoder_create(int Fs,
int channels,
IntBuffer error)
Allocates and initializes a decoder state.
|
int |
opus_decoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
Perform a CTL function on an Opus decoder.
* Generally the request and subsequent arguments are generated by a convenience macro. |
void |
opus_decoder_destroy(com.sun.jna.ptr.PointerByReference st)
Frees an
OpusDecoder allocated by opus_decoder_create(). |
int |
opus_decoder_get_nb_samples(com.sun.jna.ptr.PointerByReference dec,
byte[] packet,
int len)
Gets the number of samples of an Opus packet.
|
int |
opus_decoder_get_nb_samples(com.sun.jna.ptr.PointerByReference dec,
com.sun.jna.Pointer packet,
int len)
Gets the number of samples of an Opus packet.
|
int |
opus_decoder_get_size(int channels)
Gets the size of an
OpusDecoder structure. |
int |
opus_decoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels)
Initializes a previously allocated decoder state.
The state must be at least the size returned by opus_decoder_get_size(). This is intended for applications which use their own allocator instead of malloc. |
int |
opus_encode_float(com.sun.jna.ptr.PointerByReference st,
float[] pcm,
int frame_size,
ByteBuffer data,
int max_data_bytes)
Encodes an Opus frame from floating point input.
|
int |
opus_encode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size,
com.sun.jna.Pointer data,
int max_data_bytes)
Encodes an Opus frame from floating point input.
|
int |
opus_encode(com.sun.jna.ptr.PointerByReference st,
ShortBuffer pcm,
int frame_size,
ByteBuffer data,
int max_data_bytes)
Encodes an Opus frame.
|
int |
opus_encode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size,
com.sun.jna.Pointer data,
int max_data_bytes)
Encodes an Opus frame.
|
com.sun.jna.ptr.PointerByReference |
opus_encoder_create(int Fs,
int channels,
int application,
IntBuffer error)
Allocates and initializes an encoder state.
There are three coding modes: * @ref OPUS_APPLICATION_VOIP gives best quality at a given bitrate for voice signals. |
int |
opus_encoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
Perform a CTL function on an Opus encoder.
* Generally the request and subsequent arguments are generated by a convenience macro. |
void |
opus_encoder_destroy(com.sun.jna.ptr.PointerByReference st)
Frees an
OpusEncoder allocated by opus_encoder_create(). |
int |
opus_encoder_get_size(int channels)
Gets the size of an
OpusEncoder structure. |
int |
opus_encoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int application)
Initializes a previously allocated encoder state
The memory pointed to by st must be at least the size returned by opus_encoder_get_size(). This is intended for applications which use their own allocator instead of malloc. |
String |
opus_get_version_string()
Gets the libopus version string.
* @returns Version string Original signature : char* opus_get_version_string()native declaration : /tmp/opus_defines.h:718 |
int |
opus_multistream_decode_float(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
FloatBuffer pcm,
int frame_size,
int decode_fec)
Decode a multistream Opus packet with floating point output.
|
int |
opus_multistream_decode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size,
int decode_fec)
Decode a multistream Opus packet with floating point output.
|
int |
opus_multistream_decode(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
ShortBuffer pcm,
int frame_size,
int decode_fec)
Decode a multistream Opus packet.
|
int |
opus_multistream_decode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size,
int decode_fec)
Decode a multistream Opus packet.
|
com.sun.jna.ptr.PointerByReference |
opus_multistream_decoder_create(int Fs,
int channels,
int streams,
int coupled_streams,
byte[] mapping,
IntBuffer error)
Allocates and initializes a multistream decoder state.
Call opus_multistream_decoder_destroy() to release this object when finished. |
int |
opus_multistream_decoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
Perform a CTL function on a multistream Opus decoder.
* Generally the request and subsequent arguments are generated by a convenience macro. |
void |
opus_multistream_decoder_destroy(com.sun.jna.ptr.PointerByReference st)
Frees an
OpusMSDecoder allocated byopus_multistream_decoder_create(). |
int |
opus_multistream_decoder_get_size(int streams,
int coupled_streams)
Gets the size of an
OpusMSDecoder structure. |
int |
opus_multistream_decoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int streams,
int coupled_streams,
byte[] mapping)
Intialize a previously allocated decoder state object.
The memory pointed to by \a st must be at least the size returned by opus_multistream_encoder_get_size(). This is intended for applications which use their own allocator instead of malloc. To reset a previously initialized state, use the #OPUS_RESET_STATE CTL. |
int |
opus_multistream_decoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int streams,
int coupled_streams,
com.sun.jna.Pointer mapping)
Intialize a previously allocated decoder state object.
The memory pointed to by \a st must be at least the size returned by opus_multistream_encoder_get_size(). This is intended for applications which use their own allocator instead of malloc. To reset a previously initialized state, use the #OPUS_RESET_STATE CTL. |
int |
opus_multistream_encode_float(com.sun.jna.ptr.PointerByReference st,
float[] pcm,
int frame_size,
ByteBuffer data,
int max_data_bytes)
Encodes a multistream Opus frame from floating point input.
|
int |
opus_multistream_encode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size,
com.sun.jna.Pointer data,
int max_data_bytes)
Encodes a multistream Opus frame from floating point input.
|
int |
opus_multistream_encode(com.sun.jna.ptr.PointerByReference st,
ShortBuffer pcm,
int frame_size,
ByteBuffer data,
int max_data_bytes)
Encodes a multistream Opus frame.
|
int |
opus_multistream_encode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size,
com.sun.jna.Pointer data,
int max_data_bytes)
Encodes a multistream Opus frame.
|
com.sun.jna.ptr.PointerByReference |
opus_multistream_encoder_create(int Fs,
int channels,
int streams,
int coupled_streams,
byte[] mapping,
int application,
IntBuffer error)
Allocates and initializes a multistream encoder state.
Call opus_multistream_encoder_destroy() to release this object when finished. |
int |
opus_multistream_encoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
Perform a CTL function on a multistream Opus encoder.
* Generally the request and subsequent arguments are generated by a convenience macro. |
void |
opus_multistream_encoder_destroy(com.sun.jna.ptr.PointerByReference st)
Frees an
OpusMSEncoder allocated byopus_multistream_encoder_create(). |
int |
opus_multistream_encoder_get_size(int streams,
int coupled_streams)
Gets the size of an OpusMSEncoder structure.
|
int |
opus_multistream_encoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int streams,
int coupled_streams,
byte[] mapping,
int application)
Initialize a previously allocated multistream encoder state.
The memory pointed to by \a st must be at least the size returned by opus_multistream_encoder_get_size(). This is intended for applications which use their own allocator instead of malloc. To reset a previously initialized state, use the #OPUS_RESET_STATE CTL. |
int |
opus_multistream_encoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int streams,
int coupled_streams,
com.sun.jna.Pointer mapping,
int application)
Initialize a previously allocated multistream encoder state.
The memory pointed to by \a st must be at least the size returned by opus_multistream_encoder_get_size(). This is intended for applications which use their own allocator instead of malloc. To reset a previously initialized state, use the #OPUS_RESET_STATE CTL. |
int |
opus_multistream_packet_pad(ByteBuffer data,
int len,
int new_len,
int nb_streams)
Pads a given Opus multi-stream packet to a larger size (possibly changing the TOC sequence).
|
int |
opus_multistream_packet_unpad(ByteBuffer data,
int len,
int nb_streams)
Remove all padding from a given Opus multi-stream packet and rewrite the TOC sequence to
minimize space usage. |
com.sun.jna.ptr.PointerByReference |
opus_multistream_surround_encoder_create(int Fs,
int channels,
int mapping_family,
IntBuffer streams,
IntBuffer coupled_streams,
ByteBuffer mapping,
int application,
IntBuffer error)
Original signature :
OpusMSEncoder* opus_multistream_surround_encoder_create(opus_int32, int, int, int*, int*, unsigned char*, int, int*)native declaration : /tmp/opus_multistream.h:266 |
int |
opus_multistream_surround_encoder_get_size(int channels,
int mapping_family)
Original signature :
opus_int32 opus_multistream_surround_encoder_get_size(int, int)native declaration : /tmp/opus_multistream.h:207 |
int |
opus_multistream_surround_encoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int mapping_family,
IntBuffer streams,
IntBuffer coupled_streams,
ByteBuffer mapping,
int application)
Original signature :
int opus_multistream_surround_encoder_init(OpusMSEncoder*, opus_int32, int, int, int*, int*, unsigned char*, int)native declaration : /tmp/opus_multistream.h:335 |
int |
opus_multistream_surround_encoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int mapping_family,
com.sun.jna.ptr.IntByReference streams,
com.sun.jna.ptr.IntByReference coupled_streams,
com.sun.jna.Pointer mapping,
int application)
Original signature :
int opus_multistream_surround_encoder_init(OpusMSEncoder*, opus_int32, int, int, int*, int*, unsigned char*, int)native declaration : /tmp/opus_multistream.h:335 |
int |
opus_packet_get_bandwidth(byte[] data)
Gets the bandwidth of an Opus packet.
|
int |
opus_packet_get_nb_channels(byte[] data)
Gets the number of channels from an Opus packet.
|
int |
opus_packet_get_nb_frames(byte[] packet,
int len)
Gets the number of frames in an Opus packet.
|
int |
opus_packet_get_nb_samples(byte[] packet,
int len,
int Fs)
Gets the number of samples of an Opus packet.
|
int |
opus_packet_get_samples_per_frame(byte[] data,
int Fs)
Gets the number of samples per frame from an Opus packet.
|
int |
opus_packet_pad(ByteBuffer data,
int len,
int new_len)
Pads a given Opus packet to a larger size (possibly changing the TOC sequence).
|
int |
opus_packet_parse(byte[] data,
int len,
ByteBuffer out_toc,
byte[] frames,
ShortBuffer size,
IntBuffer payload_offset)
Parse an opus packet into one or more frames.
Opus_decode will perform this operation internally so most applications do not need to use this function. This function does not copy the frames, the returned pointers are pointers into the input packet. |
int |
opus_packet_unpad(ByteBuffer data,
int len)
Remove all padding from a given Opus packet and rewrite the TOC sequence to
minimize space usage. |
void |
opus_pcm_soft_clip(FloatBuffer pcm,
int frame_size,
int channels,
FloatBuffer softclip_mem)
Applies soft-clipping to bring a float signal within the [-1,1] range.
|
int |
opus_repacketizer_cat(com.sun.jna.ptr.PointerByReference rp,
byte[] data,
int len)
Add a packet to the current repacketizer state.
This packet must match the configuration of any packets already submitted for repacketization since the last call to opus_repacketizer_init(). This means that it must have the same coding mode, audio bandwidth, frame size, and channel count. This can be checked in advance by examining the top 6 bits of the first byte of the packet, and ensuring they match the top 6 bits of the first byte of any previously submitted packet. The total duration of audio in the repacketizer state also must not exceed 120 ms, the maximum duration of a single packet, after adding this packet. * The contents of the current repacketizer state can be extracted into new packets using opus_repacketizer_out() or opus_repacketizer_out_range(). * In order to add a packet with a different configuration or to add more audio beyond 120 ms, you must clear the repacketizer state by calling opus_repacketizer_init(). If a packet is too large to add to the current repacketizer state, no part of it is added, even if it contains multiple frames, some of which might fit. If you wish to be able to add parts of such packets, you should first use another repacketizer to split the packet into pieces and add them individually. |
int |
opus_repacketizer_cat(com.sun.jna.ptr.PointerByReference rp,
com.sun.jna.Pointer data,
int len)
Add a packet to the current repacketizer state.
This packet must match the configuration of any packets already submitted for repacketization since the last call to opus_repacketizer_init(). This means that it must have the same coding mode, audio bandwidth, frame size, and channel count. This can be checked in advance by examining the top 6 bits of the first byte of the packet, and ensuring they match the top 6 bits of the first byte of any previously submitted packet. The total duration of audio in the repacketizer state also must not exceed 120 ms, the maximum duration of a single packet, after adding this packet. * The contents of the current repacketizer state can be extracted into new packets using opus_repacketizer_out() or opus_repacketizer_out_range(). * In order to add a packet with a different configuration or to add more audio beyond 120 ms, you must clear the repacketizer state by calling opus_repacketizer_init(). If a packet is too large to add to the current repacketizer state, no part of it is added, even if it contains multiple frames, some of which might fit. If you wish to be able to add parts of such packets, you should first use another repacketizer to split the packet into pieces and add them individually. |
com.sun.jna.ptr.PointerByReference |
opus_repacketizer_create()
Allocates memory and initializes the new repacketizer with
opus_repacketizer_init(). Original signature : OpusRepacketizer* opus_repacketizer_create()native declaration : /tmp/opus.h:743 |
void |
opus_repacketizer_destroy(com.sun.jna.ptr.PointerByReference rp)
Frees an
OpusRepacketizer allocated byopus_repacketizer_create(). |
int |
opus_repacketizer_get_nb_frames(com.sun.jna.ptr.PointerByReference rp)
Return the total number of frames contained in packet data submitted to
the repacketizer state so far via opus_repacketizer_cat() since the last call to opus_repacketizer_init() or opus_repacketizer_create(). This defines the valid range of packets that can be extracted with opus_repacketizer_out_range() or opus_repacketizer_out(). |
int |
opus_repacketizer_get_size()
Gets the size of an
OpusRepacketizer structure. |
com.sun.jna.ptr.PointerByReference |
opus_repacketizer_init(com.sun.jna.ptr.PointerByReference rp)
(Re)initializes a previously allocated repacketizer state.
The state must be at least the size returned by opus_repacketizer_get_size(). This can be used for applications which use their own allocator instead of malloc(). It must also be called to reset the queue of packets waiting to be repacketized, which is necessary if the maximum packet duration of 120 ms is reached or if you wish to submit packets with a different Opus configuration (coding mode, audio bandwidth, frame size, or channel count). Failure to do so will prevent a new packet from being added with opus_repacketizer_cat(). |
int |
opus_repacketizer_out_range(com.sun.jna.ptr.PointerByReference rp,
int begin,
int end,
ByteBuffer data,
int maxlen)
Construct a new packet from data previously submitted to the repacketizer
state via opus_repacketizer_cat(). |
int |
opus_repacketizer_out_range(com.sun.jna.ptr.PointerByReference rp,
int begin,
int end,
com.sun.jna.Pointer data,
int maxlen)
Construct a new packet from data previously submitted to the repacketizer
state via opus_repacketizer_cat(). |
int |
opus_repacketizer_out(com.sun.jna.ptr.PointerByReference rp,
ByteBuffer data,
int maxlen)
Construct a new packet from data previously submitted to the repacketizer
state via opus_repacketizer_cat(). This is a convenience routine that returns all the data submitted so far in a single packet. It is equivalent to calling |
int |
opus_repacketizer_out(com.sun.jna.ptr.PointerByReference rp,
com.sun.jna.Pointer data,
int maxlen)
Construct a new packet from data previously submitted to the repacketizer
state via opus_repacketizer_cat(). This is a convenience routine that returns all the data submitted so far in a single packet. It is equivalent to calling |
String |
opus_strerror(int error)
Converts an opus error code into a human readable string.
* @param[in] error int: Error number |
static final String JNA_LIBRARY_NAME
static final com.sun.jna.NativeLibrary JNA_NATIVE_LIB
static final Opus INSTANCE
static final int OPUS_GET_LSB_DEPTH_REQUEST
static final int OPUS_GET_APPLICATION_REQUEST
static final int OPUS_GET_FORCE_CHANNELS_REQUEST
static final int OPUS_GET_VBR_REQUEST
static final int OPUS_GET_BANDWIDTH_REQUEST
static final int OPUS_SET_BITRATE_REQUEST
static final int OPUS_SET_BANDWIDTH_REQUEST
static final int OPUS_SIGNAL_MUSIC
static final int OPUS_RESET_STATE
static final int OPUS_FRAMESIZE_2_5_MS
static final int OPUS_GET_COMPLEXITY_REQUEST
static final int OPUS_FRAMESIZE_40_MS
static final int OPUS_SET_PACKET_LOSS_PERC_REQUEST
static final int OPUS_GET_VBR_CONSTRAINT_REQUEST
static final int OPUS_SET_INBAND_FEC_REQUEST
static final int OPUS_APPLICATION_RESTRICTED_LOWDELAY
static final int OPUS_BANDWIDTH_FULLBAND
static final int OPUS_SET_VBR_REQUEST
static final int OPUS_BANDWIDTH_SUPERWIDEBAND
static final int OPUS_SET_FORCE_CHANNELS_REQUEST
static final int OPUS_APPLICATION_VOIP
static final int OPUS_SIGNAL_VOICE
static final int OPUS_GET_FINAL_RANGE_REQUEST
static final int OPUS_BUFFER_TOO_SMALL
static final int OPUS_SET_COMPLEXITY_REQUEST
static final int OPUS_FRAMESIZE_ARG
static final int OPUS_GET_LOOKAHEAD_REQUEST
static final int OPUS_GET_INBAND_FEC_REQUEST
static final int OPUS_BITRATE_MAX
static final int OPUS_FRAMESIZE_5_MS
static final int OPUS_BAD_ARG
static final int OPUS_GET_PITCH_REQUEST
static final int OPUS_SET_SIGNAL_REQUEST
static final int OPUS_FRAMESIZE_20_MS
static final int OPUS_APPLICATION_AUDIO
static final int OPUS_GET_DTX_REQUEST
static final int OPUS_FRAMESIZE_10_MS
static final int OPUS_SET_LSB_DEPTH_REQUEST
static final int OPUS_UNIMPLEMENTED
static final int OPUS_GET_PACKET_LOSS_PERC_REQUEST
static final int OPUS_INVALID_STATE
static final int OPUS_SET_EXPERT_FRAME_DURATION_REQUEST
static final int OPUS_FRAMESIZE_60_MS
static final int OPUS_GET_BITRATE_REQUEST
static final int OPUS_INTERNAL_ERROR
static final int OPUS_SET_MAX_BANDWIDTH_REQUEST
static final int OPUS_SET_VBR_CONSTRAINT_REQUEST
static final int OPUS_GET_MAX_BANDWIDTH_REQUEST
static final int OPUS_BANDWIDTH_NARROWBAND
static final int OPUS_SET_GAIN_REQUEST
static final int OPUS_SET_PREDICTION_DISABLED_REQUEST
static final int OPUS_SET_APPLICATION_REQUEST
static final int OPUS_SET_DTX_REQUEST
static final int OPUS_BANDWIDTH_MEDIUMBAND
static final int OPUS_GET_SAMPLE_RATE_REQUEST
static final int OPUS_GET_EXPERT_FRAME_DURATION_REQUEST
static final int OPUS_AUTO
static final int OPUS_GET_SIGNAL_REQUEST
static final int OPUS_GET_LAST_PACKET_DURATION_REQUEST
static final int OPUS_GET_PREDICTION_DISABLED_REQUEST
static final int OPUS_GET_GAIN_REQUEST
static final int OPUS_BANDWIDTH_WIDEBAND
static final int OPUS_INVALID_PACKET
static final int OPUS_ALLOC_FAIL
static final int OPUS_OK
static final int OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST
static final int OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST
int opus_encoder_get_size(int channels)
OpusEncoder structure.com.sun.jna.ptr.PointerByReference opus_encoder_create(int Fs,
int channels,
int application,
IntBuffer error)
[in] - Fs opus_int32: Sampling rate of input signal (Hz)[in] - channels int: Number of channels (1 or 2) in input signal[in] - application int: Coding mode (@ref OPUS_APPLICATION_VOIP/@ref OPUS_APPLICATION_AUDIO/@ref OPUS_APPLICATION_RESTRICTED_LOWDELAY)[out] - error int*: @ref opus_errorcodesint opus_encoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int application)
[in] - st OpusEncoder*: Encoder state[in] - Fs opus_int32: Sampling rate of input signal (Hz)[in] - channels int: Number of channels (1 or 2) in input signal[in] - application int: Coding mode (OPUS_APPLICATION_VOIP/OPUS_APPLICATION_AUDIO/OPUS_APPLICATION_RESTRICTED_LOWDELAY)opus_encoder_create(),opus_encoder_get_size()
To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
int opus_encode(com.sun.jna.ptr.PointerByReference st,
ShortBuffer pcm,
int frame_size,
ByteBuffer data,
int max_data_bytes)
[in] - st OpusEncoder*: Encoder state[in] - pcm opus_int16*: Input signal (interleaved if 2 channels). length is frame_size*channels*sizeof(opus_int16)[in] - frame_size int: Number of samples per channel in the[out] - data unsigned char*: Output payload.[in] - max_data_bytes opus_int32: Size of the allocatedint opus_encode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size,
com.sun.jna.Pointer data,
int max_data_bytes)
[in] - st OpusEncoder*: Encoder state[in] - pcm opus_int16*: Input signal (interleaved if 2 channels). length is frame_size*channels*sizeof(opus_int16)[in] - frame_size int: Number of samples per channel in the[out] - data unsigned char*: Output payload.[in] - max_data_bytes opus_int32: Size of the allocatedint opus_encode_float(com.sun.jna.ptr.PointerByReference st,
float[] pcm,
int frame_size,
ByteBuffer data,
int max_data_bytes)
[in] - st OpusEncoder*: Encoder state[in] - pcm float*: Input in float format (interleaved if 2 channels), with a normal range of +/-1.0.[in] - frame_size int: Number of samples per channel in the[out] - data unsigned char*: Output payload.[in] - max_data_bytes opus_int32: Size of the allocatedint opus_encode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size,
com.sun.jna.Pointer data,
int max_data_bytes)
[in] - st OpusEncoder*: Encoder state[in] - pcm float*: Input in float format (interleaved if 2 channels), with a normal range of +/-1.0.[in] - frame_size int: Number of samples per channel in the[out] - data unsigned char*: Output payload.[in] - max_data_bytes opus_int32: Size of the allocatedvoid opus_encoder_destroy(com.sun.jna.ptr.PointerByReference st)
OpusEncoder allocated by opus_encoder_create().int opus_encoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
st - OpusEncoder*: Encoder state.request - This and all remaining parameters should be replaced by oneopus_genericctls
,
Original signature : int opus_encoder_ctl(OpusEncoder*, int, null)
native declaration : /tmp/opus.h:291int opus_decoder_get_size(int channels)
OpusDecoder structure.[in] - channels int: Number of channels.com.sun.jna.ptr.PointerByReference opus_decoder_create(int Fs,
int channels,
IntBuffer error)
[in] - Fs opus_int32: Sample rate to decode at (Hz).[in] - channels int: Number of channels (1 or 2) to decode[out] - error int*: #OPUS_OK Success or @ref opus_errorcodesOpusDecoder* opus_decoder_create(opus_int32, int, int*)int opus_decoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels)
[in] - st OpusDecoder*: Decoder state.[in] - Fs opus_int32: Sampling rate to decode to (Hz).[in] - channels int: Number of channels (1 or 2) to decodeint opus_decode(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
ShortBuffer pcm,
int frame_size,
int decode_fec)
[in] - st OpusDecoder*: Decoder state[in] - data char*: Input payload. Use a NULL pointer to indicate packet loss[in] - len opus_int32: Number of bytes in payload*[out] - pcm opus_int16*: Output signal (interleaved if 2 channels). length[in] - frame_size Number of samples per channel of available space in \a pcm.[in] - decode_fec int: Flag (0 or 1) to request that any in-band forward error correction data beint opus_decode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size,
int decode_fec)
[in] - st OpusDecoder*: Decoder state[in] - data char*: Input payload. Use a NULL pointer to indicate packet loss[in] - len opus_int32: Number of bytes in payload*[out] - pcm opus_int16*: Output signal (interleaved if 2 channels). length[in] - frame_size Number of samples per channel of available space in \a pcm.[in] - decode_fec int: Flag (0 or 1) to request that any in-band forward error correction data beint opus_decode_float(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
FloatBuffer pcm,
int frame_size,
int decode_fec)
[in] - st OpusDecoder*: Decoder state[in] - data char*: Input payload. Use a NULL pointer to indicate packet loss[in] - len opus_int32: Number of bytes in payload[out] - pcm float*: Output signal (interleaved if 2 channels). length[in] - frame_size Number of samples per channel of available space in \a pcm.[in] - decode_fec int: Flag (0 or 1) to request that any in-band forward error correction data beint opus_decode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size,
int decode_fec)
[in] - st OpusDecoder*: Decoder state[in] - data char*: Input payload. Use a NULL pointer to indicate packet loss[in] - len opus_int32: Number of bytes in payload[out] - pcm float*: Output signal (interleaved if 2 channels). length[in] - frame_size Number of samples per channel of available space in \a pcm.[in] - decode_fec int: Flag (0 or 1) to request that any in-band forward error correction data beint opus_decoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
st - OpusDecoder*: Decoder state.request - This and all remaining parameters should be replaced by oneopus_genericctls
,
Original signature : int opus_decoder_ctl(OpusDecoder*, int, null)
native declaration : /tmp/opus.h:470void opus_decoder_destroy(com.sun.jna.ptr.PointerByReference st)
OpusDecoder allocated by opus_decoder_create().int opus_packet_parse(byte[] data,
int len,
ByteBuffer out_toc,
byte[] frames,
ShortBuffer size,
IntBuffer payload_offset)
[in] - data char*: Opus packet to be parsed[in] - len opus_int32: size of data[out] - out_toc char*: TOC pointer[out] - frames char*[48] encapsulated frames[out] - size opus_int16[48] sizes of the encapsulated frames[out] - payload_offset int*: returns the position of the payload within the packet (in bytes)int opus_packet_get_bandwidth(byte[] data)
[in] - data char*: Opus packetint opus_packet_get_samples_per_frame(byte[] data,
int Fs)
[in] - data char*: Opus packet.[in] - Fs opus_int32: Sampling rate in Hz.int opus_packet_get_nb_channels(byte[] data)
[in] - data char*: Opus packetint opus_packet_get_nb_frames(byte[] packet,
int len)
[in] - packet char*: Opus packet[in] - len opus_int32: Length of packetint opus_packet_get_nb_samples(byte[] packet,
int len,
int Fs)
[in] - packet char*: Opus packet[in] - len opus_int32: Length of packet[in] - Fs opus_int32: Sampling rate in Hz.int opus_decoder_get_nb_samples(com.sun.jna.ptr.PointerByReference dec,
byte[] packet,
int len)
[in] - dec OpusDecoder*: Decoder state[in] - packet char*: Opus packet[in] - len opus_int32: Length of packetint opus_decoder_get_nb_samples(com.sun.jna.ptr.PointerByReference dec,
com.sun.jna.Pointer packet,
int len)
[in] - dec OpusDecoder*: Decoder state[in] - packet char*: Opus packet[in] - len opus_int32: Length of packetvoid opus_pcm_soft_clip(FloatBuffer pcm, int frame_size, int channels, FloatBuffer softclip_mem)
[in,out] - pcm float*: Input PCM and modified PCM[in] - frame_size int Number of samples per channel to process[in] - channels int: Number of channels[in,out] - softclip_mem float*: State memory for the soft clipping process (one float per channel, initialized to zero)void opus_pcm_soft_clip(float*, int, int, float*)int opus_repacketizer_get_size()
OpusRepacketizer structure.com.sun.jna.ptr.PointerByReference opus_repacketizer_init(com.sun.jna.ptr.PointerByReference rp)
rp - OpusRepacketizer*: The repacketizer state toopus_repacketizer_create
,
opus_repacketizer_get_size
,
opus_repacketizer_cat
com.sun.jna.ptr.PointerByReference opus_repacketizer_create()
OpusRepacketizer* opus_repacketizer_create()void opus_repacketizer_destroy(com.sun.jna.ptr.PointerByReference rp)
OpusRepacketizer allocated byint opus_repacketizer_cat(com.sun.jna.ptr.PointerByReference rp,
byte[] data,
int len)
rp - OpusRepacketizer*: The repacketizer state to which tolen - opus_int32: The number of bytes in the packet data.opus_repacketizer_out_range
,
opus_repacketizer_out
,
opus_repacketizer_init
int opus_repacketizer_cat(com.sun.jna.ptr.PointerByReference rp,
com.sun.jna.Pointer data,
int len)
rp - OpusRepacketizer*: The repacketizer state to which tolen - opus_int32: The number of bytes in the packet data.opus_repacketizer_out_range
,
opus_repacketizer_out
,
opus_repacketizer_init
int opus_repacketizer_out_range(com.sun.jna.ptr.PointerByReference rp,
int begin,
int end,
ByteBuffer data,
int maxlen)
rp - OpusRepacketizer*: The repacketizer state from which tobegin - int: The index of the first frame in the currentend - int: One past the index of the last frame in themaxlen - opus_int32: The maximum number of bytes to store in1276 for a single frame,1277*(end-begin).1*(end-begin) plusint opus_repacketizer_out_range(com.sun.jna.ptr.PointerByReference rp,
int begin,
int end,
com.sun.jna.Pointer data,
int maxlen)
rp - OpusRepacketizer*: The repacketizer state from which tobegin - int: The index of the first frame in the currentend - int: One past the index of the last frame in themaxlen - opus_int32: The maximum number of bytes to store in1276 for a single frame,1277*(end-begin).1*(end-begin) plusint opus_repacketizer_get_nb_frames(com.sun.jna.ptr.PointerByReference rp)
rp - OpusRepacketizer*: The repacketizer state containing theint opus_repacketizer_out(com.sun.jna.ptr.PointerByReference rp,
ByteBuffer data,
int maxlen)
rp - OpusRepacketizer*: The repacketizer state from which tomaxlen - opus_int32: The maximum number of bytes to store in1277*opus_repacketizer_get_nb_frames(rp).1*opus_repacketizer_get_nb_frames(rp)int opus_repacketizer_out(com.sun.jna.ptr.PointerByReference rp,
com.sun.jna.Pointer data,
int maxlen)
rp - OpusRepacketizer*: The repacketizer state from which tomaxlen - opus_int32: The maximum number of bytes to store in1277*opus_repacketizer_get_nb_frames(rp).1*opus_repacketizer_get_nb_frames(rp)int opus_packet_pad(ByteBuffer data, int len, int new_len)
len - opus_int32: The size of the packet.new_len - opus_int32: The desired size of the packet after padding.int opus_packet_unpad(ByteBuffer data, int len)
len - opus_int32: The size of the packet.int opus_multistream_packet_pad(ByteBuffer data, int len, int new_len, int nb_streams)
len - opus_int32: The size of the packet.new_len - opus_int32: The desired size of the packet after padding.nb_streams - opus_int32: The number of streams (not channels) in the packet.int opus_multistream_packet_unpad(ByteBuffer data, int len, int nb_streams)
len - opus_int32: The size of the packet.nb_streams - opus_int32: The number of streams (not channels) in the packet.String opus_strerror(int error)
String opus_get_version_string()
char* opus_get_version_string()int opus_multistream_encoder_get_size(int streams,
int coupled_streams)
streams - int: The total number of streams to encode from thecoupled_streams - int: Number of coupled (2 channel) streamsstreams +
coupled_streams) must be noint opus_multistream_surround_encoder_get_size(int channels,
int mapping_family)
opus_int32 opus_multistream_surround_encoder_get_size(int, int)com.sun.jna.ptr.PointerByReference opus_multistream_encoder_create(int Fs,
int channels,
int streams,
int coupled_streams,
byte[] mapping,
int application,
IntBuffer error)
Fs - opus_int32: Sampling rate of the input signal (in Hz).channels - int: Number of channels in the input signal.streams +
coupled_streams).streams - int: The total number of streams to encode from thecoupled_streams - int: Number of coupled (2 channel) streamsstreams +
coupled_streams) must be noapplication - int: The target encoder application.com.sun.jna.ptr.PointerByReference opus_multistream_surround_encoder_create(int Fs,
int channels,
int mapping_family,
IntBuffer streams,
IntBuffer coupled_streams,
ByteBuffer mapping,
int application,
IntBuffer error)
OpusMSEncoder* opus_multistream_surround_encoder_create(opus_int32, int, int, int*, int*, unsigned char*, int, int*)int opus_multistream_encoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int streams,
int coupled_streams,
byte[] mapping,
int application)
st - OpusMSEncoder*: Multistream encoder state to initialize.Fs - opus_int32: Sampling rate of the input signal (in Hz).channels - int: Number of channels in the input signal.streams +
coupled_streams).streams - int: The total number of streams to encode from thecoupled_streams - int: Number of coupled (2 channel) streamsstreams +
coupled_streams) must be noapplication - int: The target encoder application.opus_multistream_encoder_create
,
opus_multistream_encoder_get_size
int opus_multistream_encoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int streams,
int coupled_streams,
com.sun.jna.Pointer mapping,
int application)
st - OpusMSEncoder*: Multistream encoder state to initialize.Fs - opus_int32: Sampling rate of the input signal (in Hz).channels - int: Number of channels in the input signal.streams +
coupled_streams).streams - int: The total number of streams to encode from thecoupled_streams - int: Number of coupled (2 channel) streamsstreams +
coupled_streams) must be noapplication - int: The target encoder application.opus_multistream_encoder_create
,
opus_multistream_encoder_get_size
int opus_multistream_surround_encoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int mapping_family,
IntBuffer streams,
IntBuffer coupled_streams,
ByteBuffer mapping,
int application)
int opus_multistream_surround_encoder_init(OpusMSEncoder*, opus_int32, int, int, int*, int*, unsigned char*, int)int opus_multistream_surround_encoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int mapping_family,
com.sun.jna.ptr.IntByReference streams,
com.sun.jna.ptr.IntByReference coupled_streams,
com.sun.jna.Pointer mapping,
int application)
int opus_multistream_surround_encoder_init(OpusMSEncoder*, opus_int32, int, int, int*, int*, unsigned char*, int)int opus_multistream_encode(com.sun.jna.ptr.PointerByReference st,
ShortBuffer pcm,
int frame_size,
ByteBuffer data,
int max_data_bytes)
st - OpusMSEncoder*: Multistream encoder state.frame_size - int: Number of samples per channel in the input[in] - max_data_bytes opus_int32: Size of the allocatedint opus_multistream_encode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size,
com.sun.jna.Pointer data,
int max_data_bytes)
st - OpusMSEncoder*: Multistream encoder state.frame_size - int: Number of samples per channel in the input[in] - max_data_bytes opus_int32: Size of the allocatedint opus_multistream_encode_float(com.sun.jna.ptr.PointerByReference st,
float[] pcm,
int frame_size,
ByteBuffer data,
int max_data_bytes)
st - OpusMSEncoder*: Multistream encoder state.frame_size - int: Number of samples per channel in the input[in] - max_data_bytes opus_int32: Size of the allocatedint opus_multistream_encode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size,
com.sun.jna.Pointer data,
int max_data_bytes)
st - OpusMSEncoder*: Multistream encoder state.frame_size - int: Number of samples per channel in the input[in] - max_data_bytes opus_int32: Size of the allocatedvoid opus_multistream_encoder_destroy(com.sun.jna.ptr.PointerByReference st)
OpusMSEncoder allocated byst - OpusMSEncoder*: Multistream encoder state to be freed.void opus_multistream_encoder_destroy(OpusMSEncoder*)int opus_multistream_encoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
st - OpusMSEncoder*: Multistream encoder state.request - This and all remaining parameters should be replaced by oneopus_genericctls
,
opus_encoderctls
,
Original signature : int opus_multistream_encoder_ctl(OpusMSEncoder*, int, null)
native declaration : /tmp/opus_multistream.h:447int opus_multistream_decoder_get_size(int streams,
int coupled_streams)
OpusMSDecoder structure.streams - int: The total number of streams coded in thecoupled_streams - int: Number streams to decode as coupledstreams +
coupled_streams) must be nocom.sun.jna.ptr.PointerByReference opus_multistream_decoder_create(int Fs,
int channels,
int streams,
int coupled_streams,
byte[] mapping,
IntBuffer error)
Fs - opus_int32: Sampling rate to decode at (in Hz).channels - int: Number of channels to output.streams +
coupled_streams).streams - int: The total number of streams coded in thecoupled_streams - int: Number of streams to decode as coupledstreams +
coupled_streams) must be noint opus_multistream_decoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int streams,
int coupled_streams,
byte[] mapping)
st - OpusMSEncoder*: Multistream encoder state to initialize.Fs - opus_int32: Sampling rate to decode at (in Hz).channels - int: Number of channels to output.streams +
coupled_streams).streams - int: The total number of streams coded in thecoupled_streams - int: Number of streams to decode as coupledstreams +
coupled_streams) must be noopus_multistream_decoder_create
,
opus_multistream_deocder_get_size
int opus_multistream_decoder_init(com.sun.jna.ptr.PointerByReference st,
int Fs,
int channels,
int streams,
int coupled_streams,
com.sun.jna.Pointer mapping)
st - OpusMSEncoder*: Multistream encoder state to initialize.Fs - opus_int32: Sampling rate to decode at (in Hz).channels - int: Number of channels to output.streams +
coupled_streams).streams - int: The total number of streams coded in thecoupled_streams - int: Number of streams to decode as coupledstreams +
coupled_streams) must be noopus_multistream_decoder_create
,
opus_multistream_deocder_get_size
int opus_multistream_decode(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
ShortBuffer pcm,
int frame_size,
int decode_fec)
st - OpusMSDecoder*: Multistream decoder state.len - opus_int32: Number of bytes in payload.frame_size - int: The number of samples per channel ofdecode_fec - int: Flag (0 or 1) to request that any in-bandint opus_multistream_decode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size,
int decode_fec)
st - OpusMSDecoder*: Multistream decoder state.len - opus_int32: Number of bytes in payload.frame_size - int: The number of samples per channel ofdecode_fec - int: Flag (0 or 1) to request that any in-bandint opus_multistream_decode_float(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
FloatBuffer pcm,
int frame_size,
int decode_fec)
st - OpusMSDecoder*: Multistream decoder state.len - opus_int32: Number of bytes in payload.frame_size - int: The number of samples per channel ofdecode_fec - int: Flag (0 or 1) to request that any in-bandint opus_multistream_decode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size,
int decode_fec)
st - OpusMSDecoder*: Multistream decoder state.len - opus_int32: Number of bytes in payload.frame_size - int: The number of samples per channel ofdecode_fec - int: Flag (0 or 1) to request that any in-bandint opus_multistream_decoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
st - OpusMSDecoder*: Multistream decoder state.request - This and all remaining parameters should be replaced by oneopus_genericctls
,
opus_decoderctls
,
Original signature : int opus_multistream_decoder_ctl(OpusMSDecoder*, int, null)
native declaration : /tmp/opus_multistream.h:643void opus_multistream_decoder_destroy(com.sun.jna.ptr.PointerByReference st)
OpusMSDecoder allocated byst - OpusMSDecoder: Multistream decoder state to be freed.void opus_multistream_decoder_destroy(OpusMSDecoder*)com.sun.jna.ptr.PointerByReference opus_custom_mode_create(int Fs,
int frame_size,
IntBuffer error)
[in] - Fs int: Sampling rate (8000 to 96000 Hz)[in] - frame_size int: Number of samples (per channel) to encode in each[out] - error int*: Returned error code (if NULL, no error will be returned)OpusCustomMode* opus_custom_mode_create(opus_int32, int, int*)void opus_custom_mode_destroy(com.sun.jna.ptr.PointerByReference mode)
[in] - mode OpusCustomMode*: Mode to be freed.void opus_custom_mode_destroy(OpusCustomMode*)int opus_custom_encoder_get_size(com.sun.jna.ptr.PointerByReference mode,
int channels)
[in] - mode OpusCustomMode *: Mode configuration[in] - channels int: Number of channelscom.sun.jna.ptr.PointerByReference opus_custom_encoder_create(com.sun.jna.ptr.PointerByReference mode,
int channels,
IntBuffer error)
[in] - mode OpusCustomMode*: Contains all the information about the characteristics of[in] - channels int: Number of channels[out] - error int*: Returns an error codeOpusCustomEncoder* opus_custom_encoder_create(const OpusCustomMode*, int, int*)com.sun.jna.ptr.PointerByReference opus_custom_encoder_create(com.sun.jna.ptr.PointerByReference mode,
int channels,
com.sun.jna.ptr.IntByReference error)
[in] - mode OpusCustomMode*: Contains all the information about the characteristics of[in] - channels int: Number of channels[out] - error int*: Returns an error codeOpusCustomEncoder* opus_custom_encoder_create(const OpusCustomMode*, int, int*)void opus_custom_encoder_destroy(com.sun.jna.ptr.PointerByReference st)
int opus_custom_encode_float(com.sun.jna.ptr.PointerByReference st,
float[] pcm,
int frame_size,
ByteBuffer compressed,
int maxCompressedBytes)
[in] - st OpusCustomEncoder*: Encoder state[in] - pcm float*: PCM audio in float format, with a normal range of +/-1.0.[in] - frame_size int: Number of samples per frame of input signal[out] - compressed char *: The compressed data is written here. This may not alias pcm and must be at least maxCompressedBytes long.[in] - maxCompressedBytes int: Maximum number of bytes to use for compressing the frameint opus_custom_encode_float(OpusCustomEncoder*, const float*, int, unsigned char*, int)int opus_custom_encode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size,
com.sun.jna.Pointer compressed,
int maxCompressedBytes)
[in] - st OpusCustomEncoder*: Encoder state[in] - pcm float*: PCM audio in float format, with a normal range of +/-1.0.[in] - frame_size int: Number of samples per frame of input signal[out] - compressed char *: The compressed data is written here. This may not alias pcm and must be at least maxCompressedBytes long.[in] - maxCompressedBytes int: Maximum number of bytes to use for compressing the frameint opus_custom_encode_float(OpusCustomEncoder*, const float*, int, unsigned char*, int)int opus_custom_encode(com.sun.jna.ptr.PointerByReference st,
ShortBuffer pcm,
int frame_size,
ByteBuffer compressed,
int maxCompressedBytes)
[in] - st OpusCustomEncoder*: Encoder state[in] - pcm opus_int16*: PCM audio in signed 16-bit format (native endian).[in] - frame_size int: Number of samples per frame of input signal[out] - compressed char *: The compressed data is written here. This may not alias pcm and must be at least maxCompressedBytes long.[in] - maxCompressedBytes int: Maximum number of bytes to use for compressing the frameint opus_custom_encode(OpusCustomEncoder*, const opus_int16*, int, unsigned char*, int)int opus_custom_encode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size,
com.sun.jna.Pointer compressed,
int maxCompressedBytes)
[in] - st OpusCustomEncoder*: Encoder state[in] - pcm opus_int16*: PCM audio in signed 16-bit format (native endian).[in] - frame_size int: Number of samples per frame of input signal[out] - compressed char *: The compressed data is written here. This may not alias pcm and must be at least maxCompressedBytes long.[in] - maxCompressedBytes int: Maximum number of bytes to use for compressing the frameint opus_custom_encode(OpusCustomEncoder*, const opus_int16*, int, unsigned char*, int)int opus_custom_encoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
Original signature : int opus_custom_encoder_ctl(OpusCustomEncoder*, int, null)
native declaration : /tmp/opus_custom.h:237int opus_custom_decoder_get_size(com.sun.jna.ptr.PointerByReference mode,
int channels)
[in] - mode OpusCustomMode *: Mode configuration[in] - channels int: Number of channelsint opus_custom_decoder_init(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.ptr.PointerByReference mode,
int channels)
[in] - st OpusCustomDecoder*: Decoder state[in] - mode OpusCustomMode *: Contains all the information about the characteristics of[in] - channels int: Number of channelsint opus_custom_decoder_init(OpusCustomDecoder*, const OpusCustomMode*, int)opus_custom_decoder_create(),opus_custom_decoder_get_size()
To reset a previously initialized state use the OPUS_RESET_STATE CTL.
com.sun.jna.ptr.PointerByReference opus_custom_decoder_create(com.sun.jna.ptr.PointerByReference mode,
int channels,
IntBuffer error)
[in] - mode OpusCustomMode: Contains all the information about the characteristics of the[in] - channels int: Number of channels[out] - error int*: Returns an error codeOpusCustomDecoder* opus_custom_decoder_create(const OpusCustomMode*, int, int*)com.sun.jna.ptr.PointerByReference opus_custom_decoder_create(com.sun.jna.ptr.PointerByReference mode,
int channels,
com.sun.jna.ptr.IntByReference error)
[in] - mode OpusCustomMode: Contains all the information about the characteristics of the[in] - channels int: Number of channels[out] - error int*: Returns an error codeOpusCustomDecoder* opus_custom_decoder_create(const OpusCustomMode*, int, int*)void opus_custom_decoder_destroy(com.sun.jna.ptr.PointerByReference st)
int opus_custom_decode_float(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
FloatBuffer pcm,
int frame_size)
[in] - st OpusCustomDecoder*: Decoder state[in] - data char*: Input payload. Use a NULL pointer to indicate packet loss[in] - len int: Number of bytes in payload[out] - pcm float*: Output signal (interleaved if 2 channels). length[in] - frame_size Number of samples per channel of available space in *pcm.int opus_custom_decode_float(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.FloatByReference pcm,
int frame_size)
[in] - st OpusCustomDecoder*: Decoder state[in] - data char*: Input payload. Use a NULL pointer to indicate packet loss[in] - len int: Number of bytes in payload[out] - pcm float*: Output signal (interleaved if 2 channels). length[in] - frame_size Number of samples per channel of available space in *pcm.int opus_custom_decode(com.sun.jna.ptr.PointerByReference st,
byte[] data,
int len,
ShortBuffer pcm,
int frame_size)
[in] - st OpusCustomDecoder*: Decoder state[in] - data char*: Input payload. Use a NULL pointer to indicate packet loss[in] - len int: Number of bytes in payload[out] - pcm opus_int16*: Output signal (interleaved if 2 channels). length[in] - frame_size Number of samples per channel of available space in *pcm.int opus_custom_decode(com.sun.jna.ptr.PointerByReference st,
com.sun.jna.Pointer data,
int len,
com.sun.jna.ptr.ShortByReference pcm,
int frame_size)
[in] - st OpusCustomDecoder*: Decoder state[in] - data char*: Input payload. Use a NULL pointer to indicate packet loss[in] - len int: Number of bytes in payload[out] - pcm opus_int16*: Output signal (interleaved if 2 channels). length[in] - frame_size Number of samples per channel of available space in *pcm.int opus_custom_decoder_ctl(com.sun.jna.ptr.PointerByReference st,
int request,
Object... varargs)
Original signature : int opus_custom_decoder_ctl(OpusCustomDecoder*, int, null)
native declaration : /tmp/opus_custom.h:333Copyright © 2014. All rights reserved.