FFmpeg
Data Structures | Macros | Functions | Variables
flic.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  FlicDemuxContext
 

Macros

#define FLIC_FILE_MAGIC_1   0xAF11
 
#define FLIC_FILE_MAGIC_2   0xAF12
 
#define FLIC_FILE_MAGIC_3
 
#define FLIC_CHUNK_MAGIC_1   0xF1FA
 
#define FLIC_CHUNK_MAGIC_2   0xF5FA
 
#define FLIC_MC_SPEED   5 /* speed for Magic Carpet game FLIs */
 
#define FLIC_DEFAULT_SPEED   5 /* for FLIs that have 0 speed */
 
#define FLIC_TFTD_CHUNK_AUDIO
 
#define FLIC_TFTD_SAMPLE_RATE   22050
 
#define FLIC_HEADER_SIZE   128
 
#define FLIC_PREAMBLE_SIZE   6
 

Functions

static int flic_probe (const AVProbeData *p)
 
static int flic_read_header (AVFormatContext *s)
 
static int flic_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int flic_read_seek (AVFormatContext *s, int stream_index, int64_t pts, int flags)
 

Variables

const AVInputFormat ff_flic_demuxer
 

Detailed Description

FLI/FLC file demuxer by Mike Melanson (melan.nosp@m.son@.nosp@m.pcisy.nosp@m.s.ne.nosp@m.t) for more information on the .fli/.flc file format and all of its many variations, visit: http://www.compuphase.com/flic.htm

This demuxer handles standard 0xAF11- and 0xAF12-type FLIs. It also handles special FLIs from the PC games "Magic Carpet" and "X-COM: Terror from the Deep".

Definition in file flic.c.

Macro Definition Documentation

◆ FLIC_FILE_MAGIC_1

#define FLIC_FILE_MAGIC_1   0xAF11

Definition at line 39 of file flic.c.

◆ FLIC_FILE_MAGIC_2

#define FLIC_FILE_MAGIC_2   0xAF12

Definition at line 40 of file flic.c.

◆ FLIC_FILE_MAGIC_3

#define FLIC_FILE_MAGIC_3
Value:
0xAF44 /* Flic Type for Extended FLX Format which
originated in Dave's Targa Animator (DTA) */

Definition at line 41 of file flic.c.

◆ FLIC_CHUNK_MAGIC_1

#define FLIC_CHUNK_MAGIC_1   0xF1FA

Definition at line 42 of file flic.c.

◆ FLIC_CHUNK_MAGIC_2

#define FLIC_CHUNK_MAGIC_2   0xF5FA

Definition at line 43 of file flic.c.

◆ FLIC_MC_SPEED

#define FLIC_MC_SPEED   5 /* speed for Magic Carpet game FLIs */

Definition at line 44 of file flic.c.

◆ FLIC_DEFAULT_SPEED

#define FLIC_DEFAULT_SPEED   5 /* for FLIs that have 0 speed */

Definition at line 45 of file flic.c.

◆ FLIC_TFTD_CHUNK_AUDIO

#define FLIC_TFTD_CHUNK_AUDIO
Value:
0xAAAA /* Audio chunk. Used in Terror from the Deep.
Has 10 B extra header not accounted for in the chunk header */

Definition at line 46 of file flic.c.

◆ FLIC_TFTD_SAMPLE_RATE

#define FLIC_TFTD_SAMPLE_RATE   22050

Definition at line 47 of file flic.c.

◆ FLIC_HEADER_SIZE

#define FLIC_HEADER_SIZE   128

Definition at line 49 of file flic.c.

◆ FLIC_PREAMBLE_SIZE

#define FLIC_PREAMBLE_SIZE   6

Definition at line 50 of file flic.c.

Function Documentation

◆ flic_probe()

static int flic_probe ( const AVProbeData p)
static

Definition at line 58 of file flic.c.

◆ flic_read_header()

static int flic_read_header ( AVFormatContext s)
static

Definition at line 84 of file flic.c.

◆ flic_read_packet()

static int flic_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 192 of file flic.c.

◆ flic_read_seek()

static int flic_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  pts,
int  flags 
)
static

Definition at line 260 of file flic.c.

Variable Documentation

◆ ff_flic_demuxer

const AVInputFormat ff_flic_demuxer
Initial value:
= {
.name = "flic",
.long_name = NULL_IF_CONFIG_SMALL("FLI/FLC/FLX animation"),
.priv_data_size = sizeof(FlicDemuxContext),
}

Definition at line 286 of file flic.c.

flic_probe
static int flic_probe(const AVProbeData *p)
Definition: flic.c:58
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:151
FlicDemuxContext
Definition: flic.c:52
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:532
read_probe
static int read_probe(const AVProbeData *pd)
Definition: jvdec.c:55
flic_read_packet
static int flic_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: flic.c:192
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
flic_read_seek
static int flic_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags)
Definition: flic.c:260
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
flic_read_header
static int flic_read_header(AVFormatContext *s)
Definition: flic.c:84