Commit graph

1547 commits

Author SHA1 Message Date
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
Havard Graff 668b3215b8 testclock: add crank method
And use it inside GstHarness

API: gst_test_clock_crank()

https://bugzilla.gnome.org/show_bug.cgi?id=761906
2016-02-12 17:08:32 +00:00
Stian Selnes 2b0ff13d07 systemclock: Fix wait/unschedule race
Fixes a race where an entry is set to BUSY in
gst_system_clock_id_wait_jitter() and is UNSCHEDULED before
gst_system_clock_id_wait_jitter_unlocked() starts processing it. The
wakeup added by gst_system_clock_id_unschedule() must be cleaned up.

Two stress tests are added. One test that triggers the specific issue
described above. The second stresses the code path where a wait is
rescheduled because the poll returned early.

https://bugzilla.gnome.org/show_bug.cgi?id=761586
2016-02-10 08:59:33 -03:00
Thiago Santos 682516402d tests: extend the AM_TESTS_ENVIRONMENT from check.mak
To get the CK_DEFAULT_TIMEOUT defined for all tests

https://bugzilla.gnome.org/show_bug.cgi?id=761472
2016-02-05 19:11:10 -03:00
Vineeth TM ca97a9882f tests:gstinfo: Fix string memory leak
info_fourcc test leaks string.

https://bugzilla.gnome.org/show_bug.cgi?id=761071
2016-01-25 09:41:41 -03:00
Tim-Philipp Müller afaeec665a tests: info: make work without registry 2016-01-23 16:00:48 +00:00
Stefan Sauer ec75b68984 tracerrecord: don't leak the spec structures
Change the gst_tracer_record_new() api to take the parameters the make the
spec structure directly. This allows us to own the top-level structure and
also collect the args so that we can take ownership of the sub-structures.

https://bugzilla.gnome.org/show_bug.cgi?id=760821
2016-01-22 10:07:26 +01:00
Stefan Sauer a72368ebb3 test/tracerrecord: unref objects and free string 2016-01-21 08:25:24 +01:00
Florin Apostol 077db508a8 systemclock: tests: added stress test for async order
Keep inserting alarms at the beginning of the list. Due to
https://bugzilla.gnome.org/show_bug.cgi?id=760757
alarm thread will get confused and not serve them in order.
2016-01-20 13:47:20 +02:00
Stefan Sauer bdc34bd61a tests/gst/info: Fix messages glist memory leak 2016-01-20 09:18:01 +01:00
Vineeth TM 78ab2b530b tests: tracerrecord: Fix messages glist memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=760821
2016-01-20 09:17:15 +01:00
Tim-Philipp Müller eb4c5498b5 value: fail flag deserialization on invalid flag names 2016-01-18 19:39:11 +00:00
Tim-Philipp Müller fb4b673c76 tests: structure: fix wrong flag name in deserialization test
There is no GST_SEEK_FLAGS_NONE only GST_SEEK_FLAG_NONE (but
the deserializer silently skips bad flag names currently).
2016-01-18 19:39:05 +00:00
Tim-Philipp Müller 8b88fc487f gst.h: Don't spew warnings if GST_USE_UNSTABLE_API is not defined
Only hide GstTracer and GstTracerRecord API behind GST_USE_UNSTABLE_API,
but don't spew any warnings, otherwise everyone has to define this
to avoid compiler warnings.

This reverts parts of commit 89ee5d948d.
2016-01-16 16:00:16 +00:00
Stefan Sauer 89ee5d948d tracer: add a GFlag for the tracer scope
Port all tracers. Add the GST_USE_UNSTABLE_API flag to the internal CFLAGS so
that we don't have to specify this for gir, docs, mkenum, ...
2016-01-16 13:31:51 +01:00
Stefan Sauer 10b78d872b tracerrecord: add a log record class
We use this class to register tracer log entry metadata and build a log
template. With the log template we can serialize log data very efficiently.
This also simplifies the logging code, since that is now a simple varargs
function that is not exposing the implementation details.

Add docs for the new class and basic tests.

Remove the previous log handler.

Fixes #760267
2016-01-15 21:54:01 +01:00
Tim-Philipp Müller 4febebb962 info: add buffer list support to GST_PTR_FORMAT 2016-01-08 19:25:24 +00: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
Tim-Philipp Müller 4e437a564d tests: value: test buffer serialisation/deserialisation more thoroughly
Tests data/strings as well, not just that we received
something non-NULL back.
2015-12-31 12:21:12 +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
Heinrich Fink 87691d0280 systemclock: Add test for gst_clock_get_resolution
In a series of time measurements, the diff between now and previous
timestamps is either 0 or at least as long as get_resolution returned.

https://bugzilla.gnome.org/show_bug.cgi?id=758012
2015-11-13 09:23:44 +01:00