Commit graph

1567 commits

Author SHA1 Message Date
Stefan Sauer f2fd3bda2b gstobject: split up name tests
It is better to have separate tests:
1) the test name will tell what is broekn when the test fails
2) we still run the other tests when one assert fails
3) the tests are easier to understand
4) we don't rely on sie effect of previous actions
5) ...

Also ix the assertion message for the name checks (Gst -> fakeobject).
2016-05-30 13:45:02 +02:00
Nicolas Dufresne 850510f9e8 object: Add _set_name() test on parented object
This is not allowed, and set_name() should fail.

https://bugzilla.gnome.org/show_bug.cgi?id=766923
2016-05-26 15:36:52 -04:00
Nicolas Dufresne 1a5f79981c object: Check that name change are notified once
GObject allow calling g_object_notify() within set_property() and
won't notify it twice. As it was raised during review, add a unit test to
make sure.

https://bugzilla.gnome.org/show_bug.cgi?id=766923
2016-05-26 15:36:21 -04:00
Tim-Philipp Müller ef1444cfe4 bin: emit deep-element-{added,removed} for children of newly-added/removed bin
https://bugzilla.gnome.org/show_bug.cgi?id=578933
2016-05-16 09:10:09 +01:00
Tim-Philipp Müller 81dec8cc4d bin: add "deep-element-added" and "deep-element-removed" signals
This means applications and bin sub-classes can easily track when
a new child element is added to the pipeline sub-hierarchy or
removed.

Currently doesn't signal deep added/removed for elements inside
a bin if a bin is added/removed.

https://bugzilla.gnome.org/show_bug.cgi?id=578933
2016-05-16 09:10:09 +01:00
Guillaume Desmottes 6deefac851 parse-launch: fix factory leak in test
We get 2 references one from gst_element_factory_find() and the other
from gst_plugin_feature_load().

https://bugzilla.gnome.org/show_bug.cgi?id=765976
2016-05-05 10:01:25 +03:00
Guillaume Desmottes 784ebb045e miniobject: fix ref count leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=765978
2016-05-05 10:00:23 +03:00
Guillaume Desmottes 30ee36e630 utils: fix element leak in find_common_root()
The root element was not unreffed when iterating over ancestors.

https://bugzilla.gnome.org/show_bug.cgi?id=765961
2016-05-04 12:03:53 +03:00
Guillaume Desmottes 8af52df23b pipeline: fix bus leak in seek test
gst_bus_add_signal_watch_full() keeps a ref on the bus which should
be released using gst_bus_remove_signal_watch().

https://bugzilla.gnome.org/show_bug.cgi?id=765903
2016-05-03 11:02:47 +03:00
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
Guillaume Desmottes 1e297d7423 elementfactory: fix factory leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=765903
2016-05-03 11:02:47 +03:00
Guillaume Desmottes 391f767098 bin: fix leaks in unit tests
The test rely on bus being flushed when setting the bin to the NULL state which
is not the case. This apply only when setting the pipeline state to
NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=765720
2016-05-02 09:55:31 +03:00
Guillaume Desmottes 3146c12a67 pad: fix buffer leaks in tests
The buffer received through the pad have to be unreffed using
gst_check_drop_buffers().

https://bugzilla.gnome.org/show_bug.cgi?id=765719
2016-05-02 09:54:16 +03:00
Francisco Velazquez 57596ad48f tests: plugin: improve debug message
https://bugzilla.gnome.org/show_bug.cgi?id=764199
2016-04-17 18:40:53 +01: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
Julien Isorce 7d0abcc032 tests: add PTHREAD_CFLAGS for make check to pass on OS X
Currently "make check" fails with:
"error: argument unused during compilation: '-pthread'"

PTHREAD_CFLAGS now contains -Qunused-arguments to fix that.
Explanation here: http://savannah.gnu.org/patch/?8186#comment21

https://bugzilla.gnome.org/show_bug.cgi?id=747954
2016-04-11 18:03:49 +01:00
Tim-Philipp Müller 86c0058ae5 tests: baseparse: make work with CK_FORK=no
https://bugzilla.gnome.org/show_bug.cgi?id=623469
2016-04-11 10:44:22 +01:00
Tim-Philipp Müller 1fa64722d0 tests: transform1: make test work with CK_FORK=no
We need to clear some global state and register a new test
basetransform subclass for each test because we do things
in class_init base on global state.

https://bugzilla.gnome.org/show_bug.cgi?id=623469
2016-04-11 10:36:44 +01:00
Tim-Philipp Müller f9eb3b98f1 tests: collectpads: fix for CK_FORK=no
Reset global state when done, and unref sink pads too
in teardown function to make it valgrind clean.

https://bugzilla.gnome.org/show_bug.cgi?id=623469
2016-04-10 20:57:55 +01: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
Tim-Philipp Müller 4b9f2966fb tests: bufferpool: fix wrong assumptions about pointers and object lifecycles
The test assumed that if a buffer has the same pointer address as
before it is in fact the same mini object and has been re-used by
the pool. This seems to be mostly true, but not always. The buffer
might be destroyed and when a new buffer is created the allocator
might return the same memory that we just freed.

Instead attach a qdata with destroy notify function to buffer
instances we want to track to make sure the buffer actually
gets finalized rather than resurrected and put back into the pool.
2016-04-10 20:11:00 +01:00
Tim-Philipp Müller 636aa20f28 tests: don't run tracerrecord in valgrind for now
Because of the way we implement logging and adding/removing
log functions currently (we leak a GList on purpose) this
test leaks.
2016-04-08 13:28:06 +01:00
Tim-Philipp Müller 6e3fb7af52 element: add API to get property change notifications via messages
Be notified in the application thread via bus messages about
notify::* and deep-notify::* property changes, instead of
having to deal with it in a non-application thread.

API: gst_element_add_property_notify_watch()
API: gst_element_add_property_deep_notify_watch()
API: gst_element_remove_property_notify_watch()
API: gst_message_new_property_notify()
API: gst_message_parse_property_notify()
API: GST_MESSAGE_PROPERTY_NOTIFY

https://bugzilla.gnome.org/show_bug.cgi?id=763142
2016-04-08 13:27:59 +01:00
Sebastian Dröge c78ff47a87 tests: Add C++ tests for the other INIT macros we have 2016-04-07 20:29:10 +03:00
Tim-Philipp Müller e1f4c2ce61 tests: gstcpp: flesh out C++ test so we can add more bits
Like a check for GST_MAP_INFO_INIT.
2016-04-06 17:46:31 +01:00
Tim-Philipp Müller 40d89a6b4c tests: use catch-all includes for c++ gst libs include test
So we get any new header files as well as they're added.
2016-04-06 17:46:31 +01:00
Matthew Waters e8c8c27ae8 utils: check the correct element's state on ghosting pads
Checking the current element's state when we're adding pads to
the parent element is checking the wrong thing.

Silences a 'attempting to add an inactive pad to a running element'
warning when adding a ghost pad to a running parent bin of the parent
bin of the element.

https://bugzilla.gnome.org/show_bug.cgi?id=764176
2016-04-06 23:26:41 +10:00
Thiago Santos 1967d56aea tests: pad: extra tests for pad pull probes
For BUFFER and IDLE probes

https://bugzilla.gnome.org/show_bug.cgi?id=761211
2016-03-28 10:59:12 -03:00
Matej Knopp a7813adb1d pad: Add test for blocking pull probe
https://bugzilla.gnome.org/show_bug.cgi?id=761211
2016-03-28 10:55:54 -03:00
Linus Svensson 8db72e7df7 gstpad tests: Add a test for flush event only probes
https://bugzilla.gnome.org/show_bug.cgi?id=762330
2016-03-28 00:51:37 -03: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
Víctor Manuel Jáquez Leal c1f2775dcb gstbuffer: fix GstParentBufferMeta GType name
The alias define GST_TYPE_PARENT_BUFFER_META_API_TYPE is wrong and
breaks the usage of gst_buffer_get_parent_buffer_meta().

This patch fixes the GType alias and make another alias to keep the API
compatibility guarded by GST_DISABLE_DEPRECATED.

Also added a unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=763112
2016-03-07 12:02:00 +01:00
Sebastian Dröge 82e529cea5 Revert "bus: change GstBusSource to hold a weak ref to GstBus"
This reverts commit 894c67e642.
2016-02-29 23:33:03 +02:00
Vineeth TM 15e0f6315f tests: ghostpad: Fix memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=762845
2016-02-29 09:48:36 +02:00
Thiago Santos 894c67e642 bus: change GstBusSource to hold a weak ref to GstBus
When holding a regular ref it will cause the GstBus to never
reach 0 references and it won't be destroyed unless the application
explicitly calls gst_bus_remove_signal_watch().

Switching to weakref will allow the GstBus to be destroyed.
The application is still responsible for destroying the
GSource.

https://bugzilla.gnome.org/show_bug.cgi?id=762552
2016-02-25 14:08:50 -03:00
Tim-Philipp Müller 93e006bd66 tests: fix indentation 2016-02-19 14:41:55 +00:00
Sebastian Dröge 0ba615848a Revert "pad: Add test for blocking pull probe"
This reverts commit 17d30e944b.

The PULL probe changes break various tests.
2016-02-18 11:43:04 +02:00
Matej Knopp 17d30e944b pad: Add test for blocking pull probe
https://bugzilla.gnome.org/show_bug.cgi?id=761211
2016-02-18 09:44:00 +02:00
Edward Hervey 8ae671cf1d check: Add test for checking scheduling reconfiguration with ghostpads
Showcases the regression introduced by this commit:
Commit: ab55ad7eaa

Author: Stian Selnes <stian@pexip.com>
Date:   Wed Jan 27 13:20:23 2016 +0100

ghostpad: Do nothing in _internal_activate_push_default
2016-02-17 15:26:41 +01:00
Havard Graff 87c2254b1d ghostpad: add some tests for activation
https://bugzilla.gnome.org/show_bug.cgi?id=761913
2016-02-17 12:26:12 +02: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
Thiago Santos 5b64123c54 protection/harness/systemclock: move declaration out of for loop initialization
C90 compilers complain about it
error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode

Also run gst-indent on systemclock tests.
2016-02-15 12:33:46 -03:00
Stian Selnes 336c7bb69c harness: Fix MT issues when forwarding event/query to sink harness
https://bugzilla.gnome.org/show_bug.cgi?id=761910
2016-02-13 15:36:03 +00:00