public class ANIMDecoder extends Object implements IFFVisitor
| Modifier and Type | Field and Description |
|---|---|
static int |
A2024_MONITOR_ID
A2024, 60fps (I don't know the real value).
|
static int |
DBLNTSC_MONITOR_ID
DBLNTSC, 58fps, 44:52.
|
static int |
DBLPAL_MONITOR_ID
DBLPAL, 48fps, 44:44.
|
static int |
DEFAULT_MONITOR_ID
Default ID chooses a system dependent screen mode.
|
protected static int |
EHB_MODE |
static int |
EURO36_MONITOR_ID
EURO36, 73fps, 44:44.
|
static int |
EURO72_MONITOR_ID
EURO72, 69fps, 44:44.
|
protected static int |
HAM_MODE |
protected static int |
MODE_MASK |
static int |
MONITOR_ID_MASK
CAMG monitor ID mask.
|
static int |
MULTISCAN_MONITOR_ID
MULTISCAN (VGA), 58fps, 44:44.
|
static int |
NTSC_MONITOR_ID
NTSC, 60fps, 44:52.
|
static int |
PAL_MONITOR_ID
PAL, 50fps, 44:44.
|
static int |
PROTO_MONITOR_ID
PROTO, 60fps (I don't know the real value).
|
static int |
SUPER72_MONITOR_ID
SUPER72, 71fps, 34:40.
|
| Constructor and Description |
|---|
ANIMDecoder(InputStream inputStream) |
ANIMDecoder(URL location) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decodeANNO(IFFChunk[] chunks,
ANIMMovieTrack track) |
protected void |
decodeAUTH(IFFChunk[] chunks,
ANIMMovieTrack track) |
protected void |
decodeCCRT(IFFChunk chunk,
ANIMMovieTrack track)
Decodes the color cycling range and timing chunk (ILBM CCRT).
|
protected void |
decodeColorCycling(IFFChunk[] ccrtChunks,
IFFChunk[] crngChunks,
IFFChunk[] drngChunks,
ANIMMovieTrack track)
Process CRNG and DRNG chunks in the sequence of their
location in the file.
|
protected void |
decodeCOPYRIGHT(IFFChunk[] chunks,
ANIMMovieTrack track) |
protected void |
decodeCRNG(IFFChunk chunk,
ANIMMovieTrack track)
Decodes the color range cycling (ILBM CRNG).
|
protected void |
decodeDRNG(IFFChunk chunk,
ANIMMovieTrack track)
Decodes the DPaint IV enhanced color cycle chunk (ILBM DRNG)
|
void |
enterGroup(IFFChunk chunk) |
void |
leaveGroup(IFFChunk chunk) |
void |
produce(ANIMMovieTrack track,
int n,
boolean loadAudio)
Decodes the stream and produces animation frames into the specified movie
track.
|
void |
registerChunks(IFFParser iff,
boolean loadAudio) |
void |
visitChunk(IFFChunk group,
IFFChunk chunk) |
public static final int MONITOR_ID_MASK
public static final int DEFAULT_MONITOR_ID
public static final int NTSC_MONITOR_ID
public static final int PAL_MONITOR_ID
public static final int MULTISCAN_MONITOR_ID
public static final int A2024_MONITOR_ID
public static final int PROTO_MONITOR_ID
public static final int EURO72_MONITOR_ID
public static final int EURO36_MONITOR_ID
public static final int SUPER72_MONITOR_ID
public static final int DBLNTSC_MONITOR_ID
public static final int DBLPAL_MONITOR_ID
protected static final int MODE_MASK
protected static final int HAM_MODE
protected static final int EHB_MODE
public ANIMDecoder(InputStream inputStream)
public ANIMDecoder(URL location)
public void produce(ANIMMovieTrack track, int n, boolean loadAudio) throws IOException
track - The decoded data is stored in this track.n - The index of the ANIM FORM to be read out of the IFF-FileloadAudio - If this is set to false, audio data will be skipped.IOExceptionpublic void registerChunks(IFFParser iff, boolean loadAudio)
public void enterGroup(IFFChunk chunk)
enterGroup in interface IFFVisitorpublic void leaveGroup(IFFChunk chunk)
leaveGroup in interface IFFVisitorpublic void visitChunk(IFFChunk group, IFFChunk chunk) throws ParseException, AbortException
visitChunk in interface IFFVisitorParseExceptionAbortExceptionprotected void decodeCCRT(IFFChunk chunk, ANIMMovieTrack track) throws ParseException
enum {
dontCycle = 0, forward = 1, backwards = -1
} ccrtDirection;
typedef struct {
WORD enum ccrtDirection direction; // 0=don't cycle, 1=forward, -1=backwards
UBYTE start; // range lower
UBYTE end; // range upper
ULONG seconds; // seconds between cycling
ULONG microseconds; // msecs between cycling
WORD pad; // future exp - store 0 here
} ilbmColorCyclingRangeAndTimingChunk;
ParseExceptionprotected void decodeCRNG(IFFChunk chunk, ANIMMovieTrack track) throws ParseException
#define RNG_NORATE 36 // Dpaint uses this rate to mean non-active
set {
active = 1, reverse = 2
} crngActive;
// A CRange is store in a CRNG chunk.
typedef struct {
WORD pad1; // reserved for future use; store 0 here *
WORD rate; // 60/sec=16384, 30/sec=8192, 1/sec=16384/60=273
WORD set crngActive flags; // bit0 set = active, bit 1 set = reverse
UBYTE low; UBYTE high; // lower and upper color registers selected
} ilbmColorRegisterRangeChunk;
ParseExceptionprotected void decodeDRNG(IFFChunk chunk, ANIMMovieTrack track) throws ParseException
The RNG_ACTIVE flag is set when the range is cyclable. A range should only have the RNG _ACTIVE if it:
ILBM DRNG DPaint IV enhanced color cycle chunk
--------------------------------------------
set {
RNG_ACTIVE=1,RNG_DP_RESERVED=4
} drngFlags;
/* True color cell * /
typedef struct {
UBYTE cell;
UBYTE r;
UBYTE g;
UBYTE b;
} ilbmDRNGDColor;
/* Color register cell * /
typedef struct {
UBYTE cell;
UBYTE index;
} ilbmDRNGDIndex;
/* DRNG chunk. * /
typedef struct {
UBYTE min; /* min cell value * /
UBYTE max; /* max cell value * /
UWORD rate; /* color cycling rate, 16384 = 60 steps/second * /
UWORD set drngFlags flags; /* 1=RNG_ACTIVE, 4=RNG_DP_RESERVED * /
UBYTE ntrue; /* number of DColorCell structs to follow * /
UBYTE ntregs; /* number of DIndexCell structs to follow * /
ilbmDRNGDColor[ntrue] trueColorCells;
ilbmDRNGDIndex[ntregs] colorRegisterCells;
} ilbmDRangeChunk;
ParseExceptionprotected void decodeColorCycling(IFFChunk[] ccrtChunks, IFFChunk[] crngChunks, IFFChunk[] drngChunks, ANIMMovieTrack track) throws ParseException
ParseExceptionprotected void decodeCOPYRIGHT(IFFChunk[] chunks, ANIMMovieTrack track) throws ParseException
ParseExceptionprotected void decodeAUTH(IFFChunk[] chunks, ANIMMovieTrack track) throws ParseException
ParseExceptionprotected void decodeANNO(IFFChunk[] chunks, ANIMMovieTrack track) throws ParseException
ParseExceptionCopyright © 2014. All Rights Reserved.