Changeset - 6ca6d2672c6c
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 16 years ago 2009-09-03 23:32:42
ohnobinki@ohnopublishing.net
minor fixes, added output_format to distrenjob
2 files changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/server/distrenjob.h
Show inline comments
 
@@ -42,12 +42,13 @@ struct distrenjob {
 
  float percent_done;
 
  int completed_frames; // number of completed frames for stats/etc
 
  int assigned_frames; // number of assigned frames (that are not yet completed) for stats/etc
 
  int total_frames; // how many frames are in the animation for stats/etc (unassigned frames)
 
  time_t avg_render_time; // average seconds it took to render a frame
 
  time_t time_remaining; /*< estimated seconds remaining till render is complete (up to 49, 710 days) */
 
  char *output_format; /*< currently is the file extention of the request output format. @todo make this mime-type based/not a string */
 
  struct frameset *frameset;
 
};
 

	
 

	
 

	
 
/**
src/server/slave.c
Show inline comments
 
@@ -20,12 +20,13 @@
 

	
 
// Provides DISTREN_REQUEST* which is in reality, DISTREN_SEND(signal) in the minds of your average joe
 
#include "protocol.h"
 
#include "options.h" // Confuse, etc.
 
#include "slavefuncs.h" // Slave functions
 
#include "asprintf.h"
 
#include "remoteio.h"
 

	
 
#include <string.h>
 
#include <stdio.h>
 
#include <unistd.h>
 
#include <sys/stat.h> /*< mkdir() */
 
#include <stdlib.h>
 
@@ -189,17 +190,17 @@ if(gotframe ==1)
 
    else{
 
      fprintf(stderr,"I think the XML craziness may have failed, so I'll terminate just for fun.\n");
 
      return 1;
 
    }
 

	
 
    /* Variable-fillers which require XML */
 
    outputExt = myjob.outputFormat; /* @TODO: FIXME! */
 
    outputExt = myjob->output_format; /* @TODO: FIXME! */
 
    _distren_asprintf(&pathtoOutput, "%s/job%d/output/frame%d.%s", datadir, jobnum, framenum, outputExt ); // Prepares the path to the jobfile
 

	
 

	
 
     exec_blender(&myjob, pathtoJobfile, pathtoOutput, framenum); // @TODO: This warning should be fixed :D
 
     exec_blender(myjob, pathtoJobfile, pathtoOutput, framenum); // @TODO: This warning should be fixed :D
 

	
 
    // Consider placing the following in the exec_blender() function
 
    while(busy == 1){
 
      tell_the_server(DISTREN_REQUEST_PROGRESS);
 
        fprintf(stderr, "Rendering frame %d in job %d...",framenum,jobnum);
 
        sleep(5); // or not... this should be more event-driven, but should still give a heartbeat to the server
0 comments (0 inline, 0 general)