FFmpeg
Macros | Functions | Variables
mm.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "demux.h"
#include "internal.h"

Go to the source code of this file.

Macros

#define MM_PREAMBLE_SIZE   6
 
#define MM_TYPE_HEADER   0x0
 
#define MM_TYPE_RAW   0x2
 
#define MM_TYPE_INTER   0x5
 
#define MM_TYPE_INTRA   0x8
 
#define MM_TYPE_INTRA_HH   0xc
 
#define MM_TYPE_INTER_HH   0xd
 
#define MM_TYPE_INTRA_HHV   0xe
 
#define MM_TYPE_INTER_HHV   0xf
 
#define MM_TYPE_AUDIO2   0x14
 
#define MM_TYPE_AUDIO   0x15
 
#define MM_TYPE_PALETTE   0x31
 
#define MM_HEADER_LEN_V   0x16 /* video only */
 
#define MM_HEADER_LEN_AV   0x18 /* video + audio */
 
#define MM_HEADER_LEN_AV2   0x1a
 
#define MM_PALETTE_COUNT   128
 
#define MM_PALETTE_SIZE   (MM_PALETTE_COUNT*3)
 

Functions

static int probe (const AVProbeData *p)
 
static int read_header (AVFormatContext *s)
 
static int read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

const FFInputFormat ff_mm_demuxer
 

Detailed Description

American Laser Games MM Format Demuxer by Peter Ross (pross.nosp@m.@xvi.nosp@m.d.org)

The MM format was used by IBM-PC ports of ALG's "arcade shooter" games, including Mad Dog McCree and Crime Patrol.

Technical details here: http://wiki.multimedia.cx/index.php?title=American_Laser_Games_MM

Definition in file mm.c.

Macro Definition Documentation

◆ MM_PREAMBLE_SIZE

#define MM_PREAMBLE_SIZE   6

Definition at line 40 of file mm.c.

◆ MM_TYPE_HEADER

#define MM_TYPE_HEADER   0x0

Definition at line 42 of file mm.c.

◆ MM_TYPE_RAW

#define MM_TYPE_RAW   0x2

Definition at line 43 of file mm.c.

◆ MM_TYPE_INTER

#define MM_TYPE_INTER   0x5

Definition at line 44 of file mm.c.

◆ MM_TYPE_INTRA

#define MM_TYPE_INTRA   0x8

Definition at line 45 of file mm.c.

◆ MM_TYPE_INTRA_HH

#define MM_TYPE_INTRA_HH   0xc

Definition at line 46 of file mm.c.

◆ MM_TYPE_INTER_HH

#define MM_TYPE_INTER_HH   0xd

Definition at line 47 of file mm.c.

◆ MM_TYPE_INTRA_HHV

#define MM_TYPE_INTRA_HHV   0xe

Definition at line 48 of file mm.c.

◆ MM_TYPE_INTER_HHV

#define MM_TYPE_INTER_HHV   0xf

Definition at line 49 of file mm.c.

◆ MM_TYPE_AUDIO2

#define MM_TYPE_AUDIO2   0x14

Definition at line 50 of file mm.c.

◆ MM_TYPE_AUDIO

#define MM_TYPE_AUDIO   0x15

Definition at line 51 of file mm.c.

◆ MM_TYPE_PALETTE

#define MM_TYPE_PALETTE   0x31

Definition at line 52 of file mm.c.

◆ MM_HEADER_LEN_V

#define MM_HEADER_LEN_V   0x16 /* video only */

Definition at line 54 of file mm.c.

◆ MM_HEADER_LEN_AV

#define MM_HEADER_LEN_AV   0x18 /* video + audio */

Definition at line 55 of file mm.c.

◆ MM_HEADER_LEN_AV2

#define MM_HEADER_LEN_AV2   0x1a

Definition at line 56 of file mm.c.

◆ MM_PALETTE_COUNT

#define MM_PALETTE_COUNT   128

Definition at line 58 of file mm.c.

◆ MM_PALETTE_SIZE

#define MM_PALETTE_SIZE   (MM_PALETTE_COUNT*3)

Definition at line 59 of file mm.c.

Function Documentation

◆ probe()

static int probe ( const AVProbeData p)
static

Definition at line 61 of file mm.c.

◆ read_header()

static int read_header ( AVFormatContext s)
static

Definition at line 85 of file mm.c.

◆ read_packet()

static int read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 134 of file mm.c.

Variable Documentation

◆ ff_mm_demuxer

const FFInputFormat ff_mm_demuxer
Initial value:
= {
.p.name = "mm",
.p.long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM"),
.p.flags = AVFMT_GENERIC_INDEX,
.read_probe = probe,
.read_header = read_header,
.read_packet = read_packet,
}

Definition at line 197 of file mm.c.

read_packet
static int read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: mm.c:134
AVFMT_GENERIC_INDEX
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:480
probe
static int probe(const AVProbeData *p)
Definition: mm.c:61
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:94
read_header
static int read_header(AVFormatContext *s)
Definition: mm.c:85