Reported by Fedora team for gcc-13 and Andrew created patch here
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / packagingengine.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  * Copyright (C) 2003-2016 Cinelerra CV contributors
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  *
21  */
22
23 #ifndef PACKAGINGENGINE_H
24 #define PACKAGINGENGINE_H
25
26 #include "edl.h"
27 #include "packagingengine.inc"
28 #include "packagerenderer.h"
29
30 // Classes used for different packaging strategies, which allow for customary splitting of packages
31 // Used for renderfarm jobs
32 class PackagingEngine
33 {
34 public:
35         PackagingEngine() {}
36         virtual ~PackagingEngine() {}
37         virtual int create_packages_single_farm(
38                 EDL *edl,
39                 Preferences *preferences,
40                 Asset *default_asset,
41                 double total_start,
42                 double total_end) = 0;
43         virtual RenderPackage* get_package_single_farm(double frames_per_second,
44                 int client_number,
45                 int use_local_rate) = 0;
46         virtual int64_t get_progress_max() = 0;
47         virtual void get_package_paths(ArrayList<char*> *path_list) = 0;
48         virtual int get_asset_list(ArrayList<Indexable *> &idxbls) = 0;
49         virtual int packages_are_done() = 0;
50 };
51
52 // Classes used for different packaging strategies, which allow for customary splitting of packages
53 // Used for renderfarm jobs
54
55 class PackagingEngineDefault : public PackagingEngine
56 {
57 public:
58         PackagingEngineDefault();
59         ~PackagingEngineDefault();
60         int create_packages_single_farm(
61                 EDL *edl,
62                 Preferences *preferences,
63                 Asset *default_asset,
64                 double total_start,
65                 double total_end);
66         RenderPackage* get_package_single_farm(double frames_per_second,
67                 int client_number,
68                 int use_local_rate);
69         int64_t get_progress_max();
70         void get_package_paths(ArrayList<char*> *path_list);
71         int get_asset_list(ArrayList<Indexable *> &idxbls);
72         int packages_are_done();
73 private:
74         RenderPackage **packages;
75         int64_t total_allocated;  // Total packages to test the existence of
76         int current_number;    // The number being injected into the filename.
77         int number_start;      // Character in the filename path at which the number begins
78         int total_digits;      // Total number of digits including padding the user specified.
79         double package_len;    // Target length of a single package
80         double min_package_len; // Minimum package length after load balancing
81         int64_t total_packages;   // Total packages to base calculations on
82         int64_t audio_position;
83         int64_t video_position;
84         int64_t audio_end;
85         int64_t video_end;
86         double current_position;
87         int current_package;
88         Asset *default_asset;
89         Preferences *preferences;
90         double total_start;
91         double total_end;
92 };
93
94
95
96 #endif