00001 #ifndef PLUGINVCLIENT_H
00002 #define PLUGINVCLIENT_H
00003
00004
00005 #include "maxbuffers.h"
00006 #include "pluginclient.h"
00007 #include "vframe.inc"
00008
00009
00010
00011
00012 #define PLUGIN_MAX_W 2000
00013 #define PLUGIN_MAX_H 1000
00014
00015
00016
00017 class PluginVClient : public PluginClient
00018 {
00019 public:
00020 PluginVClient(PluginServer *server);
00021 virtual ~PluginVClient();
00022
00023 int get_render_ptrs();
00024 int init_realtime_parameters();
00025 int delete_nonrealtime_parameters();
00026 int is_video();
00027
00028
00029
00030
00031
00032
00033
00034
00035 virtual int process_realtime(VFrame **input,
00036 VFrame **output);
00037
00038 virtual int process_realtime(VFrame *input,
00039 VFrame *output);
00040
00041
00042
00043
00044
00045
00046
00047 virtual int process_buffer(VFrame **frame,
00048 int64_t start_position,
00049 double frame_rate);
00050 virtual int process_buffer(VFrame *frame,
00051 int64_t start_position,
00052 double frame_rate);
00053
00054
00055 void plugin_render_gui(void *data);
00056 virtual void render_gui(void *data) { };
00057
00058 void send_render_gui(void *data);
00059 virtual int process_loop(VFrame **buffers) { return 1; };
00060 virtual int process_loop(VFrame *buffer) { return 1; };
00061 int plugin_process_loop(VFrame **buffers, int64_t &write_length);
00062
00063 int plugin_start_loop(int64_t start,
00064 int64_t end,
00065 int64_t buffer_size,
00066 int total_buffers);
00067 int plugin_get_parameters();
00068
00069
00070
00071
00072
00073
00074 int read_frame(VFrame *buffer,
00075 int channel,
00076 int64_t start_position);
00077 int read_frame(VFrame *buffer,
00078 int64_t start_position);
00079
00080
00081
00082
00083
00084
00085
00086
00087 int read_frame(VFrame *buffer,
00088 int channel,
00089 int64_t start_position,
00090 double frame_rate);
00091
00092
00093
00094 VFrame* new_temp(int w, int h, int color_model);
00095
00096
00097 void age_temp();
00098
00099
00100 double get_project_framerate();
00101
00102 double get_framerate();
00103
00104 int64_t local_to_edl(int64_t position);
00105 int64_t edl_to_local(int64_t position);
00106
00107
00108
00109 VFrame ***video_in, ***video_out;
00110
00111
00112 ArrayList<VFrame***> input_ptr_master;
00113 ArrayList<VFrame***> output_ptr_master;
00114
00115
00116 VFrame ***input_ptr_render;
00117 VFrame ***output_ptr_render;
00118
00119
00120 double project_frame_rate;
00121
00122
00123
00124
00125 double frame_rate;
00126 int project_color_model;
00127 int use_float;
00128 int use_alpha;
00129 int use_interpolation;
00130 float aspect_w, aspect_h;
00131
00132
00133 VFrame *temp;
00134 };
00135
00136
00137
00138 #endif