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 VRender::get_render_strategy(Edit* &playable_edit,
00052 int &colormodel,
00053 int &use_vconsole,
00054 int64_t position);
00055 int get_use_vconsole(Edit* &playable_edit,
00056 int64_t position,
00057 int &get_use_vconsole);
00058 int get_colormodel(Edit* &playable_edit,
00059 int use_vconsole,
00060 int use_brender);
00061 int insert_timecode(Edit* &playable_edit,
00062 int64_t position,
00063 VFrame *output);
00064
00065 int64_t tounits(double position, int round);
00066 double fromunits(int64_t position);
00067
00068
00069 int64_t session_frame;
00070
00071
00072 int track_w, track_h;
00073
00074 int output_w, output_h;
00075
00076 int64_t vmodule_render_fragment;
00077
00078 int64_t playback_buffer;
00079
00080 VFrame *video_out[MAX_CHANNELS];
00081
00082 int64_t output_offset;
00083
00084
00085 VFrame *input_temp;
00086
00087 VFrame *transition_temp;
00088
00089 OverlayFrame *overlayer;
00090
00091
00092
00093
00094 int64_t source_length;
00095
00096
00097 int first_frame;
00098
00099 private:
00100 int init_device_buffers();
00101 Timer timer;
00102
00103
00104 int64_t framerate_counter;
00105 Timer framerate_timer;
00106 int render_strategy;
00107 };
00108
00109
00110
00111
00112 #endif