00001 #ifndef VRENDER_H
00002 #define VRENDER_H
00003
00004 #include "commonrender.h"
00005 #include "edit.inc"
00006 #include "guicast.h"
00007 #include "mwindow.inc"
00008 #include "overlayframe.inc"
00009 #include "renderengine.inc"
00010 #include "vframe.inc"
00011
00012
00013 class VRender : public CommonRender
00014 {
00015 public:
00016 VRender(RenderEngine *renderengine);
00017 VRender(MWindow *mwindow, RenderEngine *renderengine);
00018 ~VRender();
00019
00020 VirtualConsole* new_vconsole_object();
00021 int get_total_tracks();
00022 Module* new_module(Track *track);
00023
00024
00025 int arm_playback(int64_t current_position,
00026 int64_t input_length,
00027 int64_t module_render_fragment,
00028 int64_t playback_buffer,
00029 int track_w,
00030 int track_h,
00031 int output_w,
00032 int output_h);
00033
00034 void run();
00035 int wait_for_startup();
00036
00037 int start_playback();
00038
00039
00040 int get_datatype();
00041
00042
00043 int process_buffer(VFrame *video_out,
00044 int64_t input_position,
00045 int last_buffer);
00046
00047 int process_buffer(int64_t input_position);
00048
00049 int flash_output();
00050
00051 void get_render_strategy(Edit* &playable_edit,
00052 int &colormodel,
00053 int &use_vconsole,
00054 int64_t position);
00055
00056
00057 int get_use_vconsole(Edit* &playable_edit,
00058 int64_t position,
00059 int &get_use_vconsole);
00060 int get_colormodel(Edit* &playable_edit,
00061 int use_vconsole,
00062 int use_brender);
00063 int insert_timecode(Edit* &playable_edit,
00064 int64_t position,
00065 VFrame *output);
00066
00067 int64_t tounits(double position, int round);
00068 double fromunits(int64_t position);
00069
00070
00071 int64_t session_frame;
00072
00073
00074 int track_w, track_h;
00075
00076 int output_w, output_h;
00077
00078 int64_t vmodule_render_fragment;
00079
00080 int64_t playback_buffer;
00081
00082 VFrame *video_out;
00083
00084 int64_t output_offset;
00085
00086
00087 VFrame *input_temp;
00088
00089 VFrame *transition_temp;
00090
00091 OverlayFrame *overlayer;
00092
00093
00094
00095
00096 int64_t source_length;
00097
00098
00099 int first_frame;
00100
00101 private:
00102 int init_device_buffers();
00103 Timer timer;
00104
00105
00106 int64_t framerate_counter;
00107 Timer framerate_timer;
00108 int render_strategy;
00109 };
00110
00111
00112
00113
00114 #endif