Split linux GL rendering to a new filter (GLXVideo)

parent 780bf4e6
......@@ -184,7 +184,7 @@ AC_DEFUN([MS_CHECK_VIDEO],[
fi
fi
AC_ARG_ENABLE(gl,
[ --enable-gl Enable GL rendering support],
[ --enable-gl Enable GL rendering support (require glx and glew)],
[case "${enableval}" in
yes) enable_gl=true ;;
no) enable_gl=false ;;
......@@ -199,6 +199,8 @@ AC_DEFUN([MS_CHECK_VIDEO],[
if test "$enable_gl" = "false" ; then
AC_MSG_ERROR([No GL/GLX API found. Please install GL and GLX headers.])
fi
AC_CHECK_HEADERS(X11/Xlib.h)
AC_CHECK_HEADERS(GL/glew.h)
fi
fi
......@@ -259,7 +261,7 @@ AC_DEFUN([MS_CHECK_VIDEO],[
LIBS="$LIBS -framework AVFoundation -framework CoreVideo -framework CoreMedia"
fi
if test "$enable_gl" = "true"; then
VIDEO_LIBS="$VIDEO_LIBS -lGL"
VIDEO_LIBS="$VIDEO_LIBS -lGL -lGLEW"
VIDEO_CFLAGS="$VIDEO_CFLAGS $SDL_CFLAGS -DHAVE_GL"
fi
if test "$enable_xv" = "true"; then
......
......@@ -132,7 +132,8 @@ typedef enum MSFilterId{
MS_AAL2_G726_16_DEC_ID,
MS_L16_ENC_ID,
MS_L16_DEC_ID,
MS_OSX_GL_DISPLAY_ID
MS_OSX_GL_DISPLAY_ID,
MS_GLXVIDEO_ID
} MSFilterId;
......
......@@ -172,7 +172,7 @@ libmediastreamer_la_SOURCES+=x11video.c
endif
if BUILD_X11_GL
libmediastreamer_la_SOURCES+=x11video.c opengles_display.c shaders.c
libmediastreamer_la_SOURCES+=glxvideo.c opengles_display.c shaders.c
endif
libmediastreamer_la_SOURCES+= rfc2429.h \
......
This diff is collapsed.
......@@ -326,6 +326,9 @@ static void check_GL_errors(const char* context) {
static bool_t load_shaders(GLuint* program, GLint* uniforms) {
#include "yuv2rgb.vs.h"
#include "yuv2rgb.fs.h"
yuv2rgb_fs_len = yuv2rgb_fs_len;
yuv2rgb_vs_len = yuv2rgb_vs_len;
GLuint vertShader, fragShader;
*program = glCreateProgram();
......
......@@ -19,9 +19,11 @@
#elif defined(__APPLE__)
#import <OpenGL/OpenGL.h>
#include <OpenGL/gl.h>
#else
#elif defined( ANDROID )
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#else
#include <GL/glew.h>
#endif
/* Shader Utilities */
......
......@@ -187,7 +187,9 @@ static void choose_display_name(VideoStream *stream){
stream->display_name=ms_strdup("MSAndroidDisplay");
#elif __APPLE__ && !defined(__ios)
stream->display_name=ms_strdup("MSOSXGLDisplay");
#elif defined (HAVE_XV) || defined (HAVE_GL)
#elif defined(HAVE_GL)
stream->display_name=ms_strdup("MSGLXVideo");
#elif defined (HAVE_XV)
stream->display_name=ms_strdup("MSX11Video");
#elif defined(__ios)
stream->display_name=ms_strdup("IOSDisplay");
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment