fix trace locks hang, drag handle rework-again, 12 reset btns on plugins, booby on
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / yuvshift / yuvshift.h
diff --git a/cinelerra-5.1/plugins/yuvshift/yuvshift.h b/cinelerra-5.1/plugins/yuvshift/yuvshift.h
new file mode 100644 (file)
index 0000000..c943f5b
--- /dev/null
@@ -0,0 +1,109 @@
+
+/*
+ * CINELERRA
+ * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef YUVSHIFT_H
+#define YUVSHIFT_H
+
+#include "bcdisplayinfo.h"
+#include "clip.h"
+#include "bchash.h"
+#include "filexml.h"
+#include "guicast.h"
+#include "language.h"
+#include "bccolors.h"
+#include "pluginvclient.h"
+#include "vframe.h"
+
+#include <stdint.h>
+#include <string.h>
+
+
+class YUVShiftEffect;
+class YUVShiftWindow;
+class YUVShiftReset;
+
+
+class YUVShiftConfig
+{
+public:
+       YUVShiftConfig();
+
+       void reset();
+       void copy_from(YUVShiftConfig &src);
+       int equivalent(YUVShiftConfig &src);
+       void interpolate(YUVShiftConfig &prev,
+               YUVShiftConfig &next,
+               long prev_frame,
+               long next_frame,
+               long current_frame);
+
+       int y_dx, y_dy, u_dx, u_dy, v_dx, v_dy;
+};
+
+class YUVShiftLevel : public BC_ISlider
+{
+public:
+       YUVShiftLevel(YUVShiftEffect *plugin, int *output, int x, int y);
+       int handle_event();
+       YUVShiftEffect *plugin;
+       int *output;
+};
+
+class YUVShiftReset : public BC_GenericButton
+{
+public:
+       YUVShiftReset(YUVShiftEffect *plugin, YUVShiftWindow *window, int x, int y);
+       ~YUVShiftReset();
+       int handle_event();
+       YUVShiftEffect *plugin;
+       YUVShiftWindow *window;
+};
+
+class YUVShiftWindow : public PluginClientWindow
+{
+public:
+       YUVShiftWindow(YUVShiftEffect *plugin);
+       void create_objects();
+       void update();
+       YUVShiftLevel *y_dx, *y_dy, *u_dx, *u_dy, *v_dx, *v_dy;
+       YUVShiftEffect *plugin;
+       YUVShiftReset *reset;
+};
+
+
+
+class YUVShiftEffect : public PluginVClient
+{
+       VFrame *temp_frame;
+public:
+       YUVShiftEffect(PluginServer *server);
+       ~YUVShiftEffect();
+
+
+       PLUGIN_CLASS_MEMBERS(YUVShiftConfig)
+       int process_realtime(VFrame *input, VFrame *output);
+       int is_realtime();
+       void save_data(KeyFrame *keyframe);
+       void read_data(KeyFrame *keyframe);
+       void update_gui();
+};
+
+#endif