Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

preferences.h

Go to the documentation of this file.
00001 #ifndef PREFERENCES_H
00002 #define PREFERENCES_H
00003 
00004 #include "asset.inc"
00005 #include "audioconfig.inc"
00006 #include "defaults.inc"
00007 #include "guicast.h"
00008 #include "maxchannels.h"
00009 #include "mutex.inc"
00010 #include "preferences.inc"
00011 #include "videoconfig.inc"
00012 
00013 
00014 class Preferences
00015 {
00016 public:
00017         Preferences();
00018         ~Preferences();
00019 
00020         Preferences& operator=(Preferences &that);
00021         void copy_from(Preferences *that);
00022         int load_defaults(Defaults *defaults);
00023         int save_defaults(Defaults *defaults);
00024         void boundaries();
00025 
00026 
00027         void add_node(char *text, int port, int enabled, float rate);
00028         void delete_node(int number);
00029         void delete_nodes();
00030         void reset_rates();
00031 // Get average frame rate or 1.0
00032         float get_avg_rate(int use_master_node);
00033         void sort_nodes();
00034         void edit_node(int number, char *new_text, int port, int enabled);
00035         int get_enabled_nodes();
00036         char* get_node_hostname(int number);
00037         int get_node_port(int number);
00038 // Copy frame rates.  Always used where the argument is the renderfarm and this is
00039 // the master preferences.  This way, the value for master node is properly 
00040 // translated from a unix socket to the local_rate.
00041         void copy_rates_from(Preferences *preferences);
00042 // Set frame rate for a node.  Node -1 is the master node.
00043 // The node number is relative to the enabled nodes.
00044         void set_rate(float rate, int node);
00045 // Calculate the number of cpus to use.  Determined by /proc/cpuinfo and force_uniprocessor
00046         int calculate_processors();
00047 
00048 // ================================= Performance ================================
00049 // directory to look in for indexes
00050         char index_directory[BCTEXTLEN];   
00051 // size of index file in bytes
00052         int64_t index_size;                  
00053         int index_count;
00054 // Use thumbnails in AWindow assets.
00055         int use_thumbnails;
00056 // Title of theme
00057         char theme[BCTEXTLEN];
00058         double render_preroll;
00059         int brender_preroll;
00060         int force_uniprocessor;
00061 // The number of cpus to use.  Determined by /proc/cpuinfo and force_uniprocessor
00062         int processors;
00063 
00064 
00065         Asset *brender_asset;
00066         int use_brender;
00067 // Number of frames in a brender job.
00068         int brender_fragment;
00069 // Size of cache in bytes.
00070 // Several caches of cache_size exist so multiply by 4.
00071 // rendering, playback, timeline, preview
00072         int64_t cache_size;
00073 
00074         int use_renderfarm;
00075         int renderfarm_port;
00076 // If the node starts with a / it's on the localhost using a path as the socket.
00077         ArrayList<char*> renderfarm_nodes;
00078         ArrayList<int>   renderfarm_ports;
00079         ArrayList<int>   renderfarm_enabled;
00080         ArrayList<float> renderfarm_rate;
00081 // Rate of master node
00082         float local_rate;
00083         char renderfarm_mountpoint[BCTEXTLEN];
00084 // Use virtual filesystem
00085         int renderfarm_vfs;
00086 // Jobs per node
00087         int renderfarm_job_count;
00088 // Consolidate output files
00089         int renderfarm_consolidate;
00090 
00091 // Tip of the day
00092         int use_tipwindow;
00093 
00094 // ====================================== Plugin Set ==============================
00095         char global_plugin_dir[BCTEXTLEN];
00096         char local_plugin_dir[BCTEXTLEN];
00097 
00098 // Required when updating renderfarm rates
00099         Mutex *preferences_lock;
00100 };
00101 
00102 #endif

Generated on Sun Jan 8 13:38:59 2006 for Cinelerra-svn by  doxygen 1.4.4