Mercurial > libavformat.hg
annotate raw.c @ 595:f0066a7fba8a libavformat
use correct types
author | melanson |
---|---|
date | Sat, 20 Nov 2004 23:53:24 +0000 |
parents | f701ba509d0c |
children | 76e36d97a27a |
rev | line source |
---|---|
0 | 1 /* |
2 * RAW encoder and decoder | |
3 * Copyright (c) 2001 Fabrice Bellard. | |
4 * | |
5 * This library is free software; you can redistribute it and/or | |
6 * modify it under the terms of the GNU Lesser General Public | |
7 * License as published by the Free Software Foundation; either | |
8 * version 2 of the License, or (at your option) any later version. | |
9 * | |
10 * This library is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 * Lesser General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU Lesser General Public | |
16 * License along with this library; if not, write to the Free Software | |
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 */ | |
19 #include "avformat.h" | |
20 | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
21 #ifdef CONFIG_ENCODERS |
0 | 22 /* simple formats */ |
64 | 23 static int raw_write_header(struct AVFormatContext *s) |
0 | 24 { |
25 return 0; | |
26 } | |
27 | |
468 | 28 static int raw_write_packet(struct AVFormatContext *s, AVPacket *pkt) |
0 | 29 { |
468 | 30 put_buffer(&s->pb, pkt->data, pkt->size); |
0 | 31 put_flush_packet(&s->pb); |
32 return 0; | |
33 } | |
34 | |
64 | 35 static int raw_write_trailer(struct AVFormatContext *s) |
0 | 36 { |
37 return 0; | |
38 } | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
39 #endif //CONFIG_ENCODERS |
0 | 40 |
41 /* raw input */ | |
65 | 42 static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) |
0 | 43 { |
44 AVStream *st; | |
45 int id; | |
46 | |
47 st = av_new_stream(s, 0); | |
48 if (!st) | |
49 return AVERROR_NOMEM; | |
50 if (ap) { | |
51 id = s->iformat->value; | |
52 if (id == CODEC_ID_RAWVIDEO) { | |
53 st->codec.codec_type = CODEC_TYPE_VIDEO; | |
54 } else { | |
55 st->codec.codec_type = CODEC_TYPE_AUDIO; | |
56 } | |
57 st->codec.codec_id = id; | |
58 | |
59 switch(st->codec.codec_type) { | |
60 case CODEC_TYPE_AUDIO: | |
61 st->codec.sample_rate = ap->sample_rate; | |
62 st->codec.channels = ap->channels; | |
567 | 63 av_set_pts_info(st, 64, 1, st->codec.sample_rate); |
0 | 64 break; |
65 case CODEC_TYPE_VIDEO: | |
85
25062c9b1f86
per context frame_rate_base, this should finally fix frame_rate related av sync issues
michaelni
parents:
65
diff
changeset
|
66 st->codec.frame_rate = ap->frame_rate; |
25062c9b1f86
per context frame_rate_base, this should finally fix frame_rate related av sync issues
michaelni
parents:
65
diff
changeset
|
67 st->codec.frame_rate_base = ap->frame_rate_base; |
0 | 68 st->codec.width = ap->width; |
69 st->codec.height = ap->height; | |
128 | 70 st->codec.pix_fmt = ap->pix_fmt; |
0 | 71 break; |
72 default: | |
73 return -1; | |
74 } | |
75 } else { | |
76 return -1; | |
77 } | |
78 return 0; | |
79 } | |
80 | |
81 #define RAW_PACKET_SIZE 1024 | |
82 | |
64 | 83 static int raw_read_packet(AVFormatContext *s, AVPacket *pkt) |
0 | 84 { |
85 int ret, size; | |
28 | 86 // AVStream *st = s->streams[0]; |
0 | 87 |
88 size= RAW_PACKET_SIZE; | |
89 | |
90 if (av_new_packet(pkt, size) < 0) | |
482 | 91 return AVERROR_IO; |
0 | 92 |
93 pkt->stream_index = 0; | |
94 ret = get_buffer(&s->pb, pkt->data, size); | |
95 if (ret <= 0) { | |
96 av_free_packet(pkt); | |
482 | 97 return AVERROR_IO; |
0 | 98 } |
99 /* note: we need to modify the packet size here to handle the last | |
100 packet */ | |
101 pkt->size = ret; | |
102 return ret; | |
103 } | |
104 | |
389
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
105 static int raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt) |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
106 { |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
107 int ret, size; |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
108 |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
109 size = RAW_PACKET_SIZE; |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
110 |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
111 if (av_new_packet(pkt, size) < 0) |
482 | 112 return AVERROR_IO; |
389
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
113 |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
114 pkt->stream_index = 0; |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
115 ret = get_partial_buffer(&s->pb, pkt->data, size); |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
116 if (ret <= 0) { |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
117 av_free_packet(pkt); |
482 | 118 return AVERROR_IO; |
389
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
119 } |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
120 pkt->size = ret; |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
121 return ret; |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
122 } |
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
123 |
64 | 124 static int raw_read_close(AVFormatContext *s) |
0 | 125 { |
126 return 0; | |
127 } | |
128 | |
306 | 129 int pcm_read_seek(AVFormatContext *s, |
558 | 130 int stream_index, int64_t timestamp, int flags) |
306 | 131 { |
132 AVStream *st; | |
133 int block_align, byte_rate; | |
134 int64_t pos; | |
135 | |
136 st = s->streams[0]; | |
137 switch(st->codec.codec_id) { | |
138 case CODEC_ID_PCM_S16LE: | |
139 case CODEC_ID_PCM_S16BE: | |
140 case CODEC_ID_PCM_U16LE: | |
141 case CODEC_ID_PCM_U16BE: | |
142 block_align = 2 * st->codec.channels; | |
143 byte_rate = block_align * st->codec.sample_rate; | |
144 break; | |
145 case CODEC_ID_PCM_S8: | |
146 case CODEC_ID_PCM_U8: | |
147 case CODEC_ID_PCM_MULAW: | |
148 case CODEC_ID_PCM_ALAW: | |
149 block_align = st->codec.channels; | |
150 byte_rate = block_align * st->codec.sample_rate; | |
151 break; | |
152 default: | |
153 block_align = st->codec.block_align; | |
154 byte_rate = st->codec.bit_rate / 8; | |
155 break; | |
156 } | |
157 | |
158 if (block_align <= 0 || byte_rate <= 0) | |
159 return -1; | |
160 | |
161 /* compute the position by aligning it to block_align */ | |
558 | 162 pos = av_rescale_rnd(timestamp * byte_rate, |
163 st->time_base.num, | |
164 st->time_base.den * (int64_t)block_align, | |
165 (flags & AVSEEK_FLAG_BACKWARD) ? AV_ROUND_DOWN : AV_ROUND_UP); | |
166 pos *= block_align; | |
306 | 167 |
168 /* recompute exact position */ | |
464 | 169 st->cur_dts = av_rescale(pos, st->time_base.den, byte_rate * (int64_t)st->time_base.num); |
306 | 170 url_fseek(&s->pb, pos + s->data_offset, SEEK_SET); |
171 return 0; | |
172 } | |
173 | |
63 | 174 /* ac3 read */ |
175 static int ac3_read_header(AVFormatContext *s, | |
176 AVFormatParameters *ap) | |
177 { | |
178 AVStream *st; | |
179 | |
180 st = av_new_stream(s, 0); | |
181 if (!st) | |
182 return AVERROR_NOMEM; | |
183 | |
184 st->codec.codec_type = CODEC_TYPE_AUDIO; | |
185 st->codec.codec_id = CODEC_ID_AC3; | |
306 | 186 st->need_parsing = 1; |
63 | 187 /* the parameters will be extracted from the compressed bitstream */ |
188 return 0; | |
189 } | |
190 | |
496
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
191 /* dts read */ |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
192 static int dts_read_header(AVFormatContext *s, |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
193 AVFormatParameters *ap) |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
194 { |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
195 AVStream *st; |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
196 |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
197 st = av_new_stream(s, 0); |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
198 if (!st) |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
199 return AVERROR_NOMEM; |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
200 |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
201 st->codec.codec_type = CODEC_TYPE_AUDIO; |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
202 st->codec.codec_id = CODEC_ID_DTS; |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
203 st->need_parsing = 1; |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
204 /* the parameters will be extracted from the compressed bitstream */ |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
205 return 0; |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
206 } |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
207 |
0 | 208 /* mpeg1/h263 input */ |
209 static int video_read_header(AVFormatContext *s, | |
210 AVFormatParameters *ap) | |
211 { | |
212 AVStream *st; | |
213 | |
214 st = av_new_stream(s, 0); | |
215 if (!st) | |
216 return AVERROR_NOMEM; | |
217 | |
218 st->codec.codec_type = CODEC_TYPE_VIDEO; | |
219 st->codec.codec_id = s->iformat->value; | |
306 | 220 st->need_parsing = 1; |
221 | |
0 | 222 /* for mjpeg, specify frame rate */ |
223 /* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/ | |
306 | 224 if (st->codec.codec_id == CODEC_ID_MJPEG || |
225 st->codec.codec_id == CODEC_ID_MPEG4) { | |
226 if (ap && ap->frame_rate) { | |
85
25062c9b1f86
per context frame_rate_base, this should finally fix frame_rate related av sync issues
michaelni
parents:
65
diff
changeset
|
227 st->codec.frame_rate = ap->frame_rate; |
25062c9b1f86
per context frame_rate_base, this should finally fix frame_rate related av sync issues
michaelni
parents:
65
diff
changeset
|
228 st->codec.frame_rate_base = ap->frame_rate_base; |
0 | 229 } else { |
85
25062c9b1f86
per context frame_rate_base, this should finally fix frame_rate related av sync issues
michaelni
parents:
65
diff
changeset
|
230 st->codec.frame_rate = 25; |
25062c9b1f86
per context frame_rate_base, this should finally fix frame_rate related av sync issues
michaelni
parents:
65
diff
changeset
|
231 st->codec.frame_rate_base = 1; |
0 | 232 } |
233 } | |
234 return 0; | |
235 } | |
236 | |
237 #define SEQ_START_CODE 0x000001b3 | |
238 #define GOP_START_CODE 0x000001b8 | |
239 #define PICTURE_START_CODE 0x00000100 | |
240 | |
241 /* XXX: improve that by looking at several start codes */ | |
242 static int mpegvideo_probe(AVProbeData *p) | |
243 { | |
49 | 244 int code; |
245 const uint8_t *d; | |
0 | 246 |
247 /* we search the first start code. If it is a sequence, gop or | |
248 picture start code then we decide it is an mpeg video | |
249 stream. We do not send highest value to give a chance to mpegts */ | |
49 | 250 /* NOTE: the search range was restricted to avoid too many false |
251 detections */ | |
252 | |
253 if (p->buf_size < 6) | |
254 return 0; | |
255 d = p->buf; | |
256 code = (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | (d[3]); | |
257 if ((code & 0xffffff00) == 0x100) { | |
258 if (code == SEQ_START_CODE || | |
259 code == GOP_START_CODE || | |
260 code == PICTURE_START_CODE) | |
261 return 50 - 1; | |
262 else | |
263 return 0; | |
0 | 264 } |
265 return 0; | |
266 } | |
267 | |
135
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
268 static int h263_probe(AVProbeData *p) |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
269 { |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
270 int code; |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
271 const uint8_t *d; |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
272 |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
273 if (p->buf_size < 6) |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
274 return 0; |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
275 d = p->buf; |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
276 code = (d[0] << 14) | (d[1] << 6) | (d[2] >> 2); |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
277 if (code == 0x20) { |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
278 return 50; |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
279 } |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
280 return 0; |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
281 } |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
282 |
473
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
283 static int h261_probe(AVProbeData *p) |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
284 { |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
285 int code; |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
286 const uint8_t *d; |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
287 |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
288 if (p->buf_size < 6) |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
289 return 0; |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
290 d = p->buf; |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
291 code = (d[0] << 12) | (d[1] << 4) | (d[2] >> 4); |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
292 if (code == 0x10) { |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
293 return 50; |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
294 } |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
295 return 0; |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
296 } |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
297 |
0 | 298 AVInputFormat ac3_iformat = { |
299 "ac3", | |
300 "raw ac3", | |
301 0, | |
302 NULL, | |
63 | 303 ac3_read_header, |
389
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
304 raw_read_partial_packet, |
0 | 305 raw_read_close, |
306 .extensions = "ac3", | |
307 }; | |
308 | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
309 #ifdef CONFIG_ENCODERS |
0 | 310 AVOutputFormat ac3_oformat = { |
311 "ac3", | |
312 "raw ac3", | |
313 "audio/x-ac3", | |
314 "ac3", | |
315 0, | |
316 CODEC_ID_AC3, | |
317 0, | |
318 raw_write_header, | |
319 raw_write_packet, | |
320 raw_write_trailer, | |
321 }; | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
322 #endif //CONFIG_ENCODERS |
0 | 323 |
496
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
324 AVInputFormat dts_iformat = { |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
325 "dts", |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
326 "raw dts", |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
327 0, |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
328 NULL, |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
329 dts_read_header, |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
330 raw_read_partial_packet, |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
331 raw_read_close, |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
332 .extensions = "dts", |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
333 }; |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
334 |
473
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
335 AVInputFormat h261_iformat = { |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
336 "h261", |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
337 "raw h261", |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
338 0, |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
339 h261_probe, |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
340 video_read_header, |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
341 raw_read_partial_packet, |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
342 raw_read_close, |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
343 .extensions = "h261", |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
344 .value = CODEC_ID_H261, |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
345 }; |
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
346 |
576
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
347 #ifdef CONFIG_ENCODERS |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
348 AVOutputFormat h261_oformat = { |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
349 "h261", |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
350 "raw h261", |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
351 "video/x-h261", |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
352 "h261", |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
353 0, |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
354 0, |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
355 CODEC_ID_H261, |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
356 raw_write_header, |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
357 raw_write_packet, |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
358 raw_write_trailer, |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
359 }; |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
360 #endif //CONFIG_ENCODERS |
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
361 |
135
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
362 AVInputFormat h263_iformat = { |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
363 "h263", |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
364 "raw h263", |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
365 0, |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
366 h263_probe, |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
367 video_read_header, |
389
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
368 raw_read_partial_packet, |
135
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
369 raw_read_close, |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
370 // .extensions = "h263", //FIXME remove after writing mpeg4_probe |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
371 .value = CODEC_ID_H263, |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
372 }; |
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
373 |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
374 #ifdef CONFIG_ENCODERS |
0 | 375 AVOutputFormat h263_oformat = { |
376 "h263", | |
377 "raw h263", | |
378 "video/x-h263", | |
379 "h263", | |
380 0, | |
381 0, | |
382 CODEC_ID_H263, | |
383 raw_write_header, | |
384 raw_write_packet, | |
385 raw_write_trailer, | |
386 }; | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
387 #endif //CONFIG_ENCODERS |
0 | 388 |
389 AVInputFormat m4v_iformat = { | |
390 "m4v", | |
391 "raw MPEG4 video format", | |
392 0, | |
393 NULL /*mpegvideo_probe*/, | |
394 video_read_header, | |
389
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
395 raw_read_partial_packet, |
0 | 396 raw_read_close, |
397 .extensions = "m4v", //FIXME remove after writing mpeg4_probe | |
398 .value = CODEC_ID_MPEG4, | |
399 }; | |
400 | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
401 #ifdef CONFIG_ENCODERS |
0 | 402 AVOutputFormat m4v_oformat = { |
403 "m4v", | |
404 "raw MPEG4 video format", | |
405 NULL, | |
406 "m4v", | |
407 0, | |
408 CODEC_ID_NONE, | |
409 CODEC_ID_MPEG4, | |
410 raw_write_header, | |
411 raw_write_packet, | |
412 raw_write_trailer, | |
413 }; | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
414 #endif //CONFIG_ENCODERS |
0 | 415 |
100 | 416 AVInputFormat h264_iformat = { |
417 "h264", | |
418 "raw H264 video format", | |
419 0, | |
420 NULL /*mpegvideo_probe*/, | |
421 video_read_header, | |
389
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
422 raw_read_partial_packet, |
100 | 423 raw_read_close, |
424 .extensions = "h26l,h264", //FIXME remove after writing mpeg4_probe | |
425 .value = CODEC_ID_H264, | |
426 }; | |
427 | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
428 #ifdef CONFIG_ENCODERS |
100 | 429 AVOutputFormat h264_oformat = { |
430 "h264", | |
431 "raw H264 video format", | |
432 NULL, | |
433 "h264", | |
434 0, | |
435 CODEC_ID_NONE, | |
436 CODEC_ID_H264, | |
437 raw_write_header, | |
438 raw_write_packet, | |
439 raw_write_trailer, | |
440 }; | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
441 #endif //CONFIG_ENCODERS |
100 | 442 |
0 | 443 AVInputFormat mpegvideo_iformat = { |
444 "mpegvideo", | |
445 "MPEG video", | |
446 0, | |
447 mpegvideo_probe, | |
448 video_read_header, | |
389
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
449 raw_read_partial_packet, |
0 | 450 raw_read_close, |
451 .value = CODEC_ID_MPEG1VIDEO, | |
452 }; | |
453 | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
454 #ifdef CONFIG_ENCODERS |
0 | 455 AVOutputFormat mpeg1video_oformat = { |
456 "mpeg1video", | |
457 "MPEG video", | |
458 "video/x-mpeg", | |
459 "mpg,mpeg", | |
460 0, | |
461 0, | |
462 CODEC_ID_MPEG1VIDEO, | |
463 raw_write_header, | |
464 raw_write_packet, | |
465 raw_write_trailer, | |
466 }; | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
467 #endif //CONFIG_ENCODERS |
0 | 468 |
469 AVInputFormat mjpeg_iformat = { | |
470 "mjpeg", | |
471 "MJPEG video", | |
472 0, | |
473 NULL, | |
474 video_read_header, | |
389
e14fcd57ad2f
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents:
306
diff
changeset
|
475 raw_read_partial_packet, |
0 | 476 raw_read_close, |
477 .extensions = "mjpg,mjpeg", | |
478 .value = CODEC_ID_MJPEG, | |
479 }; | |
480 | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
481 #ifdef CONFIG_ENCODERS |
0 | 482 AVOutputFormat mjpeg_oformat = { |
483 "mjpeg", | |
484 "MJPEG video", | |
485 "video/x-mjpeg", | |
486 "mjpg,mjpeg", | |
487 0, | |
488 0, | |
489 CODEC_ID_MJPEG, | |
490 raw_write_header, | |
491 raw_write_packet, | |
492 raw_write_trailer, | |
493 }; | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
494 #endif //CONFIG_ENCODERS |
0 | 495 |
496 /* pcm formats */ | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
497 |
306 | 498 #define PCMINPUTDEF(name, long_name, ext, codec) \ |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
499 AVInputFormat pcm_ ## name ## _iformat = {\ |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
500 #name,\ |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
501 long_name,\ |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
502 0,\ |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
503 NULL,\ |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
504 raw_read_header,\ |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
505 raw_read_packet,\ |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
506 raw_read_close,\ |
306 | 507 pcm_read_seek,\ |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
508 .extensions = ext,\ |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
509 .value = codec,\ |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
510 }; |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
511 |
306 | 512 #if !defined(CONFIG_ENCODERS) && defined(CONFIG_DECODERS) |
513 | |
514 #define PCMDEF(name, long_name, ext, codec) \ | |
515 PCMINPUTDEF(name, long_name, ext, codec) | |
516 | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
517 #else |
0 | 518 |
519 #define PCMDEF(name, long_name, ext, codec) \ | |
306 | 520 PCMINPUTDEF(name, long_name, ext, codec)\ |
0 | 521 \ |
522 AVOutputFormat pcm_ ## name ## _oformat = {\ | |
523 #name,\ | |
524 long_name,\ | |
525 NULL,\ | |
526 ext,\ | |
527 0,\ | |
528 codec,\ | |
529 0,\ | |
530 raw_write_header,\ | |
531 raw_write_packet,\ | |
532 raw_write_trailer,\ | |
533 }; | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
534 #endif //CONFIG_ENCODERS |
0 | 535 |
536 #ifdef WORDS_BIGENDIAN | |
537 #define BE_DEF(s) s | |
538 #define LE_DEF(s) NULL | |
539 #else | |
540 #define BE_DEF(s) NULL | |
541 #define LE_DEF(s) s | |
542 #endif | |
543 | |
544 | |
545 PCMDEF(s16le, "pcm signed 16 bit little endian format", | |
546 LE_DEF("sw"), CODEC_ID_PCM_S16LE) | |
547 | |
548 PCMDEF(s16be, "pcm signed 16 bit big endian format", | |
549 BE_DEF("sw"), CODEC_ID_PCM_S16BE) | |
550 | |
551 PCMDEF(u16le, "pcm unsigned 16 bit little endian format", | |
552 LE_DEF("uw"), CODEC_ID_PCM_U16LE) | |
553 | |
554 PCMDEF(u16be, "pcm unsigned 16 bit big endian format", | |
555 BE_DEF("uw"), CODEC_ID_PCM_U16BE) | |
556 | |
557 PCMDEF(s8, "pcm signed 8 bit format", | |
558 "sb", CODEC_ID_PCM_S8) | |
559 | |
560 PCMDEF(u8, "pcm unsigned 8 bit format", | |
561 "ub", CODEC_ID_PCM_U8) | |
562 | |
563 PCMDEF(mulaw, "pcm mu law format", | |
564 "ul", CODEC_ID_PCM_MULAW) | |
565 | |
566 PCMDEF(alaw, "pcm A law format", | |
567 "al", CODEC_ID_PCM_ALAW) | |
568 | |
64 | 569 static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt) |
0 | 570 { |
571 int packet_size, ret, width, height; | |
572 AVStream *st = s->streams[0]; | |
573 | |
574 width = st->codec.width; | |
575 height = st->codec.height; | |
576 | |
128 | 577 packet_size = avpicture_get_size(st->codec.pix_fmt, width, height); |
578 if (packet_size < 0) | |
537 | 579 return -1; |
0 | 580 |
581 if (av_new_packet(pkt, packet_size) < 0) | |
482 | 582 return AVERROR_IO; |
0 | 583 |
584 pkt->stream_index = 0; | |
585 #if 0 | |
586 /* bypass buffered I/O */ | |
587 ret = url_read(url_fileno(&s->pb), pkt->data, pkt->size); | |
588 #else | |
589 ret = get_buffer(&s->pb, pkt->data, pkt->size); | |
590 #endif | |
591 if (ret != pkt->size) { | |
592 av_free_packet(pkt); | |
482 | 593 return AVERROR_IO; |
0 | 594 } else { |
595 return 0; | |
596 } | |
597 } | |
598 | |
599 AVInputFormat rawvideo_iformat = { | |
600 "rawvideo", | |
601 "raw video format", | |
602 0, | |
603 NULL, | |
604 raw_read_header, | |
605 rawvideo_read_packet, | |
606 raw_read_close, | |
607 .extensions = "yuv", | |
608 .value = CODEC_ID_RAWVIDEO, | |
609 }; | |
610 | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
611 #ifdef CONFIG_ENCODERS |
0 | 612 AVOutputFormat rawvideo_oformat = { |
613 "rawvideo", | |
614 "raw video format", | |
615 NULL, | |
616 "yuv", | |
617 0, | |
618 CODEC_ID_NONE, | |
619 CODEC_ID_RAWVIDEO, | |
620 raw_write_header, | |
621 raw_write_packet, | |
622 raw_write_trailer, | |
623 }; | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
624 #endif //CONFIG_ENCODERS |
0 | 625 |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
626 #ifdef CONFIG_ENCODERS |
468 | 627 static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt) |
0 | 628 { |
629 return 0; | |
630 } | |
631 | |
632 AVOutputFormat null_oformat = { | |
633 "null", | |
634 "null video format", | |
635 NULL, | |
636 NULL, | |
637 0, | |
638 #ifdef WORDS_BIGENDIAN | |
639 CODEC_ID_PCM_S16BE, | |
640 #else | |
641 CODEC_ID_PCM_S16LE, | |
642 #endif | |
643 CODEC_ID_RAWVIDEO, | |
644 raw_write_header, | |
645 null_write_packet, | |
646 raw_write_trailer, | |
647 .flags = AVFMT_NOFILE | AVFMT_RAWPICTURE, | |
648 }; | |
277
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
649 #endif //CONFIG_ENCODERS |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
650 |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
651 #ifndef CONFIG_ENCODERS |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
652 #define av_register_output_format(format) |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
653 #endif |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
654 #ifndef CONFIG_DECODERS |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
655 #define av_register_input_format(format) |
a313e1080322
disable encoders where appropriate (patch courtesy of BERO
melanson
parents:
241
diff
changeset
|
656 #endif |
0 | 657 |
658 int raw_init(void) | |
659 { | |
660 av_register_input_format(&ac3_iformat); | |
661 av_register_output_format(&ac3_oformat); | |
662 | |
496
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
663 av_register_input_format(&dts_iformat); |
112057e05179
libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents:
483
diff
changeset
|
664 |
473
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
665 av_register_input_format(&h261_iformat); |
576
f701ba509d0c
H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
michael
parents:
567
diff
changeset
|
666 av_register_output_format(&h261_oformat); |
473
e0a66a870b7f
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
michael
parents:
468
diff
changeset
|
667 |
135
56590088f801
truncated h263 decoding support / H263-ES "demuxer"
michaelni
parents:
128
diff
changeset
|
668 av_register_input_format(&h263_iformat); |
0 | 669 av_register_output_format(&h263_oformat); |
670 | |
671 av_register_input_format(&m4v_iformat); | |
672 av_register_output_format(&m4v_oformat); | |
100 | 673 |
674 av_register_input_format(&h264_iformat); | |
675 av_register_output_format(&h264_oformat); | |
0 | 676 |
677 av_register_input_format(&mpegvideo_iformat); | |
678 av_register_output_format(&mpeg1video_oformat); | |
679 | |
680 av_register_input_format(&mjpeg_iformat); | |
681 av_register_output_format(&mjpeg_oformat); | |
682 | |
683 av_register_input_format(&pcm_s16le_iformat); | |
684 av_register_output_format(&pcm_s16le_oformat); | |
685 av_register_input_format(&pcm_s16be_iformat); | |
686 av_register_output_format(&pcm_s16be_oformat); | |
687 av_register_input_format(&pcm_u16le_iformat); | |
688 av_register_output_format(&pcm_u16le_oformat); | |
689 av_register_input_format(&pcm_u16be_iformat); | |
690 av_register_output_format(&pcm_u16be_oformat); | |
691 av_register_input_format(&pcm_s8_iformat); | |
692 av_register_output_format(&pcm_s8_oformat); | |
693 av_register_input_format(&pcm_u8_iformat); | |
694 av_register_output_format(&pcm_u8_oformat); | |
695 av_register_input_format(&pcm_mulaw_iformat); | |
696 av_register_output_format(&pcm_mulaw_oformat); | |
697 av_register_input_format(&pcm_alaw_iformat); | |
698 av_register_output_format(&pcm_alaw_oformat); | |
699 | |
700 av_register_input_format(&rawvideo_iformat); | |
701 av_register_output_format(&rawvideo_oformat); | |
702 | |
703 av_register_output_format(&null_oformat); | |
704 return 0; | |
705 } |