Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / cinelerra / indexfile.h
blob3cec069ea52a4fe98fde0080df9c25973a9c4946
1 #ifndef INDEXFILE_H
2 #define INDEXFILE_H
4 #include "asset.inc"
5 #include "edit.inc"
6 #include "file.inc"
7 #include "guicast.h"
8 #include "indexthread.inc"
9 #include "mainprogress.inc"
10 #include "mwindow.inc"
11 #include "preferences.inc"
12 #include "resourcepixmap.inc"
13 #include "bctimer.inc"
14 #include "tracks.inc"
16 class IndexFile
18 public:
19 IndexFile(MWindow *mwindow);
20 IndexFile(MWindow *mwindow, Asset_GC asset);
21 ~IndexFile();
23 int open_index(Asset_GC asset);
24 int open_index(MWindow *mwindow, Asset_GC asset);
25 int create_index(Asset_GC asset, MainProgressBar *progress);
26 int create_index(MWindow *mwindow, Asset_GC asset, MainProgressBar *progress);
27 int interrupt_index();
28 static void delete_index(Preferences *preferences, Asset_GC asset);
29 static int get_index_filename(char *source_filename,
30 char *index_directory,
31 char *index_filename,
32 char *input_filename);
33 void update_edl_asset();
34 int redraw_edits(int force);
35 int draw_index(ResourcePixmap *pixmap, Edit *edit, int x, int w);
36 int close_index();
37 int remove_index();
38 int read_info(Asset_GC test_asset = Asset_GC());
39 int write_info();
41 MWindow *mwindow;
42 char index_filename[BCTEXTLEN], source_filename[BCTEXTLEN];
43 Asset_GC asset;
44 Timer *redraw_timer;
46 private:
47 void update_mainasset();
49 int open_file();
50 int open_source(File *source);
51 int64_t get_required_scale(File *source);
52 FILE *file;
53 int64_t file_length; // Length of index file in bytes
54 int interrupt_flag; // Flag set when index building is interrupted
57 #endif
59 // Local Variables:
60 // mode: C++
61 // c-file-style: "linux"
62 // End: