Changeset - d650613eb88b
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-07-01 23:12:24

A product of mostly matt and I... including queuer updates, updates to the framing thing that may or may not be the best idea, etc. Take a peek and have a laugh.
1 file changed with 43 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -199,10 +199,44 @@ void loginuser(char *username, int secre
 
 Then we will need some sort of watchdog to monitor slaves on the main server to check for stales.
 
*/
 

	
 

	
 
/* This function creates frame array based on the total number of frames to be rendered, which will then be parsed by function frame_farmer. */
 
void frame_array_builder(int sframe, int eframe) {
 
	int total = eframe + 1;
 
	int x = sframe;
 
	blendjob[jobnum].frameset[total];
 

	
 
	while(x <= eframe){
 
		blendjob[jobnum].frameset[x]=0;
 
		x++;
 
	}
 
}
 

	
 
// matches your computer up with a lovely frame to render
 
int frame_finder(){
 
	int your_frame = 0;  // your_frame is an interger value that will be given to the client as the frame number to render
 

	
 
	while(your_frame < eframe){ // this finds a frame with the value of zero, which is a frame that is ready to be rendered
 
		if (blendjob[jobnum].frameset[your_frame] = 0)
 
			break;
 

	
 
		your_frame++;
 
	}
 
blendjob[jobnum].frameset[your_frame]++; // sets the value of the frame to 2, which means its taken
 

	
 
return your_frame; // your_frame is returned as the frame to be rendered
 
}
 

	
 
// This function makes the value of the frame 2, which means its completed.
 
void the_finisher(int frame){
 
	blendjob[jobnum].frameset[frame]++;
 
}
 

	
 
// Queuer: this function should add files to the queue
 
// Type: 0 = blender, 1 = luxrender
 
// jobnum is the current job number
 
void queue(int type, char *name, char *submitter, char *email, int priority, int mode, int spp, struct frameset **frameset) {
 

	
 
void queue(int type, char *name, char *submitter, char *email, int priority, int mode, int spp, *frameset) {
 
  if(type == 1){
 
    blendjob[jobnum].name = name;
 
    blendjob[jobnum].submitter = submitter;
 
@@ -226,7 +260,14 @@ void queue(int type, char *name, char *s
 
jobnum++;
 
}
 

	
 

	
 
/*
 
 * struct frameset[]
 
 * {
 
 *   status;
 
 * }
 
 *
 
 *
 
 */
 

	
 

	
 

	
0 comments (0 inline, 0 general)