4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 // This header file is representative of any single frame file format.
35 class FileTIFF : public FileList
38 FileTIFF(Asset *asset, File *file);
41 static void get_parameters(BC_WindowBase *parent_window,
43 BC_WindowBase* &format_window,
46 static int check_sig(Asset *asset);
47 static const char* compression_to_str(int value);
48 static const char* cmodel_to_str(int value);
49 int can_copy_from(Asset *asset, int64_t position);
50 int colormodel_supported(int colormodel);
51 int get_best_colormodel(Asset *asset, int driver);
52 int read_frame_header(char *path);
53 int read_frame(VFrame *output, VFrame *input);
54 int write_frame(VFrame *frame, VFrame *data, FrameWriterUnit *unit);
55 FrameWriterUnit* new_writer_unit(FrameWriter *writer);
60 // values stored in Asset::tiff_cmodel
69 // values stored in Asset::tiff_compression
81 // For each write frame call, since multiple write_frames are running concurrently.
82 class FileTIFFUnit : public FrameWriterUnit
85 FileTIFFUnit(FileTIFF *file, FrameWriter *writer);
97 class TIFFConfigVideo : public BC_Window
100 TIFFConfigVideo(BC_WindowBase *parent_window, Asset *asset);
104 void create_objects();
106 static char* alpha_to_codec(int use_alpha);
107 static int codec_to_alpha(char *codec);
108 BC_WindowBase *parent_window;
113 class TIFFColorspace : public BC_PopupMenu
116 TIFFColorspace(TIFFConfigVideo *gui, int x, int y, int w);
117 void create_objects();
119 TIFFConfigVideo *gui;
122 class TIFFColorspaceItem : public BC_MenuItem
125 TIFFColorspaceItem(TIFFConfigVideo *gui, int value);
127 TIFFConfigVideo *gui;
134 class TIFFCompression : public BC_PopupMenu
137 TIFFCompression(TIFFConfigVideo *gui, int x, int y, int w);
138 void create_objects();
140 TIFFConfigVideo *gui;
143 class TIFFCompressionItem : public BC_MenuItem
146 TIFFCompressionItem(TIFFConfigVideo *gui, int value);
148 TIFFConfigVideo *gui;