license header for review
[cinelerra_cv/ct.git] / cinelerra / packagedispatcher.h
bloba62b3dedcf47c2f62b7c1ab6b725cbe456aaf13b
1 #ifndef PACKAGEDISPATCHER_H
2 #define PACKAGEDISPATCHER_H
5 #include "arraylist.h"
6 #include "assets.inc"
7 #include "edl.inc"
8 #include "mutex.inc"
9 #include "mwindow.inc"
10 #include "packagerenderer.inc"
11 #include "preferences.inc"
12 #include "packagingengine.h"
16 // Allocates fragments given a total start and total end.
17 // Checks the existence of every file.
18 // Adjusts package size for load.
19 class PackageDispatcher
21 public:
22 PackageDispatcher();
23 ~PackageDispatcher();
25 int create_packages(MWindow *mwindow,
26 EDL *edl,
27 Preferences *preferences,
28 int strategy,
29 Asset_GC default_asset,
30 double total_start,
31 double total_end,
32 int test_overwrite);
33 // Supply a frame rate of the calling node. If the client number is -1
34 // the frame rate isn't added to the preferences table.
35 RenderPackage* get_package(double frames_per_second,
36 int client_number,
37 int use_local_rate);
38 void get_asset_list(Assets_vector &assets);
39 void get_package_paths(ArrayList<char*> *path_list);
41 int get_total_packages();
42 int64_t get_progress_max();
43 int packages_are_done();
45 private:
46 EDL *edl;
47 int64_t audio_position;
48 int64_t video_position;
49 int64_t audio_end;
50 int64_t video_end;
51 double total_start;
52 double total_end;
53 double total_len;
54 int strategy;
55 Asset_GC default_asset;
56 Preferences *preferences;
57 int current_number; // The number being injected into the filename.
58 int number_start; // Character in the filename path at which the number begins
59 int total_digits; // Total number of digits including padding the user specified.
60 double package_len; // Target length of a single package
61 double min_package_len; // Minimum package length after load balancing
62 int64_t total_packages; // Total packages to base calculations on
63 int64_t total_allocated; // Total packages to test the existence of
64 int nodes;
65 MWindow *mwindow;
66 RenderPackage **packages;
67 int current_package;
68 Mutex *package_lock;
70 PackagingEngine *packaging_engine;
74 #endif
78 // Local Variables:
79 // mode: C++
80 // c-file-style: "linux"
81 // End: