00001 #ifndef VDEVICEX11_H
00002 #define VDEVICEX11_H
00003
00004 #include "canvas.inc"
00005 #include "edl.inc"
00006 #include "guicast.h"
00007 #include "maskauto.inc"
00008 #include "maskautos.inc"
00009 #include "pluginclient.inc"
00010 #include "thread.h"
00011 #include "vdevicebase.h"
00012
00013
00014 #define BITMAP_PRIMARY 0
00015
00016 #define BITMAP_TEMP 1
00017
00018 class VDeviceX11 : public VDeviceBase
00019 {
00020 public:
00021 VDeviceX11(VideoDevice *device, Canvas *output);
00022 ~VDeviceX11();
00023
00024 int open_input();
00025 int close_all();
00026 int read_buffer(VFrame *frame);
00027 int reset_parameters();
00028
00029 void new_output_buffer(VFrame **output, int colormodel);
00030
00031 int open_output();
00032 int start_playback();
00033 int stop_playback();
00034 int output_visible();
00035
00036 int write_buffer(VFrame *result, EDL *edl);
00037
00038 int get_best_colormodel(Asset *asset);
00039
00040
00041
00042
00043
00044 void clear_output();
00045
00046
00047 void do_camera(VFrame *output,
00048 VFrame *input,
00049 float in_x1,
00050 float in_y1,
00051 float in_x2,
00052 float in_y2,
00053 float out_x1,
00054 float out_y1,
00055 float out_x2,
00056 float out_y2);
00057
00058
00059 void clear_input(VFrame *frame);
00060
00061 void do_fade(VFrame *output_temp, float fade);
00062
00063
00064 void do_mask(VFrame *output_temp,
00065 int64_t start_position_project,
00066 MaskAutos *keyframe_set,
00067 MaskAuto *keyframe,
00068 MaskAuto *default_auto);
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 void overlay(VFrame *output_frame,
00082 VFrame *input,
00083 float in_x1,
00084 float in_y1,
00085 float in_x2,
00086 float in_y2,
00087 float out_x1,
00088 float out_y1,
00089 float out_x2,
00090 float out_y2,
00091 float alpha,
00092 int mode,
00093 EDL *edl);
00094
00095
00096
00097
00098 void run_plugin(PluginClient *client);
00099
00100
00101
00102
00103 void copy_frame(VFrame *dst, VFrame *src);
00104
00105 private:
00106
00107
00108
00109
00110
00111 int get_best_colormodel(int colormodel);
00112
00113
00114 BC_Bitmap *bitmap;
00115
00116 VFrame *output_frame;
00117
00118 int bitmap_type;
00119
00120 int bitmap_w, bitmap_h;
00121 ArrayList<int> render_strategies;
00122
00123 Canvas *output;
00124
00125
00126 int window_id;
00127 int texture_w;
00128 int texture_h;
00129 int color_model;
00130 int color_model_selected;
00131
00132
00133
00134
00135 float output_x1, output_y1, output_x2, output_y2;
00136 float canvas_x1, canvas_y1, canvas_x2, canvas_y2;
00137
00138 BC_Capture *capture_bitmap;
00139
00140 int is_cleared;
00141 };
00142
00143 #endif