Commit graph

18981 commits

Author SHA1 Message Date
Matthew Waters
a1b41b2b24 gst/bufferpool: only resize in reset when maxsize is larger
Only resize the buffer if the maxsize is larger then the configued pool
size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/570>
2020-07-21 23:31:17 +10:00
Matthew Waters
056cad44c3 build/coretracers: add dep on threads
Fixes the following build error and missing '-pthread' argument when
linking:

subprojects/gstreamer/plugins/tracers/libgstcoretracers.so.p/gstleaks.c.o: In function `gst_leaks_tracer_setup_signals':
/work/build32/../subprojects/gstreamer/plugins/tracers/gstleaks.c:919: undefined reference to `pthread_atfork'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/571>
2020-07-20 17:09:32 +10:00
Thibault Saunier
aaa95cfef7 directcontrolbinding: Properly initialize default last_value
It was zero and in some condition it means that the control binding
values where ignored (as shown in the test). Setting it to MAXDOUBLE
so that the first time we sync the values from a a timestamp in the
right range the proper value is computed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/564>
2020-07-18 20:47:29 +00:00
Seungha Yang
30dfa177be info: Fix possible broken debug output on Windows
Depending on Windows codepage setting, some characters could
be broken when printing on terminal. Fortunatly g_print* family will
take care Windows codepage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/566>
2020-07-17 22:59:21 +09:00
Olivier Crête
90530bdb28 pad: More explicitly explain how to post errors on GST_FLOW_ERROR
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/568>
2020-07-16 16:34:05 -04:00
Nicolas Dufresne
f11e9b3aa0 latency tracer: Fix leaks in the reported latency trace
The stack item was not freed as it was supposed, causing leaks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/269>
2020-07-15 16:28:34 -04:00
Jan Schmidt
e07bb52bf7 latency tracer: Fix unsafe and NULL pointer accesses
Use thread-safe accesses to pad peers and parent objects. This
fixes some crashers and all the non-safe access patterns I could
spot. There's still some weirdness when using the latency
tracer on pipeline chains that aren't yet linked, but this
at least stops it segfaulting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/269>
2020-07-15 16:28:32 -04:00
Edward Hervey
cecb291263 Revert "gstinfo: Check threshold for category from macro"
This reverts commit dcece2a878.

This increased the code size and number of branches for all debug statements.

Fixes #564

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/563>
2020-07-13 08:02:26 +02:00
Mathieu Duponchelle
bb22b7d79c aggregator: expose gst_aggregator_finish_buffer_list API
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1276

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/562>
2020-07-10 18:11:55 +02:00
Mathieu Duponchelle
3df82624ea tests/elements/leaks.c: check get_tracer_by_name return value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/557>
2020-07-10 15:13:11 +00:00
Seungha Yang
e2dc90273e basesrc: Deprecate gst_base_src_new_seamless_segment()
It can be replaced by gst_base_src_new_segment()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/490>
2020-07-10 16:53:40 +09:00
Seungha Yang
a78a9cf0c3 basesrc: Add new API for handling GstSegment update by subclass
Add API gst_base_src_new_segment() for subclass to be able to
signalling new GstSegment which should be applied to following
buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/490>
2020-07-09 13:50:25 +00:00
Thibault Saunier
1627222aa5 taglist: Stop inlining gst_tag_list_copy
This way it gets exposed to bindings through GObject Introspection.

Same logic as with d1b2d3429c

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/561>
2020-07-09 07:57:01 -04:00
Seungha Yang
4b6245597c check: Use g_thread_yield instead of g_usleep(1)
Since the commit
01c02ac08b,
g_usleep(1) will be translated to Sleep(1) on Windows which means
sleep in 1 millisecond. But GLib provides g_thread_yield() API
which is exactly what we required here for thread context switching.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/559>
2020-07-08 05:16:28 +09:00
Olivier Crête
44ef5a7c8c deviceprovider: Do static probe on start as fallback
For providers that don't support dynamic probing, just fall back to doing
a static one on start() to make the UI developers life easier.

This also means that the monitor doesn't need to call _can_monitor() before
calling start.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/353>
2020-07-06 15:08:27 -04:00
Christoph Reiter
3cfda6d6eb gstelementfactory: Fix missing features in case a feature moves to another filename
In case a plugin filename was renamed with the plugin being in the registry cache
the features were not loaded after the rename:

1) Cache of old/gone filename was loaded, features added
2) New filename was loaded, features where not added because
   they were already found in the registry.
3) In the end stale cache entries for files which are no longer there
   are removed, including the wanted features.
4) The cache gets updated without the features.

Fix this by also checking at (2) that the found feature is from the loaded plugin
and not from some stale cache entry.

This affected directsoundsink where libgstdirectsoundsink.dll was renamed
to libgstdirectsound.dll, losing the directsoundsink element in the process.

Fixes #290

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/102>
2020-07-06 14:31:48 +00:00
Tim-Philipp Müller
b1a171f912 meson: set release date from .doap file for releases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/555>
2020-07-06 11:34:07 +00:00
Tim-Philipp Müller
3cf81b8a07 po: update POTFILES
xgettext: error while opening "gst/parse/grammar.y" for reading: No such file or directory

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/586

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/556>
2020-07-05 18:20:26 +01:00
Sebastian Dröge
eea1ac156c ptp: Add GNU Hurd to the list of supported platforms and fix the Solaris name
https://mesonbuild.com/Reference-tables.html#operating-system-names has
the table of all supported names right now.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/583

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/554>
2020-07-03 11:45:36 +03:00
Sebastian Dröge
d22813ef97 element: When removing a ghost pad also unset its target
Otherwise the proxy pad of the ghost pad still stays linked to some
element inside the bin, which is not allowed anymore according to the
topology.

In 2.0 this should be fixed more generically from inside GstGhostPad but
currently there is no way to get notified that the ghost pad is
unparented.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/553>
2020-07-03 06:55:37 +00:00
Tim-Philipp Müller
f836e267c1 Back to development 2020-07-03 02:03:15 +01:00
Tim-Philipp Müller
61ed49f496 Release 1.17.2 2020-07-03 00:22:35 +01:00
Sebastian Dröge
f341619a4d stream: Don't use GST_FIXME_OBJECT() when generating a random stream id if the caller didn't provide one
That would call into gst_info_describe_stream(), which takes the same
mutex a second time and then deadlocks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/552>
2020-07-01 19:50:20 +00:00
Mathieu Duponchelle
1816f74339 gstutils: fix link in parse_bin_from_description_full doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/475>
2020-07-01 18:56:47 +01:00
Jan Schmidt
53b193414d gstbin: Fix docs typo
element-added-deep -> deep-element-added in the GstBin doc header

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/547>
2020-07-01 02:22:43 +10:00
Seungha Yang
6ca939506b docs: Specify UTF-8 encoding everywhere
Otherwise some non-English character might be broken depending on
OS and/or locale.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/545>
2020-06-25 17:25:37 +00:00
Mathieu Duponchelle
65e89d45b8 hooks: add opt-in cache update hook
CI now checks that plugin caches are up to date, for example
when adding a new property to an element.

This is something pretty easy to forget, and it can be checked
in a pre-commit hook provided the cache generator generates no
unnecessart diff on the developer's machine. This is now the
case for me in core, -base and -good, and eventually all the
repositories should behave appropriately, at least on my
development machine.

The new check in the pre-commit hook is only performed when
the user is in the development environment (it checks
$MESON_BUILD_ROOT to determine that), and when the developer
has opted-in by setting `GST_CACHE_HOOK=enabled`. That is
because the hook will actually rebuild the cache with ninja,
and modify it in the source directory, that's not a behaviour
we want to enable by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/546>
2020-06-25 16:08:42 +00:00
Seungha Yang
57d29e7fcd gst-inspect: Use gst_info_strdup_vprintf to print string
g_vprintf() will write a string binary to stdout directly using fwrite().
So, depending on character in the string, fwrite to stdout can
print broken one but printf family might not cause the issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/544>
2020-06-24 17:22:37 +00:00
Michael Olbrich
1206a60bac bus: clear bus->priv->signal_watch immediately when the source is removed
There is a race-condition that can trigger the assertion in
gst_bus_add_signal_watch_full():

If gst_bus_add_signal_watch_full() is called immediately after
gst_bus_remove_signal_watch() then bus->priv->signal_watch may still be set
because gst_bus_source_dispose() or gst_bus_source_finalize() was not yet
called.
This happens if the corresponding GMainContext has the source queued for
dispatch. In this case, the following dispatch will only unref and delete
the signal_watch because it was already destroyed. Any pending messages
will remain until a new watch is installed.

So bus->priv->signal_watch can be cleared immediately when the watch is
removed. This avoid the race condition.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/543>
2020-06-24 15:08:59 +02:00
Mathieu Duponchelle
996743ed39 gst-hotdoc-plugins-scanner: serialize interfaces 2020-06-23 11:58:56 -04:00
Mathieu Duponchelle
8c753a30e5 gst-hotdoc-plugins-scanner: don't instantiate base classes 2020-06-23 11:58:56 -04:00
Mathieu Duponchelle
ef86d00ba9 gst-hotdoc-plugins-scanner: serialize parents in hierarchy when needed 2020-06-23 11:58:56 -04:00
Thibault Saunier
1152fb33a4 docs: Document signals and properties only for current type 2020-06-23 11:58:55 -04:00
Thibault Saunier
c1c035bd65 doc: Stop documenting properties from parents 2020-06-23 11:58:55 -04:00
Nirbheek Chauhan
488acce730 registry: Print the pointer when printing features
This is what we do everywhere else too, useful for debugging.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/542>
2020-06-23 12:16:49 +01:00
Nirbheek Chauhan
43174bfe1d registry: Use a toolchain-specific registry file on Windows
If we load a plugin registry for MinGW plugins when running with MSVC,
we will have to write out the whole cache again, and vice-versa. Just
use separate cache files so that the cache is actually useful.

Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/427

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/542>
2020-06-23 12:16:45 +01:00
Sebastian Dröge
63c1945695 ghostpad: Deprecate gst_ghost_pad_construct()
Instead do everything it did as part of GObject::constructed() and
change the function to always return TRUE.

gst_ghost_pad_construct() was meant to be called by subclasses right
after construction of the object to finish construction as it can fail
in theory. In practice it's impossible for it to fail, even more so if
called directly from GObject::constructed(): The only failure condition
is if the newly created proxy pad already has a parent, which is
impossible at this point as nothing else can have a reference to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/540>
2020-06-22 12:30:48 +03:00
Thor Andreassen
57b263d620 tools: gst-inspect, add option '--color' with short option '-C'
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/498>
2020-06-20 08:45:01 +00:00
Thibault Saunier
74d29ca771 info: Add a printf extension for ClockTime/ClockTimeDiff pointers
Using both GST_TIME_FORMAT+GST_TIME_ARGS and friend is cumbersome, this
makes it sensibly more user friendly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/535>
2020-06-20 00:42:31 +00:00
Tim-Philipp Müller
a7472f30c0 Back to development 2020-06-20 00:27:57 +01:00
Tim-Philipp Müller
7113aa3b70 Release 1.17.1 2020-06-19 19:13:37 +01:00
Thibault Saunier
1fbfb4291f doc: Stop recording if building from source/release in plugin cache
Closes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/537

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/537>
2020-06-19 19:13:13 +01:00
Sebastian Dröge
f88b59f49a Fix up and add various "Since" markers and other related docs fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/536>
2020-06-19 13:10:53 +01:00
Roman Shpuntov
fd280c0981 systemclock: Fix clock time conversion on Windows/xbox
The returned ratio can be bigger than GST_SECOND, in which case we would
forever return 0 for the system clock time. Even in other cases if it's
close to GST_SECOND it would result in accuracy loss.

Instead of doing the division by GST_CLOCK_TIME_NONE during
initialization once, do it every time the clock time is requested.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/575

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/534>
2020-06-18 17:41:25 +03:00
Edward Hervey
31e6d766ff gst: Delay creation of threadpools
Since glib 2.64, gthreadpool will start waiting on a GCond immediately upon
creation. This can cause issues if we fork *before* actually using the
threadpool since we will then be signalling that GCond ... from another process
and that will never work.

Instead, delay creationg of thread pools until the very first time we need
them. This introduces a minor (un-noticeable) delay when needing a new thread
but fixes the issues for all users of GSTreamer that will call gst_init, then
fork and actually start pipelines.

See https://gitlab.gnome.org/GNOME/glib/-/issues/2131 for more context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/531>
2020-06-16 08:23:21 +02:00
Thibault Saunier
9d195da36c inputselector: Push event on selected pad only when one is selected
Calling `gst_input_selector_get_active_sinkpad` triggers sinkpad
selection but won't notify about it, leading  to breaking code that
relying on it. This new code added as part of
63ccf45395 was thought to be triggered only
when a pad was already selected and not change the behavior otherwise
so this commit makes sure it is actually the case.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/766

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/522>
2020-06-15 17:33:22 +00:00
Edward Hervey
33557f8db1 check: Fix datetime unit test for builds without assert
If built with assertions disabled, we need to ensure the variable is properly
reset before testing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/530>
2020-06-12 15:02:13 +02:00
sohwan.park
87504fe877 message: Add unit test for GST_MESSAGE_RATE_CHANGE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/528>
2020-06-11 23:16:33 +09:00
sohwan.park
4ce161258e event: Add unit test for INSTANT_RATE_CHANGE and INSTANT_RATE_SYNC_TIME
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/528>
2020-06-11 23:16:30 +09:00
sohwan.park
6dea5d2c7b segment: Add unit test for GST_SEEK_FLAG_INSTANT_RATE_CHANGE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/528>
2020-06-11 10:53:59 +09:00