r1006: configure: Use libx264_pic instead of libx264 if available.
[cinelerra_cv/mob.git] / cinelerra / vrender.h
blobf8c9fde6670ea87e1b63516b14fa410619c7b9cc
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 get_render_strategy(Edit* &playable_edit,
52 int &colormodel,
53 int &use_vconsole,
54 int64_t position);
57 int get_use_vconsole(Edit* &playable_edit,
58 int64_t position,
59 int &get_use_vconsole);
60 int get_colormodel(Edit* &playable_edit,
61 int use_vconsole,
62 int use_brender);
63 int insert_timecode(Edit* &playable_edit,
64 int64_t position,
65 VFrame *output);
67 int64_t tounits(double position, int round);
68 double fromunits(int64_t position);
70 // frames since start of playback
71 int64_t session_frame;
73 // console dimensions
74 int track_w, track_h;
75 // video device dimensions
76 int output_w, output_h;
77 // frames to send to console fragment
78 int64_t vmodule_render_fragment;
79 // frames to send to video device (1)
80 int64_t playback_buffer;
81 // Output frame
82 VFrame *video_out;
83 // Byte offset of video_out
84 int64_t output_offset;
86 // Temp frame for VModule loading
87 VFrame *input_temp;
88 // Temp frame for VModule transitions
89 VFrame *transition_temp;
90 // Engine for camera and projector automation
91 OverlayFrame *overlayer;
95 // Total number of frames to render for transitions
96 int64_t source_length;
98 // Flag first frame to unlock audio
99 int first_frame;
101 private:
102 int init_device_buffers();
103 Timer timer;
105 // for getting actual framerate
106 int64_t framerate_counter;
107 Timer framerate_timer;
108 int render_strategy;
114 #endif