|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.media.anim.ANIMDecoder
public class ANIMDecoder
Decodes IFF files and adds the data to an ANIMMovieTrack.
| Field Summary | |
|---|---|
protected static int |
A2024_MONITOR_ID
|
protected static int |
DBLNTSC_MONITOR_ID
|
protected static int |
DBLPAL_MONITOR_ID
|
protected static int |
DEFAULT_MONITOR_ID
|
protected static int |
EHB_MASK
|
protected static int |
EURO36_MONITOR_ID
|
protected static int |
EURO72_MONITOR_ID
|
protected static int |
EXTRAHALFBRITE_KEY
|
protected static int |
HAM_KEY
|
protected static int |
HAM_MASK
|
protected static int |
MONITOR_ID_MASK
ILBM CAMG chunk: Mask and ID bits for CAMG ModeID. |
protected static int |
NTSC_MONITOR_ID
|
protected static int |
PAL_MONITOR_ID
|
protected static int |
PROTO_MONITOR_ID
|
protected static int |
SUPER72_MONITOR_ID
|
protected static int |
VGA_MONITOR_ID
|
| Constructor Summary | |
|---|---|
ANIMDecoder(java.io.InputStream inputStream)
|
|
ANIMDecoder(java.net.URL location)
|
|
| Method Summary | |
|---|---|
protected void |
decodeANNO(IFFChunk[] chunks,
ANIMMovieTrack track)
|
protected void |
decodeAUTH(IFFChunk[] chunks,
ANIMMovieTrack track)
|
protected void |
decodeColorCycling(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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int MONITOR_ID_MASK
protected static final int DEFAULT_MONITOR_ID
protected static final int NTSC_MONITOR_ID
protected static final int PAL_MONITOR_ID
protected static final int VGA_MONITOR_ID
protected static final int A2024_MONITOR_ID
protected static final int PROTO_MONITOR_ID
protected static final int EURO72_MONITOR_ID
protected static final int EURO36_MONITOR_ID
protected static final int SUPER72_MONITOR_ID
protected static final int DBLNTSC_MONITOR_ID
protected static final int DBLPAL_MONITOR_ID
protected static final int HAM_MASK
protected static final int EHB_MASK
protected static final int HAM_KEY
protected static final int EXTRAHALFBRITE_KEY
| Constructor Detail |
|---|
public ANIMDecoder(java.io.InputStream inputStream)
public ANIMDecoder(java.net.URL location)
| Method Detail |
|---|
public void produce(ANIMMovieTrack track,
int n,
boolean loadAudio)
throws java.io.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.
java.io.IOException
public void registerChunks(IFFParser iff,
boolean loadAudio)
public void enterGroup(IFFChunk chunk)
enterGroup in interface IFFVisitorpublic void leaveGroup(IFFChunk chunk)
leaveGroup in interface IFFVisitor
public void visitChunk(IFFChunk group,
IFFChunk chunk)
throws ParseException,
AbortException
visitChunk in interface IFFVisitorParseException
AbortException
protected 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;
ParseException
protected 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;
ParseException
protected void decodeColorCycling(IFFChunk[] crngChunks,
IFFChunk[] drngChunks,
ANIMMovieTrack track)
throws ParseException
ParseException
protected void decodeCOPYRIGHT(IFFChunk[] chunks,
ANIMMovieTrack track)
throws ParseException
ParseException
protected void decodeAUTH(IFFChunk[] chunks,
ANIMMovieTrack track)
throws ParseException
ParseException
protected void decodeANNO(IFFChunk[] chunks,
ANIMMovieTrack track)
throws ParseException
ParseException
|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||