dynamic keyframes, textbox rework, andrea ffmpeg.opts, perpetual chkpt undo, lv2...
[goodguy/history.git] / cinelerra-5.1 / plugins / interpolate / interpolate.C
index 64fa589b188d109aef4ed3e7b28520977a4a9d94..9294d8fd6b4217047e68a2a648769966b2288991 100644 (file)
@@ -167,7 +167,7 @@ InterpolatePixelsMain::~InterpolatePixelsMain()
        delete engine;
 }
 
-const char* InterpolatePixelsMain::plugin_title() { return _("Interpolate Bayer"); }
+const char* InterpolatePixelsMain::plugin_title() { return N_("Interpolate Bayer"); }
 int InterpolatePixelsMain::is_realtime() { return 1; }
 
 
@@ -198,7 +198,7 @@ void InterpolatePixelsMain::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("INTERPOLATEPIXELS");
        output.tag.set_property("X", config.x);
        output.tag.set_property("Y", config.y);
@@ -213,7 +213,7 @@ void InterpolatePixelsMain::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;
 
@@ -278,7 +278,7 @@ int InterpolatePixelsMain::process_buffer(VFrame *frame,
                        delete out_temp;  out_temp = 0;
                }
                if( !out_temp )
-                       out_temp = new VFrame(0, -1, w, h, active_model, -1);
+                       out_temp = new VFrame(w, h, active_model, 0);
                out_frame = out_temp;
        }
 
@@ -327,19 +327,19 @@ int InterpolatePixelsMain::handle_opengl()
        get_output()->to_texture();
        get_output()->enable_opengl();
 
-       const char *shader_stack[] = { 0, 0, 0 };
-       int current_shader = 0;
-       INTERPOLATE_COMPILE(shader_stack, current_shader)
-       unsigned int frag = VFrame::make_shader(0,
-                                       shader_stack[0],
-                                       0);
-       if(frag > 0)
-       {
-               glUseProgram(frag);
-               glUniform1i(glGetUniformLocation(frag, "tex"), 0);
-               INTERPOLATE_UNIFORMS(frag)
-       }
+        const char *shader_stack[16];
+        memset(shader_stack,0, sizeof(shader_stack));
+        int current_shader = 0;
 
+       INTERPOLATE_COMPILE(shader_stack, current_shader);
+
+       shader_stack[current_shader] = 0;
+       unsigned int shader = VFrame::make_shader(shader_stack);
+       if( shader > 0 ) {
+               glUseProgram(shader);
+               glUniform1i(glGetUniformLocation(shader, "tex"), 0);
+               INTERPOLATE_UNIFORMS(shader);
+       }
 
        get_output()->init_screen();
        get_output()->bind_texture(0);