FFmpeg
Data Structures | Macros | Functions | Variables
electronicarts.c File Reference
#include <inttypes.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  VideoProperties
 
struct  EaDemuxContext
 

Macros

#define SCHl_TAG   MKTAG('S', 'C', 'H', 'l')
 
#define SEAD_TAG   MKTAG('S', 'E', 'A', 'D') /* Sxxx header */
 
#define SNDC_TAG   MKTAG('S', 'N', 'D', 'C') /* Sxxx data */
 
#define SEND_TAG   MKTAG('S', 'E', 'N', 'D') /* Sxxx end */
 
#define SHEN_TAG   MKTAG('S', 'H', 'E', 'N') /* SxEN header */
 
#define SDEN_TAG   MKTAG('S', 'D', 'E', 'N') /* SxEN data */
 
#define SEEN_TAG   MKTAG('S', 'E', 'E', 'N') /* SxEN end */
 
#define ISNh_TAG   MKTAG('1', 'S', 'N', 'h') /* 1SNx header */
 
#define EACS_TAG   MKTAG('E', 'A', 'C', 'S')
 
#define ISNd_TAG   MKTAG('1', 'S', 'N', 'd') /* 1SNx data */
 
#define ISNe_TAG   MKTAG('1', 'S', 'N', 'e') /* 1SNx end */
 
#define PT00_TAG   MKTAG('P', 'T', 0x0, 0x0)
 
#define GSTR_TAG   MKTAG('G', 'S', 'T', 'R')
 
#define SCDl_TAG   MKTAG('S', 'C', 'D', 'l')
 
#define SCEl_TAG   MKTAG('S', 'C', 'E', 'l')
 
#define kVGT_TAG   MKTAG('k', 'V', 'G', 'T') /* TGV I-frame */
 
#define fVGT_TAG   MKTAG('f', 'V', 'G', 'T') /* TGV P-frame */
 
#define mTCD_TAG   MKTAG('m', 'T', 'C', 'D') /* MDEC */
 
#define MADk_TAG   MKTAG('M', 'A', 'D', 'k') /* MAD I-frame */
 
#define MADm_TAG   MKTAG('M', 'A', 'D', 'm') /* MAD P-frame */
 
#define MADe_TAG   MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */
 
#define MPCh_TAG   MKTAG('M', 'P', 'C', 'h') /* MPEG-2 */
 
#define TGQs_TAG   MKTAG('T', 'G', 'Q', 's') /* TGQ I-frame (appears in .TGQ files) */
 
#define pQGT_TAG   MKTAG('p', 'Q', 'G', 'T') /* TGQ I-frame (appears in .UV files) */
 
#define pIQT_TAG   MKTAG('p', 'I', 'Q', 'T') /* TQI/UV2 I-frame (.UV2/.WVE) */
 
#define MVhd_TAG   MKTAG('M', 'V', 'h', 'd')
 
#define MV0K_TAG   MKTAG('M', 'V', '0', 'K')
 
#define MV0F_TAG   MKTAG('M', 'V', '0', 'F')
 
#define AVhd_TAG   MKTAG('A', 'V', 'h', 'd')
 
#define AV0K_TAG   MKTAG('A', 'V', '0', 'K')
 
#define AV0F_TAG   MKTAG('A', 'V', '0', 'F')
 
#define MVIh_TAG   MKTAG('M', 'V', 'I', 'h') /* CMV header */
 
#define MVIf_TAG   MKTAG('M', 'V', 'I', 'f') /* CMV I-frame */
 
#define AVP6_TAG   MKTAG('A', 'V', 'P', '6')
 
#define OFFSET(x)   offsetof(EaDemuxContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
 

Functions

static uint32_t read_arbitrary (AVIOContext *pb)
 
static int process_audio_header_elements (AVFormatContext *s)
 
static void process_audio_header_eacs (AVFormatContext *s)
 
static void process_audio_header_sead (AVFormatContext *s)
 
static void process_video_header_mdec (AVFormatContext *s, VideoProperties *video)
 
static int process_video_header_vp6 (AVFormatContext *s, VideoProperties *video)
 
static void process_video_header_cmv (AVFormatContext *s, VideoProperties *video)
 
static int process_ea_header (AVFormatContext *s)
 
static int ea_probe (const AVProbeData *p)
 
static int init_video_stream (AVFormatContext *s, VideoProperties *video)
 
static int ea_read_header (AVFormatContext *s)
 
static int ea_read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass ea_class
 
const AVInputFormat ff_ea_demuxer
 

Detailed Description

Electronic Arts Multimedia file demuxer (WVE/UV2/etc.) by Robin Kay (komadori at gekkou.co.uk)

Definition in file electronicarts.c.

Macro Definition Documentation

◆ SCHl_TAG

#define SCHl_TAG   MKTAG('S', 'C', 'H', 'l')

Definition at line 35 of file electronicarts.c.

◆ SEAD_TAG

#define SEAD_TAG   MKTAG('S', 'E', 'A', 'D') /* Sxxx header */

Definition at line 36 of file electronicarts.c.

◆ SNDC_TAG

#define SNDC_TAG   MKTAG('S', 'N', 'D', 'C') /* Sxxx data */

Definition at line 37 of file electronicarts.c.

◆ SEND_TAG

#define SEND_TAG   MKTAG('S', 'E', 'N', 'D') /* Sxxx end */

Definition at line 38 of file electronicarts.c.

◆ SHEN_TAG

#define SHEN_TAG   MKTAG('S', 'H', 'E', 'N') /* SxEN header */

Definition at line 39 of file electronicarts.c.

◆ SDEN_TAG

#define SDEN_TAG   MKTAG('S', 'D', 'E', 'N') /* SxEN data */

Definition at line 40 of file electronicarts.c.

◆ SEEN_TAG

#define SEEN_TAG   MKTAG('S', 'E', 'E', 'N') /* SxEN end */

Definition at line 41 of file electronicarts.c.

◆ ISNh_TAG

#define ISNh_TAG   MKTAG('1', 'S', 'N', 'h') /* 1SNx header */

Definition at line 42 of file electronicarts.c.

◆ EACS_TAG

#define EACS_TAG   MKTAG('E', 'A', 'C', 'S')

Definition at line 43 of file electronicarts.c.

◆ ISNd_TAG

#define ISNd_TAG   MKTAG('1', 'S', 'N', 'd') /* 1SNx data */

Definition at line 44 of file electronicarts.c.

◆ ISNe_TAG

#define ISNe_TAG   MKTAG('1', 'S', 'N', 'e') /* 1SNx end */

Definition at line 45 of file electronicarts.c.

◆ PT00_TAG

#define PT00_TAG   MKTAG('P', 'T', 0x0, 0x0)

Definition at line 46 of file electronicarts.c.

◆ GSTR_TAG

#define GSTR_TAG   MKTAG('G', 'S', 'T', 'R')

Definition at line 47 of file electronicarts.c.

◆ SCDl_TAG

#define SCDl_TAG   MKTAG('S', 'C', 'D', 'l')

Definition at line 48 of file electronicarts.c.

◆ SCEl_TAG

#define SCEl_TAG   MKTAG('S', 'C', 'E', 'l')

Definition at line 49 of file electronicarts.c.

◆ kVGT_TAG

#define kVGT_TAG   MKTAG('k', 'V', 'G', 'T') /* TGV I-frame */

Definition at line 50 of file electronicarts.c.

◆ fVGT_TAG

#define fVGT_TAG   MKTAG('f', 'V', 'G', 'T') /* TGV P-frame */

Definition at line 51 of file electronicarts.c.

◆ mTCD_TAG

#define mTCD_TAG   MKTAG('m', 'T', 'C', 'D') /* MDEC */

Definition at line 52 of file electronicarts.c.

◆ MADk_TAG

#define MADk_TAG   MKTAG('M', 'A', 'D', 'k') /* MAD I-frame */

Definition at line 53 of file electronicarts.c.

◆ MADm_TAG

#define MADm_TAG   MKTAG('M', 'A', 'D', 'm') /* MAD P-frame */

Definition at line 54 of file electronicarts.c.

◆ MADe_TAG

#define MADe_TAG   MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */

Definition at line 55 of file electronicarts.c.

◆ MPCh_TAG

#define MPCh_TAG   MKTAG('M', 'P', 'C', 'h') /* MPEG-2 */

Definition at line 56 of file electronicarts.c.

◆ TGQs_TAG

#define TGQs_TAG   MKTAG('T', 'G', 'Q', 's') /* TGQ I-frame (appears in .TGQ files) */

Definition at line 57 of file electronicarts.c.

◆ pQGT_TAG

#define pQGT_TAG   MKTAG('p', 'Q', 'G', 'T') /* TGQ I-frame (appears in .UV files) */

Definition at line 58 of file electronicarts.c.

◆ pIQT_TAG

#define pIQT_TAG   MKTAG('p', 'I', 'Q', 'T') /* TQI/UV2 I-frame (.UV2/.WVE) */

Definition at line 59 of file electronicarts.c.

◆ MVhd_TAG

#define MVhd_TAG   MKTAG('M', 'V', 'h', 'd')

Definition at line 60 of file electronicarts.c.

◆ MV0K_TAG

#define MV0K_TAG   MKTAG('M', 'V', '0', 'K')

Definition at line 61 of file electronicarts.c.

◆ MV0F_TAG

#define MV0F_TAG   MKTAG('M', 'V', '0', 'F')

Definition at line 62 of file electronicarts.c.

◆ AVhd_TAG

#define AVhd_TAG   MKTAG('A', 'V', 'h', 'd')

Definition at line 63 of file electronicarts.c.

◆ AV0K_TAG

#define AV0K_TAG   MKTAG('A', 'V', '0', 'K')

Definition at line 64 of file electronicarts.c.

◆ AV0F_TAG

#define AV0F_TAG   MKTAG('A', 'V', '0', 'F')

Definition at line 65 of file electronicarts.c.

◆ MVIh_TAG

#define MVIh_TAG   MKTAG('M', 'V', 'I', 'h') /* CMV header */

Definition at line 66 of file electronicarts.c.

◆ MVIf_TAG

#define MVIf_TAG   MKTAG('M', 'V', 'I', 'f') /* CMV I-frame */

Definition at line 67 of file electronicarts.c.

◆ AVP6_TAG

#define AVP6_TAG   MKTAG('A', 'V', 'P', '6')

Definition at line 68 of file electronicarts.c.

◆ OFFSET

#define OFFSET (   x)    offsetof(EaDemuxContext, x)

Definition at line 772 of file electronicarts.c.

◆ FLAGS

Definition at line 773 of file electronicarts.c.

Function Documentation

◆ read_arbitrary()

static uint32_t read_arbitrary ( AVIOContext pb)
static

Definition at line 97 of file electronicarts.c.

Referenced by process_audio_header_elements().

◆ process_audio_header_elements()

static int process_audio_header_elements ( AVFormatContext s)
static

Definition at line 115 of file electronicarts.c.

Referenced by process_ea_header().

◆ process_audio_header_eacs()

static void process_audio_header_eacs ( AVFormatContext s)
static

Definition at line 273 of file electronicarts.c.

Referenced by process_ea_header().

◆ process_audio_header_sead()

static void process_audio_header_sead ( AVFormatContext s)
static

Definition at line 310 of file electronicarts.c.

Referenced by process_ea_header().

◆ process_video_header_mdec()

static void process_video_header_mdec ( AVFormatContext s,
VideoProperties video 
)
static

Definition at line 321 of file electronicarts.c.

Referenced by process_ea_header().

◆ process_video_header_vp6()

static int process_video_header_vp6 ( AVFormatContext s,
VideoProperties video 
)
static

Definition at line 331 of file electronicarts.c.

Referenced by process_ea_header().

◆ process_video_header_cmv()

static void process_video_header_cmv ( AVFormatContext s,
VideoProperties video 
)
static

Definition at line 349 of file electronicarts.c.

Referenced by process_ea_header().

◆ process_ea_header()

static int process_ea_header ( AVFormatContext s)
static

Definition at line 362 of file electronicarts.c.

Referenced by ea_read_header().

◆ ea_probe()

static int ea_probe ( const AVProbeData p)
static

Definition at line 469 of file electronicarts.c.

◆ init_video_stream()

static int init_video_stream ( AVFormatContext s,
VideoProperties video 
)
static

Definition at line 498 of file electronicarts.c.

Referenced by ea_read_header().

◆ ea_read_header()

static int ea_read_header ( AVFormatContext s)
static

Definition at line 526 of file electronicarts.c.

◆ ea_read_packet()

static int ea_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 582 of file electronicarts.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{"merge_alpha", "return VP6 alpha in the main video stream", OFFSET(merge_alpha), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
{NULL}
}

Definition at line 774 of file electronicarts.c.

◆ ea_class

const AVClass ea_class
static
Initial value:
= {
.class_name = "ea demuxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 779 of file electronicarts.c.

◆ ff_ea_demuxer

const AVInputFormat ff_ea_demuxer
Initial value:
= {
.name = "ea",
.long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Multimedia"),
.priv_data_size = sizeof(EaDemuxContext),
.priv_class = &ea_class,
}

Definition at line 786 of file electronicarts.c.

ea_read_header
static int ea_read_header(AVFormatContext *s)
Definition: electronicarts.c:526
ea_class
static const AVClass ea_class
Definition: electronicarts.c:779
OFFSET
#define OFFSET(x)
Definition: electronicarts.c:772
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:41
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:545
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
EaDemuxContext
Definition: electronicarts.c:78
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:115
ea_read_packet
static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: electronicarts.c:582
options
static const AVOption options[]
Definition: electronicarts.c:774
ea_probe
static int ea_probe(const AVProbeData *p)
Definition: electronicarts.c:469
FLAGS
#define FLAGS
Definition: electronicarts.c:773
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:29
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:244