FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ipmovie.c File Reference

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. More...

#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  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_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_UNKNOWN_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_UNKNOWN_0E   0x0E
 
#define OPCODE_SET_DECODING_MAP   0x0F
 
#define OPCODE_UNKNOWN_10   0x10
 
#define OPCODE_VIDEO_DATA   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 process_ipmovie_chunk (IPMVEContext *s, AVIOContext *pb, AVPacket *pkt)
 
static int ipmovie_probe (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"
 
AVInputFormat 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

#define CHUNK_PREAMBLE_SIZE   4

Definition at line 40 of file ipmovie.c.

Referenced by ipmovie_read_header(), and process_ipmovie_chunk().

#define OPCODE_PREAMBLE_SIZE   4

Definition at line 41 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define CHUNK_INIT_AUDIO   0x0000

Definition at line 43 of file ipmovie.c.

Referenced by ipmovie_read_header(), ipmovie_read_packet(), and process_ipmovie_chunk().

#define CHUNK_AUDIO_ONLY   0x0001

Definition at line 44 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define CHUNK_INIT_VIDEO   0x0002

Definition at line 45 of file ipmovie.c.

Referenced by ipmovie_read_header(), ipmovie_read_packet(), and process_ipmovie_chunk().

#define CHUNK_VIDEO   0x0003
#define CHUNK_SHUTDOWN   0x0004

Definition at line 47 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define CHUNK_END   0x0005

Definition at line 48 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define CHUNK_DONE   0xFFFC

Definition at line 50 of file ipmovie.c.

Referenced by load_ipmovie_packet(), and process_ipmovie_chunk().

#define CHUNK_NOMEM   0xFFFD

Definition at line 51 of file ipmovie.c.

Referenced by ipmovie_read_packet(), and load_ipmovie_packet().

#define CHUNK_EOF   0xFFFE

Definition at line 52 of file ipmovie.c.

Referenced by ipmovie_read_packet(), load_ipmovie_packet(), and process_ipmovie_chunk().

#define CHUNK_BAD   0xFFFF

Definition at line 53 of file ipmovie.c.

Referenced by ipmovie_read_packet(), load_ipmovie_packet(), and process_ipmovie_chunk().

#define OPCODE_END_OF_STREAM   0x00

Definition at line 55 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_END_OF_CHUNK   0x01

Definition at line 56 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_CREATE_TIMER   0x02

Definition at line 57 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_INIT_AUDIO_BUFFERS   0x03

Definition at line 58 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_START_STOP_AUDIO   0x04

Definition at line 59 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_INIT_VIDEO_BUFFERS   0x05

Definition at line 60 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_UNKNOWN_06   0x06

Definition at line 61 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_SEND_BUFFER   0x07

Definition at line 62 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_AUDIO_FRAME   0x08

Definition at line 63 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_SILENCE_FRAME   0x09

Definition at line 64 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_INIT_VIDEO_MODE   0x0A

Definition at line 65 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_CREATE_GRADIENT   0x0B

Definition at line 66 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_SET_PALETTE   0x0C

Definition at line 67 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_SET_PALETTE_COMPRESSED   0x0D

Definition at line 68 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_UNKNOWN_0E   0x0E

Definition at line 69 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_SET_DECODING_MAP   0x0F

Definition at line 70 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_UNKNOWN_10   0x10

Definition at line 71 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_VIDEO_DATA   0x11

Definition at line 72 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_UNKNOWN_12   0x12

Definition at line 73 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_UNKNOWN_13   0x13

Definition at line 74 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_UNKNOWN_14   0x14

Definition at line 75 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define OPCODE_UNKNOWN_15   0x15

Definition at line 76 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

#define PALETTE_COUNT   256

Definition at line 78 of file ipmovie.c.

Function Documentation

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

Definition at line 115 of file ipmovie.c.

Referenced by process_ipmovie_chunk().

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

Definition at line 217 of file ipmovie.c.

Referenced by ipmovie_read_header(), and ipmovie_read_packet().

static int ipmovie_probe ( AVProbeData p)
static

Definition at line 531 of file ipmovie.c.

static int ipmovie_read_header ( AVFormatContext s)
static

Definition at line 544 of file ipmovie.c.

static int ipmovie_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 626 of file ipmovie.c.

Variable Documentation

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

Definition at line 529 of file ipmovie.c.

Referenced by ipmovie_probe(), ipmovie_read_header(), rl2_read_header(), and rtmp_handshake().

AVInputFormat ff_ipmovie_demuxer
Initial value:
= {
.name = "ipmovie",
.long_name = NULL_IF_CONFIG_SMALL("Interplay MVE"),
.priv_data_size = sizeof(IPMVEContext),
}
static int ipmovie_read_header(AVFormatContext *s)
Definition: ipmovie.c:544
static int ipmovie_probe(AVProbeData *p)
Definition: ipmovie.c:531
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static int read_probe(AVProbeData *pd)
Definition: jvdec.c:55
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:620
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
static int ipmovie_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: ipmovie.c:626

Definition at line 652 of file ipmovie.c.