📄 fiasco_decoder_new.3
字号:
.\" $Id: fiasco_decoder_new.3,v 1.5 2000/10/28 17:39:32 hafner Exp $.TH fiasco 3 "April, 2000" "FIASCO" "Fractal Image And Sequence COdec".SH NAME.B fiasco_decoder_new, fiasco_decoder_delete,.B fiasco_decoder_write_frame, fiasco_decoder_get_frame,.B fiasco_decoder_get_length, fiasco_decoder_get_rate,.B fiasco_decoder_get_width, fiasco_decoder_get_height.B fiasco_decoder_get_title, fiasco_decoder_get_comment.B fiasco_decoder_is_color\- decompress a FIASCO file.SH SYNOPSIS.B #include <fiasco.h>.sp.BI "fiasco_decoder_t *".fi.BI "fiasco_decoder_new (const char * "fiasco_name ,.fi.BI " const fiasco_d_options_t * "options );.sp.BI "void".fi.BI "fiasco_decoder_delete (fiasco_decoder_t * "decoder );.sp.BI "int".fi.BI "fiasco_decoder_write_frame (fiasco_decoder_t * "decoder ,.fi.BI " const char * "image_name );.sp.BI "fiasco_image_t *".fi.BI "fiasco_decoder_get_frame (fiasco_decoder_t * "decoder );.sp.BI "unsigned".fi.BI "fiasco_decoder_get_length (fiasco_decoder_t * "decoder );.sp.BI "unsigned".fi.BI "fiasco_decoder_get_rate (fiasco_decoder_t * "decoder );.sp.BI "unsigned".fi.BI "fiasco_decoder_get_width (fiasco_decoder_t * "decoder );.sp.BI "unsigned".fi.BI "fiasco_decoder_get_height (fiasco_decoder_t * "decoder );.sp.BI "const char *".fi.BI "fiasco_decoder_get_title (fiasco_decoder_t * "decoder );.sp.BI "const char *".fi.BI "fiasco_decoder_get_comment (fiasco_decoder_t * "decoder );.sp.BI "int".fi.BI "fiasco_decoder_is_color (fiasco_decoder_t * "decoder );.fi.SH DESCRIPTIONThe \fBfiasco_decoder_new()\fP function initializes the decompressionof FIASCO file \fIfiasco_name\fP. Several decompression parameterscan be adjusted by the class \fIoptions\fP (seefiasco_d_options_new(3)).The individual frames of a FIASCO video can be decompressed by callingsuccessively either function \fBfiasco_decoder_write_frame()\fP or\fBfiasco_decoder_get_frame()\fP.The function \fBfiasco_decoder_write_frame()\fP decompresses thecurrent frame and writes it in raw pgm(5) or ppm(5) format to the file\fIimage_name\fP. If \fIimage_name\fP=- or a NULL pointer then theimage file is produced on the standard output. If \fIimage_name\fP is arelative path and the environment variable \fBFIASCO_IMAGES\fP is a(colon-separated) list of directories, then the output file iswritten to the first (writable) directory of this list. Otherwise, thecurrent directory is used to store the file.The function \fBfiasco_decoder_get_frame()\fP decompresses thecurrent frame and returns the computed image object. Use the functionfiasco_renderer_new(3) to create a renderer object that converts theFIASCO image to the desired format. After all frames have been decompressed, the function\fBfiasco_decoder_delete()\fP should be called to close the input fileand to free temporarily allocated memory.Number of available frames, frame rate and frames geometry, type of theFIASCO file are accessible through member functions\fBfiasco_decoder_get_length()\fP,\fBfiasco_decoder_get_rate()\fP, \fBfiasco_decoder_get_width()\fP,\fBfiasco_decoder_get_height()\fP,and \fBfiasco_decoder_is_color()\fP. Use \fBfiasco_decoder_get_title()\fP,\fBfiasco_decoder_get_comment()\fP to read title and comment strings of theFIASCO file. .SH ARGUMENTS.TPfiasco_nameFilename of the FIASCO input file. If \fIfiasco_name\fP is a NULL pointeror "-" then the decoder reads from standard input. If the file is notfound in the current directory and the environment variable\fBFIASCO_DATA\fP is a (colon-separated) list of directories, then theinput file is searched for in these directories, too..TPoptionsThis "class" encapsulates the various coding and decodingparameters. Use the functions fiasco_d_options_new(3) andfiasco_d_options_delete(3) to create and delete an object of thisclass. Several member functions (see fiasco_d_options(3)) areavailable to change the default values..TPdecoderThe decoder "class" encapsulates the FIASCO decoder. It is used tostore the internal state of the decoder..SH RETURN VALUESThe function \fBfiasco_decoder_new()\fP returns a pointer to the newlyallocated decoder object. If an error has been catched, a NULL pointeris returned.The function \fBfiasco_decoder_write_frame()\fP returns 1 if the filehas been successfully written. Otherwise, the function returns 0.The function \fBfiasco_decoder_get_frame()\fP returns a pointer to thenewly allocated FIASCO image object. If an error has been catched, a NULLpointer is returned.The function \fBfiasco_decoder_get_length()\fP returns the number offrames of the FIASCO file. If an error has been catched, 0 isreturned. The function \fBfiasco_decoder_get_rate()\fP returns theframerate (number of frames per second) of the FIASCO file. If anerror has been catched, 0 is returned.The function \fBfiasco_decoder_get_width()\fP returns the width of thedecoded frames of the FIASCO file. If an error has been catched, 0 isreturned.The function \fBfiasco_decoder_get_height()\fP returns the height of thedecoded frames of the FIASCO file. If an error has been catched, 0 isreturned.The function \fBfiasco_decoder_get_title()\fP returns an optionaltitle of the FIASCO file. If an error has been catched, 0 is returned.The function \fBfiasco_decoder_get_comment()\fP returns an optionalcomment of the FIASCO file. If an error has been catched, 0 is returned.The function \fBfiasco_decoder_is_color()\fP returns 0 if the decodedframes are grayscale images, otherwise a non-zero value isreturned.In case of an error in one of the above functions, use the functionfiasco_get_error_message(3) to get a string describing the last errormessage of FIASCO..SH ENVIRONMENT.PD 0.TP.B FIASCO_IMAGESSearch path for image files. Default is "./"..TP.B FIASCO_DATASearch and save path for FIASCO files. Default is "./"..PD .SH "SEE ALSO".br.BR fiasco_d_options_new "(3), " fiasco_d_options_delete (3), .br.BR fiasco_d_options "(3), " fiasco_get_error_message (3).brUllrich Hafner, Juergen Albert, Stefan Frank, and Michael Unger.\fBWeighted Finite Automata for Video Compression\fP, IEEE Journal onSelected Areas In Communications, January 1998.brUllrich Hafner. \fBLow Bit-Rate Image and Video Coding with WeightedFinite Automata\fP, Ph.D. thesis, Mensch & Buch Verlag, ISBN3-89820-002-7, October 1999..SH AUTHORUllrich Hafner <hafner@bigfoot.de>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -