Mercurial > libavcodec.hg
comparison avcodec.h @ 6904:be1b0a6ee19a libavcodec
Clarify avcodec_encode_audio() vs. PCM audio.
patch by Stefano Sabatini, stefano.sabatini-lala poste it
author | diego |
---|---|
date | Mon, 26 May 2008 23:19:26 +0000 |
parents | 1b9c458d6d60 |
children | da73a98945ea |
comparison
equal
deleted
inserted
replaced
6903:0f63fc62ea8b | 6904:be1b0a6ee19a |
---|---|
2748 * @param[out] buf the output buffer | 2748 * @param[out] buf the output buffer |
2749 * @param[in] buf_size the output buffer size | 2749 * @param[in] buf_size the output buffer size |
2750 * @param[in] samples the input buffer containing the samples | 2750 * @param[in] samples the input buffer containing the samples |
2751 * The number of samples read from this buffer is frame_size*channels, | 2751 * The number of samples read from this buffer is frame_size*channels, |
2752 * both of which are defined in \p avctx. | 2752 * both of which are defined in \p avctx. |
2753 * For PCM audio the number of samples read from \p samples is equal to | |
2754 * \p buf_size * input_sample_size / output_sample_size. | |
2753 * @return On error a negative value is returned, on success zero or the number | 2755 * @return On error a negative value is returned, on success zero or the number |
2754 * of bytes used to encode the data read from the input buffer. | 2756 * of bytes used to encode the data read from the input buffer. |
2755 */ | 2757 */ |
2756 int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size, | 2758 int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size, |
2757 const short *samples); | 2759 const short *samples); |