X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Frenderfarmclient.h;h=5ee6d5ef87339e98226701d6361fe4e4c60d0ef0;hp=19547950cf5a645473c87791d4295bc338eb8dcc;hb=HEAD;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd diff --git a/cinelerra-5.1/cinelerra/renderfarmclient.h b/cinelerra-5.1/cinelerra/renderfarmclient.h index 19547950..5ee6d5ef 100644 --- a/cinelerra-5.1/cinelerra/renderfarmclient.h +++ b/cinelerra-5.1/cinelerra/renderfarmclient.h @@ -2,21 +2,21 @@ /* * CINELERRA * Copyright (C) 2008 Adam Williams - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * */ #ifndef RENDERFARMCLIENT_H @@ -38,22 +38,17 @@ class RenderFarmClient { public: - RenderFarmClient(int port, - char *deamon_path, + RenderFarmClient(int port, + char *deamon_path, int nice_value, char *config_path); ~RenderFarmClient(); - - void main_loop(); - - + void main_loop(); // After a socket times out, kill the render node. void kill_client(); - -// RenderFarmClientThread *thread; - + int port; char *deamon_path; // PID to be returned to background render object @@ -61,7 +56,6 @@ public: // The plugin paths must be known before any threads are started BC_Hash *boot_defaults; Preferences *boot_preferences; - ArrayList *plugindb; }; class RenderFarmClientThread : public Thread @@ -72,7 +66,7 @@ public: // Commands call this to send the request packet. // The ID of the request followed by the size of the data that follows is sent. - int send_request_header(int request, + int send_request_header(int request, int len); // These are local functions to handle errors the right way for a client. // They simply call the RenderFarmServerThread functions and abort if error. @@ -86,28 +80,25 @@ public: // Lock access to the socket during complete transactions void lock(const char *location); void unlock(); - - + static void trap_hook(FILE *fp, void *vp); void do_tuner(int socket_fd); void do_packages(int socket_fd); - void get_command(int socket_fd, int *command); - void read_preferences(int socket_fd, + void read_preferences(int socket_fd, Preferences *preferences); void read_asset(int socket_fd, Asset *asset); - void read_edl(int socket_fd, - EDL *edl, - Preferences *preferences); + void read_edl(int socket_fd, EDL *edl, Preferences *preferences); int read_package(int socket_fd, RenderPackage *package); int send_completion(int socket_fd); void ping_server(); - void init_client_keepalive(); + void init_client_keepalive(int timeout_secs); void main_loop(int socket_fd); void run(); + EDL *edl; // Everything must be contained in run() int socket_fd; // Read only @@ -133,14 +124,14 @@ public: FarmPackageRenderer(RenderFarmClientThread *thread, int socket_fd); ~FarmPackageRenderer(); - - + + int get_result(); void set_result(int value); void set_progress(int64_t total_samples); int set_video_map(int64_t position, int value); - + int socket_fd; RenderFarmClientThread *thread; };