r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / preferences.h
blob6159fe472dbf73f819b8673657c97090bf2679c2
1 #ifndef PREFERENCES_H
2 #define PREFERENCES_H
4 #include "assets.inc"
5 #include "audioconfig.inc"
6 #include "defaults.inc"
7 #include "guicast.h"
8 #include "maxchannels.h"
9 #include "mutex.inc"
10 #include "preferences.inc"
11 #include "videoconfig.inc"
14 class Preferences
16 public:
17 Preferences();
18 ~Preferences();
20 Preferences& operator=(Preferences &that);
21 int load_defaults(Defaults *defaults);
22 int save_defaults(Defaults *defaults);
24 void add_node(char *text, int port, int enabled, float rate);
25 void delete_node(int number);
26 void delete_nodes();
27 void reset_rates();
28 // Get average frame rate or 1.0
29 float get_avg_rate(int use_master_node);
30 void sort_nodes();
31 void edit_node(int number, char *new_text, int port, int enabled);
32 int get_enabled_nodes();
33 char* get_node_hostname(int number);
34 int get_node_port(int number);
35 // Copy frame rates. Always used where the argument is the renderfarm and this is
36 // the master preferences. This way, the value for master node is properly
37 // translated from a unix socket to the local_rate.
38 void copy_rates_from(Preferences *preferences);
39 // Set frame rate for a node. Node -1 is the master node.
40 // The node number is relative to the enabled nodes.
41 void set_rate(float rate, int node);
43 // ================================= Performance ================================
44 // directory to look in for indexes
45 char index_directory[BCTEXTLEN];
46 // size of index file in bytes
47 int64_t index_size;
48 int index_count;
49 // Use thumbnails in AWindow assets.
50 int use_thumbnails;
51 // Title of theme
52 char theme[BCTEXTLEN];
53 double render_preroll;
54 int brender_preroll;
56 Asset *brender_asset;
57 int use_brender;
58 // Number of frames in a brender job.
59 int brender_fragment;
60 // Number of items to store in cache
61 int64_t cache_size;
62 int use_renderfarm;
63 int renderfarm_port;
64 // If the node starts with a / it's on the localhost using a path as the socket.
65 ArrayList<char*> renderfarm_nodes;
66 ArrayList<int> renderfarm_ports;
67 ArrayList<int> renderfarm_enabled;
68 ArrayList<float> renderfarm_rate;
69 // Rate of master node
70 float local_rate;
71 char renderfarm_mountpoint[BCTEXTLEN];
72 // Use virtual filesystem
73 int renderfarm_vfs;
74 // Jobs per node
75 int renderfarm_job_count;
76 // Consolidate output files
77 int renderfarm_consolidate;
79 // ====================================== Plugin Set ==============================
80 char global_plugin_dir[BCTEXTLEN];
81 char local_plugin_dir[BCTEXTLEN];
83 // Required when updating renderfarm rates
84 Mutex *preferences_lock;
87 #endif