Commit graph

19228 commits

Author SHA1 Message Date
Thibault Saunier
6c364d9626 Move files from gstreamer into the "subprojects/gstreamer/" subdir 2021-09-24 16:13:07 -03:00
Tim-Philipp Müller
b4ca58df76 Release 1.19.2 2021-09-23 01:32:33 +01:00
Sebastian Dröge
55ca21edae clocksync: Add some debug output to the clock waiting code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/841>
2021-09-22 12:04:44 +00:00
Sebastian Dröge
fea7f02a1d gst: Initialize optional event/message fields when parsing
These might not exist inside the structure and then we would potentially
keep around uninitialized memory from the caller in the out parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/887>
2021-09-20 13:12:12 +03:00
He Junyan
9289df4291 test: bitwriter: Add a test for reset_and_get_data when not byte unaligned.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>
2021-09-19 22:43:11 +08:00
He Junyan
25dbae6e73 bitwriter: Fix a memory leak in reset_and_get_buffer.
We should record the ownership of the data before we reset the bitwriter.
Or we will always dup the buffer data and leak the memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>
2021-09-19 22:43:06 +08:00
He Junyan
81cf9754e3 bitwriter: Fix the trailing bits lost when getting its data.
In reset_and_get_data and reset_and_get_buffer, it fails to include
the trailing bits less than 8. So, when the bit_size is not byte
aligned, the trailing bits are lost in the return buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>
2021-09-19 20:41:59 +08:00
Mathieu Duponchelle
c6acee201e multiqueue: fix obsolete comment re initial flow status
The initial single queue srcresult is OK, it hasn't been
NOT_LINKED since 2007.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/885>
2021-09-13 14:16:06 +00:00
Mathieu Duponchelle
67eb70bb9c multiqueue: never consider a queue that is not waiting
.. when computing the high id.

After a flush for instance, sq->srcresult is reset to OK,
yet it doesn't make sense to pick a non-existing position
id as the high id when a queue doesn't contain any items
in that situation either.

It is in any case completely OK to let the not-linked stream
get consumed without throttling at this stage, as any
first packet arriving on other single queues will get assigned
a higher position id.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/885>
2021-09-13 14:16:06 +00:00
Andika Triwidada
b6147e6037 add missing space
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/884>
2021-09-09 04:08:22 +00:00
Jan Schmidt
5eba408071 multiqueue: Use running time of gap events for wakeups.
Use gap events to update the next_time of a queue the same
as buffers or segment events. Fixes problems where a group
consisting only of sparse streams primarily driven by
gap events would stall with a full multiqueue because
unlinked streams in the group were not being woken to
push data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/879>
2021-09-06 01:43:57 +10:00
Matthew Waters
c906ccb79f element: NULL the lists of contexts in dispose()
If dispose() is called more than once, we may double unref the list of
GstContext's.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/875>
2021-08-27 05:40:55 +00:00
Jan Alexander Steffens (heftig)
148ac71a1f pad: Keep IDLE probe hook alive during immediate callback
When the probe returns GST_PAD_PROBE_REMOVE and gets called concurrently
from the streaming thread while we're in the callback here, the hook has
already been destroyed by the time we've reacquired the object lock.
Consequently, cleanup_hook gets passed an invalid pointer.

Keep another reference to the hook alive to avoid this situation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/873>
2021-08-24 15:13:19 +02:00
Edward Hervey
637b0d8dc2 concat: Properly propagate seqnum of segment events
Was broken by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/819

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/871>
2021-08-20 16:35:53 +02:00
Théo MAILLART
adc565ff4a tests: elementfactory: add element creation tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/736>
2021-08-20 01:41:30 +00:00
Théo MAILLART
aadf84837b elementfactory: enable construct only property passing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/736>
2021-08-20 01:41:30 +00:00
Olivier Crête
a4a1782872 tracer: Add new tracer to list loaded elements and other features
This new tracer will list loaded elements and plugins. This should
make it easier to generate minimal builds of GStreamer.

This also traces other features such as typefind functions, device
providers and dynamic types.

The format of the output of gst-stats should match the parameters
expected by the meson based gst-build system.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/782>
2021-08-18 17:01:27 -04:00
Olivier Crête
8332b44a2a tracers: Add tracepoint when a plugin feature it loaded
This makes it possible to trace which ones are loaded in a specific
program to make nice statistics.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/782>
2021-08-18 17:01:27 -04:00
Edward Hervey
2b01467934 pad: Ensure last flow return is set on sink pads in push mode
The last flow return field was never updated on sink pads in push mode. This
fixes it and makes it consistent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/868>
2021-08-18 10:25:08 +02:00
Nirbheek Chauhan
e9d06cec5a gstbuffer: Use g_memdup2 instead of g_memdup
This was added in !826 which was created after !803 (which changes
g_memdup -> g_memdup2), but merged before it, so it slipped through.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/866>
2021-08-13 19:55:42 +05:30
Tim-Philipp Müller
bb48c4c9f6 plugin: load plugins with unknown license strings
We shouldn't fail to load plugins just because we don't
recognise the license string. It's not our job to validate
licenses, and the license list is outdated and ambiguous
anyway.

Also add MPL-2.0 to the list, and fix some defunct license
URLs in the code comments.

Get rid of the hard-coded skip index, doesn't really buy us
much versus just skipping with a few strlens, and is harder
to maintain.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/864>
2021-08-10 14:10:22 +01:00
Stéphane Cerveau
77ffed293f identity: provide a log to check the buffers
In order to not rely only on app to display the
message from identity, display the message in the logs
too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/863>
2021-08-03 09:47:12 +00:00
Seungha Yang
00e1a36c4f examples: controller-graph: Fix build with MSVC
To use macros in math.h, one needs to define _USE_MATH_DEFINES
before including the math.h file. Use glib's math define instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/862>
2021-08-01 03:42:18 +09:00
Seungha Yang
110edbc8bd gst-launch: Enable Windows high-resolution clock
Default timer precision of Windows is dependent on system, but
usually it's known to be about 15ms in worst case.
That's not an enough precision for multimedia application.

Enable high-resolution clock in gst-launch to demonstrate
the usage of Windows high-precision clock for application developers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/817>
2021-07-28 20:19:10 +09:00
Jan Alexander Steffens (heftig)
97601e49cb input-selector: Use proper segments when cleaning cached buffers
We need to use the segment associated with the cached buffer, not the
current segment of the pad, otherwise we miscalculate the running time
of cached buffers from before a segment change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/859>
2021-07-28 09:47:03 +00:00
Stéphane Cerveau
408a3bfcf2 gitlab: update bug template
Finetune the bug description.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/854>
2021-07-26 13:05:40 +00:00
Zhao, Gang
2936448f1a gsturi: Set GError if uri is invalid
GError should be set if function call failed and the failed reason is
not a programmer error.

Fixed: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1380
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/816>
2021-07-26 11:37:33 +00:00
Zhao, Gang
ed92fb2430 gsturi: Don't treat invalid format of uri as critical error
Normally uri is get from user input and invalid user input should not
be treated as critical error. Moved gst_uri_is_valid outside of
g_return_val_if_fail.

NULL uri is checked inside of gst_uri_is_valid and is correctly
treated as critical error, removed unneeded checks of NULL uri outside
of gst_uri_is_valid function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/816>
2021-07-26 11:37:33 +00:00
Seungha Yang
add1f17c57 systemclock: Restore default clock mode to monotonic for non-linux system
Before the MR https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/829
Windows and macOS system clock used monotonic clock regardless of
selected clock mode. And because of clock resolution, we should prefer
monotonic over realtime unless realtime clock is selected explicitly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/855>
2021-07-26 09:20:42 +00:00
Seungha Yang
b1b5b2d4cd basesink: Don't swap rstart/rstop when stepping
Step handling is implemented based on unmodified start/stop
segment running time, and basesink takes rate into account for
stepping. This commit is partially undoing new behavior introduced by
the commit of 39b9cc554c when stepping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/848>
2021-07-20 21:14:32 +09:00
Nirbheek Chauhan
ab6faaeeb4 gstptpclock: Don't leak the GList
120 bytes in 5 blocks are definitely lost in loss record 7,615 of 9,510
   at 0x484486F: malloc (vg_replace_malloc.c:380)
   by 0x58A2938: g_malloc (gmem.c:106)
   by 0x58BA1F4: g_slice_alloc (gslice.c:1069)
   by 0x588F059: g_list_prepend (glist.c:335)
   by 0x5B9C5C0: select_best_master_clock (gstptpclock.c:756)
   by 0x5B9CA8E: cleanup_cb (gstptpclock.c:1930)
   by 0x589AD20: g_timeout_dispatch (gmain.c:4889)
   by 0x589A4CE: UnknownInlinedFun (gmain.c:3337)
   by 0x589A4CE: g_main_context_dispatch (gmain.c:4055)
   by 0x58EE4E7: g_main_context_iterate.constprop.0 (gmain.c:4131)
   by 0x5899A92: g_main_loop_run (gmain.c:4329)
   by 0x5B9BA4C: ptp_helper_main (gstptpclock.c:1980)
   by 0x58C8C31: g_thread_proxy (gthread.c:826)

576 bytes in 24 blocks are definitely lost in loss record 8,782 of 9,510
   at 0x484486F: malloc (vg_replace_malloc.c:380)
   by 0x58A2938: g_malloc (gmem.c:106)
   by 0x58BA1F4: g_slice_alloc (gslice.c:1069)
   by 0x588F059: g_list_prepend (glist.c:335)
   by 0x5B9C5C0: select_best_master_clock (gstptpclock.c:756)
   by 0x5B9EFA0: handle_announce_message (gstptpclock.c:934)
   by 0x5B9EFA0: handle_ptp_message (gstptpclock.c:1765)
   by 0x5B9EFA0: have_stdin_data_cb (gstptpclock.c:1851)
   by 0x589A4CE: UnknownInlinedFun (gmain.c:3337)
   by 0x589A4CE: g_main_context_dispatch (gmain.c:4055)
   by 0x58EE4E7: g_main_context_iterate.constprop.0 (gmain.c:4131)
   by 0x5899A92: g_main_loop_run (gmain.c:4329)
   by 0x5B9BA4C: ptp_helper_main (gstptpclock.c:1980)
   by 0x58C8C31: g_thread_proxy (gthread.c:826)
   by 0x5DA4298: start_thread (pthread_create.c:481)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/852>
2021-07-19 15:28:05 +00:00
Nirbheek Chauhan
60a7a2e705 gstpad: Don't spam INFO when default-chaining a buffer list
This is being logged for each buffer, so it should not use INFO.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/853>
2021-07-19 20:05:29 +05:30
Stéphane Cerveau
342c05e778 gitlab: add bug template
To clarify what is expected in an issue description and avoid
issue which is just an usage issue, add a bug template in gitlab.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/836>
2021-07-15 11:17:10 +02:00
Kasper Steensig Jensen
674e6fcf65 Add meson description for tracer_hooks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/849>
2021-07-08 11:48:58 +02:00
Edward Hervey
8c08cdf9fe gstinfo: Improve usage of libdw for backtraces
When getting backtraces, we were always creating a new Dwfl context and then
discarding it. The problem with that is that it resulted in having to re-scan a
lot of information for every single backtrace.

In order to fix that issue, use a global on-demand Dwfl context and use it with
a lock.

Furthermore, we were scanning the mappings of the
process (dwfl_linux_proc_report) for *every single step* in the backtrace, and
that function is horrendously expensive (does sscanf on /proc/PID/maps
...). While there is a possibility that new mappings might be available (new
plugins being loaded for example), we can limit ourselves to just do it once per
backtrace.

These two modifications speed up the elements_leaks unit test (which traces all
pads with full backtraces) by a factor of 6.

Partially fixes #567

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/504>
2021-07-05 07:52:55 +00:00
Jan Schmidt
df52bdc5d4 parse: Fix a critical when using the : operator.
Fix "has no handler with id" output criticals when the :
multilink operator is used. These were caused by disconnecting
a signal handler multiple times.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/846>
2021-07-02 01:59:18 +10:00
Sebastian Dröge
ba294415d7 basesink: Post a latency message whenever we're ready to answer the query
Usually the latency message is only posted whenever latency of an
element changes but that might be too early as the sinks might not be
able to query the latency at that point yet.

Similarly adding a new sink should cause latency reconfiguration once
that new sink is able to report its latency.

This fixes latency configuration in pipelines where webrtcbin is the
only "sink", i.e. it is used in a sendonly session. Before, the latency
would always be configured to 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/843>
2021-06-28 19:59:47 +03:00
Sebastian Dröge
81bd8913b5 basesrc: Print segments with GST_SEGMENT_FORMAT and not GST_PTR_FORMAT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/842>
2021-06-24 07:01:38 +00:00
Víctor Manuel Jáquez Leal
9be63d2ca3 Fix GI annotations.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/840>
2021-06-22 13:02:41 +02:00
Corentin Damman
d157b23fb0 Update COPYING to LGPL 2.1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/835>
2021-06-21 08:36:49 +00:00
Jan Schmidt
7f29361488 parse: Don't do delayed property setting for top-level properties.
If a property is supplied to gst-launch-1.0 to set on a property that
implements GstChildProxy, it would always accept any property name
and try to set it later. This means that (for example) decodebin
will accept and not complain about property names that can never exist like:

gst-launch-1.0 videotestsrc ! decodebin NON-EXISTING_PROPERTY=adsfdasf ! fakesink

Instead, only try to do deferred property setting for property names
that contain the :: separator that indicates it's a setting on a child
that might appear later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/832>
2021-06-21 07:32:27 +00:00
François Laignel
5230cab38d Check mandatory ClockTime arguments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/837>
2021-06-16 12:33:28 +02:00
Doug Nazar
b16e96dd87 Use g_memdup2() where available and add fallback for older GLib versions
glib 2.68 deprecates g_memdup(). Replace with g_memdup2() and
add fallback if compiling against older versions, since we
want to avoid deprecation warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/803>
2021-06-08 07:59:05 +00:00
Alba Mendez
4c75ec53e7 introspection: annotate ownership in more vfuncs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/831>
2021-06-07 09:29:58 +00:00
Alba Mendez
b296e914a5 introspection: annotate handle_message ownership
(fixup/improvement to !747) Correct the ownership
annotation for `message` in the `handle_message` vfunc,
and remove the equivalent phrase elsewhere (following
rules of !747.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/830>
2021-06-04 04:48:39 +00:00
Guillaume Desmottes
aaaf85054f tracers: leaks: log when tracer is exiting
Useful when debugging leaks to make sure that the tracer is properly
finalized (gst_deinit() being actually called, etc).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/828>
2021-06-02 06:11:58 +00:00
Tim-Philipp Müller
81778f9d93 Back to development 2021-06-01 15:28:13 +01:00
Tim-Philipp Müller
6fa03dd151 Release 1.19.1 2021-06-01 00:07:55 +01:00
tyler-aicradle
ea33144147 systemclock: fall back to g_get_monotonic_time
This allows us to cover the case where we're on some unknown system that
doesn't have a known native precision monotonic time source. Sadly this
reintroduces some of the complexity removed in previous commits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/829>
2021-05-27 16:01:17 -05:00
tyler-aicradle
5328941632 systemclock: reorg real and mono time functions for macOS and win32
This simplifies the pre-processor checks a little to make it easier to
follow the code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/829>
2021-05-27 09:44:29 -05:00