Commit graph

106 commits

Author SHA1 Message Date
Doug Nazar 9efd519c81 gstcheck: Ensure unused threadpool threads are stopped
Ensures that all unused threads are exited before the atexit()
handlers run.

This prevents a race with any thread that used the OpenSSL library
between it's thread cleanup routine and it's atexit() cleanup routine
which can cause a SIGSEGV.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/812>
2021-05-12 03:08:30 +00:00
François Laignel 1a8dfdfc54 Introduce gst_element_request_pad_simple
The name `gst_element_get_request_pad()` is confusing to people
learning GStreamer. `gst_element_request_pad_simple()` aims at
providing the exact same functionality, while making it more
explicit it is a simplified `gst_element_request_pad()`.

`gst_element_request_pad_simple()` is consistent with other
functions such as `gst_element_seek_simple`.

This commit deprecates `gst_element_get_request_pad()` so that a
compilation warning is emitted when used and incite developers
to use the more explicit `gst_element_request_pad_simple()`.

See also https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/743#note_886586

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/802>
2021-05-04 15:49:32 +02:00
Mathieu Duponchelle 9861ad2e12 gstcheck: remove bogus refcount asserts
As soon as gstcheck potentially calls out to code it does not
control, such as gst_element_request_pad, all assertions about
pad refcounts go out the window.
2019-12-10 09:42:37 +01:00
Xavier Claessens e17bde51b3 Check buffer size before checking buffer data
If the expected size is bigger than the actual buffer size, it would
memcmp random memory which could lead to crashes instead of proper error
reporting.
2019-10-07 17:47:47 +00:00
Aaron Boxer 509f6201e1 documentation: fix a number of typos 2019-10-06 11:12:11 -04:00
Thibault Saunier 5b2da0835e doc: Fix and add some missing docstrings 2019-05-13 11:33:49 -04:00
Tim-Philipp Müller 93d190b5b3 check: suppress some g-i warnings
gstcheck.c:142: Warning: GstCheck: gst_check_add_log_filter: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip)
gstcheck.h:178: Warning: GstCheck: gst_check_run_suite: argument suite: Unresolved type: 'Suite*'
2019-03-23 18:17:43 +00:00
Tim-Philipp Müller de8fe283d6 autotools: stop controlling symbol visibility with -export-symbols-regex
Instead, use -fvisibility=hidden and explicit exports via GST_EXPORT.
This should result in consistent behaviour for the autotools and
Meson builds where this is done already, and will allow us to drop
the win32 .def files.
2018-08-12 23:26:25 +01:00
Tim-Philipp Müller 88dfd9ee48 libs: check: print stacktrace on unexpected criticals 2018-01-11 12:27:18 +00:00
Haakon Sporsheim 77502acabc check: Add test suite time elapsed output 2017-11-24 09:50:52 +01:00
Thibault Saunier a87b4551a6 Port gtk-doc comments to their equivalent markdown syntax
Modernizing our documentation and preparing a possible move to hotdoc.
This commits also adds missing @title metadatas to all SECTIONs
2017-01-27 16:36:38 -03:00
Stian Selnes 0c36e5766d check: Add API to filter g_warning/g_critical etc
New API functions to filter log messages before they are processed by
GstCheck. This can be used to discard specific messages that are
accepted by the test or to add callbacks that test specific messages.

Default bevavior when no callback is given to a filter is to discard the
message, because it does not makes sense to have a filter with no
callback which does not discard; that would be a noop.

Discarded messages will in addition to bypass the GstCheck handling also
return to GLib that the message is not fatal if it occurs.

https://bugzilla.gnome.org/show_bug.cgi?id=773091
2017-01-24 00:11:59 +00:00
Tim-Philipp Müller bb28a59d5b check: fix typo in docs 2016-12-16 18:30:46 +00:00
Thibault Saunier 7b3d383971 check: Avoid possible double free 2016-12-16 14:00:18 -03:00
Thibault Saunier f7255f318f check: Allow listing unit tests names
Adding options while running gst_check_init

https://bugzilla.gnome.org/show_bug.cgi?id=775540
2016-12-16 13:46:39 -03:00
Edward Hervey 1f7fba19f7 gstcheck: Check return value of gst_buffer_map
We can't check contents if we don't have access to it

https://bugzilla.gnome.org/show_bug.cgi?id=728326
2016-02-23 17:30:48 +01:00
Stefan Sauer a6e72aa28f check: don't memcmp twice
Simply call fail() in the condition after the first memcmp.
2015-12-27 19:42:37 +01:00
Tim-Philipp Müller 5d3c58902f check: fix 'format string is not a string literal' warning with clang
Broke this when I removed the G_GNUC_PRINTF in a previous
commit to fix indentation, since it was not really needed.
Turns out unlike gcc clang warns though if a non-literal
format string is passed then. Fix indentation differently.

http://clang.llvm.org/docs/AttributeReference.html#format-gnu-format
2015-09-28 20:10:31 +01:00
Vineeth TM fcdfcbd618 downloadbuffer, benchmarks: fix error leaks in failure code paths
https://bugzilla.gnome.org/show_bug.cgi?id=755019
2015-09-15 18:21:58 +01:00
Vineeth TM f409dd48e0 check: Fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=755019
2015-09-15 18:21:27 +01:00
Jonas Holmberg fabe966b0a gstcheck: Print newline in message handler
The message handler is supposed to print a newline after the message
just like the default message handler.
2015-06-23 16:17:56 +01:00
Stefan Sauer 8695a202c8 check: fix another typo in the docs 2015-01-23 08:59:57 +01:00
Heinrich Fink 1b472377c8 check: Fix doc of GST_CHECKS and GST_CHECKS_IGNORE
https://bugzilla.gnome.org/show_bug.cgi?id=743335
2015-01-22 21:38:51 +11:00
Sebastian Dröge ee3db74ec4 check: Add _fail_unless() compatibility function around _ck_assert_failed()
We exported this in < 1.5 and it was automatically used by many macros
from the header. Keep it exported for now.
2015-01-21 18:09:38 +01:00
Thiago Santos 896b3bfeed gstcheck: fix GI annotation
Add missing : to annotation
2014-12-18 12:04:22 -03:00
Sebastian Dröge 154eefecc9 Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.

Also normalize booleans in a few places.
2014-12-01 09:51:37 +01:00
Stefan Sauer d5518edf12 fixme: bump leftover 0.11 fixme comments 2014-09-25 21:27:03 +02:00
Sebastian Dröge 84c6e885f1 check: Use the name parameter of gst_check_setup_src_pad_by_name() and the sink variant
This was hardcoded to "sink" / "src" by accident in previous refactoring.
2014-09-15 13:08:09 +03:00
Thibault Saunier 87a79673b0 check: Add a function to check destruction of objects
Add a method letting people to ensure that unreffing one object
leads to its destruction, and possibly the destruction of more object
(think destruction of a GstBin etc...).

https://bugzilla.gnome.org/show_bug.cgi?id=736477
2014-09-12 17:18:21 +02:00
Tiago 076b83208a check: Adding documentation to the gst_check_setup_sink_pad_by_name function
https://bugzilla.gnome.org/show_bug.cgi?id=734190
2014-09-12 14:14:05 +03:00
Tiago Cesar Katcipis 91045ccd83 gstcheck: add docs for gst_check_setup_src_pad_by_name()
https://bugzilla.gnome.org/show_bug.cgi?id=734142
2014-08-03 00:27:14 +01:00
Sebastian Rasmussen 863ba1a598 docs: Fix documentation typos and inconsistencies
* GstGlobalDeviceMonitor was renamed to GstDeviceMonitor
 * Expand GST_MESSAGE_DEVICE to the full enum value names
 * Correct the incorrect references to the GstDeviceProvider interfaces
 * Describe caps arguments for gstcheck interface
 * Add missing docs for GstNetAddressMeta and its add function
 * Add docs for toc helper macros
 * Avoid refering to GstValueList type as done elsewhere

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732786
2014-07-09 09:22:11 +02:00
Evan Nemerson 5abc82e9f3 introspection: Assorted minor introspection and documentation fixes
https://bugzilla.gnome.org/show_bug.cgi?id=732534
2014-07-01 09:03:41 +02:00
Sebastian Dröge 917a033d04 check: Add new API to set up pads from non-static pad templates 2014-04-15 12:58:59 +02:00
Stefan Sauer 6fc23cd016 check: also use the glob on GST_CHECKS when forcing to run broken tests
GST_CHECKS can be simply "test*" to run run all tests (including those that are
marked broken). Update the sparse comments a bit to tell how this works.
2014-02-19 11:04:17 +01:00
Tim-Philipp Müller 5e7a7aeaf1 check: add support for blacklisting checks via GST_CHECKS_IGNORE 2014-02-09 16:39:53 +00:00
Sebastian Rasmussen 53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Jonas Holmberg 3c4873458e check: Call gst_deinit() at exit of all processes 2013-08-16 10:21:19 +01:00
Jonas Holmberg 0ea8748c6b check: Added gst_check_setup_events_with_stream_id()
Added a new function gst_check_setup_events_with_stream_id(), since
gst_check_setup_events() does not work with multiple pads.

https://bugzilla.gnome.org/show_bug.cgi?id=703377
2013-07-01 15:54:11 +02:00
Sebastian Dröge 516611bc33 check: Fix event handling in gst_check_element_push_buffer_list() 2013-05-15 11:22:25 +02:00
Nicolas Dufresne a1866e64c5 check: Add helper that sends initial events
https://bugzilla.gnome.org/show_bug.cgi?id=700033
2013-05-10 09:23:28 +02:00
Tim-Philipp Müller b48400b7a4 check: set CK_TIMEOUT_MULTIPLIER on ARM
https://bugzilla.gnome.org/show_bug.cgi?id=695599
2013-04-27 11:49:52 +01:00
Tim-Philipp Müller 666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Mark Nauwelaerts bb4860d961 check: port to the new GLib thread API 2012-09-12 13:01:18 +02:00
Edward Hervey d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Evan Nemerson 74c74fd119 check: add some missing documentation, including annotations 2012-06-19 19:53:54 -07:00
Tim-Philipp Müller e7dd426a82 check: check for GLib-GIO criticals as well 2012-05-28 00:08:56 +01:00
Olivier Crête 8f8335a7f4 check: Update gst_check_element_push_buffer to 0.11 style caps
Pass the desired caps explicitely
2012-01-28 16:42:38 +00:00
Wim Taymans a521252845 Add new GstMapInfo
Use a structure to hold info about the mapping. The application then keeps track
of this state and we can use it to unmap the memory again later.
2012-01-25 11:54:23 +01:00
Tim-Philipp Müller ed80a5cd4b registry: rename gst_registry_get_default() to gst_registry_get()
It's not really a default if there is only one that can't be changed.

Should we return a ref like e.g. g_volume_monitor_get() does?
2012-01-02 02:22:51 +00:00