r602: Fix baver's code... don't insert timecode when show_tc is not set
[cinelerra_cv/mob.git] / cinelerra / packagerenderer.h
blobd94016597e492f7bb88cc92165e94f8969d31598
1 #ifndef PACKAGERENDERER_H
2 #define PACKAGERENDERER_H
5 #include "assets.inc"
6 #include "bcwindowbase.inc"
7 #include "cache.inc"
8 #include "edit.inc"
9 #include "edl.inc"
10 #include "file.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"
18 #include "track.inc"
19 #include "transportque.inc"
20 #include "vframe.inc"
21 #include "videodevice.inc"
24 #include <stdint.h>
26 class RenderPackage
28 public:
29 RenderPackage();
30 ~RenderPackage();
32 // Path of output without remote prefix
33 char path[BCTEXTLEN];
35 // Range not including preroll
36 int64_t audio_start;
37 int64_t audio_end;
38 int64_t video_start;
39 int64_t video_end;
40 int done;
41 int use_brender;
47 // Used by Render and BRender to do packages.
48 class PackageRenderer
50 public:
51 PackageRenderer();
52 ~PackageRenderer();
54 // Initialize stuff which is reused between packages
55 int initialize(MWindow *mwindow,
56 EDL *edl,
57 Preferences *preferences,
58 Asset *default_asset,
59 ArrayList<PluginServer*> *plugindb);
61 // Aborts and returns 1 if an error is encountered.
62 int render_package(RenderPackage *package);
64 int direct_copy_possible(EDL *edl,
65 int64_t current_position,
66 Track* playable_track, // The one track which is playable
67 Edit* &playable_edit, // The edit which is playing
68 File *file); // Output file
69 int direct_frame_copy(EDL *edl,
70 int64_t &video_position,
71 File *file,
72 int &result);
74 // Invoke behavior for master node
75 virtual int get_master();
76 // Get result status from server
77 virtual int get_result();
78 virtual void set_result(int value);
79 virtual void set_progress(int64_t total_samples);
80 // Used by background rendering
81 virtual void set_video_map(int64_t position, int value);
82 virtual int progress_cancelled();
84 void create_output();
85 void create_engine();
86 void do_audio();
87 void do_video();
88 void stop_engine();
89 void stop_output();
90 void close_output();
93 // Passed in from outside
94 EDL *edl;
95 Preferences *preferences;
96 Asset *default_asset;
97 ArrayList<PluginServer*> *plugindb;
99 // Created locally
100 Asset *asset;
101 double **audio_output;
102 int64_t audio_position;
103 int64_t audio_preroll;
104 int64_t audio_read_length;
105 File *file;
106 int result;
107 VFrame ***video_output;
108 // A nonzero mwindow signals master render engine to the engine.
109 // A zero mwindow signals client or non interactive.
110 MWindow *mwindow;
111 double *audio_output_ptr[MAX_CHANNELS];
112 CICache *audio_cache;
113 CICache *video_cache;
114 VFrame *compressed_output;
115 AudioOutConfig *aconfig;
116 VideoOutConfig *vconfig;
117 // PlaybackConfig *playback_config;
118 PlayableTracks *playable_tracks;
119 RenderEngine *render_engine;
120 RenderPackage *package;
121 TransportCommand *command;
122 int direct_frame_copying;
123 VideoDevice *video_device;
124 VFrame *video_output_ptr[MAX_CHANNELS];
125 int64_t video_preroll;
126 int64_t video_position;
127 int64_t video_read_length;
128 int64_t video_write_length;
129 int64_t video_write_position;
135 #endif