comparison avcodec.h @ 6318:73c09e922744 libavcodec

Make avcodec_decode_* functions take const input buffers.
author michael
date Sat, 02 Feb 2008 22:54:50 +0000
parents 1087db4b4d78
children ac94f0de338e
comparison
equal deleted inserted replaced
6317:2f44646383c8 6318:73c09e922744
2609 /** 2609 /**
2610 * @deprecated Use avcodec_decode_audio2() instead. 2610 * @deprecated Use avcodec_decode_audio2() instead.
2611 */ 2611 */
2612 attribute_deprecated int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, 2612 attribute_deprecated int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
2613 int *frame_size_ptr, 2613 int *frame_size_ptr,
2614 uint8_t *buf, int buf_size); 2614 const uint8_t *buf, int buf_size);
2615 2615
2616 /** 2616 /**
2617 * Decodes an audio frame from \p buf into \p samples. 2617 * Decodes an audio frame from \p buf into \p samples.
2618 * The avcodec_decode_audio2() function decodes an audio frame from the input 2618 * The avcodec_decode_audio2() function decodes an audio frame from the input
2619 * buffer \p buf of size \p buf_size. To decode it, it makes use of the 2619 * buffer \p buf of size \p buf_size. To decode it, it makes use of the
2649 * @return On error a negative value is returned, otherwise the number of bytes 2649 * @return On error a negative value is returned, otherwise the number of bytes
2650 * used or zero if no frame could be decompressed. 2650 * used or zero if no frame could be decompressed.
2651 */ 2651 */
2652 int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, 2652 int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
2653 int *frame_size_ptr, 2653 int *frame_size_ptr,
2654 uint8_t *buf, int buf_size); 2654 const uint8_t *buf, int buf_size);
2655 2655
2656 /** 2656 /**
2657 * Decodes a video frame from \p buf into \p picture. 2657 * Decodes a video frame from \p buf into \p picture.
2658 * The avcodec_decode_video() function decodes a video frame from the input 2658 * The avcodec_decode_video() function decodes a video frame from the input
2659 * buffer \p buf of size \p buf_size. To decode it, it makes use of the 2659 * buffer \p buf of size \p buf_size. To decode it, it makes use of the
2684 * @return On error a negative value is returned, otherwise the number of bytes 2684 * @return On error a negative value is returned, otherwise the number of bytes
2685 * used or zero if no frame could be decompressed. 2685 * used or zero if no frame could be decompressed.
2686 */ 2686 */
2687 int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, 2687 int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
2688 int *got_picture_ptr, 2688 int *got_picture_ptr,
2689 uint8_t *buf, int buf_size); 2689 const uint8_t *buf, int buf_size);
2690 2690
2691 /* Decode a subtitle message. Return -1 if error, otherwise return the 2691 /* Decode a subtitle message. Return -1 if error, otherwise return the
2692 * number of bytes used. If no subtitle could be decompressed, 2692 * number of bytes used. If no subtitle could be decompressed,
2693 * got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */ 2693 * got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */
2694 int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub, 2694 int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,