dynamic keyframes, textbox rework, andrea ffmpeg.opts, perpetual chkpt undo, lv2...
[goodguy/history.git] / cinelerra-5.1 / plugins / videoscope / videoscope.C
index 178091cf680d6eb3b21bd08ea4dbef7c1f7b9d09..76b7cf720740f5d9a1116a79b71d0c608c6ae664 100644 (file)
@@ -2,31 +2,32 @@
 /*
  * CINELERRA
  * Copyright (C) 1997-2011 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
- * 
+ *
  */
 
 #include "bcdisplayinfo.h"
+#include "bccolors.h"
 #include "clip.h"
 #include "bchash.h"
 #include "filexml.h"
 #include "guicast.h"
 #include "language.h"
 #include "loadbalance.h"
-#include "cicolors.h"
+#include "bccolors.h"
 #include "pluginvclient.h"
 #include "fonts.h"
 #include "scopewindow.h"
@@ -83,7 +84,6 @@ public:
        VideoScopeUnit(VideoScopeEffect *plugin, VideoScopeEngine *server);
        void process_package(LoadPackage *package);
        VideoScopeEffect *plugin;
-       YUV yuv;
 };
 
 class VideoScopeEngine : public LoadServer
@@ -146,8 +146,8 @@ VideoScopeConfig::VideoScopeConfig()
 
 
 VideoScopeWindow::VideoScopeWindow(VideoScopeEffect *plugin)
- : ScopeGUI(plugin, 
-       plugin->w, 
+ : ScopeGUI(plugin,
+       plugin->w,
        plugin->h)
 {
        this->plugin = plugin;
@@ -229,13 +229,13 @@ VideoScopeEffect::VideoScopeEffect(PluginServer *server)
 
 VideoScopeEffect::~VideoScopeEffect()
 {
-       
+
 
 }
 
 
 
-const char* VideoScopeEffect::plugin_title() { return _("VideoScope"); }
+const char* VideoScopeEffect::plugin_title() { return N_("VideoScope"); }
 int VideoScopeEffect::is_realtime() { return 1; }
 
 int VideoScopeEffect::load_configuration()
@@ -248,7 +248,7 @@ void VideoScopeEffect::save_data(KeyFrame *keyframe)
        FileXML output;
 
 // cause data to be stored directly in text
-       output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+       output.set_shared_output(keyframe->xbuf);
        output.tag.set_title("VIDEOSCOPE");
 
 
@@ -273,7 +273,7 @@ void VideoScopeEffect::save_data(KeyFrame *keyframe)
 void VideoScopeEffect::read_data(KeyFrame *keyframe)
 {
        FileXML input;
-       input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+       input.set_shared_input(keyframe->xbuf);
 
        int result = 0;
 
@@ -348,7 +348,7 @@ VideoScopePackage::VideoScopePackage()
 
 
 
-VideoScopeUnit::VideoScopeUnit(VideoScopeEffect *plugin, 
+VideoScopeUnit::VideoScopeUnit(VideoScopeEffect *plugin,
        VideoScopeEngine *server)
  : LoadClient(server)
 {
@@ -361,12 +361,12 @@ VideoScopeUnit::VideoScopeUnit(VideoScopeEffect *plugin,
                                                                        ((p)[2] * 29)) >> 8)
 
 
-static void draw_point(unsigned char **rows, 
-       int color_model, 
-       int x, 
-       int y, 
-       int r, 
-       int g, 
+static void draw_point(unsigned char **rows,
+       int color_model,
+       int x,
+       int y,
+       int r,
+       int g,
        int b)
 {
        switch(color_model)
@@ -416,21 +416,13 @@ static void draw_point(unsigned char **rows,
                        { \
                                if(sizeof(type) == 2) \
                                { \
-                                       yuv.yuv_to_rgb_16(r, \
-                                               g, \
-                                               b, \
-                                               in_pixel[0], \
-                                               in_pixel[1], \
-                                               in_pixel[2]); \
+                                       YUV::yuv.yuv_to_rgb_16(r, g, b, \
+                                               in_pixel[0], in_pixel[1], in_pixel[2]); \
                                } \
                                else \
                                { \
-                                       yuv.yuv_to_rgb_8(r, \
-                                               g, \
-                                               b, \
-                                               in_pixel[0], \
-                                               in_pixel[1], \
-                                               in_pixel[2]); \
+                                       YUV::yuv.yuv_to_rgb_8(r, g, b, \
+                                               in_pixel[0], in_pixel[1], in_pixel[2]); \
                                } \
                        } \
                        else \