fiasco_decoder_t * fiasco_decoder_new (const char * fiasco_name, const fiasco_options_t * options);
void fiasco_decoder_delete (fiasco_decoder_t * decoder);
int fiasco_decoder_write_frame (fiasco_decoder_t * decoder, const char * image_name);
fiasco_image_t * fiasco_decoder_get_frame (fiasco_decoder_t * decoder);
unsigned fiasco_decoder_get_length (fiasco_decoder_t * decoder);
unsigned fiasco_decoder_get_rate (fiasco_decoder_t * decoder);
unsigned fiasco_decoder_get_width (fiasco_decoder_t * decoder);
unsigned fiasco_decoder_get_height (fiasco_decoder_t * decoder);
int fiasco_decoder_is_color (fiasco_decoder_t * decoder);
The individual frames of a FIASCO video can be decompressed by calling successively either function fiasco_decoder_write_frame() or fiasco_decoder_get_frame().
The function fiasco_decoder_write_frame() decompresses the current frame and writes it in raw pgm(5) or ppm(5) format to the file image_name. If image_name=- or a NULL pointer then the image file is produced on the standard output. If image_name is a relative path and the environment variable FIASCO_IMAGES is a (colon-separated) list of directories, then the output file is written to the first (writable) directory of this list. Otherwise, the current directory is used to store the file.
The function fiasco_decoder_get_frame() decompresses the current frame and returns the computed image object. Use the function fiasco_renderer_new(3) to create a renderer object that converts the FIASCO image to the desired format.
After all frames have been decompressed, the function fiasco_decoder_delete() should be called to close the input file and to free temporarily allocated memory.
Number of available frames, frame rate and frames geometry and type of the FIASCO file are accessible through member functions fiasco_decoder_get_length(), fiasco_decoder_get_rate(), fiasco_decoder_get_width(), fiasco_decoder_get_height(), and fiasco_decoder_is_color().
The function fiasco_decoder_write_frame() returns 1 if the file has been successfully written. Otherwise, the function returns 0.
The function fiasco_decoder_get_frame() returns a pointer to the newly allocated FIASCO image object. If an error has been catched, a NULL pointer is returned.
The function fiasco_decoder_get_length() returns the number of frames of the FIASCO file. If an error has been catched, 0 is returned.
The function fiasco_decoder_get_rate() returns the framerate (number of frames per second) of the FIASCO file. If an error has been catched, 0 is returned.
The function fiasco_decoder_get_width() returns the width of the decoded frames of the FIASCO file. If an error has been catched, 0 is returned.
The function fiasco_decoder_get_height() returns the height of the decoded frames of the FIASCO file. If an error has been catched, 0 is returned.
The function fiasco_decoder_is_color() returns 0 if the decoded frames are grayscale images, otherwise a non-zero value is returned.
In case of an error in one of the above functions, use the function fiasco_get_error_message(3) to get a string describing the last error message of FIASCO.
Ullrich Hafner, Juergen Albert, Stefan Frank, and Michael Unger.
Weighted Finite Automata for Video Compression, IEEE Journal on
Selected Areas In Communications, January 1998
Ullrich Hafner. Low Bit-Rate Image and Video Coding with Weighted
Finite Automata, Ph.D. thesis, Mensch & Buch Verlag, ISBN
3-89820-002-7, October 1999.