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
34 // This header file is representative of any single frame file format.
36 class FileTIFF : public FileList
39 FileTIFF(Asset *asset, File *file);
42 static void get_parameters(BC_WindowBase *parent_window,
43 Asset *asset, BC_WindowBase* &format_window,
44 int audio_options, int video_options, EDL *edl);
45 static int check_sig(Asset *asset);
46 static const char* compression_to_str(int value);
47 static const char* cmodel_to_str(int value);
48 int can_copy_from(Asset *asset, int64_t position);
49 int colormodel_supported(int colormodel);
50 int get_best_colormodel(Asset *asset, int driver);
51 int read_frame_header(char *path);
52 int read_frame(VFrame *output, VFrame *input);
53 int write_frame(VFrame *frame, VFrame *data, FrameWriterUnit *unit);
54 FrameWriterUnit* new_writer_unit(FrameWriter *writer);
59 // values stored in Asset::tiff_cmodel
68 // values stored in Asset::tiff_compression
80 // For each write frame call, since multiple write_frames are running concurrently.
81 class FileTIFFUnit : public FrameWriterUnit
84 FileTIFFUnit(FileTIFF *file, FrameWriter *writer);
96 class TIFFConfigVideo : public BC_Window
99 TIFFConfigVideo(BC_WindowBase *parent_window, Asset *asset);
103 void create_objects();
105 static char* alpha_to_codec(int use_alpha);
106 static int codec_to_alpha(char *codec);
107 BC_WindowBase *parent_window;
112 class TIFFColorspace : public BC_PopupMenu
115 TIFFColorspace(TIFFConfigVideo *gui, int x, int y, int w);
116 void create_objects();
118 TIFFConfigVideo *gui;
121 class TIFFColorspaceItem : public BC_MenuItem
124 TIFFColorspaceItem(TIFFConfigVideo *gui, int value);
126 TIFFConfigVideo *gui;
133 class TIFFCompression : public BC_PopupMenu
136 TIFFCompression(TIFFConfigVideo *gui, int x, int y, int w);
137 void create_objects();
139 TIFFConfigVideo *gui;
142 class TIFFCompressionItem : public BC_MenuItem
145 TIFFCompressionItem(TIFFConfigVideo *gui, int value);
147 TIFFConfigVideo *gui;