r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / indexfile.h
blob34e6c606a14d25c045e27c35bfe79db8ad5ba96b
1 #ifndef INDEXFILE_H
2 #define INDEXFILE_H
4 #include "assets.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 "timer.inc"
14 #include "tracks.inc"
16 class IndexFile
18 public:
19 IndexFile(MWindow *mwindow);
20 IndexFile(MWindow *mwindow, Asset *asset);
21 ~IndexFile();
23 int open_index(Asset *asset);
24 int open_index(MWindow *mwindow, Asset *asset);
25 int create_index(Asset *asset, MainProgressBar *progress);
26 int create_index(MWindow *mwindow, Asset *asset, MainProgressBar *progress);
27 int interrupt_index();
28 static void delete_index(Preferences *preferences, Asset *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 *test_asset = 0);
39 int write_info();
41 MWindow *mwindow;
42 char index_filename[BCTEXTLEN], source_filename[BCTEXTLEN];
43 Asset *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