r802: Remove renderframfsclient and renderfarmfsserver .h and .C from Makefile.am...
[cinelerra_cv/mob.git] / cinelerra / preferences.h
blob176a302f3588fad3fb8351b3697928c214e0ca2e
1 #ifndef PREFERENCES_H
2 #define PREFERENCES_H
4 #include "asset.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 void copy_from(Preferences *that);
22 int load_defaults(Defaults *defaults);
23 int save_defaults(Defaults *defaults);
24 void boundaries();
27 void add_node(char *text, int port, int enabled, float rate);
28 void delete_node(int number);
29 void delete_nodes();
30 void reset_rates();
31 // Get average frame rate or 1.0
32 float get_avg_rate(int use_master_node);
33 void sort_nodes();
34 void edit_node(int number, char *new_text, int port, int enabled);
35 int get_enabled_nodes();
36 char* get_node_hostname(int number);
37 int get_node_port(int number);
38 // Copy frame rates. Always used where the argument is the renderfarm and this is
39 // the master preferences. This way, the value for master node is properly
40 // translated from a unix socket to the local_rate.
41 void copy_rates_from(Preferences *preferences);
42 // Set frame rate for a node. Node -1 is the master node.
43 // The node number is relative to the enabled nodes.
44 void set_rate(float rate, int node);
45 // Calculate the number of cpus to use. Determined by /proc/cpuinfo and force_uniprocessor
46 int calculate_processors();
48 // ================================= Performance ================================
49 // directory to look in for indexes
50 char index_directory[BCTEXTLEN];
51 // size of index file in bytes
52 int64_t index_size;
53 int index_count;
54 // Use thumbnails in AWindow assets.
55 int use_thumbnails;
56 // Title of theme
57 char theme[BCTEXTLEN];
58 double render_preroll;
59 int brender_preroll;
60 int force_uniprocessor;
61 // The number of cpus to use. Determined by /proc/cpuinfo and force_uniprocessor
62 int processors;
65 Asset *brender_asset;
66 int use_brender;
67 // Number of frames in a brender job.
68 int brender_fragment;
69 // Size of cache in bytes.
70 // Several caches of cache_size exist so multiply by 4.
71 // rendering, playback, timeline, preview
72 int64_t cache_size;
74 int use_renderfarm;
75 int renderfarm_port;
76 // If the node starts with a / it's on the localhost using a path as the socket.
77 ArrayList<char*> renderfarm_nodes;
78 ArrayList<int> renderfarm_ports;
79 ArrayList<int> renderfarm_enabled;
80 ArrayList<float> renderfarm_rate;
81 // Rate of master node
82 float local_rate;
83 char renderfarm_mountpoint[BCTEXTLEN];
84 // Use virtual filesystem
85 int renderfarm_vfs;
86 // Jobs per node
87 int renderfarm_job_count;
88 // Consolidate output files
89 int renderfarm_consolidate;
91 // Tip of the day
92 int use_tipwindow;
94 // ====================================== Plugin Set ==============================
95 char global_plugin_dir[BCTEXTLEN];
96 char local_plugin_dir[BCTEXTLEN];
98 // Required when updating renderfarm rates
99 Mutex *preferences_lock;
102 #endif