]> git.sesse.net Git - mlt/commitdiff
Remove now unused FBOInput.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 11 Jan 2014 12:43:14 +0000 (13:43 +0100)
committerDan Dennedy <dan@dennedy.org>
Tue, 14 Jan 2014 06:01:56 +0000 (22:01 -0800)
src/modules/opengl/Makefile
src/modules/opengl/fbo_input.cpp [deleted file]
src/modules/opengl/fbo_input.h [deleted file]
src/modules/opengl/mlt_movit_input.cpp
src/modules/opengl/mlt_movit_input.h

index 1e61e0edde886ebc0bc89aa54c9e4b6fd2e19808..d68bccbbd0e0fdb799b30366abf0b34249f89c39 100644 (file)
@@ -8,8 +8,7 @@ TARGET = ../libmltopengl$(LIBSUF)
 
 OBJS = factory.o
 
-CPPOBJS = fbo_input.o
-CPPOBJS += filter_glsl_manager.o
+CPPOBJS = filter_glsl_manager.o
 CPPOBJS += filter_movit_blur.o
 CPPOBJS += filter_movit_convert.o
 CPPOBJS += filter_movit_crop.o
diff --git a/src/modules/opengl/fbo_input.cpp b/src/modules/opengl/fbo_input.cpp
deleted file mode 100644 (file)
index fafe333..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * fbo_input.cpp
- * Copyright (C) 2013 Dan Dennedy <dan@dennedy.org>
- *
- * 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 "fbo_input.h"
-#include <movit/util.h>
-
-// comes from unexported effect_util.h
-extern void set_uniform_int(GLuint glsl_program_num, const std::string &prefix, const std::string &key, int value);
-
-FBOInput::FBOInput(unsigned width, unsigned height)
-       : texture_num(0)
-       , needs_mipmaps(false)
-       , width(width)
-       , height(height)
-{
-       register_int("needs_mipmaps", &needs_mipmaps);
-}
-
-void FBOInput::set_gl_state(GLuint glsl_program_num, const std::string& prefix, unsigned *sampler_num)
-{
-       glActiveTexture(GL_TEXTURE0 + *sampler_num);
-       check_error();
-       glBindTexture(GL_TEXTURE_2D, texture_num);
-       check_error();
-
-       // Bind it to a sampler.
-       set_uniform_int(glsl_program_num, prefix, "tex", *sampler_num);
-       ++*sampler_num;
-}
-
-std::string FBOInput::output_fragment_shader()
-{
-       return read_file("flat_input.frag");
-//     return "uniform sampler2D PREFIX(tex); vec4 FUNCNAME(vec2 tc) { return texture2D(PREFIX(tex), tc); }\n";
-}
diff --git a/src/modules/opengl/fbo_input.h b/src/modules/opengl/fbo_input.h
deleted file mode 100644 (file)
index 0000e03..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * fbo_input.h
- * Copyright (C) 2013 Dan Dennedy <dan@dennedy.org>
- *
- * 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 FBO_INPUT_H
-#define FBO_INPUT_H
-
-#include <movit/input.h>
-
-class FBOInput : public Input
-{
-public:
-       FBOInput(unsigned width, unsigned height);
-
-       virtual std::string effect_type_id() const { return "FBOInput"; }
-       void finalize() {}
-       bool can_output_linear_gamma() const { return false; }
-       AlphaHandling alpha_handling() const { return OUTPUT_POSTMULTIPLIED_ALPHA; }
-       std::string output_fragment_shader();
-       void set_gl_state(GLuint glsl_program_num, const std::string& prefix, unsigned *sampler_num);
-       unsigned get_width() const { return width; }
-       unsigned get_height() const { return height; }
-       Colorspace get_color_space() const { return COLORSPACE_sRGB; }
-       GammaCurve get_gamma_curve() const { return GAMMA_sRGB; }
-       void set_texture(GLuint texture) {
-               texture_num = texture;
-       }
-
-private:
-       GLuint texture_num;
-       int needs_mipmaps;
-       unsigned width, height;
-};
-
-#endif // FBO_INPUT_H
index d2755741c05168bfc2be77bab186920d504eb23c..4339ac30e88a3f4db3e2b19d47244f057bdd2339 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include "mlt_movit_input.h"
-#include "fbo_input.h"
 
 MltInput::MltInput(unsigned width, unsigned height)
        : m_width(width)
@@ -106,15 +105,6 @@ void MltInput::useYCbCrInput(const ImageFormat& image_format, const YCbCrFormat&
        }
 }
 
-void MltInput::useFBOInput(GLuint texture)
-{
-       if (!input) {
-               FBOInput* fboInput = new FBOInput(m_width, m_height);
-               input = fboInput;
-               fboInput->set_texture(texture);
-       }
-}
-
 void MltInput::set_pixel_data(const unsigned char* data)
 {
        assert(input);
index ce9f61aede1b0017531583e6929786234e553923..bbeac078af3ffa67aa4f388f7045a066c7e180c2 100644 (file)
@@ -47,7 +47,6 @@ public:
        // Custom methods
        void useFlatInput(MovitPixelFormat pix_fmt, unsigned width, unsigned height);
        void useYCbCrInput(const ImageFormat& image_format, const YCbCrFormat& ycbcr_format, unsigned width, unsigned height);
-       void useFBOInput(GLuint texture);
        void set_pixel_data(const unsigned char* data);
 
 private: