Mercurial > libavcodec.hg
comparison apiexample.c @ 1064:b32afefe7d33 libavcodec
* UINTX -> uintx_t INTX -> intx_t
| author | kabi |
|---|---|
| date | Tue, 11 Feb 2003 16:35:48 +0000 |
| parents | 890b9fb44e84 |
| children | 1e39f273ecd6 |
comparison
equal
deleted
inserted
replaced
| 1063:fdeac9642346 | 1064:b32afefe7d33 |
|---|---|
| 26 AVCodecContext *c= NULL; | 26 AVCodecContext *c= NULL; |
| 27 int frame_size, i, j, out_size, outbuf_size; | 27 int frame_size, i, j, out_size, outbuf_size; |
| 28 FILE *f; | 28 FILE *f; |
| 29 short *samples; | 29 short *samples; |
| 30 float t, tincr; | 30 float t, tincr; |
| 31 UINT8 *outbuf; | 31 uint8_t *outbuf; |
| 32 | 32 |
| 33 printf("Audio encoding\n"); | 33 printf("Audio encoding\n"); |
| 34 | 34 |
| 35 /* find the MP2 encoder */ | 35 /* find the MP2 encoder */ |
| 36 codec = avcodec_find_encoder(CODEC_ID_MP2); | 36 codec = avcodec_find_encoder(CODEC_ID_MP2); |
| 92 { | 92 { |
| 93 AVCodec *codec; | 93 AVCodec *codec; |
| 94 AVCodecContext *c= NULL; | 94 AVCodecContext *c= NULL; |
| 95 int out_size, size, len; | 95 int out_size, size, len; |
| 96 FILE *f, *outfile; | 96 FILE *f, *outfile; |
| 97 UINT8 *outbuf; | 97 uint8_t *outbuf; |
| 98 UINT8 inbuf[INBUF_SIZE], *inbuf_ptr; | 98 uint8_t inbuf[INBUF_SIZE], *inbuf_ptr; |
| 99 | 99 |
| 100 printf("Audio decoding\n"); | 100 printf("Audio decoding\n"); |
| 101 | 101 |
| 102 /* find the mpeg audio decoder */ | 102 /* find the mpeg audio decoder */ |
| 103 codec = avcodec_find_decoder(CODEC_ID_MP2); | 103 codec = avcodec_find_decoder(CODEC_ID_MP2); |
| 167 AVCodec *codec; | 167 AVCodec *codec; |
| 168 AVCodecContext *c= NULL; | 168 AVCodecContext *c= NULL; |
| 169 int i, out_size, size, x, y, outbuf_size; | 169 int i, out_size, size, x, y, outbuf_size; |
| 170 FILE *f; | 170 FILE *f; |
| 171 AVFrame *picture; | 171 AVFrame *picture; |
| 172 UINT8 *outbuf, *picture_buf; | 172 uint8_t *outbuf, *picture_buf; |
| 173 | 173 |
| 174 printf("Video encoding\n"); | 174 printf("Video encoding\n"); |
| 175 | 175 |
| 176 /* find the mpeg1 video encoder */ | 176 /* find the mpeg1 video encoder */ |
| 177 codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO); | 177 codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO); |
| 281 AVCodec *codec; | 281 AVCodec *codec; |
| 282 AVCodecContext *c= NULL; | 282 AVCodecContext *c= NULL; |
| 283 int frame, size, got_picture, len; | 283 int frame, size, got_picture, len; |
| 284 FILE *f; | 284 FILE *f; |
| 285 AVFrame *picture; | 285 AVFrame *picture; |
| 286 UINT8 inbuf[INBUF_SIZE], *inbuf_ptr; | 286 uint8_t inbuf[INBUF_SIZE], *inbuf_ptr; |
| 287 char buf[1024]; | 287 char buf[1024]; |
| 288 | 288 |
| 289 printf("Video decoding\n"); | 289 printf("Video decoding\n"); |
| 290 | 290 |
| 291 /* find the mpeg1 video decoder */ | 291 /* find the mpeg1 video decoder */ |
