FFmpeg
Data Structures | Macros | Functions | Variables
ipmovie.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.

Data Structures

struct  IPMVEContext
 

Macros

#define CHUNK_PREAMBLE_SIZE   4
 
#define OPCODE_PREAMBLE_SIZE   4
 
#define CHUNK_INIT_AUDIO   0x0000
 
#define CHUNK_AUDIO_ONLY   0x0001
 
#define CHUNK_INIT_VIDEO   0x0002
 
#define CHUNK_VIDEO   0x0003
 
#define CHUNK_SHUTDOWN   0x0004
 
#define CHUNK_END   0x0005
 
#define CHUNK_HAVE_PACKET   0xFFFB
 
#define CHUNK_DONE   0xFFFC
 
#define CHUNK_NOMEM   0xFFFD
 
#define CHUNK_EOF   0xFFFE
 
#define CHUNK_BAD   0xFFFF
 
#define OPCODE_END_OF_STREAM   0x00
 
#define OPCODE_END_OF_CHUNK   0x01
 
#define OPCODE_CREATE_TIMER   0x02
 
#define OPCODE_INIT_AUDIO_BUFFERS   0x03
 
#define OPCODE_START_STOP_AUDIO   0x04
 
#define OPCODE_INIT_VIDEO_BUFFERS   0x05
 
#define OPCODE_VIDEO_DATA_06   0x06
 
#define OPCODE_SEND_BUFFER   0x07
 
#define OPCODE_AUDIO_FRAME   0x08
 
#define OPCODE_SILENCE_FRAME   0x09
 
#define OPCODE_INIT_VIDEO_MODE   0x0A
 
#define OPCODE_CREATE_GRADIENT   0x0B
 
#define OPCODE_SET_PALETTE   0x0C
 
#define OPCODE_SET_PALETTE_COMPRESSED   0x0D
 
#define OPCODE_SET_SKIP_MAP   0x0E
 
#define OPCODE_SET_DECODING_MAP   0x0F
 
#define OPCODE_VIDEO_DATA_10   0x10
 
#define OPCODE_VIDEO_DATA_11   0x11
 
#define OPCODE_UNKNOWN_12   0x12
 
#define OPCODE_UNKNOWN_13   0x13
 
#define OPCODE_UNKNOWN_14   0x14
 
#define OPCODE_UNKNOWN_15   0x15
 
#define PALETTE_COUNT   256
 

Functions

static int load_ipmovie_packet (IPMVEContext *s, AVIOContext *pb, AVPacket *pkt)
 
static int init_audio (AVFormatContext *s)
 
static int process_ipmovie_chunk (IPMVEContext *s, AVIOContext *pb, AVPacket *pkt)
 
static int ipmovie_probe (const AVProbeData *p)
 
static int ipmovie_read_header (AVFormatContext *s)
 
static int ipmovie_read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

static const char signature [] = "Interplay MVE File\x1A\0\x1A"
 
const FFInputFormat ff_ipmovie_demuxer
 

Detailed Description

Interplay MVE file demuxer by Mike Melanson (melan.nosp@m.son@.nosp@m.pcisy.nosp@m.s.ne.nosp@m.t) For more information regarding the Interplay MVE file format, visit: http://www.pcisys.net/~melanson/codecs/ The aforementioned site also contains a command line utility for parsing IP MVE files so that you can get a good idea of the typical structure of such files. This demuxer is not the best example to use if you are trying to write your own as it uses a rather roundabout approach for splitting up and sending out the chunks.

Definition in file ipmovie.c.

Macro Definition Documentation

◆ CHUNK_PREAMBLE_SIZE

#define CHUNK_PREAMBLE_SIZE   4

Definition at line 41 of file ipmovie.c.

◆ OPCODE_PREAMBLE_SIZE

#define OPCODE_PREAMBLE_SIZE   4

Definition at line 42 of file ipmovie.c.

◆ CHUNK_INIT_AUDIO

#define CHUNK_INIT_AUDIO   0x0000

Definition at line 44 of file ipmovie.c.

◆ CHUNK_AUDIO_ONLY

#define CHUNK_AUDIO_ONLY   0x0001

Definition at line 45 of file ipmovie.c.

◆ CHUNK_INIT_VIDEO

#define CHUNK_INIT_VIDEO   0x0002

Definition at line 46 of file ipmovie.c.

◆ CHUNK_VIDEO

#define CHUNK_VIDEO   0x0003

Definition at line 47 of file ipmovie.c.

◆ CHUNK_SHUTDOWN

#define CHUNK_SHUTDOWN   0x0004

Definition at line 48 of file ipmovie.c.

◆ CHUNK_END

#define CHUNK_END   0x0005

Definition at line 49 of file ipmovie.c.

◆ CHUNK_HAVE_PACKET

#define CHUNK_HAVE_PACKET   0xFFFB

Definition at line 51 of file ipmovie.c.

◆ CHUNK_DONE

#define CHUNK_DONE   0xFFFC

Definition at line 52 of file ipmovie.c.

◆ CHUNK_NOMEM

#define CHUNK_NOMEM   0xFFFD

Definition at line 53 of file ipmovie.c.

◆ CHUNK_EOF

#define CHUNK_EOF   0xFFFE

Definition at line 54 of file ipmovie.c.

◆ CHUNK_BAD

#define CHUNK_BAD   0xFFFF

Definition at line 55 of file ipmovie.c.

◆ OPCODE_END_OF_STREAM

#define OPCODE_END_OF_STREAM   0x00

Definition at line 57 of file ipmovie.c.

◆ OPCODE_END_OF_CHUNK

#define OPCODE_END_OF_CHUNK   0x01

Definition at line 58 of file ipmovie.c.

◆ OPCODE_CREATE_TIMER

#define OPCODE_CREATE_TIMER   0x02

Definition at line 59 of file ipmovie.c.

◆ OPCODE_INIT_AUDIO_BUFFERS

#define OPCODE_INIT_AUDIO_BUFFERS   0x03

Definition at line 60 of file ipmovie.c.

◆ OPCODE_START_STOP_AUDIO

#define OPCODE_START_STOP_AUDIO   0x04

Definition at line 61 of file ipmovie.c.

◆ OPCODE_INIT_VIDEO_BUFFERS

#define OPCODE_INIT_VIDEO_BUFFERS   0x05

Definition at line 62 of file ipmovie.c.

◆ OPCODE_VIDEO_DATA_06

#define OPCODE_VIDEO_DATA_06   0x06

Definition at line 63 of file ipmovie.c.

◆ OPCODE_SEND_BUFFER

#define OPCODE_SEND_BUFFER   0x07

Definition at line 64 of file ipmovie.c.

◆ OPCODE_AUDIO_FRAME

#define OPCODE_AUDIO_FRAME   0x08

Definition at line 65 of file ipmovie.c.

◆ OPCODE_SILENCE_FRAME

#define OPCODE_SILENCE_FRAME   0x09

Definition at line 66 of file ipmovie.c.

◆ OPCODE_INIT_VIDEO_MODE

#define OPCODE_INIT_VIDEO_MODE   0x0A

Definition at line 67 of file ipmovie.c.

◆ OPCODE_CREATE_GRADIENT

#define OPCODE_CREATE_GRADIENT   0x0B

Definition at line 68 of file ipmovie.c.

◆ OPCODE_SET_PALETTE

#define OPCODE_SET_PALETTE   0x0C

Definition at line 69 of file ipmovie.c.

◆ OPCODE_SET_PALETTE_COMPRESSED

#define OPCODE_SET_PALETTE_COMPRESSED   0x0D

Definition at line 70 of file ipmovie.c.

◆ OPCODE_SET_SKIP_MAP

#define OPCODE_SET_SKIP_MAP   0x0E

Definition at line 71 of file ipmovie.c.

◆ OPCODE_SET_DECODING_MAP

#define OPCODE_SET_DECODING_MAP   0x0F

Definition at line 72 of file ipmovie.c.

◆ OPCODE_VIDEO_DATA_10

#define OPCODE_VIDEO_DATA_10   0x10

Definition at line 73 of file ipmovie.c.

◆ OPCODE_VIDEO_DATA_11

#define OPCODE_VIDEO_DATA_11   0x11

Definition at line 74 of file ipmovie.c.

◆ OPCODE_UNKNOWN_12

#define OPCODE_UNKNOWN_12   0x12

Definition at line 75 of file ipmovie.c.

◆ OPCODE_UNKNOWN_13

#define OPCODE_UNKNOWN_13   0x13

Definition at line 76 of file ipmovie.c.

◆ OPCODE_UNKNOWN_14

#define OPCODE_UNKNOWN_14   0x14

Definition at line 77 of file ipmovie.c.

◆ OPCODE_UNKNOWN_15

#define OPCODE_UNKNOWN_15   0x15

Definition at line 78 of file ipmovie.c.

◆ PALETTE_COUNT

#define PALETTE_COUNT   256

Definition at line 80 of file ipmovie.c.

Function Documentation

◆ load_ipmovie_packet()

static int load_ipmovie_packet ( IPMVEContext s,
AVIOContext pb,
AVPacket pkt 
)
static

Definition at line 121 of file ipmovie.c.

Referenced by ipmovie_read_packet(), and process_ipmovie_chunk().

◆ init_audio()

static int init_audio ( AVFormatContext s)
static

Definition at line 247 of file ipmovie.c.

Referenced by ipmovie_read_header(), and process_ipmovie_chunk().

◆ process_ipmovie_chunk()

static int process_ipmovie_chunk ( IPMVEContext s,
AVIOContext pb,
AVPacket pkt 
)
static

Definition at line 272 of file ipmovie.c.

Referenced by ipmovie_read_header(), and ipmovie_read_packet().

◆ ipmovie_probe()

static int ipmovie_probe ( const AVProbeData p)
static

Definition at line 593 of file ipmovie.c.

◆ ipmovie_read_header()

static int ipmovie_read_header ( AVFormatContext s)
static

Definition at line 606 of file ipmovie.c.

◆ ipmovie_read_packet()

static int ipmovie_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 671 of file ipmovie.c.

Variable Documentation

◆ signature

const char signature[] = "Interplay MVE File\x1A\0\x1A"
static

◆ ff_ipmovie_demuxer

const FFInputFormat ff_ipmovie_demuxer
Initial value:
= {
.p.name = "ipmovie",
.p.long_name = NULL_IF_CONFIG_SMALL("Interplay MVE"),
.priv_data_size = sizeof(IPMVEContext),
}

Definition at line 703 of file ipmovie.c.

ipmovie_read_header
static int ipmovie_read_header(AVFormatContext *s)
Definition: ipmovie.c:606
IPMVEContext
Definition: ipmovie.c:82
ipmovie_probe
static int ipmovie_probe(const AVProbeData *p)
Definition: ipmovie.c:593
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:42
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:540
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
ipmovie_read_packet
static int ipmovie_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: ipmovie.c:671
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30