Function opus_packet_parse

Source
pub unsafe extern "C" fn opus_packet_parse(
    data: *const c_uchar,
    len: opus_int32,
    out_toc: *mut c_uchar,
    frames: *mut *const c_uchar,
    size: *mut opus_int16,
    payload_offset: *mut c_int,
) -> c_int
Expand description

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.

§Arguments

  • data [in] - char*: Opus packet to be parsed
  • len [in] - opus_int32: size of data
  • out_toc [out] - char*: TOC pointer
  • frames [out] - char*[48] encapsulated frames
  • size [out] - opus_int16[48] sizes of the encapsulated frames
  • payload_offset [out] - int*: returns the position of the payload within the packet (in bytes)

§Returns

number of frames