Changeset - b0463de161bd
[Not reviewed]
default
0 1 0
NEO - 16 years ago 2009-07-12 21:16:50

added:
void start_data() function
- this function will retrieve saved data from a series of xml file in case the power goes out.
- or it will initialize values at zero if there are no backup files existing.
1 file changed with 11 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -103,24 +103,35 @@ struct frameset {
 
	char slave_name; // user that frame is assigned to
 
	int frame_status; // status of frame, 0= unassigned, 1= taken, 2= done
 
	clock_t start_time; // time the frame was started
 
	int time_to_render; // the total seconds it took to render the frame
 
} frameset[]; // Frameset array is generated by status_report_generator function
 
                         // Using this method to save memory, because if animation starts on a high frame number, it would waste a lot of RAM on empty structures
 

	
 

	
 

	
 

	
 
/* ********************** Functions ************************* */
 

	
 
void start_data(){
 

	
 
	if(1 == 0){
 
		// retrieve total_finished_jobs and total_finished_frames from xml file
 
	}
 
	else{
 
		general_info.total_finished_jobs = 0;
 
		general_info.total_frames_rendered = 0;
 
	}
 
}
 

	
 
// **** Finish-Setter: Sets a frame to the "completed" status.
 
void finish_frame(int jobnum, int frame){
 
  blendjob[jobnum].frameset[frame].frame_status = 2;
 

	
 
  blendjob[jobnum].frameset[frame].time_to_render = (clock() - blendjob[jobnum].frameset[frame].start_time);
 

	
 
  general_info.total_frames_rendered++;
 
}
 

	
 

	
 
// **** Queuer: Adds files to the queue
 
void queue(int type, char *name, char *submitter, char *email, int priority, int mode, int spp, struct frameset *frameset) {
0 comments (0 inline, 0 general)