Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

filetiff.h

Go to the documentation of this file.
00001 #ifndef FILETIFF_H
00002 #define FILETIFF_H
00003 
00004 #include <stdlib.h>
00005 
00006 #include "file.inc"
00007 #include "filelist.h"
00008 #include "mutex.inc"
00009 #include <tiffio.h>
00010 #include "vframe.inc"
00011 
00012 // This header file is representative of any single frame file format.
00013 
00014 class FileTIFF : public FileList
00015 {
00016 public:
00017         FileTIFF(Asset *asset, File *file);
00018         ~FileTIFF();
00019 
00020         static void get_parameters(BC_WindowBase *parent_window, 
00021                 Asset *asset, 
00022                 BC_WindowBase* &format_window,
00023                 int audio_options,
00024                 int video_options);
00025         static int check_sig(Asset *asset);
00026         static char* compression_to_str(int value);
00027         static char* cmodel_to_str(int value);
00028         int can_copy_from(Edit *edit, int64_t position);
00029         int colormodel_supported(int colormodel);
00030         int get_best_colormodel(Asset *asset, int driver);
00031         int read_frame_header(char *path);
00032         int read_frame(VFrame *output, VFrame *input);
00033         int write_frame(VFrame *frame, VFrame *data, FrameWriterUnit *unit);
00034         FrameWriterUnit* new_writer_unit(FrameWriter *writer);
00035 
00036         enum
00037         {
00038                 NONE,
00039 // values stored in Asset::tiff_cmodel
00040 // Data types
00041                 RGB_888,
00042                 RGB_161616,
00043                 RGBA_8888,
00044                 RGBA_16161616,
00045                 RGB_FLOAT,
00046                 RGBA_FLOAT,
00047                 GREYSCALE,
00048 // values stored in Asset::tiff_compression
00049 // Compression types
00050                 LZW,
00051                 PACK_BITS,
00052                 DEFLATE,
00053                 JPEG
00054         };
00055 
00056         Mutex *unit_lock;
00057 };
00058 
00059 
00060 // For each write frame call, since multiple write_frames are running concurrently.
00061 class FileTIFFUnit : public FrameWriterUnit
00062 {
00063 public:
00064         FileTIFFUnit(FileTIFF *file, FrameWriter *writer);
00065         ~FileTIFFUnit();
00066 
00067         int offset;
00068         VFrame *data;
00069         VFrame *temp;
00070         FileTIFF *file;
00071 };
00072 
00073 
00074 
00075 
00076 class TIFFConfigVideo : public  BC_Window
00077 {
00078 public:
00079         TIFFConfigVideo(BC_WindowBase *parent_window, Asset *asset);
00080         ~TIFFConfigVideo();
00081 
00082 
00083         int create_objects();
00084         int close_event();
00085         static char* alpha_to_codec(int use_alpha);
00086         static int codec_to_alpha(char *codec);
00087         BC_WindowBase *parent_window;
00088         Asset *asset;
00089 };
00090 
00091 
00092 class TIFFColorspace : public BC_PopupMenu
00093 {
00094 public:
00095         TIFFColorspace(TIFFConfigVideo *gui, int x, int y, int w);
00096         void create_objects();
00097         int handle_event();
00098         TIFFConfigVideo *gui;
00099 };
00100 
00101 class TIFFColorspaceItem : public BC_MenuItem
00102 {
00103 public:
00104         TIFFColorspaceItem(TIFFConfigVideo *gui, int value);
00105         int handle_event();
00106         TIFFConfigVideo *gui;
00107         int value;
00108 };
00109 
00110 
00111 
00112 
00113 class TIFFCompression : public BC_PopupMenu
00114 {
00115 public:
00116         TIFFCompression(TIFFConfigVideo *gui, int x, int y, int w);
00117         void create_objects();
00118         int handle_event();
00119         TIFFConfigVideo *gui;
00120 };
00121 
00122 class TIFFCompressionItem : public BC_MenuItem
00123 {
00124 public:
00125         TIFFCompressionItem(TIFFConfigVideo *gui, int value);
00126         int handle_event();
00127         TIFFConfigVideo *gui;
00128         int value;
00129 };
00130 
00131 
00132 
00133 
00134 
00135 #endif

Generated on Sun Jan 8 13:38:55 2006 for Cinelerra-svn by  doxygen 1.4.4