Commit graph

574 commits

Author SHA1 Message Date
Tim-Philipp Müller 3f184c3abc tests: include config.h and don't include unix headers
In many cases the unistd.h includes weren't actually needed.

Don't build tests that need it on windows with MSVC
(multifdsink, multisocketsink, pipelines/tcp).

Preparation for making tests work on Windows with MSVC.
2018-01-16 18:14:59 +00:00
Tim-Philipp Müller d85a7a9b2e gl: hook up tests
Also move over simple gl launch line test.
2017-12-19 12:01:51 +00:00
Tim-Philipp Müller cdbb261d9c Move OpenGL library and plugin from -bad
Merge branch 'opengl-move'

https://bugzilla.gnome.org/show_bug.cgi?id=754094
2017-12-19 12:00:43 +00:00
Matthew Waters fc8217ae8d gl/tests: fix glimagesink element test on OSX
It was suffering a race starting up the thread that could cause the main
loop to quit before the main loop had started.
2017-12-09 19:32:25 +00:00
Guillaume Desmottes f077d937ad glimagesink: fix query leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=766663
2017-12-09 19:32:20 +00:00
Guillaume Desmottes a7f21fedc5 glimagesink: properly setup/teardown tests
tcase_add_checked_fixture() is suppose to call the setup and teardown
functions so the tests don't have to do it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2017-12-09 19:32:20 +00:00
Edward Hervey 7e62a38569 checks: Ensure thread-safe libX11/GL when running tests 2017-12-09 19:32:07 +00:00
Thiago Santos 33b5cd5426 Fix a common typo: retreive -> retrieve
Seems to have been copy pasted around a few places
2017-12-09 19:32:03 +00:00
Julien Isorce 56c9d7f111 gl: add unit test that checks for glimagesink drain query handling
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732694
2017-12-09 19:31:49 +00:00
Tim-Philipp Müller b60cc0274c appsrc: add support for pushing buffer lists
And samples that carry buffer lists.

https://bugzilla.gnome.org/show_bug.cgi?id=752363
2017-12-09 11:09:16 +00:00
Tim-Philipp Müller cb6dd3eb8d tests: appsink: fix compiler warning and typo in struct name
elements/appsink.c:624:3: warning: missing braces around initializer
with gcc 4.8.4
2017-10-07 14:20:54 +01:00
Julien Isorce fc86194595 appsink: on drain wait for buffers to be consumed
So that an upstream element can claim all buffers to return to its buffer pool.

Added unit test 'test_query_drain'
  make elements/appsink.check

https://bugzilla.gnome.org/show_bug.cgi?id=786739
2017-09-19 14:33:36 +01:00
Julien Isorce 7b1056b946 appsink: also clear preroll buffer in _pull_sample
If someone calls gst_app_sink_try_pull_sample they are
probably no longer interested in any preroll samples.

Useful if the user has not registered a preroll appsink callback.

Also added unit test 'test_do_not_care_preroll'
  make elements/appsink.check
that fails without this patch.

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-19 09:06:44 +01:00
Julien Isorce 68518acb53 appsink: unref preroll buffer upon pull
There is no reason for appsink to hang onto the preroll buffer.
If needed, the application can just keep a ref on this buffer
after calling gst_app_sink_try_pull_preroll.

Also added unit test 'test_pull_preroll'
  make elements/appsink.check

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-13 14:11:27 +01:00
Tim-Philipp Müller 925a4fe6a4 tests: playbin-complex: skip test that needs oggdemux if it's not available
https://bugzilla.gnome.org/show_bug.cgi?id=773145
2017-09-10 16:32:31 +01:00
Tim-Philipp Müller afa2cbf39b tests: appsrc: fix leaks in new unit test 2017-07-19 09:08:12 +01:00
Stefan Sauer 1811f8f1d5 tests: adder: set all properties at once 2017-07-15 21:27:29 +02:00
Stefan Sauer e309e88bd6 tests: adder: add helper to create buffers
Keeps repeated code out of the test and syncs it with the audiomixer test.
2017-07-15 19:45:02 +02:00
Stefan Sauer 8133f478a9 adder: sync some fixes from the audiomixer test 2017-07-10 21:07:45 +02:00
Nicolas Dufresne b39f5067e3 test-appsrc: Test state when blocked in caps Event
In GStreamer 1.12 and older, the GstBaseSrc live lock used to be held while
create() virtual function was called. As appsrc pushes serialized event in
that virtual function, we ended up with some deadlock while setting the
state to NULL. This test simulates this situation.

https://bugzilla.gnome.org/show_bug.cgi?id=783301
2017-07-03 21:12:03 -04:00
Mark Nauwelaerts 20705f01fc textoverlay: ensure text buffer has writable metadata when modifying 2017-07-01 17:45:36 +02:00
Nicolas Dufresne d81a6da702 rawvideoparse: Rename frame-stride in to frame-size
The term stride is confusing here, since the stride is always use
to signal the pixel row size of an image (including padding). Also
a frame may have a single stride, which adds to the confusion. This
patch uses frame-size, which simply indicate the frame size in the
case the images have some padding in between.

https://bugzilla.gnome.org/show_bug.cgi?id=780053
2017-03-24 13:50:06 -04:00
Nicolas Dufresne 2b4a173e89 rawvideoparse: Use GstValueArray for strides and offsets
This allow using those property through gst-launch-1.0. This type
gained a deserilizer recently. The syntax is: <val1, val2, ...>.
Note that we also use the type int instead of uint to avoid having
to cast when specifying the values. The deserilizers assume
int by default.

https://bugzilla.gnome.org/show_bug.cgi?id=780053
2017-03-24 13:50:06 -04:00
Stefan Sauer d759eb46dc adder: cleanup the tests
Take a first stab at cleaning up the tests. Extract common code. Make sure
we actually verify things.
2017-03-17 21:40:56 +01:00
Sebastian Dröge 38ec8f396f rawparse: Move to gst-plugins-base
https://bugzilla.gnome.org/show_bug.cgi?id=774544
2017-02-25 14:48:40 +02:00
Sebastian Dröge 498ee680fe Merge branch 'rawparse-moved-plugin' 2017-02-25 14:32:33 +02:00
Sebastian Dröge 4cde35553f rawbaseparse: Drop incomplete frames at EOS
See https://bugzilla.gnome.org/show_bug.cgi?id=773666

This would ideally be solved in baseparse but that requires further
thought at this point, and in the meantime it would be good to have
rawbaseparse not assert on this but handle it gracefully instead.
2017-02-18 20:18:50 +02:00
Sebastian Dröge 5e2e111627 multifdsink: Make sure to use a 64 bit integer for the units-max property 2017-02-02 14:56:39 +02:00
Guillaume Desmottes b8c78c87d2 encodebin: fix caps leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=776797
2017-01-30 14:17:42 +02:00
Tim-Philipp Müller d6c0e9072b videorate: fix duration and position query handling
Duration query would return TRUE and duration=-1. This
worked in the unit test because the unit test implementation
was a bit broken.

Both queries need to access rate with a lock.

Fix broken duration query test as well. It relied on broken
behaviour by the videorate query handler, and also it was
implemented as a downstream query rather than an upstream
query. And we must return HANDLED from the probe so that the
query we intercept actually returns TRUE.

https://bugzilla.gnome.org/show_bug.cgi?id=699077
2017-01-24 01:04:39 +00:00
Thibault Saunier 03e263b92f tests: Fix build 2016-12-19 15:20:35 -03:00
Thibault Saunier c8ea302e57 encodebin: Fallback to other profile if we fail with one
In some case we might have EncodingProfile that will be defined
in a way that, for example if a Preset is not present, another
profile for that stream should be used.

A test is added showing the feature.

https://bugzilla.gnome.org/show_bug.cgi?id=776188
2016-12-19 10:13:23 -03:00
Sebastian Dröge 9795115564 gst: Don't declare variables inside the for loop header
This is a C99 feature.
2016-12-13 22:26:08 +02:00
Jan Alexander Steffens (heftig) 9bdf7ff6d0 multifdsink: Add a test involving a slow client
https://bugzilla.gnome.org/show_bug.cgi?id=774908
2016-11-29 19:13:00 +02:00
Edward Hervey 647b183adb check/videorate: Avoid leaking extra buffers 2016-11-28 16:54:55 +01:00
Patricia Muscalu f1562053fe appsink: add support for buffer lists
https://bugzilla.gnome.org/show_bug.cgi?id=752363
2016-11-16 02:06:40 +11:00
Joris Valette 658ee6f0db videorate: Add fixed rate property
https://bugzilla.gnome.org/show_bug.cgi?id=699077
2016-11-04 14:01:54 -03:00
Edward Hervey 3cc9b2c490 check: Fix corrupted xml check files
By making sure each different videoscale check instance gets logged
into different output file
2016-11-03 17:18:05 +01:00
Sebastian Dröge 33f4b9cc8e Revert "tests: rawvideoparse: add test for flow error handling"
This reverts commit 280b4ac2ff.

https://bugzilla.gnome.org/show_bug.cgi?id=773666
2016-11-02 09:36:04 +02:00
Tim-Philipp Müller f324c88d92 tests: rawvideoparse: add test for flow error handling
Also needs fixes in baseparse:
https://bugzilla.gnome.org/show_bug.cgi?id=773666
2016-11-01 20:34:37 +02:00
Stian Selnes 22ccb687fa videotestsrc: Make snow deterministic
Deterministic generation of snow and smpte is important for tests so
that it's not affected by other videotestsrc elements in current or
possibly previous tests.

https://bugzilla.gnome.org/show_bug.cgi?id=773102
2016-11-01 20:05:18 +02:00
Jimmy Ohn 6335a074e2 opusdec: Fix memory leak in test code
gst_caps_to_string function returned allocated memory.
So, It should be free using g_free function.

https://bugzilla.gnome.org/show_bug.cgi?id=772500
2016-10-06 13:29:22 +03:00
Jimmy Ohn fdefa9c1ad videorate: Fix memory leakage in test code
gst_caps_to_string function returned allocated memory.
So, It should be free using g_free function.

https://bugzilla.gnome.org/show_bug.cgi?id=772501
2016-10-06 13:27:42 +03:00
Tim-Philipp Müller 7c0ec13942 tests: adder: disable racy flush_start_flush_stop test
It's been broken for years, and it's unlikely it will ever
be fixed for collectpads/adder now that there's audiomixer
which works fine. So let's disable it, since all it does
is that it creates noise that distracts from other failures.

https://bugzilla.gnome.org/show_bug.cgi?id=708891
2016-09-25 16:22:47 +01:00
Tim-Philipp Müller 3baa1d655c tests: videoscale: split test into multiple ones
The videoscale test takes eternities to run, that's not
great. Split the test into multiple ones. That way they
can be run in parallel. Reduces time to run all tests in
-base from 29 secs to 12 secs when using meson/ninja.
2016-09-10 10:10:05 +01:00
Carlos Rafael Giani 232902369c rawparse: Fix and extend unit tests
* Add caps change test to unit tests
* Cleanup leftover buffers after each unit test
* Add missing rawvideoparse entry in .gitignore

https://bugzilla.gnome.org/show_bug.cgi?id=769637
2016-08-18 10:53:58 +03:00
Carlos Rafael Giani e5b70d384c rawvideoparse: Compute plane offsets & strides if no custom ones are set
This is useful to ensure that the offsets and strides are computed if
only width, height, format etc. in the property config are set.

https://bugzilla.gnome.org/show_bug.cgi?id=769797
2016-08-18 09:21:16 +03:00
Carlos Rafael Giani d508525119 rawparse: Add new raw audio and video parser elements
The new rawaudioparse and rawvideoparse elements are based on GstBaseParse
and completely replace audioparse and videoparse

https://bugzilla.gnome.org/show_bug.cgi?id=767011
2016-07-26 13:44:39 +03:00
Tim-Philipp Müller ffa9f04bb2 tests: appsink: add minimal test for new pull with timeout functions
https://bugzilla.gnome.org/show_bug.cgi?id=768852
2016-07-18 17:26:26 +01:00
Guillaume Desmottes 54e4551cd8 videoscale: fix bus leak in test
gst_bus_add_signal_watch() takes a ref on the bus which should be
released using gst_bus_remove_signal_watch().

https://bugzilla.gnome.org/show_bug.cgi?id=768718
2016-07-12 13:12:19 +03:00