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 int video_do;
00043 int audio_do;
00044 };
00045
00046
00047
00048
00049
00050 class PackageRenderer
00051 {
00052 public:
00053 PackageRenderer();
00054 ~PackageRenderer();
00055
00056
00057 int initialize(MWindow *mwindow,
00058 EDL *edl,
00059 Preferences *preferences,
00060 Asset *default_asset,
00061 ArrayList<PluginServer*> *plugindb);
00062
00063
00064 int render_package(RenderPackage *package);
00065
00066 int direct_copy_possible(EDL *edl,
00067 int64_t current_position,
00068 Track* playable_track,
00069 Edit* &playable_edit,
00070 File *file);
00071 int direct_frame_copy(EDL *edl,
00072 int64_t &video_position,
00073 File *file,
00074 int &result);
00075
00076
00077 virtual int get_master();
00078
00079 virtual int get_result();
00080 virtual void set_result(int value);
00081 virtual void set_progress(int64_t total_samples);
00082
00083
00084
00085 virtual int set_video_map(int64_t position, int value);
00086 virtual int progress_cancelled();
00087
00088 void create_output();
00089 void create_engine();
00090 void do_audio();
00091 void do_video();
00092 void stop_engine();
00093 void stop_output();
00094 void close_output();
00095
00096
00097
00098 EDL *edl;
00099 Preferences *preferences;
00100 Asset *default_asset;
00101 ArrayList<PluginServer*> *plugindb;
00102
00103
00104 Asset *asset;
00105 double **audio_output;
00106 int64_t audio_position;
00107 int64_t audio_preroll;
00108 int64_t audio_read_length;
00109 File *file;
00110
00111 int result;
00112 VFrame ***video_output;
00113
00114
00115 MWindow *mwindow;
00116 double *audio_output_ptr[MAX_CHANNELS];
00117 CICache *audio_cache;
00118 CICache *video_cache;
00119 VFrame *compressed_output;
00120 AudioOutConfig *aconfig;
00121 VideoOutConfig *vconfig;
00122
00123 PlayableTracks *playable_tracks;
00124 RenderEngine *render_engine;
00125 RenderPackage *package;
00126 TransportCommand *command;
00127 int direct_frame_copying;
00128 VideoDevice *video_device;
00129 VFrame *video_output_ptr;
00130 int64_t video_preroll;
00131 int64_t video_position;
00132 int64_t video_read_length;
00133 int64_t video_write_length;
00134 int64_t video_write_position;
00135 };
00136
00137
00138
00139
00140 #endif