Sebastian Dröge [Mon, 9 Mar 2020 19:32:28 +0000 (21:32 +0200)]
clocksync: Use g_cond_signal() instead of g_cond_broadcast()
There can only be a single waiter: on the streaming thread.
Sebastian Dröge [Mon, 9 Mar 2020 19:31:48 +0000 (21:31 +0200)]
identity: Use g_cond_signal() instead of g_cond_broadcast()
There can only be a single waiter: on the streaming thread.
Sebastian Dröge [Mon, 9 Mar 2020 18:27:58 +0000 (20:27 +0200)]
identity: Unblock condition variable on FLUSH_START
... and immediately return FLUSHING from the streaming thread instead of
waiting potentially forever.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/516
Sebastian Dröge [Mon, 9 Mar 2020 13:17:08 +0000 (15:17 +0200)]
systemclock: Don't start the system clock at 0 on Windows
We kept the start time around and subtracted it everywhere for "easy of
debugging", but we don't do anything like this anywhere else and it
only complicates the code unnecessarily.
Sebastian Dröge [Mon, 9 Mar 2020 13:16:00 +0000 (15:16 +0200)]
systemclock: Don't divide by zero on Windows if high performance timers are not available
Sebastian Dröge [Sat, 7 Mar 2020 09:09:05 +0000 (11:09 +0200)]
caps: Don't assert in fixate() on EMPTY/ANY caps and document EMPTY/ANY behaviour on more functions
fixate() will return empty caps if it gets empty caps passed and assert
early if any caps are provided as there's no meaningful way of fixating
any caps.
truncate() and simplify() will return the input caps in case of
any/empty caps as before, but slightly optimized and as documented
behaviour.
Also add tests for this and a few other operations behaviour on
empty/any caps.
Mathieu Duponchelle [Wed, 4 Mar 2020 21:13:12 +0000 (22:13 +0100)]
gstaggregator: fix the prototype of sink_event_pre_queue
This is not an API breakage, as implementors are already
expected to return a GstFlowReturn
Seungha Yang [Tue, 3 Mar 2020 09:49:36 +0000 (18:49 +0900)]
gst-launch: Follow up to missing s/g_print/gst_print/g
Required to avoid broken log string on Windows but missed
in the commit of
493a3261a9757b5ade7aec289eb07221966f9eed
Seungha Yang [Sat, 29 Feb 2020 10:00:44 +0000 (19:00 +0900)]
tests: info: Fix thread-id pattern matching on Windows
The format modifier for thread-id prints hex value without "0x" prefix on Windows.
Tim-Philipp Müller [Sun, 26 Jan 2020 00:56:44 +0000 (00:56 +0000)]
tracers: rusage: use thread-local storage for per-thread stats
.. instead of looking things up by thread id from a GHashTable,
which also happens to have no locking around insertion/lookup.
Tim-Philipp Müller [Sun, 26 Jan 2020 00:32:18 +0000 (00:32 +0000)]
tracers: rusage: fix minor string leak in constructor
Johan Bjäreholt [Sat, 2 Nov 2019 10:49:25 +0000 (11:49 +0100)]
gst-stats: Fix missing NULL checks
gst-inspect-1.0 segfaults on tracing logs where it fails to find
element stats. So on the pipelines where we get the following WARNING
during execution will afterwards crash with a segfault as the
g_ptr_array has a index for it but it is just a NULL pointer.
WARN default gst-stats.c:444:do_message_stats: no element stats found for ix=X
An example of an pipeline which can reproducibly create a trace log
where this occurs would be this
GST_DEBUG="GST_TRACER:7" GST_TRACERS="stats;rusage;latency" gst-launch-1.0 videotestsrc num-buffers=120 ! autovideosink &> trace.log
gst-stats-1.0 trace.log
Olivier Crête [Mon, 24 Feb 2020 20:24:44 +0000 (15:24 -0500)]
basesink: Improve clarity of latency query maths debug message
Add the equation to the debug message to make it easier for non-GStreamer
experts to understand why their pipeline has latency.
Nirbheek Chauhan [Wed, 26 Feb 2020 11:50:04 +0000 (17:20 +0530)]
tests: Maintain compatibility with GLib 2.48
That's the minimum version of GLib we require right now.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/514
Jan Schmidt [Mon, 24 Feb 2020 17:47:35 +0000 (04:47 +1100)]
clocksync: Add new clocksync element
The clocksync element is a generic element that can be
placed in a pipeline to synchronise passing buffers to the
clock at that point. This is similar to 'identity sync=true',
but because it isn't GstBaseTransform-based, it can process
GstBufferLists without breaking them into separate GstBuffers
Seungha Yang [Wed, 26 Feb 2020 13:29:43 +0000 (22:29 +0900)]
gst-inspect: Add define guard for g_log_writer_supports_color()
g_log_writer_supports_color() was introduced since GLib 2.50.0
which is slightly higher version than our minimum required GLib version.
Nirbheek Chauhan [Tue, 25 Feb 2020 13:43:59 +0000 (19:13 +0530)]
Don't use glib format modifiers with sscanf or printf
We do not have a way to know the format modifiers to use with string
functions provided by the system. `G_GUINT64_FORMAT` and other string
modifiers only work for glib string formatting functions. We cannot
use them for string functions provided by the stdlib. See:
https://developer.gnome.org/glib/stable/glib-Basic-Types.html#glib-Basic-Types.description
F.ex.:
```
../tools/gst-stats.c:921:11: error: too many arguments for format [-Werror=format-extra-args]
printf ("Number of Buffers passed: %" G_GUINT64_FORMAT "\n", num_buffers);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../tools/gst-stats.c:922:11: error: unknown conversion type character 'l' in format [-Werror=format=]
printf ("Number of Events sent: %" G_GUINT64_FORMAT "\n", num_events);
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86_64/include/glib-2.0/glib/gtypes.h:32,
from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86_64/include/glib-2.0/glib/galloca.h:32,
from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86_64/include/glib-2.0/glib.h:30,
from ../gst/gst.h:27,
from ../tools/tools.h:28,
from ../tools/gst-stats.c:30:
/builds/nirbheek/cerbero/cerbero-build/dist/windows_x86_64/lib/glib-2.0/include/glibconfig.h:69:28: note: format string is defined here
#define G_GUINT64_FORMAT "llu"
^
```
and
```
../tests/misc/netclock-replay.c: In function 'main':
../tests/misc/netclock-replay.c:98:23: error: unknown conversion type character 'l' in format [-Werror=format=]
if (sscanf (line, "%" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %"
^~~
In file included from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/include/glib-2.0/glib/gtypes.h:32,
from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/include/glib-2.0/glib/galloca.h:32,
from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/include/glib-2.0/glib.h:30,
from ../tests/misc/../../libs/gst/net/gstntppacket.c:38,
from ../tests/misc/netclock-replay.c:31:
/builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/lib/glib-2.0/include/glibconfig.h:69:28: note: format string is defined here
#define G_GUINT64_FORMAT "llu"
^
```
This is needed for upgrading glib inside Cerbero which builds with
`-Werror` on Windows:
https://gitlab.freedesktop.org/gstreamer/cerbero/merge_requests/419
Tim-Philipp Müller [Wed, 19 Feb 2020 18:49:07 +0000 (18:49 +0000)]
debugutils: skip "parent" property for elements when dumping pipeline graph
Seems unnecessary to print the parent name for every
element in the pipeline graph, it's clear from the
graph what the parent element is and it's hard to
imagine a case where this is useful info rather than
just distracting spam. So far this was only done for
pads, but we should just do it for everything.
Matus Gajdos [Thu, 19 Dec 2019 10:28:13 +0000 (11:28 +0100)]
baseparse: fix memory leak
A buffer to be skipped wasn't unref'd in gst_base_parse_chain().
Fixes #406
Olivier Crête [Mon, 27 Jan 2020 19:46:18 +0000 (14:46 -0500)]
leak tracer: Initialize GValue
Thibault Saunier [Thu, 13 Feb 2020 20:53:29 +0000 (17:53 -0300)]
leaks: Do not trace refs for object we do not follow
When the user sets filters, we should not trace ref counts of object that
are not traced. This optimizes the tracer by potentially avoiding
generating useless backtraces.
Zebediah Figura [Mon, 10 Feb 2020 22:35:06 +0000 (16:35 -0600)]
baseparse: Set the private duration before posting a duration-changed message
Otherwise an application cannot rely on a subsequent call to e.g. gst_pad_query_duration() succeeding.
Sebastian Dröge [Wed, 12 Feb 2020 10:32:05 +0000 (12:32 +0200)]
bus: Make setting/replacing/clearing the sync handler thread-safe
Previously we would use the object lock only for storing the sync
handler and its user_data in a local variable, then unlock it and only
then call the sync handler. Between unlocking and calling the sync
handler it might be unset and the user_data be freed, causing it to be
called with a freed pointer.
To prevent this add a refcounting wrapper struct around the sync
handler, hold the object lock while retrieving it and increasing the
reference count and only actually free it once the reference count
reaches zero.
As a side-effect we can now also allow to actually replace the sync
handler. Previously it was only allowed to clear it after initially
setting it according to the docs, but the code still allowed to clear it
and then set a different one.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/506
Seungha Yang [Thu, 13 Feb 2020 06:38:15 +0000 (15:38 +0900)]
docs: Fix bold markdown syntax for GST_DEBUG_NO_COLOR
Fixing markdown syntax
Henry Wilkes [Mon, 27 Jan 2020 11:58:57 +0000 (11:58 +0000)]
caps: keep ANY caps empty internally
Keep the ANY caps empty internally when appending and merging
caps/structures. Previously, an ANY caps could end up containing
internal structures, which could be fetched by the user, and gave the
caps a non-zero length.
Also, made sure that `gst_caps_set_features_simple` frees the features
if caps is empty.
Henry Wilkes [Tue, 21 Jan 2020 19:02:48 +0000 (19:02 +0000)]
caps: fix is_strictly_equal
Fixed gst_caps_is_strictly_equal() to take into account whether either of
the caps are ANY caps. Previously, two ANY caps could be considered not
strictly equal if one of them still contained some remnant *internal*
structure (this can happen if an ANY caps has emerged from an append or
merge operation). Also, an ANY caps with no remnant internal structures
was considered strictly equal to an EMPTY caps. Similarly, a non-ANY caps
was considered strictly equal to an ANY caps if its remnant internal
structures happened to match.
Also changed gst_caps_is_fixed to take into account that an ANY caps
should not be considered fixed even if it contains a single remnant
internal fixed structure. This affects gst_caps_is_equal(), which uses a
separate method if both caps are fixed. Previously, this meant that a
non-ANY fixed caps was considered equal to an ANY caps if it contained a
single matching remnant internal structure.
Added some tests for these two equality methods, which covers the above
examples, as well as asserts existing behaviour.
Fixes #496
Sebastian Dröge [Mon, 10 Feb 2020 10:58:47 +0000 (12:58 +0200)]
basetransform: Make gst_base_transform_reconfigure() public
This has the same function as the negotiate() functions in various other
base classes and is required to be able to completely re-implement
submit_input_buffer() in subclasses.
Thibault Saunier [Tue, 7 Jan 2020 20:12:54 +0000 (17:12 -0300)]
baseparse: Don't set meaningless buffer dts from segment->start
When we do not have any information about DTSs we shouldn't try to make
them up, moreover after seeking `segment->start` has nothing to do with
the next buffer timing (and is probably after the actual buffer timestamp)
and since, since https://gitlab.freedesktop.org/gstreamer/gstreamer/commit/
fa8312472f08d468677d188d5cf1ad52c5b5b0a0
we do:
```
if (buffer->dts > buffer->dts)
buffer->pts = buffer->dts
```
we end up setting `buffer->pts = segment->start` which is plain
broken and leads to downstream decoder accept the first buffer
as it will be inside the segment (its pts==segment->start) which
basically means accurate seeking behaves mostly the same way as
keyframe seeks.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/492
Olivier Crête [Fri, 27 Dec 2019 17:36:10 +0000 (12:36 -0500)]
systemclock: No need to check for CLOCK_TAI in the meson
POSIX defines CLOCK_MONOTONIC to always be a macro, so I think
it's safe to assume that CLOCK_TAI will also be.
Ederson de Souza [Fri, 13 Dec 2019 19:07:40 +0000 (11:07 -0800)]
GstSystemClock: Add GST_CLOCK_TYPE_TAI
GST_CLOCK_TYPE_TAI is GStreamer abstraction for CLOCK_TAI. Main
motivation for this patch is support for transmission offloading features
- when network packets are timestamped with the time they are deemed to
be actually transmitted. Linux API for that requires that time to be
in CLOCK_TAI coordinate.
With GST_CLOCK_TYPE_TAI, applications can use CLOCK_TAI directly on
their pipelines, avoiding the need to cross timestamp packet times. By
leveraging system's CLOCK_TAI, applications also don't need to keep track
of leap seconds - less burden for them. Just keep system's CLOCK_TAI
accurate and use it.
Sebastian Dröge [Fri, 24 Jan 2020 21:56:32 +0000 (23:56 +0200)]
bin: Don't consider having a group-id or being STREAM_START if we have not a single STREAM_START message
This would cause us to set GST_GROUP_ID_INVALID as group-id in the
aggregated STREAM_START message if there are no sinks at all or none of
them have a STREAM_START message, which is simply wrong.
If we have not a single STREAM_START message then the bin should not be
considered STREAM_START.
Sebastian Dröge [Fri, 24 Jan 2020 15:52:49 +0000 (17:52 +0200)]
event/message: Don't allow setting invalid group ids
They are optional on STREAM_START messages/events but if available
should have at least a valid value.
For STREAM_GROUP_DONE events don't allow creating it with an invalid
group id as this does not make any sense.
Sebastian Dröge [Thu, 23 Jan 2020 17:27:14 +0000 (19:27 +0200)]
aggregator: Initialize source pad segment position to -1 when resetting
This allows start-time selection in gst_aggregator_pad_chain_internal()
to actually work as that code assumes it to be -1 for actually
overriding the value.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/500
Jan Alexander Steffens (heftig) [Thu, 9 Jan 2020 19:07:06 +0000 (20:07 +0100)]
bin: Fix deep-element-removed log message
child and bin were switched.
https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/354
Thibault Saunier [Tue, 3 Sep 2019 21:14:49 +0000 (17:14 -0400)]
docs: Document the new 'redirect-location' error message detail field
Stefan Sauer [Tue, 30 Dec 2014 10:48:26 +0000 (11:48 +0100)]
parse: add support for presets
Add new parse syntax: @preset="<preset-name>" to load presets.
Fixes #86
Mathieu Duponchelle [Thu, 26 Dec 2019 14:08:09 +0000 (15:08 +0100)]
gst-launch: handle ERROR messages in the sync handler
Errors causing the pipeline to fail going from NULL to PAUSED
were not displayed, and the pipeline was not dumped either in
those cases.
In addition, dumping the pipeline from the sync handler means
the dump matches exactly the state of the pipeline at the
moment the error was posted.
Seungha Yang [Sun, 22 Dec 2019 12:13:00 +0000 (21:13 +0900)]
gst-inspect: Increase array size for printing rank name
Now the rank value can be MAX_INT (
2147483647)
Seungha Yang [Thu, 15 Aug 2019 11:56:40 +0000 (20:56 +0900)]
pluginfeature: Allow updating initial rank of plugin feature
Introducing "GST_PLUGIN_FEATURE_RANK" environment variable in order for users
to adjust rank of plugin(s) via environment.
A "feature" and "rank" key-value pair should be separable by ":",
and each key-value pair is recognized per "," delimiters. The rank
can be a numerical value or one of pre-defined rank values
such as "NONE", "MARGINAL", "SECONDARY", and "PRIMARY" in case-insensitive manner.
In addition to pre-defined { NONE, MARGINAL, SECONDARY, PRIMARY },
"MAX" can be passed to key value used to ensure having a higher rank
than other plugin features.
Example)
- GST_PLUGIN_FEATURE_RANK=qtdemux:256,h264parse:NONE
Set rank of qtdemux plugin to 256 (primary) and 0 (none) for h264parse.
Nirbheek Chauhan [Thu, 29 Aug 2019 18:53:09 +0000 (00:23 +0530)]
gstinfo: Add new API for getting debug log lines
If you're using a custom log handler, you had to reverse-engineer the
debug log format and create your own format function. Now, you can
call `gst_debug_log_get_line()` and it will return a string (without
ANSI escape color codes) representation instead.
This is useful in situations when you need to log the ordinary
gst_debug log to a resource that can't be opened as a `FILE` handle.
Also includes a test.
Mathieu Duponchelle [Fri, 20 Dec 2019 13:01:02 +0000 (14:01 +0100)]
tests: remove system-dependent tests
We now have GstTestClock-based tests that validate the same logic,
without inducing spurious timing failures / overly relying on sleeps.
Fixes: #346
Fixes: #347
Fixes: #348
Co-authored by: Thibault Saunier <tsaunier@igalia.com>
Thibault Saunier [Fri, 20 Dec 2019 13:53:21 +0000 (10:53 -0300)]
tests-clock: Fix race in test_late_crank
There was a case where we started waiting on the clock before setting
the clock time, leading to the wait succeeding instead of being late:
gsttestclock.c:1073:F:testclock:test_late_crank:0: '1 * GST_SECOND' (
1000000000) is not equal to 'context.jitter' (-
4000000000)
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/426
Co-authored by: Mathieu Duponchelle <mathieu@centricular.com>
Niels De Graef [Fri, 15 Nov 2019 14:49:32 +0000 (15:49 +0100)]
bin: Add method to find elements by factory name
A common use case of a dynamically built pipeline is that you want to
(conditionally) find a certain element, e.g. the `rtpbin`s in a
`uridecodebin`. If that element has a fixed name inside its parent bin
(and only has a single instance) this can be easily done by
`gst_bin_get_by_name()`.
If there are multiple instances of the element however, you can only use
`gst_bin_iterate_all_by_interface()`, but this doesn't work if you don't
have the specific `GType` (which is often the case, due to plugins being
dynamically loaded). As such, another fallback could be to use the
well-known name of the element's factory (in case of our example, this
is of course `"rtpbin"`).
Stéphane Cerveau [Wed, 18 Dec 2019 14:57:35 +0000 (15:57 +0100)]
gstreamer: use of g_value_dup_string
Use helper method to get string from GValue.
Mathieu Duponchelle [Fri, 13 Dec 2019 17:21:32 +0000 (18:21 +0100)]
tests: fix pipelines_parse_launch.delayed_link flakiness
Fixes #345
There were two causes for the flakiness, one much rarer than
the other.
The test sets up a source with a sometimes pad added during
the transition of a wrapper bin from READY to PAUSED.
It runs 4 iterations, the last of which makes it so the
negotiation fails.
In that case, the intention as correctly presented by the following
comment:
/* [..] ie, the pipeline should create ok but fail to change state */
However the implementation of run_delayed_test was neither calling
get_state on the pipeline (it called it on the wrapper bin), nor
checking that the return of get_state was FAILURE (it actually
checked that it was not).
This led to an obvious race condition, and was fixed by calling
get_state on the pipeline, then checking that in this specific
case (expect_link == FALSE), the state change has actually failed.
The second, rarer race condition is at set_state time. When we
don't expect the link to succeed, the return of set_state may
either be FAILURE or ASYNC, depending on timing. This was fixed
by taking expect_link into account when checking the return value
of set_state.
Co-authored by: Thibault Saunier <tsaunier@igalia.com>
Peter Seiderer [Thu, 12 Dec 2019 10:39:56 +0000 (11:39 +0100)]
pluginloader: handle fsync interrupted by signal (EINTR)
According to [1] EINTR is a possible errno for fsync(),
so handle it as all other EINTR (do/while(errno == EINTR)).
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Peter Seiderer [Thu, 12 Dec 2019 10:37:56 +0000 (11:37 +0100)]
registry: handle fsync interrupted by signal (EINTR)
According to [1] EINTR is a possible errno for fsync(),
so handle it as all other EINTR (do/while(errno == EINTR)).
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Peter Seiderer [Thu, 12 Dec 2019 10:07:07 +0000 (11:07 +0100)]
filesink: handle fsync interrupted by signal (EINTR)
According to [1] EINTR is a possible errno for fsync() and it happens in
reality on linux (video writing via splitmuxsink with robust muxing enabled
on a cifs mounted network share), so handle it as all other EINTR
(do/while(errno == EINTR)).
Fixes:
GError.message: Error while writing to file "vidoe_001.mp4". GError.domain: 2372 GError.code: 10 from: FileSink debug: gstfilesink.c(849): gst_file_sink_render (): /GstPipeline:Pipeline/GstSplitMuxSink:SplitMuxSink/GstBin:QueueBin/GstFileSink:FileSink: Interrupted system call
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Olivier Crête [Tue, 10 Dec 2019 22:06:02 +0000 (17:06 -0500)]
Remove deprecated GTimeVal
GTimeVal won't work past 2038
Mathieu Duponchelle [Tue, 10 Dec 2019 12:31:50 +0000 (13:31 +0100)]
device, elementfactory: relax floating requirement
Using g_assert() is a bit too extreme, as it will abort the whole
program unless G_DISABLE_ASSERTS is true.
Switch to g_critical()
Mathieu Duponchelle [Tue, 10 Dec 2019 08:42:37 +0000 (09:42 +0100)]
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.
Mathieu Duponchelle [Fri, 6 Dec 2019 10:40:44 +0000 (11:40 +0100)]
aggregator: fix logging in new update_segment API
Mathieu Duponchelle [Thu, 5 Dec 2019 12:44:33 +0000 (13:44 +0100)]
aggregator: add method to update srcpad segment
Sebastian Dröge [Thu, 5 Dec 2019 07:54:32 +0000 (09:54 +0200)]
bus: Clean up #ifdefs to compile with debugging enabled in all combinations
Thanks to Roland Jon for finding this.
Mathieu Duponchelle [Wed, 4 Dec 2019 19:12:02 +0000 (20:12 +0100)]
device, elementfactory: don't enforce floating status
The reference we receive when calling g_object_new should be
floating, but we can't force it at our level.
Switch from g_object_force_floating() to a simple assertion.
See https://gitlab.freedesktop.org/gstreamer/gst-python/issues/27
Tulio Beloqui [Wed, 19 Jun 2019 11:45:54 +0000 (13:45 +0200)]
testclock: added single clock id process function
Co-authored-by: Havard Graff <hgr@pexip.com>
Sebastian Dröge [Mon, 21 Oct 2019 14:56:14 +0000 (17:56 +0300)]
bus: Use new GSource dispose function
Without this it is possible that we have a GSource with reference count
0 stored in the GstBus that is currently in the process of being
destroyed. gst_bus_remove_watch() might then access it, increase its
reference count to 1 again, call GSource API on it and then unref it,
which will then finalize it a second time.
The dispose function allows the GSource to be resurrected until it
returned so the above would be safe now.
This caused some spurious crashes during shutdown in various
applications.
Xavier Claessens [Tue, 3 Dec 2019 20:40:59 +0000 (15:40 -0500)]
Meson: Add 'coretracers' feature option
This was the only plugin still built when using
-Dauto_features=disabled, besides coreelements.
Håvard Graff [Tue, 3 Dec 2019 11:23:01 +0000 (11:23 +0000)]
gstharness: don't push the event to the queue before processing
The application might pull and unref it by the time the code gets
around to check it for EOS.
Vivia Nikolaidou [Thu, 28 Nov 2019 11:09:45 +0000 (13:09 +0200)]
baseparse: Don't copy invalid DTS to the PTS
We were checking to make sure the buffer's DTS wouldn't be after its
PTS. However, the check would also trigger when DTS is NONE, which is
e.g. in the case of some broken cameras.
Fixes #470
Edward Hervey [Wed, 27 Nov 2019 14:47:32 +0000 (15:47 +0100)]
tracers: Don't leak temporary GstStructure
CID: 1455462
Edward Hervey [Wed, 21 Nov 2018 15:14:58 +0000 (16:14 +0100)]
GstBuffer: size-related optimization
Avoid calling generic function when it's possible to directly
return/get sizes
Edward Hervey [Wed, 21 Nov 2018 15:13:48 +0000 (16:13 +0100)]
GstBuffer: Inline fast-path for merged memory
Tim-Philipp Müller [Wed, 27 Nov 2019 09:41:36 +0000 (09:41 +0000)]
docs: mention gst_parse_bin_from_description() in gst_parse_launch() docs
Linus Svensson [Fri, 22 Nov 2019 15:04:20 +0000 (16:04 +0100)]
datetime: Add constructor for timestamps in microseconds
Vivia Nikolaidou [Fri, 11 Oct 2019 14:33:42 +0000 (17:33 +0300)]
baseparse: Make sure PTS >= DTS
If, for example, we are accumulating rounding errors from the buffer
duration when calculating the PTS/DTS, it can happen that the buffer
thinks it should be presented before it's decoded. In that case we just
clamp the DTS.
Stéphane Cerveau [Mon, 18 Nov 2019 00:15:31 +0000 (00:15 +0000)]
gstbuffer: update documentation
remove unclear documentation about GST_BUFFER_FLAG_MARKER
Seungha Yang [Tue, 12 Nov 2019 02:24:45 +0000 (11:24 +0900)]
gst-launch: Disable printing current position by default when stdout is not a tty
... and add new option to force-enable printing position even if stdout
is not a tty.
Havard Graff [Sun, 3 Nov 2019 11:55:13 +0000 (12:55 +0100)]
structure: add gst_structure_take
(╯°□°)╯︵ ┻━┻
Tulio Beloqui [Tue, 20 Aug 2019 11:57:09 +0000 (13:57 +0200)]
harness: fixed race condition on forward pad while forwarding sticky events to sink harness
Co-authored-by: Camilo Celis <camilo@pexip.com>
Co-authored-by: Havard Graff <hgr@pexip.com>
Thibault Saunier [Tue, 12 Nov 2019 22:15:34 +0000 (19:15 -0300)]
hotdoc: Add missing json escaping
Fixes https://gitlab.freedesktop.org/gstreamer/gst-docs/issues/50
Wonchul Lee [Tue, 12 Nov 2019 06:19:28 +0000 (15:19 +0900)]
event: Fix gir warning
It fixes below gir warnings.
../subprojects/gstreamer/gst/gstevent.c:2246: Warning: Gst:
gst_event_new_instant_rate_sync_time: unknown parameter
'rate_multiplier' in documentation comment, should be 'rate'
../subprojects/gstreamer/gst/gstevent.c:2296: Warning: Gst:
gst_event_parse_instant_rate_sync_time: unknown parameter
'rate_multiplier' in documentation comment, should be 'rate'
Víctor Manuel Jáquez Leal [Mon, 26 Aug 2019 10:48:28 +0000 (12:48 +0200)]
gst/parse: define pure-parser depending on bison version
After release bison 2.5 the declaration %pure-parser was deprecated
in favor of %define api.pure
Nonetheless, until bison 3.4, the declaration was treated as backward
compatibility, but now bison shows a warning:
warning: deprecated directive, use ‘%define api.pure’
The patch's approach is to handle both directives according with the
used bison's version, by string replacement at source configuration
stage.
Nayana Topolsky [Thu, 21 Feb 2019 12:29:31 +0000 (13:29 +0100)]
pad: clear sticky event tag upon stream-start
When playing gapless there were situations when some sticky events
like tags were stuck at some pad and then revived much later.
Therefore it is better to clear them upon stream-start.
Fixes #360
Seungha Yang [Thu, 30 May 2019 13:29:23 +0000 (22:29 +0900)]
taglist: Fix broken empty set character in code
Previous one was not a valid ASCII empty set character.
'tig' and 'git log -p' couldn't represent it as expected.
Seungha Yang [Thu, 30 May 2019 11:53:34 +0000 (20:53 +0900)]
gst-launch: Add support printing current position of pipeline
By default, gst-launch will print the current position of pipeline (with duration if available).
To disable it, use "--no-position" option.
Seungha Yang [Wed, 29 May 2019 11:22:54 +0000 (20:22 +0900)]
gst-launch: Port to the direct use of GMainLoop
... instead of custom event loop.
This can make it easy to use GMainLoop related APIs in code.
Seungha Yang [Wed, 29 May 2019 11:24:06 +0000 (20:24 +0900)]
gst-launch: Remove meaningless global variable
Jan Schmidt [Thu, 7 Feb 2019 12:59:51 +0000 (23:59 +1100)]
pipeline: Instant rate change handling
Implement aggregation of INSTANT_RATE_REQUEST messages and sending of
INSTANT_RATE_SYNC_TIME events.
Sebastian Dröge [Tue, 15 May 2018 15:42:25 +0000 (18:42 +0300)]
basesink: Add support for instant-rate-change events
Post instant-rate-request message when receiving an instant-rate-change
event, and handle the incoming instant-rate-sync-time events from the
pipeline.
Sebastian Dröge [Mon, 14 May 2018 20:14:24 +0000 (23:14 +0300)]
event/message: Add new instant-rate-sync-time event and instant-rate-request message
Sebastian Dröge [Wed, 9 May 2018 12:28:13 +0000 (15:28 +0300)]
event: Add new GST_EVENT_INSTANT_RATE_CHANGE and GST_SEEK_FLAGS_INSTANT_RATE_CHANGE
A seek with that flag set must be non-flushing, not change the playback
direction and start/stop position. A seek handler will then send the new
GST_EVENT_INSTANT_RATE_CHANGE event downstream for downstream elements
to immediately apply the new playback rate before the new in-band segment
event arrives.
Víctor Manuel Jáquez Leal [Sat, 2 Nov 2019 14:06:28 +0000 (15:06 +0100)]
elementfactory: add GST_ELEMENT_FACTORY_TYPE_HARDWARE
This new symbol matches with the elements within "Hardware" class.
Niels De Graef [Thu, 31 Oct 2019 10:06:48 +0000 (11:06 +0100)]
queue2: Use g_object_notify_by_pspec
`g_object_notify()` actually takes a global lock to look up the
`GParamSpec` that corresponds to the given property name. It's not a
huge performance hit, but it's easily avoidable by using the
`_by_pspec()` variant.
Sebastian Dröge [Thu, 24 Oct 2019 22:41:27 +0000 (01:41 +0300)]
tee: First deactivate the pad and then remove it when releasing pads
This reverts
a96002bb28c21b30fb9338a4620ad20504c70aa5, which is not
necessary anymore. If we release the pad after removing it then none of
the deactivation code will actually be called because the pad has no
parent anymore, and we require a parent on the pad for deactivation to
happen.
This can then, among other things, cause a streaming thread to be still
stuck in a pad probe because the pad was never flushed, and waiting
there forever because now the pad will actually never be flushed anymore.
Sebastian Dröge [Thu, 24 Oct 2019 22:39:50 +0000 (01:39 +0300)]
tee: Check for the removed pad flag also in the slow pushing path
If a pad is currently being released we don't want to forward the
FLUSHING flow return but instead consider it as NOT_LINKED. FLUSHING
would also cause upstream to be FLUSHING.
This part was missed in
a3c4a3201a705eb1934ceeea34d1ca42d4571c07 and
resulted in a different (and wrong) workaround in
a96002bb28c21b30fb9338a4620ad20504c70aa5.
Sebastian Dröge [Thu, 24 Oct 2019 22:39:05 +0000 (01:39 +0300)]
tee: Lock mutex before reading the removed flag of the pads
Otherwise we're not guaranteed to read the very latest value that
another thread might've written in there when the pad was released, and
could instead work with an old value.
Sebastian Dröge [Mon, 30 Sep 2019 08:34:51 +0000 (11:34 +0300)]
bin: Drop need-context messages without source instead of crashing
Tim-Philipp Müller [Thu, 17 Oct 2019 11:13:35 +0000 (12:13 +0100)]
meson: build gir even when cross-compiling if introspection was enabled explicitly
This can be made to work in certain circumstances when
cross-compiling, so default to not building g-i stuff
when cross-compiling, but allow it if introspection was
enabled explicitly via -Dintrospection=enabled.
Fixes #454 and #381.
Tim-Philipp Müller [Sun, 9 Jun 2019 00:34:04 +0000 (01:34 +0100)]
Remove autotools build system
Edward Hervey [Thu, 10 Oct 2019 13:53:16 +0000 (15:53 +0200)]
core: Avoid usage of deprecated API
GTimeval and related functions are now deprecated in glib.
Replacement APIs have been present since 2.26
Xavier Claessens [Mon, 23 Sep 2019 15:19:07 +0000 (11:19 -0400)]
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.
Xavier Claessens [Tue, 24 Sep 2019 14:09:08 +0000 (10:09 -0400)]
dataurisrc: Do not include trailing `\0` into buffer
Xavier Claessens [Tue, 24 Sep 2019 14:06:51 +0000 (10:06 -0400)]
harness: Add gst_harness_pull_until_eos()
Aaron Boxer [Sun, 6 Oct 2019 15:12:11 +0000 (11:12 -0400)]
documentation: fix a number of typos
Jordan Petridis [Fri, 4 Oct 2019 17:01:46 +0000 (20:01 +0300)]
gstdirectcontrolbinding: Fix integer comparison
i is declared as gint but then compared against `n_values` guint
in the for loop below.
Sebastian Dröge [Mon, 30 Sep 2019 08:49:35 +0000 (11:49 +0300)]
gst: Don't pass miniobjects to GST_DEBUG_OBJECT() and similar macros
The argument must be at least a GObject according to the GstLogFunction
definition, and while the default C log function handles miniobjects
just fine this is crashing bindings and user-supplied log functions that
(rightfully) don't expect anything but GObjects.
Mathieu Duponchelle [Sat, 7 Sep 2019 02:36:18 +0000 (04:36 +0200)]
gstvalue: use value_nick for serialization
not value_name . This was causing incorrect launch lines to be
displayed by gst-device-monitor, and the deserialization code
below works with nicks.
Mathieu Duponchelle [Mon, 9 Sep 2019 22:28:45 +0000 (00:28 +0200)]
deviceprovider: set the bus to non-flushing before calling klass->start
Not posting DEVICE_ADDED messages while a device provider is being
started makes things awkward for applications, as they have to call
get_devices() after starting the monitor.
This requires redundant code on the application side, and as far as
I understand also could cause race conditions, when a device gets
added between the calls to gst_device_monitor_start() and
gst_device_monitor_get_devices(), causing the application to "see"
the same device twice.
Sebastian Dröge [Thu, 12 Sep 2019 07:09:18 +0000 (10:09 +0300)]
element: Enforce that elements created by gst_element_factory_create/make() are floating
Bindings might have a hard time making sure that the reference is indeed
still floating after returning here.
See https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/444