# HG changeset patch # User ethanzonca # Date 2009-07-01 23:12:24 # Node ID d650613eb88bbcc0dbf88611cb9836b2030d6f7e # Parent df9be21fe006f865a7ac8ff41a7b5fee066d0aa4 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. diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -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; + * } + * + * + */