5 #include "audioconfig.inc"
8 #include "maxchannels.h"
10 #include "preferences.inc"
11 #include "videoconfig.inc"
20 Preferences
& operator=(Preferences
&that
);
21 void copy_from(Preferences
*that
);
22 int load_defaults(BC_Hash
*defaults
);
23 int save_defaults(BC_Hash
*defaults
);
26 static void print_channels(char *string
,
27 int *channel_positions
,
29 static void scan_channels(char *string
,
30 int *channel_positions
,
33 void add_node(char *text
, int port
, int enabled
, float rate
);
34 void delete_node(int number
);
37 // Get average frame rate or 1.0
38 float get_avg_rate(int use_master_node
);
40 void edit_node(int number
, char *new_text
, int port
, int enabled
);
41 int get_enabled_nodes();
42 char* get_node_hostname(int number
);
43 int get_node_port(int number
);
44 // Copy frame rates. Always used where the argument is the renderfarm and this is
45 // the master preferences. This way, the value for master node is properly
46 // translated from a unix socket to the local_rate.
47 void copy_rates_from(Preferences
*preferences
);
48 // Set frame rate for a node. Node -1 is the master node.
49 // The node number is relative to the enabled nodes.
50 void set_rate(float rate
, int node
);
51 // Calculate the number of cpus to use.
52 // Determined by /proc/cpuinfo and force_uniprocessor.
53 // interactive forces it to ignore force_uniprocessor
54 int calculate_processors(int interactive
= 0);
56 // ================================= Performance ================================
57 // directory to look in for indexes
58 char index_directory
[BCTEXTLEN
];
59 // size of index file in bytes
62 // Use thumbnails in AWindow assets.
65 char theme
[BCTEXTLEN
];
66 double render_preroll
;
68 int force_uniprocessor
;
69 // The number of cpus to use when rendering.
70 // Determined by /proc/cpuinfo and force_uniprocessor
72 // Number of processors for interactive operations.
75 // Default positions for channels
76 int channel_positions
[MAXCHANNELS
* MAXCHANNELS
];
78 Asset_GC brender_asset
;
80 // Number of frames in a brender job.
82 // Size of cache in bytes.
83 // Several caches of cache_size exist so multiply by 4.
84 // rendering, playback, timeline, preview
89 // If the node starts with a / it's on the localhost using a path as the socket.
90 ArrayList
<char*> renderfarm_nodes
;
91 ArrayList
<int> renderfarm_ports
;
92 ArrayList
<int> renderfarm_enabled
;
93 ArrayList
<float> renderfarm_rate
;
94 // Rate of master node
96 char renderfarm_mountpoint
[BCTEXTLEN
];
97 // Use virtual filesystem
100 int renderfarm_job_count
;
101 // Consolidate output files
102 int renderfarm_consolidate
;
107 // ====================================== Plugin Set ==============================
108 char global_plugin_dir
[BCTEXTLEN
];
109 char local_plugin_dir
[BCTEXTLEN
];
111 // Required when updating renderfarm rates
112 Mutex
*preferences_lock
;
119 // c-file-style: "linux"