Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / cinelerra / mainindexes.h
blob837c0541b9d26aa10fd0be9d69e8b4f16297c0e4
1 #ifndef MAININDEXES_H
2 #define MAININDEXES_H
4 #include "asset.inc"
5 #include "condition.inc"
6 #include "file.inc"
7 #include "indexfile.inc"
8 #include "mutex.inc"
9 #include "mwindow.inc"
10 #include "thread.h"
12 // Runs in a loop, creating new index files as needed
14 class MainIndexes : public Thread
16 public:
17 MainIndexes(MWindow *mwindow);
18 ~MainIndexes();
20 void add_next_asset(File *file, Asset_GC asset);
22 void start_loop();
23 void stop_loop();
24 void start_build();
25 void run();
26 void interrupt_build();
27 void load_next_assets();
28 void delete_current_assets();
30 Assets_vector current_assets;
31 Assets_vector next_assets;
33 int interrupt_flag; // Build process interrupted by user
34 int done; // Program quit
35 MWindow *mwindow;
36 Condition *input_lock; // Lock until new data is to be indexed
37 Mutex *next_lock; // Lock changes to next assets
38 Condition *interrupt_lock; // Force blocking until thread is finished
39 IndexFile *indexfile;
42 #endif
44 // Local Variables:
45 // mode: C++
46 // c-file-style: "linux"
47 // End: