pub unsafe extern "C" fn opus_repacketizer_out(
rp: *mut OpusRepacketizer,
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(). 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 # Arguments
rp- OpusRepacketizer*: The repacketizer state from which to construct the new packet.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 least1277opus_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.
#OPUS_BUFFER_TOO_SMALLmaxlen was insufficient to contain the complete output packet.