| opus.h | | opus.h | |
| | | | |
| skipping to change at line 523 | | skipping to change at line 523 | |
| | | | |
| /** Parse an opus packet into one or more frames. | | /** Parse an opus packet into one or more frames. | |
| * Opus_decode will perform this operation internally so most applications
do | | * Opus_decode will perform this operation internally so most applications
do | |
| * not need to use this function. | | * not need to use this function. | |
| * This function does not copy the frames, the returned pointers are point
ers into | | * This function does not copy the frames, the returned pointers are point
ers into | |
| * the input packet. | | * the input packet. | |
| * @param [in] data <tt>char*</tt>: Opus packet to be parsed | | * @param [in] data <tt>char*</tt>: Opus packet to be parsed | |
| * @param [in] len <tt>opus_int32</tt>: size of data | | * @param [in] len <tt>opus_int32</tt>: size of data | |
| * @param [out] out_toc <tt>char*</tt>: TOC pointer | | * @param [out] out_toc <tt>char*</tt>: TOC pointer | |
| * @param [out] frames <tt>char*[48]</tt> encapsulated frames | | * @param [out] frames <tt>char*[48]</tt> encapsulated frames | |
|
| * @param [out] size <tt>short[48]</tt> sizes of the encapsulated frames | | * @param [out] size <tt>opus_int16[48]</tt> sizes of the encapsulated fra
mes | |
| * @param [out] payload_offset <tt>int*</tt>: returns the position of the
payload within the packet (in bytes) | | * @param [out] payload_offset <tt>int*</tt>: returns the position of the
payload within the packet (in bytes) | |
| * @returns number of frames | | * @returns number of frames | |
| */ | | */ | |
| OPUS_EXPORT int opus_packet_parse( | | OPUS_EXPORT int opus_packet_parse( | |
| const unsigned char *data, | | const unsigned char *data, | |
| opus_int32 len, | | opus_int32 len, | |
| unsigned char *out_toc, | | unsigned char *out_toc, | |
| const unsigned char *frames[48], | | const unsigned char *frames[48], | |
|
| short size[48], | | opus_int16 size[48], | |
| int *payload_offset | | int *payload_offset | |
| ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4); | | ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4); | |
| | | | |
| /** Gets the bandwidth of an Opus packet. | | /** Gets the bandwidth of an Opus packet. | |
| * @param [in] data <tt>char*</tt>: Opus packet | | * @param [in] data <tt>char*</tt>: Opus packet | |
| * @retval OPUS_BANDWIDTH_NARROWBAND Narrowband (4kHz bandpass) | | * @retval OPUS_BANDWIDTH_NARROWBAND Narrowband (4kHz bandpass) | |
| * @retval OPUS_BANDWIDTH_MEDIUMBAND Mediumband (6kHz bandpass) | | * @retval OPUS_BANDWIDTH_MEDIUMBAND Mediumband (6kHz bandpass) | |
| * @retval OPUS_BANDWIDTH_WIDEBAND Wideband (8kHz bandpass) | | * @retval OPUS_BANDWIDTH_WIDEBAND Wideband (8kHz bandpass) | |
| * @retval OPUS_BANDWIDTH_SUPERWIDEBAND Superwideband (12kHz bandpass) | | * @retval OPUS_BANDWIDTH_SUPERWIDEBAND Superwideband (12kHz bandpass) | |
| * @retval OPUS_BANDWIDTH_FULLBAND Fullband (20kHz bandpass) | | * @retval OPUS_BANDWIDTH_FULLBAND Fullband (20kHz bandpass) | |
| | | | |
| skipping to change at line 569 | | skipping to change at line 569 | |
| * @param [in] data <tt>char*</tt>: Opus packet | | * @param [in] data <tt>char*</tt>: Opus packet | |
| * @returns Number of channels | | * @returns Number of channels | |
| * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or
of an unsupported type | | * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or
of an unsupported type | |
| */ | | */ | |
| OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_channels(const u
nsigned char *data) OPUS_ARG_NONNULL(1); | | OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_channels(const u
nsigned char *data) OPUS_ARG_NONNULL(1); | |
| | | | |
| /** Gets the number of frames in an Opus packet. | | /** Gets the number of frames in an Opus packet. | |
| * @param [in] packet <tt>char*</tt>: Opus packet | | * @param [in] packet <tt>char*</tt>: Opus packet | |
| * @param [in] len <tt>opus_int32</tt>: Length of packet | | * @param [in] len <tt>opus_int32</tt>: Length of packet | |
| * @returns Number of frames | | * @returns Number of frames | |
|
| | | * @retval OPUS_BAD_ARG Insufficient data was passed to the function | |
| * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or
of an unsupported type | | * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or
of an unsupported type | |
| */ | | */ | |
| OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_frames(const uns
igned char packet[], opus_int32 len) OPUS_ARG_NONNULL(1); | | OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_frames(const uns
igned char packet[], opus_int32 len) OPUS_ARG_NONNULL(1); | |
| | | | |
| /** Gets the number of samples of an Opus packet. | | /** Gets the number of samples of an Opus packet. | |
| * @param [in] packet <tt>char*</tt>: Opus packet | | * @param [in] packet <tt>char*</tt>: Opus packet | |
| * @param [in] len <tt>opus_int32</tt>: Length of packet | | * @param [in] len <tt>opus_int32</tt>: Length of packet | |
| * @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz. | | * @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz. | |
| * This must be a multiple of 400, or | | * This must be a multiple of 400, or | |
| * inaccurate results will be returned
. | | * inaccurate results will be returned
. | |
| * @returns Number of samples | | * @returns Number of samples | |
|
| | | * @retval OPUS_BAD_ARG Insufficient data was passed to the function | |
| * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or
of an unsupported type | | * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or
of an unsupported type | |
| */ | | */ | |
| OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_samples(const un
signed char packet[], opus_int32 len, opus_int32 Fs) OPUS_ARG_NONNULL(1); | | OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_samples(const un
signed char packet[], opus_int32 len, opus_int32 Fs) OPUS_ARG_NONNULL(1); | |
| | | | |
| /** Gets the number of samples of an Opus packet. | | /** Gets the number of samples of an Opus packet. | |
| * @param [in] dec <tt>OpusDecoder*</tt>: Decoder state | | * @param [in] dec <tt>OpusDecoder*</tt>: Decoder state | |
| * @param [in] packet <tt>char*</tt>: Opus packet | | * @param [in] packet <tt>char*</tt>: Opus packet | |
| * @param [in] len <tt>opus_int32</tt>: Length of packet | | * @param [in] len <tt>opus_int32</tt>: Length of packet | |
| * @returns Number of samples | | * @returns Number of samples | |
|
| | | * @retval OPUS_BAD_ARG Insufficient data was passed to the function | |
| * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or
of an unsupported type | | * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or
of an unsupported type | |
| */ | | */ | |
| OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decoder_get_nb_samples(const O
pusDecoder *dec, const unsigned char packet[], opus_int32 len) OPUS_ARG_NON
NULL(1) OPUS_ARG_NONNULL(2); | | OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decoder_get_nb_samples(const O
pusDecoder *dec, const unsigned char packet[], opus_int32 len) OPUS_ARG_NON
NULL(1) OPUS_ARG_NONNULL(2); | |
| /**@}*/ | | /**@}*/ | |
| | | | |
| /** @defgroup opus_repacketizer Repacketizer | | /** @defgroup opus_repacketizer Repacketizer | |
| * @{ | | * @{ | |
| * | | * | |
| * The repacketizer can be used to merge multiple Opus packets into a sing
le | | * The repacketizer can be used to merge multiple Opus packets into a sing
le | |
| * packet or alternatively to split Opus packets that have previously been | | * packet or alternatively to split Opus packets that have previously been | |
| | | | |
End of changes. 5 change blocks. |
| 2 lines changed or deleted | | 5 lines changed or added | |
|