FFmpeg
Data Structures | Macros | Functions | Variables
4xm.c File Reference
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat.h"
#include "libavcodec/internal.h"
#include "avformat.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AudioTrack
 
struct  FourxmDemuxContext
 

Macros

#define RIFF_TAG   MKTAG('R', 'I', 'F', 'F')
 
#define FOURXMV_TAG   MKTAG('4', 'X', 'M', 'V')
 
#define LIST_TAG   MKTAG('L', 'I', 'S', 'T')
 
#define HEAD_TAG   MKTAG('H', 'E', 'A', 'D')
 
#define TRK__TAG   MKTAG('T', 'R', 'K', '_')
 
#define MOVI_TAG   MKTAG('M', 'O', 'V', 'I')
 
#define VTRK_TAG   MKTAG('V', 'T', 'R', 'K')
 
#define STRK_TAG   MKTAG('S', 'T', 'R', 'K')
 
#define std__TAG   MKTAG('s', 't', 'd', '_')
 
#define name_TAG   MKTAG('n', 'a', 'm', 'e')
 
#define vtrk_TAG   MKTAG('v', 't', 'r', 'k')
 
#define strk_TAG   MKTAG('s', 't', 'r', 'k')
 
#define ifrm_TAG   MKTAG('i', 'f', 'r', 'm')
 
#define pfrm_TAG   MKTAG('p', 'f', 'r', 'm')
 
#define cfrm_TAG   MKTAG('c', 'f', 'r', 'm')
 
#define ifr2_TAG   MKTAG('i', 'f', 'r', '2')
 
#define pfr2_TAG   MKTAG('p', 'f', 'r', '2')
 
#define cfr2_TAG   MKTAG('c', 'f', 'r', '2')
 
#define snd__TAG   MKTAG('s', 'n', 'd', '_')
 
#define vtrk_SIZE   0x44
 
#define strk_SIZE   0x28
 
#define GET_LIST_HEADER()
 

Functions

static int fourxm_probe (const AVProbeData *p)
 
static int parse_vtrk (AVFormatContext *s, FourxmDemuxContext *fourxm, uint8_t *buf, int size, int left)
 
static int parse_strk (AVFormatContext *s, FourxmDemuxContext *fourxm, uint8_t *buf, int size, int left)
 
static int fourxm_read_header (AVFormatContext *s)
 
static int fourxm_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int fourxm_read_close (AVFormatContext *s)
 

Variables

const AVInputFormat ff_fourxm_demuxer
 

Detailed Description

4X Technologies file demuxer by Mike Melanson (melan.nosp@m.son@.nosp@m.pcisy.nosp@m.s.ne.nosp@m.t) for more information on the .4xm file format, visit: http://www.pcisys.net/~melanson/codecs/

Definition in file 4xm.c.

Macro Definition Documentation

◆ RIFF_TAG

#define RIFF_TAG   MKTAG('R', 'I', 'F', 'F')

Definition at line 36 of file 4xm.c.

◆ FOURXMV_TAG

#define FOURXMV_TAG   MKTAG('4', 'X', 'M', 'V')

Definition at line 37 of file 4xm.c.

◆ LIST_TAG

#define LIST_TAG   MKTAG('L', 'I', 'S', 'T')

Definition at line 38 of file 4xm.c.

◆ HEAD_TAG

#define HEAD_TAG   MKTAG('H', 'E', 'A', 'D')

Definition at line 39 of file 4xm.c.

◆ TRK__TAG

#define TRK__TAG   MKTAG('T', 'R', 'K', '_')

Definition at line 40 of file 4xm.c.

◆ MOVI_TAG

#define MOVI_TAG   MKTAG('M', 'O', 'V', 'I')

Definition at line 41 of file 4xm.c.

◆ VTRK_TAG

#define VTRK_TAG   MKTAG('V', 'T', 'R', 'K')

Definition at line 42 of file 4xm.c.

◆ STRK_TAG

#define STRK_TAG   MKTAG('S', 'T', 'R', 'K')

Definition at line 43 of file 4xm.c.

◆ std__TAG

#define std__TAG   MKTAG('s', 't', 'd', '_')

Definition at line 44 of file 4xm.c.

◆ name_TAG

#define name_TAG   MKTAG('n', 'a', 'm', 'e')

Definition at line 45 of file 4xm.c.

◆ vtrk_TAG

#define vtrk_TAG   MKTAG('v', 't', 'r', 'k')

Definition at line 46 of file 4xm.c.

◆ strk_TAG

#define strk_TAG   MKTAG('s', 't', 'r', 'k')

Definition at line 47 of file 4xm.c.

◆ ifrm_TAG

#define ifrm_TAG   MKTAG('i', 'f', 'r', 'm')

Definition at line 48 of file 4xm.c.

◆ pfrm_TAG

#define pfrm_TAG   MKTAG('p', 'f', 'r', 'm')

Definition at line 49 of file 4xm.c.

◆ cfrm_TAG

#define cfrm_TAG   MKTAG('c', 'f', 'r', 'm')

Definition at line 50 of file 4xm.c.

◆ ifr2_TAG

#define ifr2_TAG   MKTAG('i', 'f', 'r', '2')

Definition at line 51 of file 4xm.c.

◆ pfr2_TAG

#define pfr2_TAG   MKTAG('p', 'f', 'r', '2')

Definition at line 52 of file 4xm.c.

◆ cfr2_TAG

#define cfr2_TAG   MKTAG('c', 'f', 'r', '2')

Definition at line 53 of file 4xm.c.

◆ snd__TAG

#define snd__TAG   MKTAG('s', 'n', 'd', '_')

Definition at line 54 of file 4xm.c.

◆ vtrk_SIZE

#define vtrk_SIZE   0x44

Definition at line 56 of file 4xm.c.

◆ strk_SIZE

#define strk_SIZE   0x28

Definition at line 57 of file 4xm.c.

◆ GET_LIST_HEADER

#define GET_LIST_HEADER ( )
Value:
fourcc_tag = avio_rl32(pb); \
size = avio_rl32(pb); \
if (fourcc_tag != LIST_TAG) { \
goto fail; \
} \
fourcc_tag = avio_rl32(pb);

Definition at line 59 of file 4xm.c.

Function Documentation

◆ fourxm_probe()

static int fourxm_probe ( const AVProbeData p)
static

Definition at line 86 of file 4xm.c.

◆ parse_vtrk()

static int parse_vtrk ( AVFormatContext s,
FourxmDemuxContext fourxm,
uint8_t *  buf,
int  size,
int  left 
)
static

Definition at line 95 of file 4xm.c.

Referenced by fourxm_read_header().

◆ parse_strk()

static int parse_strk ( AVFormatContext s,
FourxmDemuxContext fourxm,
uint8_t *  buf,
int  size,
int  left 
)
static

Definition at line 129 of file 4xm.c.

Referenced by fourxm_read_header().

◆ fourxm_read_header()

static int fourxm_read_header ( AVFormatContext s)
static

Definition at line 208 of file 4xm.c.

◆ fourxm_read_packet()

static int fourxm_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 290 of file 4xm.c.

◆ fourxm_read_close()

static int fourxm_read_close ( AVFormatContext s)
static

Definition at line 386 of file 4xm.c.

Variable Documentation

◆ ff_fourxm_demuxer

const AVInputFormat ff_fourxm_demuxer
Initial value:
= {
.name = "4xm",
.long_name = NULL_IF_CONFIG_SMALL("4X Technologies"),
.priv_data_size = sizeof(FourxmDemuxContext),
.flags_internal = FF_FMT_INIT_CLEANUP,
}

Definition at line 395 of file 4xm.c.

fourxm_read_packet
static int fourxm_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: 4xm.c:290
FF_FMT_INIT_CLEANUP
#define FF_FMT_INIT_CLEANUP
For an AVInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
Definition: internal.h:48
fourxm_probe
static int fourxm_probe(const AVProbeData *p)
Definition: 4xm.c:86
fail
#define fail()
Definition: checkasm.h:127
fourxm_read_header
static int fourxm_read_header(AVFormatContext *s)
Definition: 4xm.c:208
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:141
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:527
read_probe
static int read_probe(const AVProbeData *pd)
Definition: jvdec.c:55
fourxm_read_close
static int fourxm_read_close(AVFormatContext *s)
Definition: 4xm.c:386
avio_rl32
unsigned int avio_rl32(AVIOContext *s)
Definition: aviobuf.c:742
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:117
FourxmDemuxContext
Definition: 4xm.c:77
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
LIST_TAG
#define LIST_TAG
Definition: 4xm.c:38
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61