r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / vrender.h
blob79803a6cf4521a9826b4f38cab7f8b13945be510
1 #ifndef VRENDER_H
2 #define VRENDER_H
4 #include "guicast.h"
5 #include "commonrender.h"
6 #include "edit.inc"
7 #include "mwindow.inc"
8 #include "renderengine.inc"
9 #include "vframe.inc"
12 class VRender : public CommonRender
14 public:
15 VRender(RenderEngine *renderengine);
16 VRender(MWindow *mwindow, RenderEngine *renderengine);
17 ~VRender();
19 VirtualConsole* new_vconsole_object();
20 int get_total_tracks();
21 Module* new_module(Track *track);
23 // set up and start thread
24 int arm_playback(int64_t current_position,
25 int64_t input_length,
26 int64_t module_render_fragment,
27 int64_t playback_buffer,
28 int track_w,
29 int track_h,
30 int output_w,
31 int output_h);
33 void run();
34 int wait_for_startup();
36 int start_playback(); // start the thread
38 // get data type for certain commonrender routines
39 int get_datatype();
41 // process frames to put in buffer_out
42 int process_buffer(VFrame **video_out,
43 int64_t input_position,
44 int last_buffer);
45 // load an array of buffers for each track to send to the thread
46 int process_buffer(int64_t input_position);
47 // Flash the output on the display
48 int flash_output();
49 // Determine if data can be copied directly from the file to the output device.
50 void VRender::get_render_strategy(Edit* &playable_edit,
51 int &colormodel,
52 int &use_vconsole,
53 int64_t position);
54 int get_use_vconsole(Edit* &playable_edit,
55 int64_t position,
56 int &get_use_vconsole);
57 int get_colormodel(Edit* &playable_edit,
58 int use_vconsole,
59 int use_brender);
61 int64_t tounits(double position, int round);
62 double fromunits(int64_t position);
64 // frames since start of playback
65 int64_t session_frame;
67 // console dimensions
68 int track_w, track_h;
69 // video device dimensions
70 int output_w, output_h;
71 // frames to send to console fragment
72 int64_t vmodule_render_fragment;
73 // frames to send to video device (1)
74 int64_t playback_buffer;
75 // Output frame
76 VFrame *video_out[MAX_CHANNELS];
77 // Byte offset of video_out
78 int64_t output_offset;
81 int64_t source_length; // Total number of frames to render for transitions
83 private:
84 int init_device_buffers();
85 Timer timer;
87 // for getting actual framerate
88 int64_t framerate_counter;
89 Timer framerate_timer;
90 int render_strategy;
96 #endif