mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 02:32:23 +00:00
player: Add unit test that is disabled by default
The unit test is downloading a few small media files from the Internet, which are then used during the test. "make clean" removes the files again.
This commit is contained in:
parent
d16eb47cca
commit
2f86923cbd
3 changed files with 1548 additions and 1 deletions
11
configure.ac
11
configure.ac
|
@ -396,6 +396,17 @@ fi
|
||||||
AC_SUBST(GST_PLUGIN_LIBTOOLFLAGS)
|
AC_SUBST(GST_PLUGIN_LIBTOOLFLAGS)
|
||||||
AM_CONDITIONAL(GST_PLUGIN_BUILD_STATIC, test "x$enable_static_plugins" = "xyes")
|
AM_CONDITIONAL(GST_PLUGIN_BUILD_STATIC, test "x$enable_static_plugins" = "xyes")
|
||||||
|
|
||||||
|
AC_ARG_WITH([player-tests],
|
||||||
|
AS_HELP_STRING([--with-player-tests],[Enable GstPlayer tests that need network access (default: no)]))
|
||||||
|
if test x$with_player_tests = xyes; then
|
||||||
|
AC_PATH_PROG([WGET], [wget], no)
|
||||||
|
if test x$WGET = xno; then
|
||||||
|
AC_MSG_WARN([wget required for GstPlayer tests but not found - disabling])
|
||||||
|
with_player_tests=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(WITH_GST_PLAYER_TESTS, test "x$with_player_tests" = "xyes")
|
||||||
|
|
||||||
# set by AG_GST_PARSE_SUBSYSTEM_DISABLES above
|
# set by AG_GST_PARSE_SUBSYSTEM_DISABLES above
|
||||||
dnl make sure it doesn't complain about unused variables if debugging is disabled
|
dnl make sure it doesn't complain about unused variables if debugging is disabled
|
||||||
NO_WARNINGS=""
|
NO_WARNINGS=""
|
||||||
|
|
|
@ -176,6 +176,12 @@ check_hlsdemux_m3u8 =
|
||||||
check_hlsdemux =
|
check_hlsdemux =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if WITH_GST_PLAYER_TESTS
|
||||||
|
check_player = libs/player
|
||||||
|
else
|
||||||
|
check_player =
|
||||||
|
endif
|
||||||
|
|
||||||
if USE_CURL
|
if USE_CURL
|
||||||
check_curl = elements/curlhttpsink \
|
check_curl = elements/curlhttpsink \
|
||||||
elements/curlfilesink \
|
elements/curlfilesink \
|
||||||
|
@ -291,7 +297,8 @@ check_PROGRAMS = \
|
||||||
libs/insertbin \
|
libs/insertbin \
|
||||||
$(check_gl) \
|
$(check_gl) \
|
||||||
$(check_hlsdemux_m3u8) \
|
$(check_hlsdemux_m3u8) \
|
||||||
$(check_hls_demux) \
|
$(check_hlsdemux) \
|
||||||
|
$(check_player) \
|
||||||
$(EXPERIMENTAL_CHECKS)
|
$(EXPERIMENTAL_CHECKS)
|
||||||
|
|
||||||
noinst_HEADERS = elements/mxfdemux.h
|
noinst_HEADERS = elements/mxfdemux.h
|
||||||
|
@ -470,6 +477,36 @@ libs_insertbin_LDADD = \
|
||||||
libs_insertbin_CFLAGS = \
|
libs_insertbin_CFLAGS = \
|
||||||
$(GST_PLUGINS_BAD_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
|
$(GST_PLUGINS_BAD_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
|
||||||
|
|
||||||
|
libs_player_SOURCES = libs/player.c
|
||||||
|
|
||||||
|
libs_player_LDADD = \
|
||||||
|
$(top_builddir)/gst-libs/gst/player/libgstplayer-@GST_API_VERSION@.la \
|
||||||
|
$(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
|
||||||
|
libs_player_CFLAGS = \
|
||||||
|
$(GST_PLUGINS_BAD_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS) \
|
||||||
|
-DTEST_PATH=\"$(builddir)/media\"
|
||||||
|
|
||||||
|
if WITH_GST_PLAYER_TESTS
|
||||||
|
PLAYER_MEDIA_FILES = \
|
||||||
|
media/audio.ogg \
|
||||||
|
media/audio-video.ogg \
|
||||||
|
media/audio-short.ogg \
|
||||||
|
media/audio-video-short.ogg \
|
||||||
|
media/sintel.mkv \
|
||||||
|
media/test_sub.srt
|
||||||
|
|
||||||
|
$(PLAYER_MEDIA_FILES):
|
||||||
|
$(MKDIR_P) media
|
||||||
|
$(WGET) -c http://gstreamer.freedesktop.org/data/media/small/$(subst media/,,$@) -O media/$(subst media/,,$@)
|
||||||
|
|
||||||
|
libs/player_dummy.c: $(PLAYER_MEDIA_FILES)
|
||||||
|
touch libs/player_dummy.c
|
||||||
|
|
||||||
|
nodist_libs_player_SOURCES = libs/player_dummy.c
|
||||||
|
|
||||||
|
CLEANFILES += $(PLAYER_MEDIA_FILES) libs/player_dummy.c
|
||||||
|
endif
|
||||||
|
|
||||||
elements_rtponvifparse_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
|
elements_rtponvifparse_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
|
||||||
elements_rtponvifparse_LDADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -lgstrtp-$(GST_API_VERSION) $(LDADD)
|
elements_rtponvifparse_LDADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -lgstrtp-$(GST_API_VERSION) $(LDADD)
|
||||||
|
|
||||||
|
|
1499
tests/check/libs/player.c
Normal file
1499
tests/check/libs/player.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue