FunctionsAndGlobals class

Constructors

FunctionsAndGlobals(DynamicLibrary _dynamicLibrary)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
opus_multistream_packet_pad(Pointer<Uint8> data, int len, int new_len, int nb_streams) int
Pads a given Opus multi-stream packet to a larger size (possibly changing the TOC sequence). @paramin,out data const unsigned char*: The buffer containing the packet to pad. @param len opus_int32: The size of the packet. This must be at least 1. @param new_len opus_int32: The desired size of the packet after padding. This must be at least 1. @param nb_streams opus_int32: The number of streams (not channels) in the packet. This must be at least as large as len. @returns an error code @retval #OPUS_OK a on success. @retval #OPUS_BAD_ARG a len was less than 1. @retval #OPUS_INVALID_PACKET a data did not contain a valid Opus packet.
opus_multistream_packet_unpad(Pointer<Uint8> data, int len, int nb_streams) int
Remove all padding from a given Opus multi-stream packet and rewrite the TOC sequence to minimize space usage. @paramin,out data const unsigned char*: The buffer containing the packet to strip. @param len opus_int32: The size of the packet. This must be at least 1. @param nb_streams opus_int32: The number of streams (not channels) in the packet. This must be at least 1. @returns The new size of the output packet on success, or an error code on failure. @retval #OPUS_BAD_ARG a len was less than 1 or new_len was less than len. @retval #OPUS_INVALID_PACKET a data did not contain a valid Opus packet.
opus_packet_pad(Pointer<Uint8> data, int len, int new_len) int
Pads a given Opus packet to a larger size (possibly changing the TOC sequence). @paramin,out data const unsigned char*: The buffer containing the packet to pad. @param len opus_int32: The size of the packet. This must be at least 1. @param new_len opus_int32: The desired size of the packet after padding. This must be at least as large as len. @returns an error code @retval #OPUS_OK a on success. @retval #OPUS_BAD_ARG a len was less than 1 or new_len was less than len. @retval #OPUS_INVALID_PACKET a data did not contain a valid Opus packet.
opus_packet_unpad(Pointer<Uint8> data, int len) int
Remove all padding from a given Opus packet and rewrite the TOC sequence to minimize space usage. @paramin,out data const unsigned char*: The buffer containing the packet to strip. @param len opus_int32: The size of the packet. This must be at least 1. @returns The new size of the output packet on success, or an error code on failure. @retval #OPUS_BAD_ARG a len was less than 1. @retval #OPUS_INVALID_PACKET a data did not contain a valid Opus packet.
opus_repacketizer_cat(Pointer<OpusRepacketizer> rp, Pointer<Uint8> data, int len) int
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. @see opus_repacketizer_out_range @see opus_repacketizer_out @see opus_repacketizer_init @param rp OpusRepacketizer*: The repacketizer state to which to add the packet. @paramin data const unsigned char*: The packet data. The application must ensure this pointer remains valid until the next call to opus_repacketizer_init() or opus_repacketizer_destroy(). @param len opus_int32: The number of bytes in the packet data. @returns An error code indicating whether or not the operation succeeded. @retval #OPUS_OK The packet's contents have been added to the repacketizer state. @retval #OPUS_INVALID_PACKET The packet did not have a valid TOC sequence, the packet's TOC sequence was not compatible with previously submitted packets (because the coding mode, audio bandwidth, frame size, or channel count did not match), or adding this packet would increase the total amount of audio stored in the repacketizer state to more than 120 ms.
opus_repacketizer_create() → Pointer<OpusRepacketizer>
Allocates memory and initializes the new repacketizer with
opus_repacketizer_destroy(Pointer<OpusRepacketizer> rp) → void
Frees an OpusRepacketizer allocated by opus_repacketizer_create(). @paramin rp OpusRepacketizer*: State to be freed.
opus_repacketizer_get_nb_frames(Pointer<OpusRepacketizer> rp) int
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(). @param rp OpusRepacketizer*: The repacketizer state containing the frames. @returns The total number of frames contained in the packet data submitted to the repacketizer state.
opus_repacketizer_get_size() int
Gets the size of an OpusRepacketizer structure. @returns The size in bytes.
opus_repacketizer_init(Pointer<OpusRepacketizer> rp) → Pointer<OpusRepacketizer>
(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(). @see opus_repacketizer_create @see opus_repacketizer_get_size @see opus_repacketizer_cat @param rp OpusRepacketizer*: The repacketizer state to (re)initialize. @returns A pointer to the same repacketizer state that was passed in.
opus_repacketizer_out(Pointer<OpusRepacketizer> rp, Pointer<Uint8> data, int maxlen) int
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 @code opus_repacketizer_out_range(rp, 0, opus_repacketizer_get_nb_frames(rp), data, maxlen) @endcode @param rp OpusRepacketizer*: The repacketizer state from which to construct the new packet. @paramout data const unsigned char*: The buffer in which to store the output packet. @param maxlen opus_int32: The maximum number of bytes to store in the output buffer. In order to guarantee success, this should be at least 1277opus_repacketizer_get_nb_frames(rp). However, 1opus_repacketizer_get_nb_frames(rp) plus the size of all packet data submitted to the repacketizer since the last call to opus_repacketizer_init() or opus_repacketizer_create() is also sufficient, and possibly much smaller. @returns The total size of the output packet on success, or an error code on failure. @retval #OPUS_BUFFER_TOO_SMALL a maxlen was insufficient to contain the complete output packet.
opus_repacketizer_out_range(Pointer<OpusRepacketizer> rp, int begin, int end, Pointer<Uint8> data, int maxlen) int
Construct a new packet from data previously submitted to the repacketizer state via opus_repacketizer_cat(). @param rp OpusRepacketizer*: The repacketizer state from which to construct the new packet. @param begin int: The index of the first frame in the current repacketizer state to include in the output. @param end int: One past the index of the last frame in the current repacketizer state to include in the output. @paramout data const unsigned char*: The buffer in which to store the output packet. @param maxlen opus_int32: The maximum number of bytes to store in the output buffer. In order to guarantee success, this should be at least 1276 for a single frame, or for multiple frames, 1277*(end-begin). However, 1*(end-begin) plus the size of all packet data submitted to the repacketizer since the last call to opus_repacketizer_init() or opus_repacketizer_create() is also sufficient, and possibly much smaller. @returns The total size of the output packet on success, or an error code on failure. @retval #OPUS_BAD_ARG [begin,end) was an invalid range of frames (begin < 0, begin >= end, or end > opus_repacketizer_get_nb_frames()). @retval #OPUS_BUFFER_TOO_SMALL a maxlen was insufficient to contain the complete output packet.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited