r553: Modern gccs require __attribute__((used)) for variables used only in assembly.
[cinelerra_cv/mob.git] / cinelerra / vrender.h
blob3e91af75501de62224fe323d1ea72ad3173cd4aa
1 #ifndef VRENDER_H
2 #define VRENDER_H
4 #include "commonrender.h"
5 #include "edit.inc"
6 #include "guicast.h"
7 #include "mwindow.inc"
8 #include "overlayframe.inc"
9 #include "renderengine.inc"
10 #include "vframe.inc"
13 class VRender : public CommonRender
15 public:
16 VRender(RenderEngine *renderengine);
17 VRender(MWindow *mwindow, RenderEngine *renderengine);
18 ~VRender();
20 VirtualConsole* new_vconsole_object();
21 int get_total_tracks();
22 Module* new_module(Track *track);
24 // set up and start thread
25 int arm_playback(int64_t current_position,
26 int64_t input_length,
27 int64_t module_render_fragment,
28 int64_t playback_buffer,
29 int track_w,
30 int track_h,
31 int output_w,
32 int output_h);
34 void run();
35 int wait_for_startup();
37 int start_playback(); // start the thread
39 // get data type for certain commonrender routines
40 int get_datatype();
42 // process frames to put in buffer_out
43 int process_buffer(VFrame **video_out,
44 int64_t input_position,
45 int last_buffer);
46 // load an array of buffers for each track to send to the thread
47 int process_buffer(int64_t input_position);
48 // Flash the output on the display
49 int flash_output();
50 // Determine if data can be copied directly from the file to the output device.
51 void VRender::get_render_strategy(Edit* &playable_edit,
52 int &colormodel,
53 int &use_vconsole,
54 int64_t position);
55 int get_use_vconsole(Edit* &playable_edit,
56 int64_t position,
57 int &get_use_vconsole);
58 int get_colormodel(Edit* &playable_edit,
59 int use_vconsole,
60 int use_brender);
61 int insert_timecode(Edit* &playable_edit,
62 int64_t position,
63 VFrame *output);
65 int64_t tounits(double position, int round);
66 double fromunits(int64_t position);
68 // frames since start of playback
69 int64_t session_frame;
71 // console dimensions
72 int track_w, track_h;
73 // video device dimensions
74 int output_w, output_h;
75 // frames to send to console fragment
76 int64_t vmodule_render_fragment;
77 // frames to send to video device (1)
78 int64_t playback_buffer;
79 // Output frame
80 VFrame *video_out[MAX_CHANNELS];
81 // Byte offset of video_out
82 int64_t output_offset;
84 // Temp frame for VModule loading
85 VFrame *input_temp;
86 // Temp frame for VModule transitions
87 VFrame *transition_temp;
88 // Engine for camera and projector automation
89 OverlayFrame *overlayer;
93 // Total number of frames to render for transitions
94 int64_t source_length;
96 // Flag first frame to unlock audio
97 int first_frame;
99 private:
100 int init_device_buffers();
101 Timer timer;
103 // for getting actual framerate
104 int64_t framerate_counter;
105 Timer framerate_timer;
106 int render_strategy;
112 #endif