Changeset - 6b468a948714
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-07-15 11:22:14
ohnobinki@ohnopublishing.net
struct blendjob*-ized blend_frame_watchdog()
1 file changed with 19 insertions and 12 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -308,22 +308,29 @@ blendjob[jobnum].frameset[frameset_count
 
return your_frame; // your_frame is returned as the frame to be rendered
 
}
 

	
 
void blend_frame_watchdog(){
 
  short int watchdog_forgiveness = 3; // Hours to wait on a frame before re-assigning it
 
void blend_frame_watchdog(struct blendjob *blendjob_head)
 
{
 
  unsigned short int watchdog_forgiveness; /*< seconds to wait on a frame before re-assigning it */
 
  struct blendjob *blendjob_ptr;
 
  unsigned int counter;
 

	
 
  int num1 = hcfjob + 1;
 
  watchdog_forgiveness = 3 * 60 * 60; /*< 3hr in seconds */
 
  blendjob_ptr = blendjob_head;
 

	
 
  while(num1 <= highest_jobnum){  // counts up through all the jobs
 
    int num2 = 0;
 
  for(blendjob_ptr = blendjob_head; blendjob_ptr; blendjob_ptr = blendjob_ptr->next)
 
    /* iterate through jobs */
 

	
 
    while(num2 <= blendjob[num1].total_frames){ // Counts up through all the frames
 
      if((blendjob[num1].frameset[num2].start_time + (watchdog_forgiveness * 3600)) < clock()) // If frame is not completed within the number of hours specified by watchdog_forgiveness
 
			  blendjob[num1].frameset[num2].frame_status = 0;								   // Then change the frame status to unassigned
 
    for(counter = 0; counter < blendjob_ptr->total_frames; counter ++)
 
      /* iterate through all frames for this job*/
 
      {
 
	if((blendjob_ptr->frameset[counter].start_time + (watchdog_forgiveness * 3600)) < clock()) 
 
	  /*
 
	    If frame is not completed within the number of hours specified by watchdog_forgiveness 
 
	    Then change the frame status to unassigned
 
	  */
 
	  blendjob_ptr->frameset[counter].frame_status = 0;
 
      }
 

	
 
      num2++;
 
    }
 
    num1++;
 
  }
 
}
 

	
 

	
0 comments (0 inline, 0 general)