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);
57 // values stored in Asset::tiff_cmodel
59 RGB_888, RGB_161616, RGBA_8888, RGBA_16161616,
60 RGB_FLOAT, RGBA_FLOAT, GREYSCALE,
61 // values stored in Asset::tiff_compression
63 LZW, PACK_BITS, DEFLATE, JPEG,
64 PIXARFILM, PIXARLOG, JP2000, ADOBE_DEFLATE,
71 // For each write frame call, since multiple write_frames are running concurrently.
72 class FileTIFFUnit : public FrameWriterUnit
75 FileTIFFUnit(FileTIFF *file, FrameWriter *writer);
85 class TIFFConfigVideo : public BC_Window
88 TIFFConfigVideo(BC_WindowBase *parent_window, Asset *asset);
92 void create_objects();
94 static char* alpha_to_codec(int use_alpha);
95 static int codec_to_alpha(char *codec);
96 BC_WindowBase *parent_window;
101 class TIFFColorspace : public BC_PopupMenu
104 TIFFColorspace(TIFFConfigVideo *gui, int x, int y, int w);
105 void create_objects();
107 TIFFConfigVideo *gui;
110 class TIFFColorspaceItem : public BC_MenuItem
113 TIFFColorspaceItem(TIFFConfigVideo *gui, int value);
115 TIFFConfigVideo *gui;
119 class TIFFCompression : public BC_PopupMenu
122 TIFFCompression(TIFFConfigVideo *gui, int x, int y, int w);
123 void create_objects();
125 TIFFConfigVideo *gui;
128 class TIFFCompressionItem : public BC_MenuItem
131 TIFFCompressionItem(TIFFConfigVideo *gui, int value);
133 TIFFConfigVideo *gui;