]> git.vomp.tv Git - vompclient.git/commitdiff
Add missing files + compile error for wheezy
authorMarten Richter <marten.richter@freenet.de>
Tue, 26 Jun 2012 05:44:49 +0000 (07:44 +0200)
committerMarten Richter <marten.richter@freenet.de>
Wed, 27 Jun 2012 06:01:26 +0000 (08:01 +0200)
GNUmakefile
Makefile.nmake
glyuv444shader.cc [new file with mode: 0755]
glyuv444shader.h [new file with mode: 0755]
objects.mk

index 4e386e1f4253be46392e296e33d51ecb9c4ea33f..2327226668afd1d388a13e9d91d9f19f8ad8564a 100755 (executable)
@@ -61,7 +61,7 @@ LIBS = -L/opt/vc/lib -lpthread -lrt -lEGL -lGLESv2 -lopenmaxil -lbcm_host   -lav
 OBJECTS += main.o threadp.o osdopengl.o surfaceopengl.o ledraspberry.o mtdraspberry.o videovpeogl.o audiovpe.o wjpegsimple.o remotelinux.o glshader.o glosdshader.o glyuv400shader.o glyuv444shader.o  glmocoshader.o\r
 LIBS+= -ljpeg\r
 CROSSLIBS =\r
-INCLUDES = -DVOMP_PLATTFORM_RASPBERRY   -I/opt/vc/include \r
+INCLUDES = -DVOMP_PLATTFORM_RASPBERRY   -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads \r
 CXXFLAGS_DEV += -D__STDC_CONSTANT_MACROS\r
 CXXFLAGS_REL += -D__STDC_CONSTANT_MACROS\r
 \r
index dbb2fb8e9768191c76919c8b5476590f364fa79d..3f9701437e2efc03ca5a013aa2bd1720df529080 100644 (file)
@@ -17,7 +17,7 @@ CROSSLIBS =
 !include "objects.mk"
 
 
-OBJECTSWIN = winmain.o threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o dsallocator.o dssourcefilter.o dssourcepin.o wwinvideofilter.o wwinaudiofilter.o wwinmp3audiofilter.o wjpegsimple.o
+OBJECTSWIN = winmain.o threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o dsallocator.o dssourcefilter.o dssourcepin.o wwinvideofilter.o wwinaudiofilter.o wwinmp3audiofilter.o wjpegsimple.o 
 
 OBJECTS = $(OBJECTS1) $(OBJECTSWIN)
 
diff --git a/glyuv444shader.cc b/glyuv444shader.cc
new file mode 100755 (executable)
index 0000000..2c90f77
--- /dev/null
@@ -0,0 +1,106 @@
+/*\r
+    Copyright 2012 Marten Richter\r
+\r
+    This file is part of VOMP.\r
+\r
+    VOMP is free software; you can redistribute it and/or modify\r
+    it under the terms of the GNU General Public License as published by\r
+    the Free Software Foundation; either version 2 of the License, or\r
+    (at your option) any later version.\r
+\r
+    VOMP is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    GNU General Public License for more details.\r
+\r
+    You should have received a copy of the GNU General Public License\r
+    along with VOMP; if not, write to the Free Software\r
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\r
+*/\r
+#include "glyuv444shader.h"\r
+\r
+const GLchar generic_vertex_shader[] =\r
+               "attribute vec4 vec_pos;\n"\r
+               "attribute vec2 tex_coord;\n"\r
+               "varying vec2 out_texCoord;\n"\r
+               "void main()\n"\r
+               "{\n"\r
+               " gl_Position=vec_pos;\n"\r
+               " out_texCoord=tex_coord;\n"\r
+               "}\n";\r
+\r
+const GLchar frame_frag_shader[] =\r
+               "precision mediump float;\n"\r
+               "uniform sampler2D textureYUV;\n"\r
+               "const float uv_corr=0.5;\n"\r
+               "const float y_corr=0.0625;\n"\r
+               "const mat3 yuvtransform= mat3( 1.164 ,0.0  ,1.596   ,\n"\r
+               "                               1.164 ,-0.391,-0.813   ,\n"\r
+               "                               1.164,2.018  , 0.0 );\n"\r
+//             "const mat3 yuvtransform= mat3( 1. ,1.  ,1.   ,\n"\r
+//             "                               0.0 ,-0.3960,2.029   ,\n"\r
+//             "                               1.140,-0.581  , 0.0 );\n"\r
+//             "const mat3 yuvtransform= mat3( 1. ,0  ,0.   ,\n"\r
+//             "                               0.0 ,1.,0.   ,\n"\r
+//             "                               0.,0.  , 1.0 );\n"\r
+//             "const mat3 yuvtransform= mat3( 1. ,1.  ,1.   ,\n"\r
+//             "                               0.0 ,-0.03960,0.2029   ,\n"\r
+//             "                               0.1140,-0.0581  , 0.0 );\n"\r
+               "varying vec2 out_texCoord;\n"\r
+               "void main()\n"\r
+               "{\n"\r
+               " vec3 help;\n"\r
+               "help=texture2D(textureYUV,out_texCoord).rgb-vec3(y_corr,uv_corr,uv_corr);\n"\r
+               "gl_FragColor.rgb=help*yuvtransform;\n"\r
+               "gl_FragColor.a=1.;\n"\r
+               "}\n";\r
+\r
+GLYuv444Shader::GLYuv444Shader(): GLShader("GLYuv444Shader")\r
+{\r
+\r
+}\r
+\r
+GLYuv444Shader::~GLYuv444Shader()\r
+{\r
+       //parent does everything\r
+}\r
+\r
+int GLYuv444Shader::init() {\r
+       if (!initShaders(generic_vertex_shader, frame_frag_shader)) {\r
+               return 0;\r
+       }\r
+       frame_sampler_locYUV = glGetUniformLocation(shad_program, "textureYUV");\r
+       return 1;\r
+\r
+}\r
+\r
+int GLYuv444Shader::deinit()\r
+{\r
+       return deinitShaders();\r
+}\r
+\r
+int GLYuv444Shader::PrepareRendering(GLuint yuv_tex) { // This Function setups the rendering pipeline according to the shaders standards\r
+       glUseProgram(shad_program);\r
+       //Log::getInstance()->log("OSD", Log::WARN, "mark1 glerror %x",glGetError());\r
+\r
+\r
+\r
+\r
+\r
+       glActiveTexture( GL_TEXTURE0);\r
+       glBindTexture(GL_TEXTURE_2D, yuv_tex);\r
+       //Log::getInstance()->log("OSD", Log::WARN, "mark3 glerror %x %x",glGetError(),yuv_tex);\r
+       glUniform1i(frame_sampler_locYUV, 0);\r
+       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\r
+       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);\r
+\r
+       return 1;\r
+\r
+}\r
+\r
+int GLYuv444Shader::BindAttributes()\r
+{\r
+       glBindAttribLocation(shad_program,0,"vec_pos");\r
+       glBindAttribLocation(shad_program,1,"tex_coord");\r
+       return 1;\r
+}\r
diff --git a/glyuv444shader.h b/glyuv444shader.h
new file mode 100755 (executable)
index 0000000..86bcbc6
--- /dev/null
@@ -0,0 +1,45 @@
+/*\r
+    Copyright 2012 Marten Richter\r
+\r
+    This file is part of VOMP.\r
+\r
+    VOMP is free software; you can redistribute it and/or modify\r
+    it under the terms of the GNU General Public License as published by\r
+    the Free Software Foundation; either version 2 of the License, or\r
+    (at your option) any later version.\r
+\r
+    VOMP is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    GNU General Public License for more details.\r
+\r
+    You should have received a copy of the GNU General Public License\r
+    along with VOMP; if not, write to the Free Software\r
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\r
+*/\r
+\r
+#ifndef GL_YUV444SHADER_H\r
+#define GL_YUV444SHADER_H\r
+\r
+#include "glshader.h"\r
+\r
+class GLYuv444Shader: public GLShader {\r
+public:\r
+       GLYuv444Shader();\r
+       virtual ~GLYuv444Shader();\r
+\r
+       int init();\r
+       int deinit();\r
+\r
+       int PrepareRendering(GLuint y_tex); // This Function setups the rendering pipeline according to the shaders standards\r
+\r
+protected:\r
+       virtual int BindAttributes();\r
+\r
+       GLint frame_sampler_locYUV;\r
+\r
+\r
+};\r
+\r
+\r
+#endif\r
index ddbd015424305e0923f526145d4f70eb93d3c92b..0ce596edb8fb5a0a921b5d260975fc8fb062de81 100644 (file)
@@ -21,8 +21,8 @@ OBJECTS1 = command.o  tcp.o dsock.o thread.o timers.o i18n.o       \
            playerlivetv.o playerliveradio.o                                      \\r
            wprogressbar.o                                                        \\r
            bitmap.o dvbsubtitles.o                                               \\r
-           imagereader.o  mediaoptions.o mediaplayer.o mediafile.o \\r
+           imagereader.o  mediaoptions.o mediaplayer.o  \\r
            serialize.o localmediafile.o   playermedia.o \\r
            demuxermedia.o tfeed.o vteletextview.o teletextdecodervbiebu.o        \\r
-           teletxt/txtfont.o\r
+           teletxt/txtfont.o mediafile.o\r
 \r