r136: This commit was manufactured by cvs2svn to create tag 'hv_1_1_8'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / packagedispatcher.h
blob43472363538c4f3e1b033b5b409d8db06d4b1c30
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"
15 // Allocates fragments given a total start and total end.
16 // Checks the existence of every file.
17 // Adjusts package size for load.
18 class PackageDispatcher
20 public:
21 PackageDispatcher();
22 ~PackageDispatcher();
24 int create_packages(MWindow *mwindow,
25 EDL *edl,
26 Preferences *preferences,
27 int strategy,
28 Asset *default_asset,
29 double total_start,
30 double total_end,
31 int test_overwrite);
32 // Supply a frame rate of the calling node. If the client number is -1
33 // the frame rate isn't added to the preferences table.
34 RenderPackage* get_package(double frames_per_second,
35 int client_number,
36 int use_local_rate);
37 ArrayList<Asset*>* get_asset_list();
38 RenderPackage* get_package(int number);
39 int get_total_packages();
41 EDL *edl;
42 int64_t audio_position;
43 int64_t video_position;
44 int64_t audio_end;
45 int64_t video_end;
46 double total_start;
47 double total_end;
48 double total_len;
49 int strategy;
50 Asset *default_asset;
51 Preferences *preferences;
52 int current_number; // The number being injected into the filename.
53 int number_start; // Character in the filename path at which the number begins
54 int total_digits; // Total number of digits including padding the user specified.
55 double package_len; // Target length of a single package
56 double min_package_len; // Minimum package length after load balancing
57 int64_t total_packages; // Total packages to base calculations on
58 int64_t total_allocated; // Total packages to test the existence of
59 int nodes;
60 MWindow *mwindow;
61 RenderPackage **packages;
62 int current_package;
63 Mutex *package_lock;
67 #endif