Commit d2d912f3 authored by Alex Ashley's avatar Alex Ashley Committed by Tim-Philipp Müller

tests: curlhttpsrc: add unit tests

Based upon the souphttpsrc tests, add unit tests for the curlhttpsrc
element. The souphttpsrc tests are able to use an HTTP server that
is provided as part of the soup library. This does not exist in the
curl library, therefore these tests provide a very simple HTTP server
using the GIO library.

These curlhttpsrc tests contain one new test that does not come from
the souphttpsrc tests. The test_multiple_http_requests test tries to
reproduce the way in which GstAdaptiveDemux makes use of URI source
elements. GstAdaptiveDemux creates a bin with the httpsrc element
and a queue element and sets the locked state of that bin to TRUE,
so that it does not follow the state transitions of its parent. It
then moves this bin to the PLAYING state to start each download and
back to READY when the download completes.
parent 8213d0b8
......@@ -178,6 +178,7 @@ endif
if USE_CURL
check_curl = elements/curlhttpsink \
elements/curlhttpsrc \
elements/curlfilesink \
elements/curlftpsink \
$(check_curl_sftp) \
......@@ -469,6 +470,9 @@ elements_cccombiner_LDADD = $(GST_PLUGINS_BASE_LIBS) $(GST_VIDEO_LIBS) $(GST_BAS
elements_ccextractor_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
elements_ccextractor_LDADD = $(GST_PLUGINS_BASE_LIBS) $(GST_VIDEO_LIBS) $(GST_BASE_LIBS) $(LDADD)
elements_curlhttpsrc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GIO_CFLAGS) $(AM_CFLAGS)
elements_curlhttpsrc_LDADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GIO_LIBS) $(LDADD)
elements_jifmux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(EXIF_CFLAGS) $(AM_CFLAGS)
elements_jifmux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) $(GST_CHECK_LIBS) $(EXIF_LIBS) $(LDADD)
elements_jifmux_SOURCES = elements/jifmux.c
......
This diff is collapsed.
......@@ -59,6 +59,7 @@ if host_machine.system() != 'windows'
[['elements/cccombiner.c']],
[['elements/ccextractor.c']],
[['elements/curlhttpsink.c'], not curl_dep.found(), [curl_dep]],
[['elements/curlhttpsrc.c'], not curl_dep.found(), [curl_dep, gio_dep]],
[['elements/curlfilesink.c'],
not curl_dep.found() or not cdata.has('HAVE_UNISTD_H'), [curl_dep]],
[['elements/curlftpsink.c'], not curl_dep.found(), [curl_dep]],
......
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