annotate rawdec.c @ 6449:3a28e6827095 libavformat

Solving memory leak and initialization problem with prev_pkt / pkt.
author bindhammer
date Tue, 31 Aug 2010 07:15:11 +0000
parents 4775a49a6045
children eb68008daac2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
885
da1d5db0ce5c COSMETICS: Remove all trailing whitespace.
diego
parents: 868
diff changeset
1 /*
6448
4775a49a6045 split raw.c into rawdec.c and rawenc.c
aurel
parents: 6447
diff changeset
2 * RAW demuxers
4251
77e0c7511d41 cosmetics: Remove pointless period after copyright statement non-sentences.
diego
parents: 4206
diff changeset
3 * Copyright (c) 2001 Fabrice Bellard
868
c6b1dde68f3a Ingenient MJPEG support, more at http://www.artificis.hu/files/texts/ingenient.txt
alex
parents: 858
diff changeset
4 * Copyright (c) 2005 Alex Beregszaszi
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
5 *
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1245
diff changeset
6 * This file is part of FFmpeg.
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1245
diff changeset
7 *
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1245
diff changeset
8 * FFmpeg is free software; you can redistribute it and/or
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
9 * modify it under the terms of the GNU Lesser General Public
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
10 * License as published by the Free Software Foundation; either
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1245
diff changeset
11 * version 2.1 of the License, or (at your option) any later version.
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
12 *
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1245
diff changeset
13 * FFmpeg is distributed in the hope that it will be useful,
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
16 * Lesser General Public License for more details.
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
17 *
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1245
diff changeset
19 * License along with FFmpeg; if not, write to the Free Software
896
edbe5c3717f9 Update licensing information: The FSF changed postal address.
diego
parents: 887
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
21 */
3286
6f61c3b36632 Use full path for #includes from another directory.
diego
parents: 3274
diff changeset
22
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
23 #include "avformat.h"
6448
4775a49a6045 split raw.c into rawdec.c and rawenc.c
aurel
parents: 6447
diff changeset
24 #include "rawdec.h"
1078
0bc9422cc0ad Raw flac muxer, patch by Justin Ruggles (jruggle earthlink net). Can be
banan
parents: 1070
diff changeset
25
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
26 /* raw input */
6445
4aaed59641ff move pcm demuxers to their own file
aurel
parents: 6443
diff changeset
27 int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
28 {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
29 AVStream *st;
5360
a00cc1aac80d Use enum instead of integer types where appropriate.
cehoyos
parents: 5263
diff changeset
30 enum CodecID id;
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
31
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
32 st = av_new_stream(s, 0);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
33 if (!st)
2273
7eb456c4ed8a Replace all occurrences of AVERROR_NOMEM with AVERROR(ENOMEM).
takis
parents: 2231
diff changeset
34 return AVERROR(ENOMEM);
1003
2d57ce58f576 simplify AVFormatParameters NULL checks
michael
parents: 985
diff changeset
35
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
36 id = s->iformat->value;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
37 if (id == CODEC_ID_RAWVIDEO) {
5910
536e5527c1e0 Define AVMediaType enum, and use it instead of enum CodecType, which
stefano
parents: 5657
diff changeset
38 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
39 } else {
5910
536e5527c1e0 Define AVMediaType enum, and use it instead of enum CodecType, which
stefano
parents: 5657
diff changeset
40 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
41 }
820
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
42 st->codec->codec_id = id;
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
43
820
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
44 switch(st->codec->codec_type) {
5910
536e5527c1e0 Define AVMediaType enum, and use it instead of enum CodecType, which
stefano
parents: 5657
diff changeset
45 case AVMEDIA_TYPE_AUDIO:
820
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
46 st->codec->sample_rate = ap->sample_rate;
3995
fcff303d5c8c Assume mono if no other information for raw.
michael
parents: 3973
diff changeset
47 if(ap->channels) st->codec->channels = ap->channels;
fcff303d5c8c Assume mono if no other information for raw.
michael
parents: 3973
diff changeset
48 else st->codec->channels = 1;
4857
18acfe3fe3d5 fix 6 channels raw pcm demuxing, raw pcm now demux a fixed number of samples
bcoudurier
parents: 4751
diff changeset
49 st->codec->bits_per_coded_sample = av_get_bits_per_sample(st->codec->codec_id);
18acfe3fe3d5 fix 6 channels raw pcm demuxing, raw pcm now demux a fixed number of samples
bcoudurier
parents: 4751
diff changeset
50 assert(st->codec->bits_per_coded_sample > 0);
18acfe3fe3d5 fix 6 channels raw pcm demuxing, raw pcm now demux a fixed number of samples
bcoudurier
parents: 4751
diff changeset
51 st->codec->block_align = st->codec->bits_per_coded_sample*st->codec->channels/8;
820
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
52 av_set_pts_info(st, 64, 1, st->codec->sample_rate);
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
53 break;
5910
536e5527c1e0 Define AVMediaType enum, and use it instead of enum CodecType, which
stefano
parents: 5657
diff changeset
54 case AVMEDIA_TYPE_VIDEO:
2860
cf6976fdd05f Do not force fps unless the user actually specified one.
michael
parents: 2771
diff changeset
55 if(ap->time_base.num)
cf6976fdd05f Do not force fps unless the user actually specified one.
michael
parents: 2771
diff changeset
56 av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
cf6976fdd05f Do not force fps unless the user actually specified one.
michael
parents: 2771
diff changeset
57 else
cf6976fdd05f Do not force fps unless the user actually specified one.
michael
parents: 2771
diff changeset
58 av_set_pts_info(st, 64, 1, 25);
820
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
59 st->codec->width = ap->width;
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
60 st->codec->height = ap->height;
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
61 st->codec->pix_fmt = ap->pix_fmt;
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
62 if(st->codec->pix_fmt == PIX_FMT_NONE)
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
63 st->codec->pix_fmt= PIX_FMT_YUV420P;
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
64 break;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
65 default:
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
66 return -1;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
67 }
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
68 return 0;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
69 }
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
70
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
71 #define RAW_PACKET_SIZE 1024
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
72
4610
41542d2edcf4 Separate the raw FLAC demuxer from raw.c and put in a new file,
jbr
parents: 4577
diff changeset
73 int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt)
389
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
74 {
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
75 int ret, size;
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
76
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
77 size = RAW_PACKET_SIZE;
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
78
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
79 if (av_new_packet(pkt, size) < 0)
5245
30c093f11b4e av_new_packet failing should return ENOMEM, not EIO.
reimar
parents: 5238
diff changeset
80 return AVERROR(ENOMEM);
885
da1d5db0ce5c COSMETICS: Remove all trailing whitespace.
diego
parents: 868
diff changeset
81
2771
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2545
diff changeset
82 pkt->pos= url_ftell(s->pb);
389
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
83 pkt->stream_index = 0;
2771
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2545
diff changeset
84 ret = get_partial_buffer(s->pb, pkt->data, size);
5254
83cc2a571542 Return any error return values from av_get_packet, get_buffer etc. unchanged
reimar
parents: 5249
diff changeset
85 if (ret < 0) {
389
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
86 av_free_packet(pkt);
5254
83cc2a571542 Return any error return values from av_get_packet, get_buffer etc. unchanged
reimar
parents: 5249
diff changeset
87 return ret;
389
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
88 }
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
89 pkt->size = ret;
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
90 return ret;
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
91 }
e14fcd57ad2f decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
michael
parents: 306
diff changeset
92
6429
3e32902d7025 move DTS demuxer to its own file
aurel
parents: 6428
diff changeset
93 int ff_raw_audio_read_header(AVFormatContext *s,
3268
319c36da904b set demuxers .value and use common audio_read_header function
bcoudurier
parents: 3238
diff changeset
94 AVFormatParameters *ap)
63
8329ba7cbd01 raw ac3 auto detects parameters
bellard
parents: 49
diff changeset
95 {
3268
319c36da904b set demuxers .value and use common audio_read_header function
bcoudurier
parents: 3238
diff changeset
96 AVStream *st = av_new_stream(s, 0);
686
e2687b784c3a shorten decoder by (Jeff Muizelaar <jrmuizel gmail com>)
michael
parents: 637
diff changeset
97 if (!st)
2273
7eb456c4ed8a Replace all occurrences of AVERROR_NOMEM with AVERROR(ENOMEM).
takis
parents: 2231
diff changeset
98 return AVERROR(ENOMEM);
5910
536e5527c1e0 Define AVMediaType enum, and use it instead of enum CodecType, which
stefano
parents: 5657
diff changeset
99 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
3268
319c36da904b set demuxers .value and use common audio_read_header function
bcoudurier
parents: 3238
diff changeset
100 st->codec->codec_id = s->iformat->value;
2023
a3e79d6e4e3c add an enum for need_parsing
aurel
parents: 2022
diff changeset
101 st->need_parsing = AVSTREAM_PARSE_FULL;
931
7420a756dc7a read/write adts aac
mru
parents: 930
diff changeset
102 /* the parameters will be extracted from the compressed bitstream */
4285
d8803d0a4274 Handle ID3v2 tags in raw FLAC streams by skipping them.
jbr
parents: 4254
diff changeset
103
931
7420a756dc7a read/write adts aac
mru
parents: 930
diff changeset
104 return 0;
7420a756dc7a read/write adts aac
mru
parents: 930
diff changeset
105 }
7420a756dc7a read/write adts aac
mru
parents: 930
diff changeset
106
3725
900a232fc55e cosmetics: misc spelling fixes
diego
parents: 3613
diff changeset
107 /* MPEG-1/H.263 input */
6430
d3a51b32b769 move ingenient demuxer to its own file
aurel
parents: 6429
diff changeset
108 int ff_raw_video_read_header(AVFormatContext *s,
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
109 AVFormatParameters *ap)
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
110 {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
111 AVStream *st;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
112
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
113 st = av_new_stream(s, 0);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
114 if (!st)
2273
7eb456c4ed8a Replace all occurrences of AVERROR_NOMEM with AVERROR(ENOMEM).
takis
parents: 2231
diff changeset
115 return AVERROR(ENOMEM);
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
116
5910
536e5527c1e0 Define AVMediaType enum, and use it instead of enum CodecType, which
stefano
parents: 5657
diff changeset
117 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
820
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
118 st->codec->codec_id = s->iformat->value;
2023
a3e79d6e4e3c add an enum for need_parsing
aurel
parents: 2022
diff changeset
119 st->need_parsing = AVSTREAM_PARSE_FULL;
306
e7a8d4dd8e14 seek support for PCM formats
bellard
parents: 277
diff changeset
120
3725
900a232fc55e cosmetics: misc spelling fixes
diego
parents: 3613
diff changeset
121 /* for MJPEG, specify frame rate */
900a232fc55e cosmetics: misc spelling fixes
diego
parents: 3613
diff changeset
122 /* for MPEG-4 specify it, too (most MPEG-4 streams do not have the fixed_vop_rate set ...)*/
1003
2d57ce58f576 simplify AVFormatParameters NULL checks
michael
parents: 985
diff changeset
123 if (ap->time_base.num) {
4620
290808c90f82 Change the timebase of the raw demuxer to one that can represent the ts of fields.
michael
parents: 4610
diff changeset
124 st->codec->time_base= ap->time_base;
885
da1d5db0ce5c COSMETICS: Remove all trailing whitespace.
diego
parents: 868
diff changeset
125 } else if ( st->codec->codec_id == CODEC_ID_MJPEG ||
820
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
126 st->codec->codec_id == CODEC_ID_MPEG4 ||
3272
07038dc492ab Import Dirac demuxer/muxer from SoC branch; written by Marco Gerards,
lu_zero
parents: 3269
diff changeset
127 st->codec->codec_id == CODEC_ID_DIRAC ||
5451
c0f40f4293cd Add CODEC_ID_DNXHD into the 25 fps case.
michael
parents: 5425
diff changeset
128 st->codec->codec_id == CODEC_ID_DNXHD ||
6120
a2a55244ca6b Fix raw vc1 decoding - this is supposed to break FATE.
cehoyos
parents: 5910
diff changeset
129 st->codec->codec_id == CODEC_ID_VC1 ||
820
feca73904e67 changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
michael
parents: 814
diff changeset
130 st->codec->codec_id == CODEC_ID_H264) {
4620
290808c90f82 Change the timebase of the raw demuxer to one that can represent the ts of fields.
michael
parents: 4610
diff changeset
131 st->codec->time_base= (AVRational){1,25};
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
132 }
4620
290808c90f82 Change the timebase of the raw demuxer to one that can represent the ts of fields.
michael
parents: 4610
diff changeset
133 av_set_pts_info(st, 64, 1, 1200000);
745
a03f1f7497ad always honor the user specified frame rate if set
michael
parents: 743
diff changeset
134
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
135 return 0;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
136 }
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
137
3545
2949f7da8931 Add a note to remind people to add new raw formats to the Makefile.
diego
parents: 3543
diff changeset
138 /* Note: Do not forget to add new entries to the Makefile as well. */
2949f7da8931 Add a note to remind people to add new raw formats to the Makefile.
diego
parents: 3543
diff changeset
139
4206
c3102b189cb6 Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 4103
diff changeset
140 #if CONFIG_GSM_DEMUXER
3269
55d4f01c9728 raw GSM demuxer (does not work yet as parser is missing)
michael
parents: 3268
diff changeset
141 AVInputFormat gsm_demuxer = {
55d4f01c9728 raw GSM demuxer (does not work yet as parser is missing)
michael
parents: 3268
diff changeset
142 "gsm",
4501
3e5b9c1a413e Make format long_names consistent.
diego
parents: 4293
diff changeset
143 NULL_IF_CONFIG_SMALL("raw GSM"),
3269
55d4f01c9728 raw GSM demuxer (does not work yet as parser is missing)
michael
parents: 3268
diff changeset
144 0,
55d4f01c9728 raw GSM demuxer (does not work yet as parser is missing)
michael
parents: 3268
diff changeset
145 NULL,
6429
3e32902d7025 move DTS demuxer to its own file
aurel
parents: 6428
diff changeset
146 ff_raw_audio_read_header,
4610
41542d2edcf4 Separate the raw FLAC demuxer from raw.c and put in a new file,
jbr
parents: 4577
diff changeset
147 ff_raw_read_partial_packet,
3269
55d4f01c9728 raw GSM demuxer (does not work yet as parser is missing)
michael
parents: 3268
diff changeset
148 .flags= AVFMT_GENERIC_INDEX,
55d4f01c9728 raw GSM demuxer (does not work yet as parser is missing)
michael
parents: 3268
diff changeset
149 .extensions = "gsm",
55d4f01c9728 raw GSM demuxer (does not work yet as parser is missing)
michael
parents: 3268
diff changeset
150 .value = CODEC_ID_GSM,
55d4f01c9728 raw GSM demuxer (does not work yet as parser is missing)
michael
parents: 3268
diff changeset
151 };
3729
ed875181c3fa Surround AVInputFormat declarations with format-specific #ifdefs.
diego
parents: 3728
diff changeset
152 #endif
3269
55d4f01c9728 raw GSM demuxer (does not work yet as parser is missing)
michael
parents: 3268
diff changeset
153
4206
c3102b189cb6 Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 4103
diff changeset
154 #if CONFIG_MJPEG_DEMUXER
3546
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
155 AVInputFormat mjpeg_demuxer = {
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
156 "mjpeg",
4501
3e5b9c1a413e Make format long_names consistent.
diego
parents: 4293
diff changeset
157 NULL_IF_CONFIG_SMALL("raw MJPEG video"),
100
fa3ebf0d0270 H264 decoder & demuxer
michaelni
parents: 85
diff changeset
158 0,
3546
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
159 NULL,
6430
d3a51b32b769 move ingenient demuxer to its own file
aurel
parents: 6429
diff changeset
160 ff_raw_video_read_header,
4610
41542d2edcf4 Separate the raw FLAC demuxer from raw.c and put in a new file,
jbr
parents: 4577
diff changeset
161 ff_raw_read_partial_packet,
1756
5d72afc6c8aa better generic index building and seeking code
michael
parents: 1463
diff changeset
162 .flags= AVFMT_GENERIC_INDEX,
3546
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
163 .extensions = "mjpg,mjpeg",
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
164 .value = CODEC_ID_MJPEG,
100
fa3ebf0d0270 H264 decoder & demuxer
michaelni
parents: 85
diff changeset
165 };
3729
ed875181c3fa Surround AVInputFormat declarations with format-specific #ifdefs.
diego
parents: 3728
diff changeset
166 #endif
100
fa3ebf0d0270 H264 decoder & demuxer
michaelni
parents: 85
diff changeset
167
4206
c3102b189cb6 Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 4103
diff changeset
168 #if CONFIG_MLP_DEMUXER
3546
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
169 AVInputFormat mlp_demuxer = {
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
170 "mlp",
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
171 NULL_IF_CONFIG_SMALL("raw MLP"),
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
172 0,
3546
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
173 NULL,
6429
3e32902d7025 move DTS demuxer to its own file
aurel
parents: 6428
diff changeset
174 ff_raw_audio_read_header,
4610
41542d2edcf4 Separate the raw FLAC demuxer from raw.c and put in a new file,
jbr
parents: 4577
diff changeset
175 ff_raw_read_partial_packet,
1756
5d72afc6c8aa better generic index building and seeking code
michael
parents: 1463
diff changeset
176 .flags= AVFMT_GENERIC_INDEX,
3546
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
177 .extensions = "mlp",
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
178 .value = CODEC_ID_MLP,
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
179 };
3729
ed875181c3fa Surround AVInputFormat declarations with format-specific #ifdefs.
diego
parents: 3728
diff changeset
180 #endif
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
181
4751
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
182 #if CONFIG_TRUEHD_DEMUXER
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
183 AVInputFormat truehd_demuxer = {
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
184 "truehd",
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
185 NULL_IF_CONFIG_SMALL("raw TrueHD"),
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
186 0,
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
187 NULL,
6429
3e32902d7025 move DTS demuxer to its own file
aurel
parents: 6428
diff changeset
188 ff_raw_audio_read_header,
4751
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
189 ff_raw_read_partial_packet,
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
190 .flags= AVFMT_GENERIC_INDEX,
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
191 .extensions = "thd",
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
192 .value = CODEC_ID_TRUEHD,
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
193 };
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
194 #endif
ffb7e8093289 Support raw TrueHD files
ramiro
parents: 4710
diff changeset
195
4206
c3102b189cb6 Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 4103
diff changeset
196 #if CONFIG_SHORTEN_DEMUXER
3546
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
197 AVInputFormat shorten_demuxer = {
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
198 "shn",
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
199 NULL_IF_CONFIG_SMALL("raw Shorten"),
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
200 0,
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
201 NULL,
6429
3e32902d7025 move DTS demuxer to its own file
aurel
parents: 6428
diff changeset
202 ff_raw_audio_read_header,
4610
41542d2edcf4 Separate the raw FLAC demuxer from raw.c and put in a new file,
jbr
parents: 4577
diff changeset
203 ff_raw_read_partial_packet,
3546
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
204 .flags= AVFMT_GENERIC_INDEX,
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
205 .extensions = "shn",
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
206 .value = CODEC_ID_SHORTEN,
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
207 };
3729
ed875181c3fa Surround AVInputFormat declarations with format-specific #ifdefs.
diego
parents: 3728
diff changeset
208 #endif
3546
45c3d2b2b2fb Alphabetically order AVInputFormat/AVOutputFormat declarations.
diego
parents: 3545
diff changeset
209
4206
c3102b189cb6 Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 4103
diff changeset
210 #if CONFIG_VC1_DEMUXER
1773
4b8313d5b23b Raw VC-1 demuxer
kostya
parents: 1768
diff changeset
211 AVInputFormat vc1_demuxer = {
4b8313d5b23b Raw VC-1 demuxer
kostya
parents: 1768
diff changeset
212 "vc1",
3424
7a0230981402 Make long_names in lavf/lavdev optional depending on CONFIG_SMALL.
diego
parents: 3405
diff changeset
213 NULL_IF_CONFIG_SMALL("raw VC-1"),
1773
4b8313d5b23b Raw VC-1 demuxer
kostya
parents: 1768
diff changeset
214 0,
4b8313d5b23b Raw VC-1 demuxer
kostya
parents: 1768
diff changeset
215 NULL /* vc1_probe */,
6430
d3a51b32b769 move ingenient demuxer to its own file
aurel
parents: 6429
diff changeset
216 ff_raw_video_read_header,
4610
41542d2edcf4 Separate the raw FLAC demuxer from raw.c and put in a new file,
jbr
parents: 4577
diff changeset
217 ff_raw_read_partial_packet,
1773
4b8313d5b23b Raw VC-1 demuxer
kostya
parents: 1768
diff changeset
218 .extensions = "vc1",
4b8313d5b23b Raw VC-1 demuxer
kostya
parents: 1768
diff changeset
219 .value = CODEC_ID_VC1,
4b8313d5b23b Raw VC-1 demuxer
kostya
parents: 1768
diff changeset
220 };
3729
ed875181c3fa Surround AVInputFormat declarations with format-specific #ifdefs.
diego
parents: 3728
diff changeset
221 #endif