summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-03-01queue: Ignore thresholds if a query is queuedOlivier Crête1-0/+35
The queue gets filled by the tail, so a query will always be the tail object, not the head object. Also add a _peek_tail_struct() method to the GstQueueArray to enable looking at the tail. With unit test to prevent future regression. https://bugzilla.gnome.org/show_bug.cgi?id=762875
2018-03-01gstaggregator: pads must inherit from #GstAggregatorPadMathieu Duponchelle1-5/+8
Document this, and take advantage of that fact to use GstAggregator.srcpad.segment instead of GstAggregator.segment https://bugzilla.gnome.org/show_bug.cgi?id=793942
2018-03-01Revert "gstaggregator: pads must inherit from #GstAggregatorPad"Mathieu Duponchelle1-8/+5
This reverts commit 9774b3775d8483e5697f9196a26c1e5831113bd6. Pushed by mistake
2018-03-01gstaggregator: pads must inherit from #GstAggregatorPadMathieu Duponchelle1-5/+8
Document this, and take advantage of that fact to use GstAggregator.srcpad.segment instead of GstAggregator.segment https://bugzilla.gnome.org/show_bug.cgi?id=793942
2018-02-19queuearray: add _peek_tail() and _pop_tail()Tim-Philipp Müller1-0/+53
API: gst_queue_array_pop_tail() API: gst_queue_array_peek_tail() These will be needed later for appsrc.
2018-02-16gstbasesink: Include segment.offset in the computation of positionAlicia Boya García1-0/+41
Position queries with GST_FORMAT_TIME are supposed to return stream time. gst_base_sink_get_position() estimates the current stream time on its own instead of using gst_segment_to_stream_time(), but the algorithm used was not taking segment.offset into account, resulting in invalid values when this field was set to a non-zero value. https://bugzilla.gnome.org/show_bug.cgi?id=792434
2018-02-15tests: pipeline: try to make test_pipeline_reset_start_time more reliableTim-Philipp Müller1-1/+5
Occasionally this test would fail, especially if the system is under load, because the position query would pick up the last position from the last buffer timestamp which has a lower timestamp than what we're looking for. The sleep is long enough, however. It's unclear to me why exactly this happens but there seems to be some kind of scheduling issue going on as the streaming thread floods the sink with buffers. Let's throttle the fakesrc to 100 buffers per second and make the sink sync to the clock to restore some sanity. It should be totally sufficient to test what we want to test, and seems to make things reliable here.
2018-02-15tests: uri: fix build without -DGST_DISABLE_DEPRECATEDTim-Philipp Müller1-0/+4
Must undefine it before including gst headers, since the test tests deprecated API.
2018-01-26message: Add gst_message_writable_structure()François Laignel1-0/+8
Add gst_message_writable_structure() to be able to add extra fields to messages (and be on par with GstEvent). https://bugzilla.gnome.org/show_bug.cgi?id=792928
2018-01-23aggregator: rename _get_buffer() -> _peek_buffer() and _steal -> _popTim-Philipp Müller1-1/+1
https://bugzilla.gnome.org/show_bug.cgi?id=791204
2018-01-11tests: fakesink: make notify stress test work better on WindowsTim-Philipp Müller1-4/+10
Set up all ten pipelines and preroll them first, and only set them to playing to run wild after they're all set up. If we set them to PLAYING directly and let those threads run wild, then it might take ages (many seconds) for the other pipelines to even get up and running, especially on machines with only one or two cores, and operating systems that suck at scheduling. Now the fakesink test takes 19 secs instead of 71 secs on a single-cpu windows machine.
2018-01-11tests: filesrc: more Windows fixesTim-Philipp Müller1-2/+2
Fix typo in newly-added windows uri test.
2018-01-11tests: systemclock: scale stress test threads according to number of cpusTim-Philipp Müller1-8/+14
Scale the number of threads used in the stress tests according to the number of cores/cpus. We want some contention, but we also don't want too much contention, as some operating systems are better at handling 100 threads running wild on a single core than others.
2018-01-11tests: filesrc: fix for windowsTim-Philipp Müller1-2/+21
Location paths have backslashes on windows when converted from URI.
2018-01-11tests: abi: fix abi test on 64-bit WindowsTim-Philipp Müller3-0/+72
Add header with structure sizes for 64-bit windows as well. They're almost the same as on Linux, but it looks like things like padding unions get aligned slightly differently so there are a handful of differences: sizeof(GstGhostPad) is 528, expected 536 sizeof(GstPad) is 512, expected 520 sizeof(GstPadProbeInfo) is 64, expected 72 sizeof(GstProxyPad) is 520, expected 528
2018-01-11tests: info: fix post init cat reg test on windows and with CK_FORK=noTim-Philipp Müller1-1/+4
The test checks that categories not covered by the pattern in the GST_DEBUG string have debug level GST_LEVEL_DEFAULT set, but previous tests mess with the default threshold, which made this test fail on Windows or when run with CK_FORK=no. Fix this by resetting everything at the beginning, and then also do a sanity check afterwards.
2018-01-11meson: make check and tests build on Windows with msvcHåvard Graff1-3/+0
2017-12-24Skip gst_deinit() if gstreamer was not initialized properlyTim-Philipp Müller4-0/+41
Can happen if an error occurs during option parsing, for example. https://bugzilla.gnome.org/show_bug.cgi?id=781914
2017-12-24tests: multiqueue: Replace large test macro with functionJan Alexander Steffens (heftig)1-24/+28
Just a bit of cleanup. https://bugzilla.gnome.org/show_bug.cgi?id=756867
2017-12-24tests: multiqueue: Check we get CREATE+ENTER stream-statuses when adding padsJan Alexander Steffens (heftig)1-0/+64
https://bugzilla.gnome.org/show_bug.cgi?id=756867
2017-12-07basesrc: add buffer list supportTim-Philipp Müller1-1/+138
Add a gst_base_src_submit_buffer_list() function that allows subclasses to produce a bufferlist containing multiple buffers in the ::create() function. The buffers in the buffer list will then also be pushed out in one go as a GstBufferList. This can reduce push overhead significantly for sources with packetised inputs (such as udpsrc) in high-throughput scenarios. The _submit_buffer_list() approach was chosen because it is fairly straight-forward, backwards-compatible, bindings-friendly (as opposed to e.g. making the create function return a mini object instead), and it allows the subclass maximum control: the subclass can decide dynamically at runtime whether to return a list or a single buffer (which would be messier if we added a create_list virtual method). https://bugzilla.gnome.org/show_bug.cgi?id=750241
2017-12-06tests: aggregator: fix caps leak in unit testTim-Philipp Müller1-2/+6
2017-12-05harness: add gst_harness_take_all_data() + _take_all_data_as_{bytes,buffer}()Tim-Philipp Müller1-0/+77
Convenience function to just grab all pending data from the harness, e.g. if we just want to check if it matches what we expect and we don't care about the chunking or buffer metadata. Based on patch by: Havard Graff <havard.graff@gmail.com>
2017-12-05meson: Use array syntax instead of .get() in testsNirbheek Chauhan1-2/+2
2017-12-02aggregator: hook up to build systemTim-Philipp Müller3-0/+3
https://bugzilla.gnome.org/show_bug.cgi?id=739010
2017-12-02Move GstAggregator from -bad to coreTim-Philipp Müller1-0/+1276
Merge branch 'aggregator-move' https://bugzilla.gnome.org/show_bug.cgi?id=739010
2017-12-02tests: comment and logging cleanups for audiomixer and aggregatorStefan Sauer1-5/+8
Remove some references to 'collectpads'. Logs pads through the object variants. Add some more comments. Remove a left over comment.
2017-12-02aggregator: add two more tests for a sequence of dataStefan Sauer1-0/+66
This verifies that we handle events and queries at the head of the queue and then buffers.
2017-12-02aggregator: refactor the test helperStefan Sauer1-67/+89
Make the test helpers use a queue. This lets us also test sequences of events, queries and data.
2017-12-02aggregator: test cleanupStefan Sauer1-32/+15
Remove gst_init() from a few tests. Use _OBJECT variants in logging. Remove arbitrary extra blank lines. Make push_event() more like push_buffer() - set the event to NULL and add cleanup to _chain_data_clear().
2017-12-02check: Fix usage of dual probesEdward Hervey1-7/+13
Using two (or more) probes on the same pad where one of the probe returns HANDLED or DROP is tricky since the other probes might not be called. Instead use regular probes and a proper pad (the sinkpad already existed, it only required to be activated and have a dummy chain function for the events/buffers to be received/handled properly)
2017-12-02aggregator: Fix leak in unit testSebastian Dröge1-0/+2
GST_PAD_PROBE_HANDLED means that we should've unreffed the probe data, it was handled by us in one way or another.
2017-12-02bad: use new gst_element_class_add_static_pad_template()Vineeth TM1-4/+2
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2017-12-02tests:aggregator: fix tc failure and correct check valueHyunjun Ko1-2/+3
Failure by this commit 2dfa548f3645844082c3db65d96d87255701b3ad, which is to append hooks instead of prepend. Because of this change, aggretated_cb is not called and leads to failure. And correct to check flush stop value instead of flush start value https://bugzilla.gnome.org/show_bug.cgi?id=757801
2017-12-02tests: Add test for seeking live pipelinesOlivier Crête1-8/+22
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2017-12-02tests: Make source live to re-enable aggregator timeout testsOlivier Crête1-3/+3
The live mode is only enabled if one of the sources if live. https://bugzilla.gnome.org/show_bug.cgi?id=745768
2017-12-02aggregator: fix typo in test suiteReynaldo H. Verdejo Pinochet1-1/+1
2017-12-02aggregator: add gap event handling unit testReynaldo H. Verdejo Pinochet1-5/+71
https://bugzilla.gnome.org/show_bug.cgi?id=746249
2017-12-02aggregator: use new gst_aggregator_pad_drop_buffer()Tim-Philipp Müller1-3/+1
2017-12-02aggregator: Hide GstAggregatorPad buffer and EOS filedsThibault Saunier1-1/+1
And add a getter for the EOS. The user should always use the various getters to access those fields https://bugzilla.gnome.org/show_bug.cgi?id=742684
2017-12-02aggregator: Add a timeout parameter to ::aggregate()Sebastian Dröge1-1/+1
When this is TRUE, we really have to produce output. This happens in live mixing mode when we have to output something for the current time, no matter if we have enough input or not.
2017-12-02tests: fix aggregator unit test after property renamingTim-Philipp Müller1-1/+1
2017-12-02tests/aggregator: Use correct type when setting propertySebastian Rasmussen1-1/+1
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741495
2017-12-02tests/aggregator: add timeout handling test for the timeout parameterMatthew Waters1-0/+91
2017-12-02aggregator: Avoid destroying sources we do not ownThibault Saunier1-2/+2
+ Unref the maincontext in a new dispose function + Make sure to remove all sources on dispose https://bugzilla.gnome.org/show_bug.cgi?id=732445
2017-12-02tests: aggregator: fix various leaks in the testsThiago Santos1-0/+9
2017-12-02aggregator: Add new GstAggregator base classThibault Saunier1-0/+1017
This base class has been added to a newly created libgstbadbase library Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> https://bugzilla.gnome.org/show_bug.cgi?id=731917
2017-12-02tests: info: add test for post-gst_init() category registration perfTim-Philipp Müller1-0/+55
When registering categories after gst_init() we would re-check *all* categories against the existing GST_DEBUG patterns again, whereas it's enough to just check the new category. Moreover, we would parse the GST_DEBUG pattern string again and re-add that to the existing pattern list for every newly-registered debug category, and then check that against all categories of course. This made registering categories after gst_init() very very slow.
2017-11-24check/buffer: Remove usless memcmp with empty sizeEdward Hervey1-2/+0
1) checking nothing against nothing is pointless 2) memcmp needs to be provided non-NULL arguments
2017-11-24tests: include config.h and don't include unix headersTim-Philipp Müller63-43/+191
In many cases the unistd.h includes weren't actually needed. Preparation for making tests work on Windows with MSVC.