1 #ifndef PACKAGEDISPATCHER_H
2 #define PACKAGEDISPATCHER_H
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
24 int create_packages(MWindow
*mwindow
,
26 Preferences
*preferences
,
31 // Supply a frame rate of the calling node. If the client number is -1
32 // the frame rate isn't added to the preferences table.
33 RenderPackage
* get_package(double frames_per_second
,
36 ArrayList
<Asset
*>* get_asset_list();
39 int64_t audio_position
;
40 int64_t video_position
;
48 Preferences
*preferences
;
49 int current_number
; // The number being injected into the filename.
50 int number_start
; // Character in the filename path at which the number begins
51 int total_digits
; // Total number of digits including padding the user specified.
52 double package_len
; // Target length of a single package
53 double min_package_len
; // Minimum package length after load balancing
54 int64_t total_packages
; // Total packages to base calculations on
55 int64_t total_allocated
; // Total packages to test the existence of
58 RenderPackage
**packages
;