00001 #ifndef PACKAGERENDERER_H
00002 #define PACKAGERENDERER_H
00003
00004
00005 #include "assets.inc"
00006 #include "bcwindowbase.inc"
00007 #include "cache.inc"
00008 #include "edit.inc"
00009 #include "edl.inc"
00010 #include "file.inc"
00011 #include "maxchannels.h"
00012 #include "mwindow.inc"
00013 #include "playabletracks.inc"
00014 #include "playbackconfig.inc"
00015 #include "pluginserver.inc"
00016 #include "preferences.inc"
00017 #include "renderengine.inc"
00018 #include "track.inc"
00019 #include "transportque.inc"
00020 #include "vframe.inc"
00021 #include "videodevice.inc"
00022
00023
00024 #include <stdint.h>
00025
00026 class RenderPackage
00027 {
00028 public:
00029 RenderPackage();
00030 ~RenderPackage();
00031
00032
00033 char path[BCTEXTLEN];
00034
00035
00036 int64_t audio_start;
00037 int64_t audio_end;
00038 int64_t video_start;
00039 int64_t video_end;
00040 int done;
00041 int use_brender;
00042 };
00043
00044
00045
00046
00047
00048 class PackageRenderer
00049 {
00050 public:
00051 PackageRenderer();
00052 ~PackageRenderer();
00053
00054
00055 int initialize(MWindow *mwindow,
00056 EDL *edl,
00057 Preferences *preferences,
00058 Asset *default_asset,
00059 ArrayList<PluginServer*> *plugindb);
00060
00061
00062 int render_package(RenderPackage *package);
00063
00064 int direct_copy_possible(EDL *edl,
00065 int64_t current_position,
00066 Track* playable_track,
00067 Edit* &playable_edit,
00068 File *file);
00069 int direct_frame_copy(EDL *edl,
00070 int64_t &video_position,
00071 File *file,
00072 int &result);
00073
00074
00075 virtual int get_master();
00076
00077 virtual int get_result();
00078 virtual void set_result(int value);
00079 virtual void set_progress(int64_t total_samples);
00080
00081
00082
00083 virtual int set_video_map(int64_t position, int value);
00084 virtual int progress_cancelled();
00085
00086 void create_output();
00087 void create_engine();
00088 void do_audio();
00089 void do_video();
00090 void stop_engine();
00091 void stop_output();
00092 void close_output();
00093
00094
00095
00096 EDL *edl;
00097 Preferences *preferences;
00098 Asset *default_asset;
00099 ArrayList<PluginServer*> *plugindb;
00100
00101
00102 Asset *asset;
00103 double **audio_output;
00104 int64_t audio_position;
00105 int64_t audio_preroll;
00106 int64_t audio_read_length;
00107 File *file;
00108
00109 int result;
00110 VFrame ***video_output;
00111
00112
00113 MWindow *mwindow;
00114 double *audio_output_ptr[MAX_CHANNELS];
00115 CICache *audio_cache;
00116 CICache *video_cache;
00117 VFrame *compressed_output;
00118 AudioOutConfig *aconfig;
00119 VideoOutConfig *vconfig;
00120
00121 PlayableTracks *playable_tracks;
00122 RenderEngine *render_engine;
00123 RenderPackage *package;
00124 TransportCommand *command;
00125 int direct_frame_copying;
00126 VideoDevice *video_device;
00127 VFrame *video_output_ptr[MAX_CHANNELS];
00128 int64_t video_preroll;
00129 int64_t video_position;
00130 int64_t video_read_length;
00131 int64_t video_write_length;
00132 int64_t video_write_position;
00133 };
00134
00135
00136
00137
00138 #endif