opus_repacketizer_out method
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,
1
opus_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.
Implementation
int opus_repacketizer_out(
ffi.Pointer<OpusRepacketizer> rp,
ffi.Pointer<ffi.Uint8> data,
int maxlen,
) {
return _opus_repacketizer_out(rp, data, maxlen);
}