dynamic keyframes, textbox rework, andrea ffmpeg.opts, perpetual chkpt undo, lv2...
[goodguy/history.git] / cinelerra-5.1 / plugins / 1080to480 / 1080to480.C
index bb35f2612ebd91bbcdb034e135905481dd229b92..6b522295ea0d46caeb59df4e2b5e7cb1293ce50f 100644 (file)
@@ -2,21 +2,21 @@
 /*
  * 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
- * 
+ *
  */
 
 #include "1080to480.h"
@@ -58,10 +58,10 @@ void _1080to480Config::copy_from(_1080to480Config &that)
        first_field = that.first_field;
 }
 
-void _1080to480Config::interpolate(_1080to480Config &prev, 
-       _1080to480Config &next, 
-       long prev_frame, 
-       long next_frame, 
+void _1080to480Config::interpolate(_1080to480Config &prev,
+       _1080to480Config &next,
+       long prev_frame,
+       long next_frame,
        long current_frame)
 {
        copy_from(prev);
@@ -73,8 +73,8 @@ void _1080to480Config::interpolate(_1080to480Config &prev,
 
 _1080to480Window::_1080to480Window(_1080to480Main *client)
  : PluginClientWindow(client, 200, 100, 0, 0, 1)
-{ 
-       this->client = client; 
+{
+       this->client = client;
 }
 
 
@@ -111,15 +111,15 @@ int _1080to480Window::set_first_field(int first_field, int send_event)
 
 
 
-_1080to480Option::_1080to480Option(_1080to480Main *client, 
-               _1080to480Window *window, 
-               int output, 
-               int x, 
-               int y, 
+_1080to480Option::_1080to480Option(_1080to480Main *client,
+               _1080to480Window *window,
+               int output,
+               int x,
+               int y,
                char *text)
- : BC_Radial(x, 
-       y, 
-       client->config.first_field == output, 
+ : BC_Radial(x,
+       y,
+       client->config.first_field == output,
        text)
 {
        this->client = client;
@@ -145,17 +145,17 @@ int _1080to480Option::handle_event()
 _1080to480Main::_1080to480Main(PluginServer *server)
  : PluginVClient(server)
 {
-       
+
        temp = 0;
 }
 
 _1080to480Main::~_1080to480Main()
 {
-       
+
        if(temp) delete temp;
 }
 
-const char* _1080to480Main::plugin_title() { return _("1080 to 480"); }
+const char* _1080to480Main::plugin_title() { return N_("1080 to 480"); }
 int _1080to480Main::is_realtime() { return 1; }
 
 NEW_WINDOW_MACRO(_1080to480Main, _1080to480Window)
@@ -237,13 +237,13 @@ int _1080to480Main::process_realtime(VFrame *input, VFrame *output)
        load_configuration();
        if(!temp)
        {
-               temp = new VFrame(input->get_w(), input->get_h(), input->get_color_model());
+               temp = new VFrame(input->get_w(), input->get_h(), input->get_color_model(), 0);
                temp->clear_frame();
        }
 
        reduce_field(temp, input, config.first_field == 0 ? 0 : 1, 0);
        reduce_field(temp, input, config.first_field == 0 ? 1 : 0, 1);
-       
+
        output->copy_from(temp);
 
        return 0;
@@ -253,7 +253,7 @@ int _1080to480Main::process_realtime(VFrame *input, VFrame *output)
 void _1080to480Main::save_data(KeyFrame *keyframe)
 {
        FileXML output;
-       output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+       output.set_shared_output(keyframe->xbuf);
        output.tag.set_title("1080TO480");
        output.tag.set_property("FIRST_FIELD", config.first_field);
        output.append_tag();
@@ -266,7 +266,7 @@ void _1080to480Main::save_data(KeyFrame *keyframe)
 void _1080to480Main::read_data(KeyFrame *keyframe)
 {
        FileXML input;
-       input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+       input.set_shared_input(keyframe->xbuf);
 
        while(!input.read_tag())
        {
@@ -279,7 +279,7 @@ void _1080to480Main::read_data(KeyFrame *keyframe)
 
 void _1080to480Main::update_gui()
 {
-       if(thread) 
+       if(thread)
        {
                load_configuration();
                _1080to480Window *window = (_1080to480Window *)thread->window;