comparison utils.c @ 1064:b32afefe7d33 libavcodec

* UINTX -> uintx_t INTX -> intx_t
author kabi
date Tue, 11 Feb 2003 16:35:48 +0000
parents bb5de8a59da8
children 1e39f273ecd6
comparison
equal deleted inserted replaced
1063:fdeac9642346 1064:b32afefe7d33
283 return ret; 283 return ret;
284 } 284 }
285 return 0; 285 return 0;
286 } 286 }
287 287
288 int avcodec_encode_audio(AVCodecContext *avctx, UINT8 *buf, int buf_size, 288 int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size,
289 const short *samples) 289 const short *samples)
290 { 290 {
291 int ret; 291 int ret;
292 292
293 ret = avctx->codec->encode(avctx, buf, buf_size, (void *)samples); 293 ret = avctx->codec->encode(avctx, buf, buf_size, (void *)samples);
294 avctx->frame_number++; 294 avctx->frame_number++;
295 return ret; 295 return ret;
296 } 296 }
297 297
298 int avcodec_encode_video(AVCodecContext *avctx, UINT8 *buf, int buf_size, 298 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
299 const AVFrame *pict) 299 const AVFrame *pict)
300 { 300 {
301 int ret; 301 int ret;
302 302
303 ret = avctx->codec->encode(avctx, buf, buf_size, (void *)pict); 303 ret = avctx->codec->encode(avctx, buf, buf_size, (void *)pict);
311 /* decode a frame. return -1 if error, otherwise return the number of 311 /* decode a frame. return -1 if error, otherwise return the number of
312 bytes used. If no frame could be decompressed, *got_picture_ptr is 312 bytes used. If no frame could be decompressed, *got_picture_ptr is
313 zero. Otherwise, it is non zero */ 313 zero. Otherwise, it is non zero */
314 int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, 314 int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
315 int *got_picture_ptr, 315 int *got_picture_ptr,
316 UINT8 *buf, int buf_size) 316 uint8_t *buf, int buf_size)
317 { 317 {
318 int ret; 318 int ret;
319 319
320 ret = avctx->codec->decode(avctx, picture, got_picture_ptr, 320 ret = avctx->codec->decode(avctx, picture, got_picture_ptr,
321 buf, buf_size); 321 buf, buf_size);
329 329
330 /* decode an audio frame. return -1 if error, otherwise return the 330 /* decode an audio frame. return -1 if error, otherwise return the
331 *number of bytes used. If no frame could be decompressed, 331 *number of bytes used. If no frame could be decompressed,
332 *frame_size_ptr is zero. Otherwise, it is the decompressed frame 332 *frame_size_ptr is zero. Otherwise, it is the decompressed frame
333 *size in BYTES. */ 333 *size in BYTES. */
334 int avcodec_decode_audio(AVCodecContext *avctx, INT16 *samples, 334 int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
335 int *frame_size_ptr, 335 int *frame_size_ptr,
336 UINT8 *buf, int buf_size) 336 uint8_t *buf, int buf_size)
337 { 337 {
338 int ret; 338 int ret;
339 339
340 ret = avctx->codec->decode(avctx, samples, frame_size_ptr, 340 ret = avctx->codec->decode(avctx, samples, frame_size_ptr,
341 buf, buf_size); 341 buf, buf_size);
587 return 0; 587 return 0;
588 } 588 }
589 589
590 static int raw_decode_frame(AVCodecContext *avctx, 590 static int raw_decode_frame(AVCodecContext *avctx,
591 void *data, int *data_size, 591 void *data, int *data_size,
592 UINT8 *buf, int buf_size) 592 uint8_t *buf, int buf_size)
593 { 593 {
594 return -1; 594 return -1;
595 } 595 }
596 596
597 static int raw_encode_frame(AVCodecContext *avctx, 597 static int raw_encode_frame(AVCodecContext *avctx,