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


 opus_defines.h   opus_defines.h 
skipping to change at line 67 skipping to change at line 67
/** An encoder or decoder structure is invalid or already freed @hideinitia lizer*/ /** An encoder or decoder structure is invalid or already freed @hideinitia lizer*/
#define OPUS_INVALID_STATE -6 #define OPUS_INVALID_STATE -6
/** Memory allocation has failed @hideinitializer*/ /** Memory allocation has failed @hideinitializer*/
#define OPUS_ALLOC_FAIL -7 #define OPUS_ALLOC_FAIL -7
/**@}*/ /**@}*/
/** @cond OPUS_INTERNAL_DOC */ /** @cond OPUS_INTERNAL_DOC */
/**Export control for opus functions */ /**Export control for opus functions */
#ifndef OPUS_EXPORT #ifndef OPUS_EXPORT
# if defined(__GNUC__) && defined(OPUS_BUILD) # if defined(WIN32)
# define OPUS_EXPORT __attribute__ ((visibility ("default")))
# elif defined(WIN32) && !defined(__MINGW32__)
# ifdef OPUS_BUILD # ifdef OPUS_BUILD
# define OPUS_EXPORT __declspec(dllexport) # define OPUS_EXPORT __declspec(dllexport)
# else # else
# define OPUS_EXPORT # define OPUS_EXPORT
# endif # endif
# elif defined(__GNUC__) && defined(OPUS_BUILD)
# define OPUS_EXPORT __attribute__ ((visibility ("default")))
# else # else
# define OPUS_EXPORT # define OPUS_EXPORT
# endif # endif
#endif #endif
# if !defined(OPUS_GNUC_PREREQ) # if !defined(OPUS_GNUC_PREREQ)
# if defined(__GNUC__)&&defined(__GNUC_MINOR__) # if defined(__GNUC__)&&defined(__GNUC_MINOR__)
# define OPUS_GNUC_PREREQ(_maj,_min) \ # define OPUS_GNUC_PREREQ(_maj,_min) \
((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min)) ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min))
# else # else
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 opus_multistream.h   opus_multistream.h 
skipping to change at line 208 skipping to change at line 208
* coupled_streams</code>) must be no * coupled_streams</code>) must be no
* more than 255. * more than 255.
* @returns The size in bytes on success, or a negative error code * @returns The size in bytes on success, or a negative error code
* (see @ref opus_errorcodes) on error. * (see @ref opus_errorcodes) on error.
*/ */
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_encoder_get _size( OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_encoder_get _size(
int streams, int streams,
int coupled_streams int coupled_streams
); );
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_surround_en
coder_get_size(
int channels,
int mapping_family
);
/** Allocates and initializes a multistream encoder state. /** Allocates and initializes a multistream encoder state.
* Call opus_multistream_encoder_destroy() to release * Call opus_multistream_encoder_destroy() to release
* this object when finished. * this object when finished.
* @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz ). * @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz ).
* This must be one of 8000, 12000, 16000, * This must be one of 8000, 12000, 16000,
* 24000, or 48000. * 24000, or 48000.
* @param channels <tt>int</tt>: Number of channels in the input signal. * @param channels <tt>int</tt>: Number of channels in the input signal.
* This must be at most 255. * This must be at most 255.
* It may be greater than the number of * It may be greater than the number of
* coded channels (<code>streams + * coded channels (<code>streams +
skipping to change at line 261 skipping to change at line 266
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_encoder _create( OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_encoder _create(
opus_int32 Fs, opus_int32 Fs,
int channels, int channels,
int streams, int streams,
int coupled_streams, int coupled_streams,
const unsigned char *mapping, const unsigned char *mapping,
int application, int application,
int *error int *error
) OPUS_ARG_NONNULL(5); ) OPUS_ARG_NONNULL(5);
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_surroun
d_encoder_create(
opus_int32 Fs,
int channels,
int mapping_family,
int *streams,
int *coupled_streams,
unsigned char *mapping,
int application,
int *error
) OPUS_ARG_NONNULL(5);
/** Initialize a previously allocated multistream encoder state. /** Initialize a previously allocated multistream encoder state.
* The memory pointed to by \a st must be at least the size returned by * The memory pointed to by \a st must be at least the size returned by
* opus_multistream_encoder_get_size(). * opus_multistream_encoder_get_size().
* This is intended for applications which use their own allocator instead of * This is intended for applications which use their own allocator instead of
* malloc. * malloc.
* To reset a previously initialized state, use the #OPUS_RESET_STATE CTL. * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
* @see opus_multistream_encoder_create * @see opus_multistream_encoder_create
* @see opus_multistream_encoder_get_size * @see opus_multistream_encoder_get_size
* @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initial ize. * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initial ize.
* @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz ). * @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz ).
skipping to change at line 319 skipping to change at line 335
OPUS_EXPORT int opus_multistream_encoder_init( OPUS_EXPORT int opus_multistream_encoder_init(
OpusMSEncoder *st, OpusMSEncoder *st,
opus_int32 Fs, opus_int32 Fs,
int channels, int channels,
int streams, int streams,
int coupled_streams, int coupled_streams,
const unsigned char *mapping, const unsigned char *mapping,
int application int application
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6); ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
OPUS_EXPORT int opus_multistream_surround_encoder_init(
OpusMSEncoder *st,
opus_int32 Fs,
int channels,
int mapping_family,
int *streams,
int *coupled_streams,
unsigned char *mapping,
int application
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
/** Encodes a multistream Opus frame. /** Encodes a multistream Opus frame.
* @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state. * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.
* @param[in] pcm <tt>const opus_int16*</tt>: The input signal as interlea ved * @param[in] pcm <tt>const opus_int16*</tt>: The input signal as interlea ved
* samples. * samples.
* This must contain * This must contain
* <code>frame_size*channels</c ode> * <code>frame_size*channels</c ode>
* samples. * samples.
* @param frame_size <tt>int</tt>: Number of samples per channel in the in put * @param frame_size <tt>int</tt>: Number of samples per channel in the in put
* signal. * signal.
* This must be an Opus frame size for the * This must be an Opus frame size for the
 End of changes. 3 change blocks. 
0 lines changed or deleted 29 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/