comparison avienc.c @ 858:66cc656ea404 libavformat

Replace CONFIG_ENCODERS/CONFIG_DECODERS with CONFIG_MUXERS/CONFIG_DEMUXERS in libavformat to allow building (de)coders and (de)muxers independently at some point + support for this option in configure.
author diego
date Fri, 23 Sep 2005 00:25:41 +0000
parents 89897453def2
children 227caa55d8ea
comparison
equal deleted inserted replaced
857:26aaf3eed638 858:66cc656ea404
22 /* 22 /*
23 * TODO: 23 * TODO:
24 * - fill all fields if non streamed (nb_frames for example) 24 * - fill all fields if non streamed (nb_frames for example)
25 */ 25 */
26 26
27 #ifdef CONFIG_ENCODERS 27 #ifdef CONFIG_MUXERS
28 typedef struct AVIIentry { 28 typedef struct AVIIentry {
29 unsigned int flags, pos, len; 29 unsigned int flags, pos, len;
30 } AVIIentry; 30 } AVIIentry;
31 31
32 #define AVI_INDEX_CLUSTER_SIZE 16384 32 #define AVI_INDEX_CLUSTER_SIZE 16384
69 pos = url_ftell(pb); 69 pos = url_ftell(pb);
70 url_fseek(pb, start - 4, SEEK_SET); 70 url_fseek(pb, start - 4, SEEK_SET);
71 put_le32(pb, (uint32_t)(pos - start)); 71 put_le32(pb, (uint32_t)(pos - start));
72 url_fseek(pb, pos, SEEK_SET); 72 url_fseek(pb, pos, SEEK_SET);
73 } 73 }
74 #endif //CONFIG_ENCODERS 74 #endif //CONFIG_MUXERS
75 75
76 /* Note: when encoding, the first matching tag is used, so order is 76 /* Note: when encoding, the first matching tag is used, so order is
77 important if multiple tags possible for a given codec. */ 77 important if multiple tags possible for a given codec. */
78 const CodecTag codec_bmp_tags[] = { 78 const CodecTag codec_bmp_tags[] = {
79 { CODEC_ID_H264, MKTAG('H', '2', '6', '4') }, 79 { CODEC_ID_H264, MKTAG('H', '2', '6', '4') },
243 enum CodecID codec_get_wav_id(unsigned int tag) 243 enum CodecID codec_get_wav_id(unsigned int tag)
244 { 244 {
245 return codec_get_id(codec_wav_tags, tag); 245 return codec_get_id(codec_wav_tags, tag);
246 } 246 }
247 247
248 #ifdef CONFIG_ENCODERS 248 #ifdef CONFIG_MUXERS
249 /* BITMAPINFOHEADER header */ 249 /* BITMAPINFOHEADER header */
250 void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags, int for_asf) 250 void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags, int for_asf)
251 { 251 {
252 put_le32(pb, 40 + enc->extradata_size); /* size */ 252 put_le32(pb, 40 + enc->extradata_size); /* size */
253 put_le32(pb, enc->width); 253 put_le32(pb, enc->width);
750 int avienc_init(void) 750 int avienc_init(void)
751 { 751 {
752 av_register_output_format(&avi_oformat); 752 av_register_output_format(&avi_oformat);
753 return 0; 753 return 0;
754 } 754 }
755 #endif //CONFIG_ENCODERS 755 #endif //CONFIG_MUXERS