Commit graph

240 commits

Author SHA1 Message Date
Guillaume Desmottes
0e42f92a76 streamiddemux: fix list and event leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=765903
2016-05-03 11:02:47 +03:00
Guillaume Desmottes
d456f8e8d2 selector: fix pad leaks in tests
setup_input_pad() creates a new pad so we should unref it once we're
done.

https://bugzilla.gnome.org/show_bug.cgi?id=765903
2016-05-03 11:02:47 +03:00
Guillaume Desmottes
7c1a091404 filesrc: fix buffer leaks in tests
gst_check_setup_sink_pad() internally uses gst_check_chain_func() so we
should call gst_check_drop_buffers() when tearing down tests to free the
buffers which have been exchanged through the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=765903
2016-05-03 11:02:47 +03:00
Guillaume Desmottes
1064bdb06e fakesink: fix pipeline leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=765903
2016-05-03 11:02:47 +03:00
Carlos Rafael Giani
3bd5aeac52 multiqueue: Recheck buffering status after changing low threshold
https://bugzilla.gnome.org/show_bug.cgi?id=763757
2016-04-15 16:04:54 +03:00
Carlos Rafael Giani
a1d2f387c6 multiqueue: Recalculate fill level after changing high-threshold
This ensures the following special case is handled properly:

1. Queue is empty
2. Data is pushed, fill level is below the current high-threshold
3. high-threshold is set to a level that is below the current fill level

Since mq->percent wasn't being recalculated in step #3 properly, this
caused the multiqueue to switch off its buffering state when new data is
pushed in, and never post a 100% buffering message. The application will
have received a <100% buffering message from step #2, but will never see
100%.

Fix this by recalculating the current fill level percentage during
high-threshold property changes in the same manner as it is done when
use-buffering is modified.

https://bugzilla.gnome.org/show_bug.cgi?id=763757
2016-04-15 16:04:54 +03:00
Tim-Philipp Müller
71f554009d tests: streamiddemux: fix with CK_FORK=no
Clear global state when done.

https://bugzilla.gnome.org/show_bug.cgi?id=623469
2016-04-10 20:26:11 +01:00
Sebastian Dröge
d9a1cb21e4 valve: Fix unit test by sending caps before buffers
Unexpected critical/warning: gstpad.c:4400:gst_pad_push_data:<'':src> Got data flow before segment event

https://bugzilla.gnome.org/show_bug.cgi?id=763753
2016-03-25 12:05:41 +02:00
Havard Graff
1bc8d9f2ea valve: don't send sticky events as a direct response to upstream events
Also refactor the existing valve test to actually test the valve,
and not just test the EOS mechanism of a pad.

https://bugzilla.gnome.org/show_bug.cgi?id=763753
2016-03-24 14:50:50 +02:00
Vineeth TM
8cc3e908c3 gstreamer: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763020
2016-03-24 14:43:41 +02:00
Jan Schmidt
146e219d83 tests: Check multiqueue not-linked EOS handling
Add a test which checks that not-linked pads continue
to output data after linked pads have gone EOS

https://bugzilla.gnome.org/show_bug.cgi?id=763770
2016-03-18 21:21:44 +11:00
Tim-Philipp Müller
93e006bd66 tests: fix indentation 2016-02-19 14:41:55 +00:00
Sebastian Dröge
fd253ab1ab Revert "queue2: add overrun signal"
This reverts commit 8ae8b2723d.

It's not used anymore by anything and was considered a bad idea in general.
2016-02-16 19:11:59 +02:00
Aleksander Wabik
90318900a1 tests: queue2: add test for fill level arithmetic overflow
https://bugzilla.gnome.org/show_bug.cgi?id=755971
2016-01-06 20:00:46 +00:00
Thiago Santos
1751835838 tests: funnel: remove state change from stress tests
Changing states up and down while buffers are being pushed is not
a valid use case. If a pad is deactivated and reactivated during
a buffer push it is racy with the check of pushed sticky events
and the actual chainfunction call. As it might call the chain
without noticing the peer pad lost its previous sticky events.

https://bugzilla.gnome.org/show_bug.cgi?id=758340
2015-12-04 17:26:02 -03:00
Philippe Normand
8ae8b2723d queue2: add overrun signal
Notifies that the queue2 is full, same as queue does

https://bugzilla.gnome.org/show_bug.cgi?id=733959
2015-11-06 12:32:10 -03:00
Stian Selnes
2c60b7eb1f funnel: Fix racy state change
Iterator may need to be resynced, for instance if pads are released
during state change.

got_eos should be protected by the object lock of the element, not of
the pad, as is the case throughout the rest of the funnel code.

https://bugzilla.gnome.org/show_bug.cgi?id=755343
2015-09-24 12:14:57 +02:00
Havard Graff
ee63702d61 identity: refactor and add tests using GstHarness
Writing a test for unscheduling the gst_clock_id_wait inside the
identity element, found an invalid read, caused by removing the clock-id
when calling _unschedule instead of letting the code calling _wait remove
the clock-id after being unscheduled.

https://bugzilla.gnome.org/show_bug.cgi?id=752055
2015-07-07 13:05:34 +03:00
Tim-Philipp Müller
201b013fac tests: fakesink: fix string leak in unit test 2015-06-08 20:00:47 +01:00
Tim-Philipp Müller
0c80c41ade tests: fakesink: test notify::last-message and deep-notify::last-message
deep-notify::last-message seems to cause some problems, so disable for now.

https://bugzilla.gnome.org/show_bug.cgi?id=681642
2015-06-05 19:38:36 +01:00
Tim-Philipp Müller
fd67f40e4d tests: multiqueue: add test to make sure initial events go through without buffers 2015-04-05 16:47:26 +01:00
Tim-Philipp Müller
fe455d1330 tests: queue: check that the initial events are sent on immediately
Add a check that makes sure stream-start, caps, and segment events
are passed on by queue without delay, i.e. even if no buffer is
sent.
2015-04-05 16:11:03 +01:00
Prashant Gotarne
b1c59a17cc test: filesink: add tests for buffers with multiple memory blocks
Update test_seeking testcase to verify the render and render_list
virtual method handle buffers and buffer list containing multiple
memory blocks correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=747223
2015-04-02 09:54:08 +01:00
Prashant Gotarne
714d8e58e3 tests: filesink: add check for render_list virtual method
GstFileSink implements the render_list virtual method to render
a list of buffers. Update the test_seeking test case to also
check the render_list method implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=747100
2015-04-01 12:31:15 +01:00
Luis de Bethencourt
ae0b2ec46b tests: check location isn't truncated
Test covering the recent commit where location='".abc' won't get truncated
to '.ab' anymore

https://bugzilla.gnome.org/show_bug.cgi?id=688625
2015-03-27 17:19:02 +00:00
Jose Antonio Santos Cadenas
3e8e0a7065 tee: Add allow-not-linked property
This property avoids not linked error when all the pads are unlinked
or when there are no source pads. This is useful in dynamic pipelines
where it can happen that for a short time there are no pads at all or
all downstream pads are not linked yet.

https://bugzilla.gnome.org/show_bug.cgi?id=746436
2015-03-26 10:46:26 +01:00
Thiago Santos
150e8a5c97 tests: input-selector: new tests for EOS handling
3 new tests:

1) Tests that a stream that is empty (just an EOS event)
   on inactive pad doesn't get through and tamper
   with the active pad that still has data

2) Tests that a stream that is shorter than the active one
   (pushes EOS earlier) doesn't has its EOS pushed

3) Tests that switching to an inactive stream that has received
   EOS will make input-selector push EOS

https://bugzilla.gnome.org/show_bug.cgi?id=746518
2015-03-24 09:13:57 -03:00
Thiago Santos
92d2351b2e tests: selector: remove weird semicolons at the end of test functions
Even though it works, it is not needed and seems more natural
to not have semicolons at the end of function declarations

https://bugzilla.gnome.org/show_bug.cgi?id=746518
2015-03-24 08:22:26 -03:00
Tim-Philipp Müller
f7eeed3447 Add new streamiddemux binaries to .gitignore 2015-03-14 16:05:57 +00:00
HoonHee Lee
fadabe8b78 streamiddemux: Add streamiddemux element
Demultiplex a stream to multiple source pads based on the stream ids from the
stream-start events. This basically reverses the behaviour of funnel.

https://bugzilla.gnome.org/show_bug.cgi?id=707605
2015-03-12 14:42:18 +00:00
hoonhee.lee
8ce1f4d470 funnel: handle GAP event to forwards sticky events into downstream
If no data is coming and funnel receive GAP event, need to forwards sticky events
into downstream if it needs.

https://bugzilla.gnome.org/show_bug.cgi?id=738202
2015-03-10 16:15:35 -04:00
Sebastian Dröge
c102d02bd0 queue: Add unit test for buffer list and time level handling 2015-02-18 11:03:08 +02:00
Sebastian Dröge
9606e04895 capsfilter: Add an optional delayed caps change mode
In this mode we accept previously set filter caps until
upstream renegotiates to something that is compatible
to the current filter caps.

This allows dynamic caps changes in the pipeline even
if there is a queue between any conversion element
and the capsfilter. Without this we would get not-negotiated
errors if timing is bad.

https://bugzilla.gnome.org/show_bug.cgi?id=739002
2014-11-03 08:09:21 +01:00
Tim-Philipp Müller
82abf56e8e tests: fdsrc: don't ignore return value of write()
Causes compiler warnings on some systems.
2014-10-28 09:28:28 +00:00
Tim-Philipp Müller
caed34f45f tests: fix fdsrc test corner case
Make pipe socket non-blocking, so we don't
end up being blocked in a write on the pipe
while the src is eos and not reading data
any more, and thus we never unblock and never
notice that we're done. This would happen
quite reliably on the rpi.
2014-10-28 00:10:26 +00:00
Linus Svensson
ae74a1a83a tests: add test that triggers deadlock in state change of queue
When receiving FLASH_STOP in a state transition to READY, a queue
element can end up with an active task that will never end.

https://bugzilla.gnome.org/show_bug.cgi?id=734688
2014-08-23 12:03:38 +01:00
Sebastian Dröge
96f0544cbd concat: Add unit tests for concat element 2014-08-12 15:39:09 +03:00
Srimanta Panda
5b3ee70ea9 Fix funnel EOS handling and wrong unittest
When no data is coming from sinkpads and eos events
arrived at one of the sinkpad, funnel forwards the EOS
event to downstream. It forwards the EOS because lastsink pad
is NULL. Also the unit testcase of the funnel is not checking
the correct behavior as it should. The unit test case should
fail if one of the sink pad has already EOS present on it and
we are trying to push one more EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=731716
2014-06-19 10:19:15 -04:00
Thiago Santos
baf1688474 tests: multiqueue: fix leaks 2014-05-30 01:42:17 -03:00
Thiago Santos
40b5b32803 tests: multiqueue: test to check queue overrun with pts=none
Checks if buffers with pts=none can break the queue time size limit
and allow more buffers than expected
2014-05-08 17:56:26 -03:00
Srimanta Panda
094fdfee7e funnel: Handle end of stream event on sink pad
Handle end of stream events on sink pad. Check all the sink pad
has received eos before forwarding to source pad.

Fixes : https://bugzilla.gnome.org/show_bug.cgi?id=727945
2014-04-17 19:14:34 -04:00
Sebastian Dröge
414f21d160 multiqueue: And actually run the other tests again 2014-04-09 16:01:09 +02:00
Sebastian Dröge
914012de70 multiqueue: Add test for checking if pads are waked up when limits are changed 2014-04-09 15:57:31 +02:00
Sebastian Dröge
888cf0656d fakesink: Update positions we're checking for after a state is lost 2014-03-18 18:12:16 +01:00
Thiago Santos
22258782d8 tests: multiqueue: fix eos count on test for not-linked case
From the test case:

/* This test creates a multiqueue with 2 streams. One receives
 * a constant flow of buffers, the other only gets one buffer, and then
 * new-segment events, and returns not-linked. The multiqueue should not fill.
 */

If one of the queues goes EOS and the other returns NOT_LINKED the stream
can be considerered EOS as a NOT_LINKED means that one of the branches has no
sink downstream that will block the EOS message posting.

https://bugzilla.gnome.org/show_bug.cgi?id=725917
2014-03-15 09:54:49 -03:00
Edward Hervey
7b014d67a7 check: Remove a minor leak in unit test
Makes valgrind happy
2014-02-05 10:11:43 +01:00
Thiago Santos
5d62ead83c tests: capsfilter: add test for pending_events pushing
make sure that pending events are pushed when caps are already
set when a buffer is received
2014-01-29 14:59:43 -03:00
Sebastian Dröge
96f454d0ba tee: Add unit test for requesting pad names 2014-01-14 16:47:38 +01:00
Sebastian Rasmussen
1479aba1cf tests/filesrc: Set location in wrong state
Also remove incorrect comment about code possibly not being reachable
that is now exercised by the filesrc unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=709831
2013-10-13 12:18:57 -04:00
Tim-Philipp Müller
10981f781c tests: use tcase_skip_broken_test() to skip broken multiqueue test
So that we get a warning in the output that reminds us that
something needs to be fixed.
2013-10-02 12:30:54 +01:00