r1014: Enable horizontal scrolling with the mouse wheel by pressing Ctrl.
[cinelerra_cv/ct.git] / cinelerra / filetiff.h
blobe66c591f44ab01cf2ae4a076dcf52ca71a643394
1 #ifndef FILETIFF_H
2 #define FILETIFF_H
4 #include <stdlib.h>
6 #include "file.inc"
7 #include "filelist.h"
8 #include "mutex.inc"
9 #include <tiffio.h>
10 #include "vframe.inc"
12 // This header file is representative of any single frame file format.
14 class FileTIFF : public FileList
16 public:
17 FileTIFF(Asset *asset, File *file);
18 ~FileTIFF();
20 static void get_parameters(BC_WindowBase *parent_window,
21 Asset *asset,
22 BC_WindowBase* &format_window,
23 int audio_options,
24 int video_options);
25 static int check_sig(Asset *asset);
26 static char* compression_to_str(int value);
27 static char* cmodel_to_str(int value);
28 int can_copy_from(Edit *edit, int64_t position);
29 int colormodel_supported(int colormodel);
30 int get_best_colormodel(Asset *asset, int driver);
31 int read_frame_header(char *path);
32 int read_frame(VFrame *output, VFrame *input);
33 int write_frame(VFrame *frame, VFrame *data, FrameWriterUnit *unit);
34 FrameWriterUnit* new_writer_unit(FrameWriter *writer);
36 enum
38 NONE,
39 // values stored in Asset::tiff_cmodel
40 // Data types
41 RGB_888,
42 RGB_161616,
43 RGBA_8888,
44 RGBA_16161616,
45 RGB_FLOAT,
46 RGBA_FLOAT,
47 GREYSCALE,
48 // values stored in Asset::tiff_compression
49 // Compression types
50 LZW,
51 PACK_BITS,
52 DEFLATE,
53 JPEG
56 Mutex *unit_lock;
60 // For each write frame call, since multiple write_frames are running concurrently.
61 class FileTIFFUnit : public FrameWriterUnit
63 public:
64 FileTIFFUnit(FileTIFF *file, FrameWriter *writer);
65 ~FileTIFFUnit();
67 int offset;
68 VFrame *data;
69 VFrame *temp;
70 FileTIFF *file;
76 class TIFFConfigVideo : public BC_Window
78 public:
79 TIFFConfigVideo(BC_WindowBase *parent_window, Asset *asset);
80 ~TIFFConfigVideo();
83 int create_objects();
84 int close_event();
85 static char* alpha_to_codec(int use_alpha);
86 static int codec_to_alpha(char *codec);
87 BC_WindowBase *parent_window;
88 Asset *asset;
92 class TIFFColorspace : public BC_PopupMenu
94 public:
95 TIFFColorspace(TIFFConfigVideo *gui, int x, int y, int w);
96 void create_objects();
97 int handle_event();
98 TIFFConfigVideo *gui;
101 class TIFFColorspaceItem : public BC_MenuItem
103 public:
104 TIFFColorspaceItem(TIFFConfigVideo *gui, int value);
105 int handle_event();
106 TIFFConfigVideo *gui;
107 int value;
113 class TIFFCompression : public BC_PopupMenu
115 public:
116 TIFFCompression(TIFFConfigVideo *gui, int x, int y, int w);
117 void create_objects();
118 int handle_event();
119 TIFFConfigVideo *gui;
122 class TIFFCompressionItem : public BC_MenuItem
124 public:
125 TIFFCompressionItem(TIFFConfigVideo *gui, int value);
126 int handle_event();
127 TIFFConfigVideo *gui;
128 int value;
135 #endif