Libav
electronicarts.c
Go to the documentation of this file.
1 /* Electronic Arts Multimedia File Demuxer
2  * Copyright (c) 2004 The ffmpeg Project
3  * Copyright (c) 2006-2008 Peter Ross
4  *
5  * This file is part of Libav.
6  *
7  * Libav is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * Libav is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with Libav; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
28 #include <inttypes.h>
29 
30 #include "libavutil/intreadwrite.h"
31 #include "avformat.h"
32 #include "internal.h"
33 
34 #define SCHl_TAG MKTAG('S', 'C', 'H', 'l')
35 #define SEAD_TAG MKTAG('S', 'E', 'A', 'D') /* Sxxx header */
36 #define SNDC_TAG MKTAG('S', 'N', 'D', 'C') /* Sxxx data */
37 #define SEND_TAG MKTAG('S', 'E', 'N', 'D') /* Sxxx end */
38 #define SHEN_TAG MKTAG('S', 'H', 'E', 'N') /* SxEN header */
39 #define SDEN_TAG MKTAG('S', 'D', 'E', 'N') /* SxEN data */
40 #define SEEN_TAG MKTAG('S', 'E', 'E', 'N') /* SxEN end */
41 #define ISNh_TAG MKTAG('1', 'S', 'N', 'h') /* 1SNx header */
42 #define EACS_TAG MKTAG('E', 'A', 'C', 'S')
43 #define ISNd_TAG MKTAG('1', 'S', 'N', 'd') /* 1SNx data */
44 #define ISNe_TAG MKTAG('1', 'S', 'N', 'e') /* 1SNx end */
45 #define PT00_TAG MKTAG('P', 'T', 0x0, 0x0)
46 #define GSTR_TAG MKTAG('G', 'S', 'T', 'R')
47 #define SCDl_TAG MKTAG('S', 'C', 'D', 'l')
48 #define SCEl_TAG MKTAG('S', 'C', 'E', 'l')
49 #define kVGT_TAG MKTAG('k', 'V', 'G', 'T') /* TGV I-frame */
50 #define fVGT_TAG MKTAG('f', 'V', 'G', 'T') /* TGV P-frame */
51 #define mTCD_TAG MKTAG('m', 'T', 'C', 'D') /* MDEC */
52 #define MADk_TAG MKTAG('M', 'A', 'D', 'k') /* MAD I-frame */
53 #define MADm_TAG MKTAG('M', 'A', 'D', 'm') /* MAD P-frame */
54 #define MADe_TAG MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */
55 #define MPCh_TAG MKTAG('M', 'P', 'C', 'h') /* MPEG-2 */
56 #define TGQs_TAG MKTAG('T', 'G', 'Q', 's') /* TGQ I-frame (appears in .TGQ files) */
57 #define pQGT_TAG MKTAG('p', 'Q', 'G', 'T') /* TGQ I-frame (appears in .UV files) */
58 #define pIQT_TAG MKTAG('p', 'I', 'Q', 'T') /* TQI/UV2 I-frame (.UV2/.WVE) */
59 #define MVhd_TAG MKTAG('M', 'V', 'h', 'd')
60 #define MV0K_TAG MKTAG('M', 'V', '0', 'K')
61 #define MV0F_TAG MKTAG('M', 'V', '0', 'F')
62 #define MVIh_TAG MKTAG('M', 'V', 'I', 'h') /* CMV header */
63 #define MVIf_TAG MKTAG('M', 'V', 'I', 'f') /* CMV I-frame */
64 
65 typedef struct EaDemuxContext {
67 
70  int width, height;
72 
75 
76  int bytes;
81 
82 static uint32_t read_arbitrary(AVIOContext *pb)
83 {
84  uint8_t size, byte;
85  int i;
86  uint32_t word;
87 
88  size = avio_r8(pb);
89 
90  word = 0;
91  for (i = 0; i < size; i++) {
92  byte = avio_r8(pb);
93  word <<= 8;
94  word |= byte;
95  }
96 
97  return word;
98 }
99 
101 {
102  EaDemuxContext *ea = s->priv_data;
103  AVIOContext *pb = s->pb;
104  int in_header = 1;
105  int compression_type = -1, revision = -1, revision2 = -1;
106 
107  ea->bytes = 2;
108  ea->sample_rate = -1;
109  ea->num_channels = 1;
110 
111  while (!pb->eof_reached && in_header) {
112  int in_subheader;
113  uint8_t byte;
114  byte = avio_r8(pb);
115 
116  switch (byte) {
117  case 0xFD:
118  av_log(s, AV_LOG_DEBUG, "entered audio subheader\n");
119  in_subheader = 1;
120  while (!pb->eof_reached && in_subheader) {
121  uint8_t subbyte;
122  subbyte = avio_r8(pb);
123 
124  switch (subbyte) {
125  case 0x80:
126  revision = read_arbitrary(pb);
127  av_log(s, AV_LOG_DEBUG,
128  "revision (element 0x80) set to 0x%08x\n", revision);
129  break;
130  case 0x82:
131  ea->num_channels = read_arbitrary(pb);
132  av_log(s, AV_LOG_DEBUG,
133  "num_channels (element 0x82) set to 0x%08x\n",
134  ea->num_channels);
135  break;
136  case 0x83:
137  compression_type = read_arbitrary(pb);
138  av_log(s, AV_LOG_DEBUG,
139  "compression_type (element 0x83) set to 0x%08x\n",
140  compression_type);
141  break;
142  case 0x84:
143  ea->sample_rate = read_arbitrary(pb);
144  av_log(s, AV_LOG_DEBUG,
145  "sample_rate (element 0x84) set to %i\n",
146  ea->sample_rate);
147  break;
148  case 0x85:
149  ea->num_samples = read_arbitrary(pb);
150  av_log(s, AV_LOG_DEBUG,
151  "num_samples (element 0x85) set to 0x%08x\n",
152  ea->num_samples);
153  break;
154  case 0x8A:
155  av_log(s, AV_LOG_DEBUG,
156  "element 0x%02x set to 0x%08"PRIx32"\n",
157  subbyte, read_arbitrary(pb));
158  av_log(s, AV_LOG_DEBUG, "exited audio subheader\n");
159  in_subheader = 0;
160  break;
161  case 0xA0:
162  revision2 = read_arbitrary(pb);
163  av_log(s, AV_LOG_DEBUG,
164  "revision2 (element 0xA0) set to 0x%08x\n",
165  revision2);
166  break;
167  case 0xFF:
168  av_log(s, AV_LOG_DEBUG,
169  "end of header block reached (within audio subheader)\n");
170  in_subheader = 0;
171  in_header = 0;
172  break;
173  default:
174  av_log(s, AV_LOG_DEBUG,
175  "element 0x%02x set to 0x%08"PRIx32"\n",
176  subbyte, read_arbitrary(pb));
177  break;
178  }
179  }
180  break;
181  case 0xFF:
182  av_log(s, AV_LOG_DEBUG, "end of header block reached\n");
183  in_header = 0;
184  break;
185  default:
186  av_log(s, AV_LOG_DEBUG,
187  "header element 0x%02x set to 0x%08"PRIx32"\n",
188  byte, read_arbitrary(pb));
189  break;
190  }
191  }
192 
193  switch (compression_type) {
194  case 0:
196  break;
197  case 7:
199  break;
200  case -1:
201  switch (revision) {
202  case 1:
204  break;
205  case 2:
207  break;
208  case 3:
210  break;
211  case -1:
212  break;
213  default:
214  av_log(s, AV_LOG_ERROR,
215  "unsupported stream type; revision=%i\n", revision);
216  return 0;
217  }
218  switch (revision2) {
219  case 8:
221  break;
222  case 10:
224  break;
225  case 16:
227  break;
228  case -1:
229  break;
230  default:
232  av_log(s, AV_LOG_ERROR,
233  "unsupported stream type; revision2=%i\n", revision2);
234  return 0;
235  }
236  break;
237  default:
238  av_log(s, AV_LOG_ERROR,
239  "unsupported stream type; compression_type=%i\n",
240  compression_type);
241  return 0;
242  }
243 
244  if (ea->sample_rate == -1)
245  ea->sample_rate = revision == 3 ? 48000 : 22050;
246 
247  return 1;
248 }
249 
251 {
252  EaDemuxContext *ea = s->priv_data;
253  AVIOContext *pb = s->pb;
254  int compression_type;
255 
256  ea->sample_rate = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
257  ea->bytes = avio_r8(pb); /* 1=8-bit, 2=16-bit */
258  ea->num_channels = avio_r8(pb);
259  compression_type = avio_r8(pb);
260  avio_skip(pb, 13);
261 
262  switch (compression_type) {
263  case 0:
264  switch (ea->bytes) {
265  case 1:
267  break;
268  case 2:
270  break;
271  }
272  break;
273  case 1:
275  ea->bytes = 1;
276  break;
277  case 2:
279  break;
280  default:
281  av_log(s, AV_LOG_ERROR,
282  "unsupported stream type; audio compression_type=%i\n",
283  compression_type);
284  }
285 }
286 
288 {
289  EaDemuxContext *ea = s->priv_data;
290  AVIOContext *pb = s->pb;
291 
292  ea->sample_rate = avio_rl32(pb);
293  ea->bytes = avio_rl32(pb); /* 1=8-bit, 2=16-bit */
294  ea->num_channels = avio_rl32(pb);
296 }
297 
299 {
300  EaDemuxContext *ea = s->priv_data;
301  AVIOContext *pb = s->pb;
302  avio_skip(pb, 4);
303  ea->width = avio_rl16(pb);
304  ea->height = avio_rl16(pb);
305  ea->time_base = (AVRational) { 1, 15 };
307 }
308 
310 {
311  EaDemuxContext *ea = s->priv_data;
312  AVIOContext *pb = s->pb;
313 
314  avio_skip(pb, 16);
315  ea->time_base.den = avio_rl32(pb);
316  ea->time_base.num = avio_rl32(pb);
318 }
319 
321 {
322  EaDemuxContext *ea = s->priv_data;
323  int fps;
324 
325  avio_skip(s->pb, 10);
326  fps = avio_rl16(s->pb);
327  if (fps)
328  ea->time_base = (AVRational) { 1, fps };
330 }
331 
332 /* Process EA file header.
333  * Return 1 if the EA file is valid and successfully opened, 0 otherwise. */
335 {
336  uint32_t blockid, size = 0;
337  EaDemuxContext *ea = s->priv_data;
338  AVIOContext *pb = s->pb;
339  int i;
340 
341  for (i = 0; i < 5 && (!ea->audio_codec || !ea->video_codec); i++) {
342  unsigned int startpos = avio_tell(pb);
343  int err = 0;
344 
345  blockid = avio_rl32(pb);
346  size = avio_rl32(pb);
347  if (i == 0)
348  ea->big_endian = size > 0x000FFFFF;
349  if (ea->big_endian)
350  size = av_bswap32(size);
351 
352  switch (blockid) {
353  case ISNh_TAG:
354  if (avio_rl32(pb) != EACS_TAG) {
355  av_log(s, AV_LOG_ERROR, "unknown 1SNh headerid\n");
356  return 0;
357  }
359  break;
360 
361  case SCHl_TAG:
362  case SHEN_TAG:
363  blockid = avio_rl32(pb);
364  if (blockid == GSTR_TAG) {
365  avio_skip(pb, 4);
366  } else if ((blockid & 0xFFFF) != PT00_TAG) {
367  av_log(s, AV_LOG_ERROR, "unknown SCHl headerid\n");
368  return 0;
369  }
371  break;
372 
373  case SEAD_TAG:
375  break;
376 
377  case MVIh_TAG:
379  break;
380 
381  case kVGT_TAG:
383  ea->time_base = (AVRational) { 1, 15 };
384  break;
385 
386  case mTCD_TAG:
388  break;
389 
390  case MPCh_TAG:
392  break;
393 
394  case pQGT_TAG:
395  case TGQs_TAG:
397  break;
398 
399  case pIQT_TAG:
401  break;
402 
403  case MADk_TAG:
405  break;
406 
407  case MVhd_TAG:
409  break;
410  }
411 
412  if (err < 0) {
413  av_log(s, AV_LOG_ERROR, "error parsing header: %i\n", err);
414  return err;
415  }
416 
417  avio_seek(pb, startpos + size, SEEK_SET);
418  }
419 
420  avio_seek(pb, 0, SEEK_SET);
421 
422  return 1;
423 }
424 
425 static int ea_probe(AVProbeData *p)
426 {
427  switch (AV_RL32(&p->buf[0])) {
428  case ISNh_TAG:
429  case SCHl_TAG:
430  case SEAD_TAG:
431  case SHEN_TAG:
432  case kVGT_TAG:
433  case MADk_TAG:
434  case MPCh_TAG:
435  case MVhd_TAG:
436  case MVIh_TAG:
437  break;
438  default:
439  return 0;
440  }
441  if (AV_RL32(&p->buf[4]) > 0xfffff && AV_RB32(&p->buf[4]) > 0xfffff)
442  return 0;
443 
444  return AVPROBE_SCORE_MAX;
445 }
446 
448 {
449  EaDemuxContext *ea = s->priv_data;
450  AVStream *st;
451 
452  if (!process_ea_header(s))
453  return AVERROR(EIO);
454 
455  if (ea->video_codec) {
456  /* initialize the video decoder stream */
457  st = avformat_new_stream(s, NULL);
458  if (!st)
459  return AVERROR(ENOMEM);
460  ea->video_stream_index = st->index;
462  st->codec->codec_id = ea->video_codec;
463  st->codec->codec_tag = 0; /* no fourcc */
464  st->codec->width = ea->width;
465  st->codec->height = ea->height;
466  avpriv_set_pts_info(st, 33, ea->time_base.num, ea->time_base.den);
467  st->avg_frame_rate = (AVRational) { ea->time_base.den,
468  ea->time_base.num };
469  }
470 
471  if (ea->audio_codec) {
472  if (ea->num_channels <= 0 || ea->num_channels > 2) {
474  "Unsupported number of channels: %d\n", ea->num_channels);
475  ea->audio_codec = 0;
476  return 1;
477  }
478  if (ea->sample_rate <= 0) {
479  av_log(s, AV_LOG_ERROR,
480  "Unsupported sample rate: %d\n", ea->sample_rate);
481  ea->audio_codec = 0;
482  return 1;
483  }
484  if (ea->bytes <= 0) {
485  av_log(s, AV_LOG_ERROR,
486  "Invalid number of bytes per sample: %d\n", ea->bytes);
488  return 1;
489  }
490 
491  /* initialize the audio decoder stream */
492  st = avformat_new_stream(s, NULL);
493  if (!st)
494  return AVERROR(ENOMEM);
495  avpriv_set_pts_info(st, 33, 1, ea->sample_rate);
497  st->codec->codec_id = ea->audio_codec;
498  st->codec->codec_tag = 0; /* no tag */
499  st->codec->channels = ea->num_channels;
500  st->codec->sample_rate = ea->sample_rate;
501  st->codec->bits_per_coded_sample = ea->bytes * 8;
502  st->codec->bit_rate = st->codec->channels *
503  st->codec->sample_rate *
504  st->codec->bits_per_coded_sample / 4;
505  st->codec->block_align = st->codec->channels *
507  ea->audio_stream_index = st->index;
508  st->start_time = 0;
509  }
510 
511  return 1;
512 }
513 
515 {
516  EaDemuxContext *ea = s->priv_data;
517  AVIOContext *pb = s->pb;
518  unsigned int chunk_type, chunk_size;
519  int ret = 0, packet_read = 0, key = 0;
520  int av_uninit(num_samples);
521 
522  while (!packet_read) {
523  chunk_type = avio_rl32(pb);
524  chunk_size = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
525  if (chunk_size < 8)
526  return AVERROR_INVALIDDATA;
527  chunk_size -= 8;
528 
529  switch (chunk_type) {
530  /* audio data */
531  case ISNh_TAG:
532  /* header chunk also contains data; skip over the header portion */
533  if (chunk_size < 32)
534  return AVERROR_INVALIDDATA;
535  avio_skip(pb, 32);
536  chunk_size -= 32;
537  case ISNd_TAG:
538  case SCDl_TAG:
539  case SNDC_TAG:
540  case SDEN_TAG:
541  if (!ea->audio_codec) {
542  avio_skip(pb, chunk_size);
543  break;
544  } else if (ea->audio_codec == AV_CODEC_ID_PCM_S16LE_PLANAR ||
545  ea->audio_codec == AV_CODEC_ID_MP3) {
546  num_samples = avio_rl32(pb);
547  avio_skip(pb, 8);
548  chunk_size -= 12;
549  }
550  if (!chunk_size)
551  continue;
552 
553  ret = av_get_packet(pb, pkt, chunk_size);
554  if (ret < 0)
555  return ret;
556  pkt->stream_index = ea->audio_stream_index;
557 
558  switch (ea->audio_codec) {
564  if (pkt->size < 4) {
565  av_log(s, AV_LOG_ERROR, "Packet is too short\n");
566  av_free_packet(pkt);
567  return AVERROR_INVALIDDATA;
568  }
570  pkt->duration = AV_RB32(pkt->data);
571  else
572  pkt->duration = AV_RL32(pkt->data);
573  break;
575  pkt->duration = ret * 2 / ea->num_channels;
576  break;
578  case AV_CODEC_ID_MP3:
579  pkt->duration = num_samples;
580  break;
581  default:
582  pkt->duration = chunk_size / (ea->bytes * ea->num_channels);
583  }
584 
585  packet_read = 1;
586  break;
587 
588  /* ending tag */
589  case 0:
590  case ISNe_TAG:
591  case SCEl_TAG:
592  case SEND_TAG:
593  case SEEN_TAG:
594  ret = AVERROR(EIO);
595  packet_read = 1;
596  break;
597 
598  case MVIh_TAG:
599  case kVGT_TAG:
600  case pQGT_TAG:
601  case TGQs_TAG:
602  case MADk_TAG:
603  key = AV_PKT_FLAG_KEY;
604  case MVIf_TAG:
605  case fVGT_TAG:
606  case MADm_TAG:
607  case MADe_TAG:
608  avio_seek(pb, -8, SEEK_CUR); // include chunk preamble
609  chunk_size += 8;
610  goto get_video_packet;
611 
612  case mTCD_TAG:
613  if (chunk_size < 8)
614  return AVERROR_INVALIDDATA;
615 
616  avio_skip(pb, 8); // skip ea DCT header
617  chunk_size -= 8;
618  goto get_video_packet;
619 
620  case MV0K_TAG:
621  case MPCh_TAG:
622  case pIQT_TAG:
623  key = AV_PKT_FLAG_KEY;
624  case MV0F_TAG:
625 get_video_packet:
626  if (!chunk_size)
627  continue;
628 
629  ret = av_get_packet(pb, pkt, chunk_size);
630  if (ret < 0)
631  return ret;
632  pkt->stream_index = ea->video_stream_index;
633  pkt->flags |= key;
634  packet_read = 1;
635  break;
636 
637  default:
638  avio_skip(pb, chunk_size);
639  break;
640  }
641  }
642 
643  return ret;
644 }
645 
647  .name = "ea",
648  .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Multimedia"),
649  .priv_data_size = sizeof(EaDemuxContext),
650  .read_probe = ea_probe,
653 };
#define SEEN_TAG
static int process_ea_header(AVFormatContext *s)
Bytestream IO Context.
Definition: avio.h:68
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:54
static uint32_t read_arbitrary(AVIOContext *pb)
int size
void av_free_packet(AVPacket *pkt)
Free a packet.
Definition: avpacket.c:243
#define SCDl_TAG
#define pIQT_TAG
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:129
void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits, unsigned int pts_num, unsigned int pts_den)
Set the time base and wrapping info for a given stream.
Definition: utils.c:2829
#define mTCD_TAG
int num
numerator
Definition: rational.h:44
int index
stream index in AVFormatContext
Definition: avformat.h:700
int size
Definition: avcodec.h:974
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
Definition: aviobuf.c:186
#define MV0F_TAG
static void process_video_header_mdec(AVFormatContext *s)
AVRational time_base
enum AVCodecID audio_codec
#define fVGT_TAG
#define SCEl_TAG
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
Definition: avcodec.h:1844
#define pQGT_TAG
enum AVCodecID video_codec
#define ISNe_TAG
#define TGQs_TAG
Format I/O context.
Definition: avformat.h:922
#define MPCh_TAG
#define PT00_TAG
uint8_t
#define MADm_TAG
unsigned int avio_rb32(AVIOContext *s)
Definition: aviobuf.c:606
#define AV_RB32
Definition: intreadwrite.h:130
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
Definition: utils.c:2521
uint8_t * data
Definition: avcodec.h:973
int av_get_packet(AVIOContext *s, AVPacket *pkt, int size)
Allocate and read the payload of a packet and initialize its fields with default values.
Definition: utils.c:117
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
Definition: avio.h:219
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
Definition: avcodec.h:2523
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: avcodec.h:991
#define SEND_TAG
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
Definition: avcodec.h:1019
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: avcodec.h:105
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:123
#define SCHl_TAG
#define MADk_TAG
unsigned int avio_rl32(AVIOContext *s)
Definition: aviobuf.c:575
#define AVERROR(e)
Definition: error.h:43
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:145
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:144
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: avcodec.h:379
void av_log(void *avcl, int level, const char *fmt,...)
Definition: log.c:169
AVRational avg_frame_rate
Average framerate.
Definition: avformat.h:780
int flags
A combination of AV_PKT_FLAG values.
Definition: avcodec.h:979
int avio_r8(AVIOContext *s)
Definition: aviobuf.c:454
AVCodecContext * codec
Codec context associated with this stream.
Definition: avformat.h:718
#define SDEN_TAG
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
Definition: avformat.h:397
static void process_audio_header_eacs(AVFormatContext *s)
int bit_rate
the average bitrate
Definition: avcodec.h:1114
#define SNDC_TAG
static int process_audio_header_elements(AVFormatContext *s)
static int read_probe(AVProbeData *pd)
Definition: jvdec.c:55
int width
picture width / height.
Definition: avcodec.h:1229
static int ea_read_header(AVFormatContext *s)
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
Definition: avio.h:210
#define AV_RL32
Definition: intreadwrite.h:146
preferred ID for MPEG-1/2 video decoding
Definition: avcodec.h:110
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:544
Stream structure.
Definition: avformat.h:699
#define ISNd_TAG
NULL
Definition: eval.c:55
#define av_bswap32
Definition: bswap.h:33
enum AVMediaType codec_type
Definition: avcodec.h:1058
#define SEAD_TAG
enum AVCodecID codec_id
Definition: avcodec.h:1067
#define EACS_TAG
int sample_rate
samples per second
Definition: avcodec.h:1807
AVIOContext * pb
I/O context.
Definition: avformat.h:964
#define kVGT_TAG
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
Definition: avcodec.h:1082
#define GSTR_TAG
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: libcdio.c:114
#define MVIh_TAG
rational number numerator/denominator
Definition: rational.h:43
#define MVhd_TAG
This structure contains the data a format has to probe a file.
Definition: avformat.h:395
static int ea_probe(AVProbeData *p)
#define SHEN_TAG
#define AVPROBE_SCORE_MAX
maximum score
Definition: avformat.h:404
#define MV0K_TAG
unsigned int avio_rl16(AVIOContext *s)
Definition: aviobuf.c:559
Main libavformat public API header.
int64_t start_time
Decoding: pts of the first frame of the stream, in stream time base.
Definition: avformat.h:749
#define MADe_TAG
static void process_audio_header_sead(AVFormatContext *s)
int den
denominator
Definition: rational.h:45
#define ISNh_TAG
int eof_reached
true if eof reached
Definition: avio.h:96
#define MVIf_TAG
int channels
number of audio channels
Definition: avcodec.h:1808
void * priv_data
Format private data.
Definition: avformat.h:950
static void process_video_header_cmv(AVFormatContext *s)
#define av_uninit(x)
Definition: attributes.h:109
const char * name
A comma separated list of short names for the format.
Definition: avformat.h:525
static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
static void process_video_header_vp6(AVFormatContext *s)
int stream_index
Definition: avcodec.h:975
AVInputFormat ff_ea_demuxer
This structure stores compressed data.
Definition: avcodec.h:950