tests: simplify build with various display options.

This commit is contained in:
Gwenole Beauchesne 2012-07-20 16:37:01 +02:00
parent 98f860f433
commit 37bf5a669e
2 changed files with 45 additions and 45 deletions

View file

@ -1,73 +1,72 @@
noinst_PROGRAMS = \ noinst_PROGRAMS = \
test-decode \ test-decode \
test-display \ test-display \
test-surfaces \ test-surfaces \
test-windows \ test-windows \
test-subpicture \ test-subpicture \
$(NULL) $(NULL)
if USE_GLX if USE_GLX
noinst_PROGRAMS += \ noinst_PROGRAMS += \
test-textures \ test-textures \
$(NULL) $(NULL)
endif endif
TEST_CFLAGS = $(LIBVA_CFLAGS) -I$(top_srcdir)/gst-libs $(GST_CFLAGS) -DGST_USE_UNSTABLE_API TEST_CFLAGS = \
TEST_X11_CFLAGS = -DUSE_X11 $(X11_CFLAGS) -DGST_USE_UNSTABLE_API \
TEST_GLX_CFLAGS = -DUSE_GLX $(X11_CFLAGS) $(GL_CFLAGS) -I$(top_srcdir)/gst-libs \
TEST_MIX_CFLAGS = $(TEST_X11_CFLAGS) $(LIBVA_CFLAGS) \
if USE_GLX $(GST_CFLAGS) \
TEST_MIX_CFLAGS += $(TEST_GLX_CFLAGS) $(NULL)
endif
TEST_LIBS = \ TEST_LIBS = \
$(GST_LIBS) \ $(LIBVA_LIBS) \
$(GST_LIBS) \
$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-@GST_MAJORMINOR@.la $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-@GST_MAJORMINOR@.la
TEST_X11_LIBS = \ if USE_X11
$(X11_LIBS) \ TEST_CFLAGS += $(X11_CFLAGS)
$(GST_LIBS) \ TEST_LIBS += \
$(LIBVA_X11_LIBS) \ $(LIBVA_X11_LIBS) \
$(X11_LIBS) \
$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-x11-@GST_MAJORMINOR@.la $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-x11-@GST_MAJORMINOR@.la
endif
TEST_GLX_LIBS = \
$(X11_LIBS) \
$(GL_LIBS) \
$(GST_LIBS) \
$(LIBVA_GLX_LIBS) \
$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-glx-@GST_MAJORMINOR@.la
TEST_MIX_LIBS = $(TEST_X11_LIBS)
if USE_GLX if USE_GLX
TEST_MIX_LIBS += $(TEST_GLX_LIBS) TEST_CFLAGS += $(X11_CFLAGS) $(GL_CFLAGS)
TEST_LIBS += \
$(LIBVA_GLX_LIBS) \
$(X11_LIBS) \
$(GL_LIBS) \
$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-glx-@GST_MAJORMINOR@.la
endif endif
test_codecs_source_c = test-mpeg2.c test-h264.c test-vc1.c test-jpeg.c test_codecs_source_c = test-mpeg2.c test-h264.c test-vc1.c test-jpeg.c
test_codecs_source_h = $(test_codecs_source_c:%.c=%.h) test_codecs_source_h = $(test_codecs_source_c:%.c=%.h)
test_decode_SOURCES = test-decode.c $(test_codecs_source_c) test_decode_SOURCES = test-decode.c $(test_codecs_source_c)
test_decode_CFLAGS = $(TEST_CFLAGS) $(TEST_X11_CFLAGS) test_decode_CFLAGS = $(TEST_CFLAGS)
test_decode_LDADD = $(TEST_LIBS) $(TEST_X11_LIBS) test_decode_LDADD = $(TEST_LIBS)
test_display_SOURCES = test-display.c test_display_SOURCES = test-display.c
test_display_CFLAGS = $(TEST_CFLAGS) $(TEST_MIX_CFLAGS) test_display_CFLAGS = $(TEST_CFLAGS)
test_display_LDADD = $(TEST_LIBS) $(TEST_MIX_LIBS) test_display_LDADD = $(TEST_LIBS)
test_surfaces_SOURCES = test-surfaces.c test_surfaces_SOURCES = test-surfaces.c
test_surfaces_CFLAGS = $(TEST_CFLAGS) $(TEST_X11_CFLAGS) test_surfaces_CFLAGS = $(TEST_CFLAGS)
test_surfaces_LDADD = $(TEST_LIBS) $(TEST_X11_LIBS) test_surfaces_LDADD = $(TEST_LIBS)
test_subpicture_SOURCES = test-subpicture.c test-mpeg2.c test-subpicture-data.c test_subpicture_SOURCES = test-subpicture.c test-mpeg2.c test-subpicture-data.c
test_subpicture_CFLAGS = $(TEST_CFLAGS) $(TEST_X11_CFLAGS) test_subpicture_CFLAGS = $(TEST_CFLAGS)
test_subpicture_LDADD = $(TEST_LIBS) $(TEST_X11_LIBS) test_subpicture_LDADD = $(TEST_LIBS)
test_windows_SOURCES = test-windows.c image.c test_windows_SOURCES = test-windows.c image.c
test_windows_CFLAGS = $(TEST_CFLAGS) $(TEST_X11_CFLAGS) test_windows_CFLAGS = $(TEST_CFLAGS)
test_windows_LDADD = $(TEST_LIBS) $(TEST_X11_LIBS) test_windows_LDADD = $(TEST_LIBS)
test_textures_SOURCES = test-textures.c image.c test_textures_SOURCES = test-textures.c image.c
test_textures_CFLAGS = $(TEST_CFLAGS) $(TEST_GLX_CFLAGS) test_textures_CFLAGS = $(TEST_CFLAGS)
test_textures_LDADD = $(TEST_LIBS) $(TEST_GLX_LIBS) test_textures_LDADD = $(TEST_LIBS)
EXTRA_DIST = \ EXTRA_DIST = \
image.h \ image.h \

View file

@ -19,11 +19,12 @@
* Boston, MA 02110-1301 USA * Boston, MA 02110-1301 USA
*/ */
#include "config.h"
#include <gst/video/video.h> #include <gst/video/video.h>
#ifdef USE_X11 #if USE_X11
#include <gst/vaapi/gstvaapidisplay_x11.h> #include <gst/vaapi/gstvaapidisplay_x11.h>
#endif #endif
#ifdef USE_GLX #if USE_GLX
#include <gst/vaapi/gstvaapidisplay_glx.h> #include <gst/vaapi/gstvaapidisplay_glx.h>
#endif #endif
@ -155,7 +156,7 @@ main(int argc, char *argv[])
gst_init(&argc, &argv); gst_init(&argc, &argv);
#ifdef USE_X11 #if USE_X11
g_print("#\n"); g_print("#\n");
g_print("# Create display with gst_vaapi_display_x11_new()\n"); g_print("# Create display with gst_vaapi_display_x11_new()\n");
g_print("#\n"); g_print("#\n");
@ -216,7 +217,7 @@ main(int argc, char *argv[])
g_print("\n"); g_print("\n");
#endif #endif
#ifdef USE_GLX #if USE_GLX
g_print("#\n"); g_print("#\n");
g_print("# Create display with gst_vaapi_display_glx_new()\n"); g_print("# Create display with gst_vaapi_display_glx_new()\n");
g_print("#\n"); g_print("#\n");