7 #include "browsebutton.h"
9 #include "compresspopup.h"
10 #include "defaults.inc"
12 #include "errorbox.inc"
14 #include "formatpopup.inc"
15 #include "formattools.inc"
17 #include "loadmode.inc"
18 #include "mainprogress.inc"
19 #include "maxchannels.h"
21 #include "mwindow.inc"
22 #include "packagedispatcher.inc"
23 #include "packagerenderer.h"
24 #include "playabletracks.inc"
25 #include "preferences.inc"
26 #include "bcprogressbox.inc"
29 #include "transportque.inc"
32 class RenderItem
: public BC_MenuItem
35 RenderItem(MWindow
*mwindow
);
40 class RenderProgress
: public Thread
43 RenderProgress(MWindow
*mwindow
, Render
*render
);
57 class MainPackageRenderer
: public PackageRenderer
60 MainPackageRenderer(Render
*render
);
61 ~MainPackageRenderer();
65 void set_result(int value
);
66 void set_progress(int64_t value
);
67 int progress_cancelled();
75 class Render
: public Thread
78 Render(MWindow
*mwindow
);
82 int load_defaults(Asset
*asset
);
83 int save_defaults(Asset
*asset
);
84 // force asset parameters regardless of window
85 // This should be integrated into the Asset Class.
86 static int check_asset(EDL
*edl
, Asset
&asset
);
87 // Force filename to have a 0 padded number if rendering to a list.
88 int check_numbering(Asset
&asset
);
89 static void create_filename(char *path
,
94 static void get_starting_number(char *path
,
99 static int test_existence(MWindow
*mwindow
, Asset
*asset
);
100 int direct_frame_copy(EDL
*edl
, int64_t &render_video_position
, File
*file
);
101 int direct_copy_possible(EDL
*edl
,
102 int64_t current_position
,
103 Track
* playable_track
, // The one track which is playable
104 Edit
* &playable_edit
, // The edit which is playing
105 File
*file
); // Output file
107 void start_progress();
108 void stop_progress();
112 // Background compression must be disabled when direct frame copying and reenabled afterwards
113 int direct_frame_copying
;
115 CICache
*audio_cache
, *video_cache
;
116 VFrame
*compressed_output
;
117 MainProgressBar
*progress
;
118 RenderProgress
*render_progress
;
120 PlayableTracks
*playable_tracks
;
121 PackageDispatcher
*packages
;
122 Mutex
*package_lock
, *counter_lock
;
123 Preferences
*preferences
;
125 // Total selection to render in seconds
126 double total_start
, total_end
;
127 // External Render farm checks this every frame.
129 Asset
*default_asset
;
130 TransportCommand
*command
;
132 // Total samples updated by the render farm and the local renderer.
133 // This avoids rounding errors and complies with the use of samples for
135 int64_t total_rendered
;
136 // Speed for the master node
137 double frames_per_second
;
140 class RenderToTracks
;
142 class RenderWindow
: public BC_Window
145 RenderWindow(MWindow
*mwindow
, Render
*render
, Asset
*asset
);
148 int create_objects();
152 FormatTools
*format_tools
;