Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

vrender.h

Go to the documentation of this file.
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 // set up and start thread
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();     // start the thread
00038 
00039 // get data type for certain commonrender routines
00040         int get_datatype();
00041 
00042 // process frames to put in buffer_out
00043         int process_buffer(VFrame **video_out, 
00044                 int64_t input_position, 
00045                 int last_buffer);
00046 // load an array of buffers for each track to send to the thread
00047         int process_buffer(int64_t input_position);
00048 // Flash the output on the display
00049         int flash_output();
00050 // Determine if data can be copied directly from the file to the output device.
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 // frames since start of playback
00069         int64_t session_frame;           
00070 
00071 // console dimensions
00072         int track_w, track_h;    
00073 // video device dimensions
00074         int output_w, output_h;    
00075 // frames to send to console fragment
00076         int64_t vmodule_render_fragment;    
00077 // frames to send to video device (1)
00078         int64_t playback_buffer;            
00079 // Output frame
00080         VFrame *video_out[MAX_CHANNELS];
00081 // Byte offset of video_out
00082         int64_t output_offset;
00083 
00084 // Temp frame for VModule loading
00085         VFrame *input_temp;
00086 // Temp frame for VModule transitions
00087         VFrame *transition_temp;
00088 // Engine for camera and projector automation
00089         OverlayFrame *overlayer;
00090 
00091 
00092         
00093 // Total number of frames to render for transitions
00094         int64_t source_length;  
00095 
00096 // Flag first frame to unlock audio
00097         int first_frame;
00098 
00099 private:
00100         int init_device_buffers();
00101         Timer timer;
00102 
00103 // for getting actual framerate
00104         int64_t framerate_counter;
00105         Timer framerate_timer;
00106         int render_strategy;
00107 };
00108 
00109 
00110 
00111 
00112 #endif

Generated on Sun Jan 8 13:39:02 2006 for Cinelerra-svn by  doxygen 1.4.4