home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- film.datatype/--datasheed--
- film.datatype/--input_format--
- film.datatype/ADTM_LOADFRAME
- film.datatype/ADTM_UNLOADFRAME
- film.datatype/DTM_FRAMEBOX
- film.datatype/DTM_WRITE
- film.datatype/GM_LAYOUT
- film.datatype/OM_DISPOSE
- film.datatype/OM_NEW
- film.datatype/preferences
- film.datatype/--datasheed-- film.datatype/--datasheed--
-
- NAME
- film.datatype -- data type for IFF FILM movies
-
- SUPERCLASS
- animation.datatype
-
- DESCRIPTION
- The film datatype, a sub-class of the animation.datatype, is
- used load and play IFF FILM movies.
-
- METHODS
- OM_NEW -- Create a new animation object from a description file. The
- source may only be a file.
-
- OM_DISPOSE -- Dispose instance and contents (frames, colormaps,
- sounds etc.), then pass msg to superclass
-
- OM_UPDATE -- Perform an ICM_CHECKLOOP check, and if succesfull, the
- method will be executed like OM_SET downstairs.
-
- OM_SET -- Pass msg to superclass and call GM_RENDER if retval from
- superclass was != 0UL.
-
- GM_LAYOUT
- DTM_PROCLAYOUT -- Collect information from superclass, set up
- struct DTSpecialInfo and send an OM_NOTIFY containing usefull
- attributes.
-
- DTM_FRAMEBOX -- Set up object for a specified environment if
- FRAMEF_SPECIFY was set in (dtf -> dtf_FrameFlags).
-
- ADTM_LOADFRAME -- Fill in struct adtFrame with requested information
- from internal FrameNode list like bitmap, colormap and sound.
-
- ADTM_UNLOADFRAME -- Release resources obtained by ADTM_LOADFRAME like
- bitmaps, colormaps etc.
-
- DTM_WRITE -- Save data in local (IFF FILM) or superclass (IFF ILBM)
- format.
-
- All other methods are passed unchanged to superclass.
-
- ATTRIBUTES
- Following attributes are set by the object and are READ-ONLY for
- applications:
- DTA_ObjName -- reserved
- DTA_ObjAuthor -- reserved
- DTA_ObjAnnotation -- reserved
- DTA_ObjCopyright -- reserved
- DTA_ObjVersion -- reserved
- DTA_NominalVert -- same as ADTA_Width
- DTA_NominalHoriz -- same as ADTA_Height
- ADTA_Width -- Set by ILBM BitMapHeader
- ADTA_Height -- Set by ILBM BitMapHeader
- ADTA_Depth -- Set by ILBM BitMapHeader
-
- BUGS
- - In large videos, the frames at the end will be played slower than
- those at the beginning of the file. This is the result of the
- sequential search internally used (only serious with more than 25000
- frames (mc6030/50mhz)).
- May or may not be fixed.
-
- - Currently, after a full playback mainly all frames are cached
- because animation.datatype does not flush enougth frane during
- playback. This is not a bug of animation.datatype. I don't know that
- return codes of the ADTM_LOADFRAME method which causes
- animation.datatype to flush unused frames. Without information from
- CBM, Amiga Technologies or David Junod I cannot fix this bug.
- Comments welcome !
-
- TODO
-
- HISTORY
- V1.1
- First public release.
-
- V1.2
- - Implemented relative seeking, which speeds up loading.
-
- - Moved and removed some bounds checking code in the ILBM BODY
- loader.
-
- - Moved, removed and new code: Small cleanup.
-
- - Now supports a prefs file.
-
- - If a ILBM CAMG-Chunks is missing in the movie and no MODEID
- option was set, BestModeID is used to get the best matching
- screen mode.
-
- V1.3
- - Now uses interleaved bitmaps for faster loading.
-
- - Small code cleanup.
-
- V1.4
- - Recompiled with SAS/C 6.57.
-
- - Fixed a small mistake in the template, which may cause crashes
- or other things (not seen, but...).
-
- - Implemented VERBOSE prefs switch (verbose information).
-
- - Stack check included. Forces a stack size of 16KB.
-
- - Implemented LOADALL prefs switch (load all frames into memory).
-
- V1.5
- - Now supports IFF ILBM CMAPs in the CAT CELLs (dynamic palette
- changes), which are supported by animation.datatype V41 or
- "DBufDTAnim".
-
- - Uses OpenFromLock when obtaining a fh for random frame access.
- This allows the usage of "virtual filesystems" (datatypes.library
- V45 allows such things).
-
- - Now the high order bits of each color gun are replicated through
- the whole INT32 in the colormap.
-
- - Now uses EXPERIMENTAL stack swapping code. The "Need more stack"
- requester has been gone for this reason.
-
- - Fixed a bug in LibExpunge (didn't check lib_OpenCnt), which is
- also present in all my other external BOOSI classes (and
- datatypes).
- Thanks to Guenter Niki (gniki@informatik.uni-rostok.de) for
- reporting this bug.
-
- - Now supports saving in the local format (e.g. IFF FILM).
- Note that saveing begins with the __current__ frame and can be
- controlled with the ADTA_Frame, ADTA_Frames and
- ADTA_FrameIncrement attributes.
-
- - Now support DTST_RAM (creates an empty film.datatype object).
-
- - Now supports subclasses of film.datatype, mainly to fill in
- the ADTM_LOADFRAME/ADTM_UNLOADFRAME methods when using an empty
- (e.g. created with DTST_RAM) film.datatype object.
-
- NOTES
-
- SEE ALSO
- animation.datatype,
- mpegsystem.datatype, mpegvideo.datatype,
- picmovie.datatype,
- cdxl.datatype. avi.datatype, quicktime.datatype,
- directory.datatype,
- markabletextdtclass
-
- film.datatype/--input_format-- film.datatype/--input_format--
-
- NAME
- IFF FILM -- ILBM frames with interleaved 8SVX samples
-
- DESCRIPTION
- A IFF FILM stream contains uncompressed video and audio data.
- The LIST section contains a ILBM part and a 8SVX part, which
- must contain a ILBM BMHD (BitMapHeader), a ILBM CMAP
- (global colormap), a ILMB CAMG (amiga view mod id) and a 8SVX VHDR
- (VoiceHeader). Other information (like a 8SVX CHAN chunk are
- optional).
-
- After this "header" part, the single animation frames will follow.
- A "frame" consists of a CAT CELL, which contains the video (FORM ILBM
- BODY) and audio (FORM 8SVX BODY) data; a ILBM CMAP is optional when
- palette changes occurs.
- Each ILBM/8SVX BODY must have exactly the same size, and as a result,
- all CELLs have the same size (usefull for continous reading).
-
- Example (created with "sift"):
- . LIST 736892 FILM
- . . PROP 100 ILBM ; shared ILBM properties
- . . . BMHD 20 ILBM
- . . . CAMG 4 ILBM
- . . . CMAP 48 ILBM
- . . PROP 44 8SVX ; shared 8SVX properties
- . . . VHDR 20 8SVX
- . . . CHAN 4 8SVX
- . . CAT 16000 CELL ; 1st cell (frame of movie)
- . . . FORM 14532 ILBM
- . . . . BODY 14520 ILBM ; ILBM BitMap data
- . . . FORM 1448 8SVX
- . . . . BODY 1436 8SVX ; 8SVX Sample data
- . . CAT 16000 CELL ; 2nd cell
- . . . FORM 14532 ILBM
- . . . . BODY 14520 ILBM ; ILBM BitMap data
- . . . FORM 1448 8SVX
- . . . . BODY 1436 8SVX ; 8SVX Sample data
- . . CAT 16000 CELL ; 3rd cell
- . . . FORM 14532 ILBM
- . . . . BODY 14520 ILBM ; ILBM BitMap data
- . . . FORM 1448 8SVX
- . . . . BODY 1436 8SVX ; 8SVX Sample data
- and so on....
-
- SEE ALSO
- - AminetCD2:gfx/show/AGMSFilm2.LhA, which includes a much better
- description, the history and background of the IFF FILM format.
-
- - Aminet:gfx/conv/DumpDTAnim#?.LhA as an implementation of an
- IFF FILM writer
-
- - ARKM Devices: IFF part
-
- - iffparse.library autodocs
-
- film.datatype/ADTM_LOADFRAME film.datatype/ADTM_LOADFRAME
-
- NAME
- ADTM_LOADFRAME -- Load frame
-
- FUNCTION
- The ADTM_LOADFRAME method is used to obtain the bitmap and timing
- data of the animation.
- The given timestamp will be used to find a matching timestamp
- in the internal FrameNode list. If it was found, the corresponding
- timing, bitmap, and sound data are stored into the struct
- adtFrame. If the bitmap wasn't loaded, this method attempts to
- load it from disk.
-
- RESULT
- Returns always non-zero,
- the bitmap ptr if a bitmap was found,
- 1UL otherwise.
-
- film.datatype/ADTM_UNLOADFRAME film.datatype/ADTM_UNLOADFRAME
-
- NAME
- ADTM_UNLOADFRAME -- Load frame contents
-
- FUNCTION
- The ADTM_UNLOADFRAME method is used to release the contents of a
- animation frame.
-
- This method frees the bitmap data found in adtFrame.
-
- RESULT
- Returns always 0UL.
-
- film.datatype/DTM_FRAMEBOX film.datatype/DTM_FRAMEBOX
-
- NAME
- DTM_FRAMEBOX -- Set up object for a specified environment
-
- FUNCTION
- The DTM_FRAMEBOX method is used to set up for a specified
- environment. This method is passed to the superclass after
- film.datatype instance finished it's work.
-
- Only if FRAMEF_SPECIFY is set in (dtf -> dtf_FrameFlags), the
- film.datatype instance will modify the ADTA_Remap to FALSE if
- the NOREMAP switch in the prefs file was set and the animation
- depth matches the given (frameinfo -> fri_Screen -> BitMap . Depth)
- depth.
-
- RESULT
- The value from the superclass is returned.
-
- SEE ALSO
- 3.1_Examples2:DataTypes/Src/ClipView/clipview.c
-
- film.datatype/DTM_WRITE film.datatype/DTM_WRITE
-
- NAME
- DTM_WRITE -- Save data
-
- FUNCTION
- This method saves the object's contents to disk.
-
- If dtw_Mode is DTWM_IFF, the method is passed unchanged to the
- superclass, animation.datatype, which writes a single IFF ILBM
- picture.
-
- If dtw_mode is DTWM_RAW, the object saved an IFF FILM stream to
- the filehandle given, starting with the current frame until
- the end is reached.
- The sequence saved can be controlled by the ADTA_Frame, ADTA_Frames
- and ADTA_FrameIncrement attributes (see TAGS section below).
-
- TAGS
- When writing the local ("raw") format, IFF FILM, the following
- attributes are recognized:
-
- ADTA_Frame (ULONG) - start frame, saving starts here.
- Defaults to the current frame displayed.
-
- ADTA_Frames (ULONG) - the number of frames to be saved,
- Defaults to (max_num_of_frames - curr_frame).
-
- ADTA_FrameIncrement (ULONG) - frame increment when saving.
- Defaults to 1, which means: "jump to next frame".
-
- BUGS
- Any other ADTA_FrameIncrement value than 1 causes that
- the sound of the skipped frames got lost. A recommened way would be
- to append their sound to the next frame(s).
-
- RESULT
- Returns 0 for failure (IoErr() returns result2), non-zero
- for success.
-
- film.datatype/GM_LAYOUT film.datatype/GM_LAYOUT
-
- NAME
- GM_LAYOUT -- Layout animation object
- DTM_PROCLAYOUT -- Layout animation object on application's task
-
- FUNCTION
- This method is passed to the superclass first.
- Then it collects information from superclass, set up
- struct DTSpecialInfo and send an OM_NOTIFY containing the following
- attributes:
- DTA_VisibleVert, (DTA_Domain -> Height)
- DTA_TotalVert, (same as ADTA_Height)
- DTA_NominalVert, (same as ADTA_Height)
- DTA_VertUnit, 1UL,
- DTA_VisibleHoriz, (DTA_Domain -> Width),
- DTA_TotalHoriz, (same as ADTA_Width),
- DTA_NominalHoriz, (same as ADTA_Width),
- DTA_HorizUnit, 1UL,
- GA_ID, (GadgetID),
- DTA_Title, (same as DTA_Name),
- DTA_Busy, FALSE,
- DTA_Sync, TRUE
-
- RESULT
- The value from the superclass is returned.
-
- film.datatype/OM_DISPOSE film.datatype/OM_DISPOSE
-
- NAME
- OM_DISPOSE -- Delete a film.datatype object.
-
- FUNCTION
- The OM_DISPOSE method is used to delete an instance of the
- film.datatype class. This method is pass to the superclass when
- it has completed.
- This method frees all frame nodes and their contents (bitmaps,
- sounds etc.).
-
- RESULT
- The object is deleted. 0UL is returned.
-
- film.datatype/OM_NEW film.datatype/OM_NEW
-
- NAME
- OM_NEW -- Create a film.datatype object.
-
- FUNCTION
- The OM_NEW method is used to create an instance of the film.datatype
- class. This method is passed to the superclass first. After this,
- film.datatype parses the description file and makes a scan through
- the data to get index information. The samples are loaded directly
- (due their small size), frame bitmaps are loaded if the input
- stream isn't seekable (e.g. IFF handle/clipboard).
-
- ATTRIBUTES
- The following attributes can be specified at creation time.
-
- DTA_SourceType (ULONG) -- Determinates the type of DTA_Handle
- attribute. DTST_FILE, DTST_CLIPBOARD and DTST_RAM are supported.
- If any other type was set in a given DTA_SourceType,
- OM_NEW will be rejected.
- Defaults to DTST_FILE.
-
- DTA_Handle -- For both supported DTST_FILE and DTST_CLIPBOARD, a
- (struct IFFHandle *) is expected.
- (DTST_FILE expects a IFF Stream handle because this is a IFF
- type DataType (DTF_IFF)).
- A DTST_RAM (create empty object) source type requires a NULL
- handle.
-
- BUGS
- Before V1.3, this autodoc described that a DTA_Handle with a
- DTA_SourceType of DTST_FILE takes a DOS filehandle as an argument.
- This was WRONG ! Because this is a DTF_IFF type datatype, DTST_FILE
- takes also an IFF Stream handle as an argument.
-
- RESULT
- If the object was created a pointer to the object is returned,
- otherwise NULL is returned.
-
- film.datatype/preferences film.datatype/preferences
-
- NAME
- preferences
-
- DESCRIPTION
- The "ENV:Classes/DataTypes/film.prefs" file contains global
- settings for the datatype.
- The preferences file is an ASCII file containing one line where the
- preferences can be set.
- It can be superset by a local variable with the same name.
-
- Each line can contain settings, special settings for some projects
- can be set using the MATCHPROJECT option.
- Lines beginning with a '#' or ';' chars are treated as comments.
- Lines are limitted to 256 chars.
-
- TEMPLATE
- MATCHPROJECT/K,MODEID/K/N,NOREMAP/S,FPS/K/N,VOLUME/K/N,LOADALL/S,
- VERBOSE/S
-
- MATCHPROJECT -- The settings in this line belongs only to this
- project(s), e.g. if the case-insensitive pattern does not match,
- this line is ignored.
- The maximum length of the pattern is 256 chars.
- Defaults to #?, which matches any project.
-
- MODEID -- Select screen mode id of datatype (will be stored in
- ADTA_ModeID). Note that the DOS ReadArgs function used for parsing
- fetches a SIGNED long. The bit 31 will be represented by minus
- '-'. (example: "MODEID=266240" sets the mode to the A2024 screen
- mode id)
- Defaults to 0, which means: Use the best screenmode available
- for the given width, height and depth.
-
- FPS -- frames per second
- Defaults to 0, which means: overtake fps rate from video stream.
- Setting the FPS value also affects an attched sound. The period
- of the sample (e.g. the playback speed) will everytimes as long
- as the frame is displayed.
-
- VOLUME -- Volume of the sound when playing.
- Defaults to 64, which is the maximum. A value greater than 64 will
- be set to 64.
-
- LOADALL -- Load all frames into memory.
-
- VERBOSE -- Print out verbose information about the movie like
- width, height, depth, number of frames, FPS-Rate etc.
-
- NOTE
- An invalid prefs file line will be ignored.
-
- BUGS
- - Low memory may cause that the prefs file won't be parsed.
-
- - Lines are limitted to 256 chars
-
-