X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fbatchrender.h;h=4a81520babf3ba1180863a4f58671504ac31ae05;hp=d848d98907decf72c6387bc55fd13b3ca8d36de3;hb=b402ed7f93de4c98e6651483eb8561cf1c37ec9a;hpb=6616b3b82fdbc586f5da00bf772e45d8ada3b464 diff --git a/cinelerra-5.1/cinelerra/batchrender.h b/cinelerra-5.1/cinelerra/batchrender.h index d848d989..4a81520b 100644 --- a/cinelerra-5.1/cinelerra/batchrender.h +++ b/cinelerra-5.1/cinelerra/batchrender.h @@ -36,10 +36,11 @@ #include "render.inc" #include "timeentry.h" -#define BATCHRENDER_COLUMNS 4 - - - +enum { + ENABLED_COL, LABELED_COL, FARMED_COL, + OUTPUT_COL, EDL_COL, ELAPSED_COL, + BATCHRENDER_COLUMNS +}; class BatchRenderMenuItem : public BC_MenuItem { @@ -54,19 +55,19 @@ public: class BatchRenderJob { public: - BatchRenderJob(Preferences *preferences); + BatchRenderJob(Preferences *preferences, int labeled=0, int farmed=-1); ~BatchRenderJob(); void copy_from(BatchRenderJob *src); void load(FileXML *file); void save(FileXML *file); - void fix_strategy(); + int get_strategy(); // Source EDL to render char edl_path[BCTEXTLEN]; // Destination file for output Asset *asset; - int strategy; + int labeled, farmed; int enabled; // Amount of time elapsed in last render operation double elapsed; @@ -92,11 +93,11 @@ public: int test_edl_files(); void calculate_dest_paths(ArrayList *paths, Preferences *preferences); - void reset(); + void reset(const char *path=0); // Load batch rendering jobs void load_jobs(char *path, Preferences *preferences); // Not applicable to western civilizations - void save_jobs(char *path); + void save_jobs(char *path=0); void load_defaults(BC_Hash *defaults); void save_defaults(BC_Hash *defaults); // Create path for persistent storage functions @@ -118,8 +119,10 @@ public: void update_active(int number); void update_done(int number, int create_list, double elapsed_time); void move_batch(int src, int dst); + static void trap_hook(FILE *fp, void *vp); MWindow *mwindow; + char batch_path[BCTEXTLEN]; double current_start; double current_end; BatchRenderJob *default_job; @@ -128,31 +131,24 @@ public: Preferences *preferences; Render *render; BatchRenderGUI *gui; - int column_width[BATCHRENDER_COLUMNS]; + + static const char *column_titles[BATCHRENDER_COLUMNS]; + static int column_widths[BATCHRENDER_COLUMNS]; + int list_width[BATCHRENDER_COLUMNS]; // job being edited int current_job; // job being rendered int rendering_job; int is_rendering; - ArrayList *file_entries; + int warn; }; - - - - - - - class BatchRenderEDLPath : public BC_TextBox { public: - BatchRenderEDLPath(BatchRenderThread *thread, - int x, - int y, - int w, + BatchRenderEDLPath(BatchRenderThread *thread, int x, int y, int w, char *text); int handle_event(); BatchRenderThread *thread; @@ -162,9 +158,7 @@ public: class BatchRenderCurrentEDL : public BC_GenericButton { public: - BatchRenderCurrentEDL(BatchRenderThread *thread, - int x, - int y); + BatchRenderCurrentEDL(BatchRenderThread *thread, int x, int y); int handle_event(); BatchRenderThread *thread; }; @@ -173,9 +167,7 @@ public: class BatchRenderUpdateEDL : public BC_GenericButton { public: - BatchRenderUpdateEDL(BatchRenderThread *thread, - int x, - int y); + BatchRenderUpdateEDL(BatchRenderThread *thread, int x, int y); int handle_event(); BatchRenderThread *thread; }; @@ -184,9 +176,7 @@ public: class BatchRenderNew : public BC_GenericButton { public: - BatchRenderNew(BatchRenderThread *thread, - int x, - int y); + BatchRenderNew(BatchRenderThread *thread, int x, int y); int handle_event(); BatchRenderThread *thread; }; @@ -194,9 +184,7 @@ public: class BatchRenderDelete : public BC_GenericButton { public: - BatchRenderDelete(BatchRenderThread *thread, - int x, - int y); + BatchRenderDelete(BatchRenderThread *thread, int x, int y); int handle_event(); BatchRenderThread *thread; }; @@ -206,14 +194,13 @@ public: class BatchRenderSaveList : public BC_GenericButton, public Thread { public: - BatchRenderSaveList(BatchRenderThread *thread, - int x, - int y); + BatchRenderSaveList(BatchRenderThread *thread, int x, int y); ~BatchRenderSaveList(); int handle_event(); BatchRenderThread *thread; BC_FileBox *gui; void run(); + void stop(); virtual int keypress_event(); Mutex *startup_lock; }; @@ -221,14 +208,13 @@ public: class BatchRenderLoadList : public BC_GenericButton, public Thread { public: - BatchRenderLoadList(BatchRenderThread *thread, - int x, - int y); + BatchRenderLoadList(BatchRenderThread *thread, int x, int y); ~BatchRenderLoadList(); int handle_event(); BatchRenderThread *thread; BC_FileBox *gui; void run(); + void stop(); virtual int keypress_event(); Mutex *startup_lock; }; @@ -238,11 +224,7 @@ public: class BatchRenderList : public BC_ListBox { public: - BatchRenderList(BatchRenderThread *thread, - int x, - int y, - int w, - int h); + BatchRenderList(BatchRenderThread *thread, int x, int y, int w, int h); int handle_event(); int selection_changed(); int column_resize_event(); @@ -255,9 +237,7 @@ public: class BatchRenderStart : public BC_GenericButton { public: - BatchRenderStart(BatchRenderThread *thread, - int x, - int y); + BatchRenderStart(BatchRenderThread *thread, int x, int y); int handle_event(); BatchRenderThread *thread; }; @@ -265,9 +245,15 @@ public: class BatchRenderStop : public BC_GenericButton { public: - BatchRenderStop(BatchRenderThread *thread, - int x, - int y); + BatchRenderStop(BatchRenderThread *thread, int x, int y); + int handle_event(); + BatchRenderThread *thread; +}; + +class BatchRenderWarning : public BC_CheckBox +{ +public: + BatchRenderWarning(BatchRenderThread *thread, int x, int y); int handle_event(); BatchRenderThread *thread; }; @@ -275,9 +261,7 @@ public: class BatchRenderCancel : public BC_GenericButton { public: - BatchRenderCancel(BatchRenderThread *thread, - int x, - int y); + BatchRenderCancel(BatchRenderThread *thread, int x, int y); int handle_event(); int keypress_event(); BatchRenderThread *thread; @@ -287,9 +271,7 @@ public: class BatchFormat : public FormatTools { public: - BatchFormat(MWindow *mwindow, - BatchRenderGUI *gui, - Asset *asset); + BatchFormat(MWindow *mwindow, BatchRenderGUI *gui, Asset *asset); ~BatchFormat(); int handle_event(); @@ -298,6 +280,17 @@ public: MWindow *mwindow; }; +class BatchRenderUseFarm : public BC_CheckBox +{ +public: + BatchRenderUseFarm(BatchRenderThread *thread, int x, int y, int *output); + int handle_event(); + void update(int *output); + + BatchRenderThread *thread; + int *output; +}; + class BatchRenderGUI : public BC_Window { @@ -319,7 +312,9 @@ public: void button_enable(); void button_disable(); - ArrayList list_columns[BATCHRENDER_COLUMNS]; + ArrayList list_items[BATCHRENDER_COLUMNS]; + const char *list_titles[BATCHRENDER_COLUMNS]; + int list_width[BATCHRENDER_COLUMNS], list_columns; MWindow *mwindow; BatchRenderThread *thread; @@ -332,16 +327,19 @@ public: // BC_Title *status_text; // BC_ProgressBar *progress_bar; BC_Title *list_title; + BC_Title *batch_path; BatchRenderNew *new_batch; BatchRenderDelete *delete_batch; BatchRenderSaveList *savelist_batch; BatchRenderLoadList *loadlist_batch; + BatchRenderWarning *warning; BatchRenderList *batch_list; BatchRenderStart *start_button; BatchRenderStop *stop_button; BatchRenderCancel *cancel_button; BatchRenderCurrentEDL *use_current_edl; BatchRenderUpdateEDL *update_selected_edl; + BatchRenderUseFarm *use_renderfarm; };