1 #ifndef PACKAGERENDERER_H
2 #define PACKAGERENDERER_H
6 #include "bcwindowbase.inc"
11 #include "maxchannels.h"
12 #include "mwindow.inc"
13 #include "playabletracks.inc"
14 #include "playbackconfig.inc"
15 #include "pluginserver.inc"
16 #include "preferences.inc"
17 #include "renderengine.inc"
19 #include "transportque.inc"
21 #include "videodevice.inc"
32 // Path of output without remote prefix
35 // Range not including preroll
49 // Used by Render and BRender to do packages.
56 // Initialize stuff which is reused between packages
57 int initialize(MWindow
*mwindow
,
59 Preferences
*preferences
,
61 ArrayList
<PluginServer
*> *plugindb
);
63 // Aborts and returns 1 if an error is encountered.
64 int render_package(RenderPackage
*package
);
66 int direct_copy_possible(EDL
*edl
,
67 int64_t current_position
,
68 Track
* playable_track
, // The one track which is playable
69 Edit
* &playable_edit
, // The edit which is playing
70 File
*file
); // Output file
71 int direct_frame_copy(EDL
*edl
,
72 int64_t &video_position
,
76 // Invoke behavior for master node
77 virtual int get_master();
78 // Get result status from server
79 virtual int get_result();
80 virtual void set_result(int value
);
81 virtual void set_progress(int64_t total_samples
);
82 // Used by background rendering to mark a frame as finished.
83 // If the GUI is locked for a long time this may abort,
84 // assuming the server crashed.
85 virtual int set_video_map(int64_t position
, int value
);
86 virtual int progress_cancelled();
97 // Passed in from outside
99 Preferences
*preferences
;
100 Asset
*default_asset
;
101 ArrayList
<PluginServer
*> *plugindb
;
105 double **audio_output
;
106 int64_t audio_position
;
107 int64_t audio_preroll
;
108 int64_t audio_read_length
;
110 // This is 1 if an error is encountered.
112 VFrame
***video_output
;
113 // A nonzero mwindow signals master render engine to the engine.
114 // A zero mwindow signals client or non interactive.
116 double *audio_output_ptr
[MAX_CHANNELS
];
117 CICache
*audio_cache
;
118 CICache
*video_cache
;
119 VFrame
*compressed_output
;
120 AudioOutConfig
*aconfig
;
121 VideoOutConfig
*vconfig
;
122 // PlaybackConfig *playback_config;
123 PlayableTracks
*playable_tracks
;
124 RenderEngine
*render_engine
;
125 RenderPackage
*package
;
126 TransportCommand
*command
;
127 int direct_frame_copying
;
128 VideoDevice
*video_device
;
129 VFrame
*video_output_ptr
;
130 int64_t video_preroll
;
131 int64_t video_position
;
132 int64_t video_read_length
;
133 int64_t video_write_length
;
134 int64_t video_write_position
;