pub unsafe extern "C" fn opus_repacketizer_out_range(
rp: *mut OpusRepacketizer,
begin: c_int,
end: c_int,
data: *mut c_uchar,
maxlen: opus_int32,
) -> opus_int32Expand description
Construct a new packet from data previously submitted to the repacketizer state via opus_repacketizer_cat().
§Arguments
rp- OpusRepacketizer*: The repacketizer state from which to construct the new packet.begin- int: The index of the first frame in the current repacketizer state to include in the output.end- int: One past the index of the last frame in the current repacketizer state to include in the output.data[out] - const unsigned char*: The buffer in which to store the output packet.maxlen- opus_int32: The maximum number of bytes to store in the output buffer. In order to guarantee success, this should be at least1276for 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.
#OPUS_BAD_ARG[begin,end)was an invalid range of frames (begin < 0, begin >= end, or end > opus_repacketizer_get_nb_frames()).#OPUS_BUFFER_TOO_SMALLmaxlen was insufficient to contain the complete output packet.