Mercurial > libavcodec.hg
comparison avcodec.h @ 92:1d3eb6cdc6b5 libavcodec
added pcm codecs
author | glantau |
---|---|
date | Sun, 23 Sep 2001 17:16:51 +0000 |
parents | cdd89f96cbe1 |
children | 1e4a4af694d1 |
comparison
equal
deleted
inserted
replaced
91:db55e2d3b380 | 92:1d3eb6cdc6b5 |
---|---|
1 #ifndef AVCODEC_H | |
2 #define AVCODEC_H | |
3 | |
1 #include "common.h" | 4 #include "common.h" |
2 | 5 |
3 enum CodecID { | 6 enum CodecID { |
4 CODEC_ID_NONE, | 7 CODEC_ID_NONE, |
5 CODEC_ID_MPEG1VIDEO, | 8 CODEC_ID_MPEG1VIDEO, |
7 CODEC_ID_RV10, | 10 CODEC_ID_RV10, |
8 CODEC_ID_MP2, | 11 CODEC_ID_MP2, |
9 CODEC_ID_AC3, | 12 CODEC_ID_AC3, |
10 CODEC_ID_MJPEG, | 13 CODEC_ID_MJPEG, |
11 CODEC_ID_MPEG4, | 14 CODEC_ID_MPEG4, |
12 CODEC_ID_PCM, | |
13 CODEC_ID_RAWVIDEO, | 15 CODEC_ID_RAWVIDEO, |
14 CODEC_ID_MSMPEG4, | 16 CODEC_ID_MSMPEG4, |
15 CODEC_ID_H263P, | 17 CODEC_ID_H263P, |
16 CODEC_ID_H263I, | 18 CODEC_ID_H263I, |
19 | |
20 /* various pcm "codecs" */ | |
21 CODEC_ID_PCM_S16LE, | |
22 CODEC_ID_PCM_S16BE, | |
23 CODEC_ID_PCM_U16LE, | |
24 CODEC_ID_PCM_U16BE, | |
25 CODEC_ID_PCM_S8, | |
26 CODEC_ID_PCM_U8, | |
27 CODEC_ID_PCM_MULAW, | |
28 CODEC_ID_PCM_ALAW, | |
17 }; | 29 }; |
18 | 30 |
19 enum CodecType { | 31 enum CodecType { |
20 CODEC_TYPE_VIDEO, | 32 CODEC_TYPE_VIDEO, |
21 CODEC_TYPE_AUDIO, | 33 CODEC_TYPE_AUDIO, |
26 PIX_FMT_YUV422, | 38 PIX_FMT_YUV422, |
27 PIX_FMT_RGB24, | 39 PIX_FMT_RGB24, |
28 PIX_FMT_BGR24, | 40 PIX_FMT_BGR24, |
29 PIX_FMT_YUV422P, | 41 PIX_FMT_YUV422P, |
30 PIX_FMT_YUV444P, | 42 PIX_FMT_YUV444P, |
43 }; | |
44 | |
45 /* currently unused, may be used if 24/32 bits samples ever supported */ | |
46 enum SampleFormat { | |
47 SAMPLE_FMT_S16 = 0, /* signed 16 bits */ | |
31 }; | 48 }; |
32 | 49 |
33 /* in bytes */ | 50 /* in bytes */ |
34 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 18432 | 51 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 18432 |
35 | 52 |
72 int y, int width, int height); | 89 int y, int width, int height); |
73 | 90 |
74 /* audio only */ | 91 /* audio only */ |
75 int sample_rate; /* samples per sec */ | 92 int sample_rate; /* samples per sec */ |
76 int channels; | 93 int channels; |
94 int sample_fmt; /* sample format, currenly unused */ | |
77 | 95 |
78 /* the following data should not be initialized */ | 96 /* the following data should not be initialized */ |
79 int frame_size; /* in samples, initialized when calling 'init' */ | 97 int frame_size; /* in samples, initialized when calling 'init' */ |
80 int frame_number; /* audio or video frame number */ | 98 int frame_number; /* audio or video frame number */ |
81 int key_frame; /* true if the previous compressed frame was | 99 int key_frame; /* true if the previous compressed frame was |
128 extern AVCodec msmpeg4_decoder; | 146 extern AVCodec msmpeg4_decoder; |
129 extern AVCodec mpeg_decoder; | 147 extern AVCodec mpeg_decoder; |
130 extern AVCodec h263i_decoder; | 148 extern AVCodec h263i_decoder; |
131 extern AVCodec rv10_decoder; | 149 extern AVCodec rv10_decoder; |
132 extern AVCodec mjpeg_decoder; | 150 extern AVCodec mjpeg_decoder; |
133 | 151 extern AVCodec mp3_decoder; |
134 /* dummy raw codecs */ | 152 |
135 extern AVCodec pcm_codec; | 153 /* pcm codecs */ |
154 #define PCM_CODEC(id, name) \ | |
155 extern AVCodec name ## _decoder; \ | |
156 extern AVCodec name ## _encoder; | |
157 | |
158 PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le); | |
159 PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be); | |
160 PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le); | |
161 PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be); | |
162 PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8); | |
163 PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8); | |
164 PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw); | |
165 PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw); | |
166 | |
167 #undef PCM_CODEC | |
168 | |
169 /* dummy raw video codec */ | |
136 extern AVCodec rawvideo_codec; | 170 extern AVCodec rawvideo_codec; |
137 | 171 |
138 /* the following codecs use external GPL libs */ | 172 /* the following codecs use external GPL libs */ |
139 extern AVCodec mp3_decoder; | |
140 extern AVCodec ac3_decoder; | 173 extern AVCodec ac3_decoder; |
141 | 174 |
142 /* resample.c */ | 175 /* resample.c */ |
143 | 176 |
144 struct ReSampleContext; | 177 struct ReSampleContext; |
201 const AVPicture *pict); | 234 const AVPicture *pict); |
202 | 235 |
203 int avcodec_close(AVCodecContext *avctx); | 236 int avcodec_close(AVCodecContext *avctx); |
204 | 237 |
205 void avcodec_register_all(void); | 238 void avcodec_register_all(void); |
239 | |
240 #endif /* AVCODEC_H */ |