comparison avcodec.h @ 4351:1e251b54cba2 libavcodec

avcodec_decode_audio2() difference to avcodec_decode_audio() is that the user can pass the allocated size of the output buffer to the decoder and the decoder can check if theres enough space
author michael
date Sun, 14 Jan 2007 23:50:06 +0000
parents a0cfbd6679c0
children 65bb4ce33467
comparison
equal deleted inserted replaced
4350:a3a9e4996276 4351:1e251b54cba2
2509 * opens / inits the AVCodecContext. 2509 * opens / inits the AVCodecContext.
2510 * not thread save! 2510 * not thread save!
2511 */ 2511 */
2512 int avcodec_open(AVCodecContext *avctx, AVCodec *codec); 2512 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
2513 2513
2514
2515 attribute_deprecated int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
2516 int *frame_size_ptr,
2517 uint8_t *buf, int buf_size);
2514 /** 2518 /**
2515 * Decode an audio frame. 2519 * Decode an audio frame.
2516 * 2520 *
2517 * @param avctx the codec context. 2521 * @param avctx the codec context.
2518 * @param samples output buffer, 16 byte aligned 2522 * @param samples output buffer, 16 byte aligned
2519 * @param frame_size_ptr the output buffer size in bytes, zero if no frame could be compressed 2523 * @param frame_size_ptr the output buffer size in bytes (you MUST set this to the allocated size before calling avcodec_decode_audio2()), zero if no frame could be compressed
2520 * @param buf input buffer, 16 byte aligned 2524 * @param buf input buffer, 16 byte aligned
2521 * @param buf_size the input buffer size 2525 * @param buf_size the input buffer size
2522 * @return 0 if successful, -1 if not. 2526 * @return 0 if successful, -1 if not.
2523 */ 2527 */
2524 2528 int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
2525 int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
2526 int *frame_size_ptr, 2529 int *frame_size_ptr,
2527 uint8_t *buf, int buf_size); 2530 uint8_t *buf, int buf_size);
2528 int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, 2531 int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
2529 int *got_picture_ptr, 2532 int *got_picture_ptr,
2530 uint8_t *buf, int buf_size); 2533 uint8_t *buf, int buf_size);