platform/upstream/gstreamer.git
3 years agomeson: gtk_doc is not supported anymore
Jose Quaresma [Tue, 1 Dec 2020 19:17:05 +0000 (19:17 +0000)]
meson: gtk_doc is not supported anymore

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/710>

3 years agostreams: gst_stream_type_get_name() is not nullable
Sebastian Dröge [Wed, 2 Dec 2020 07:22:35 +0000 (09:22 +0200)]
streams: gst_stream_type_get_name() is not nullable

It takes an enum and only the defined values are valid to pass in here
as it's not extensible from the outside.

Add a g_return_val_if_reached() for the unreachable case and return
"invalid".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/711>

3 years agoinfo: Warn if logging with a non-GObject object if GST_ENABLE_EXTRA_CHECKS is enabled
Sebastian Dröge [Wed, 2 Dec 2020 07:35:26 +0000 (09:35 +0200)]
info: Warn if logging with a non-GObject object if GST_ENABLE_EXTRA_CHECKS is enabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/712>

3 years agotaskpool: fix docs warnings
Tim-Philipp Müller [Fri, 20 Nov 2020 14:55:17 +0000 (14:55 +0000)]
taskpool: fix docs warnings

gsttaskpool.c:507: Warning: Gst: gst_shared_task_pool_get_max_threads: unknown parameter 'max_threads' in documentation comment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/703>

3 years agotypefind: copy seqnum to new segment event
Jonathan Matthew [Tue, 10 Nov 2020 11:39:13 +0000 (21:39 +1000)]
typefind: copy seqnum to new segment event

Fixes: #635
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/700>

3 years agosystemclock: Use clock_nanosleep for higher accuracy
Edward Hervey [Fri, 30 Oct 2020 15:58:52 +0000 (16:58 +0100)]
systemclock: Use clock_nanosleep for higher accuracy

The various wait implementation have a latency ranging from 50 to 500+
microseconds. While this is not a major issue when dealing with a low number of
waits per second (for ex: video), it does introduce a non-negligeable jitter for
synchronization of higher packet rate systems.

The `clock_nanosleep` syscall does offer a lower-latency waiting system but is
unfortunately blocking, so we don't want to use it in all scenarios nor for too
long.

This patch makes GstSystemClock use clock_nanosleep (if available) as such:
* Any wait below 500us uses it
* Any wait below 2ms will first use the regular waiting system and then
  clock_nanosleep

  # modified:   gst/gstsystemclock.c

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/688>

3 years agotaskpool: expose new "shared" task pool implementation
Mathieu Duponchelle [Tue, 3 Nov 2020 01:43:26 +0000 (02:43 +0100)]
taskpool: expose new "shared" task pool implementation

While the default implementation will spawn a thread per new
pushed task, this new implementation instead spawns a maximum
number of threads, then queues new tasks on existing threads.

The thread that the new task will be queued on is picked in
a pretty naive fashion, by simply popping the first thread
from a queue and pushing it back to the tail, but this is
an implementation detail and can always be sophisticated
in the future if the need arises.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>

3 years agotaskpool: expose dispose_handle() API
Mathieu Duponchelle [Tue, 3 Nov 2020 01:41:31 +0000 (02:41 +0100)]
taskpool: expose dispose_handle() API

This is useful when the subclass does return a non-NULL pointer
in push(), and the user doesn't want to call join()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>

3 years agotaskpool: improve join() documentation
Mathieu Duponchelle [Tue, 3 Nov 2020 01:39:37 +0000 (02:39 +0100)]
taskpool: improve join() documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>

3 years agotaskpool: modify transfer annotations for push() and join()
Mathieu Duponchelle [Tue, 3 Nov 2020 01:33:32 +0000 (02:33 +0100)]
taskpool: modify transfer annotations for push() and join()

While the default implementation passes NULL around as the
task handle, other implementations can only provide a safe
API by having that handle map to a refcounted opaque type.

While what's passed around is a gpointer, a valid transfer
type annotation has informative value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>

3 years agoAdd some missing nullable annotations
Sebastian Dröge [Sat, 17 Oct 2020 09:34:20 +0000 (12:34 +0300)]
Add some missing nullable annotations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/678>

3 years agomeson: Enable some MSVC warnings for parity with GCC/Clang
Nirbheek Chauhan [Wed, 4 Nov 2020 13:07:32 +0000 (18:37 +0530)]
meson: Enable some MSVC warnings for parity with GCC/Clang

This makes it easier to do development with MSVC by making it warn
on common issues that GCC/Clang error out for in our CI configuration.

Continuation from https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/223

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/698>

3 years agoidentity/clocksync: Also provide system clock if sync=false
Bing Song [Mon, 2 Nov 2020 09:43:42 +0000 (17:43 +0800)]
identity/clocksync: Also provide system clock if sync=false

identity should provide when sync=true. Don't provide when sync=false.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/690>

3 years agoqueue2: Fix modes in scheduling query handling
Jonathan Matthew [Tue, 3 Nov 2020 12:39:54 +0000 (22:39 +1000)]
queue2: Fix modes in scheduling query handling

Create a new query to send upstream and copy the flags across from it,
rather than reusing the same query, as this allows us to prevent use
of pull mode when we don't have a download file.

Fixes: #629
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/693>

3 years agogst_private.h: increse padding in struct _GstClockEntryImpl
Khem Raj [Wed, 4 Nov 2020 06:58:26 +0000 (22:58 -0800)]
gst_private.h: increse padding in struct _GstClockEntryImpl

When compiling for 32bit architectures with 64bit time_t e.g. riscv32,
the static assert that the GstClockEntryImpl smaller or
equal to the struct _GstClockEntryImpl triggered.
(they were 12bytes off).

To fix this, the padding is increased by 8 bytes (on 32bit).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/694>

3 years agogstinfo: colorize PIDs in log messages
Chris White [Sat, 31 Oct 2020 19:10:23 +0000 (15:10 -0400)]
gstinfo: colorize PIDs in log messages

The PIDs on log lines were supposed to be colorized before, but the
escape sequence was incorrect.  With this change, the code uses the
correct sequence to colorize those PIDs.  E.g., instead of `\033[334m`
(incorrect), use `\033[34m` (correct).

This makes the log messages easier to read.  It also reduces the chance
that a buggy terminal will choke on the invalid escape sequence.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/624

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/689>

3 years agoharness: Handle element not being set cleanly.
Jan Schmidt [Fri, 30 Oct 2020 12:46:07 +0000 (23:46 +1100)]
harness: Handle element not being set cleanly.

If a harness is created with gst_harness_new_empty(), there
might not be an internal element to unref on cleanup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/686>

3 years agobin: When removing a sink, check if the EOS status changed.
Jan Schmidt [Thu, 29 Oct 2020 13:45:42 +0000 (00:45 +1100)]
bin: When removing a sink, check if the EOS status changed.

Removing a sink that hasn't posted EOS might change the bin itself
to EOS if it's the last remaining non-EOSed sink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/683>

3 years agobaseparse: always use incoming DTS
Mathieu Duponchelle [Mon, 26 Oct 2020 22:17:59 +0000 (23:17 +0100)]
baseparse: always use incoming DTS

When parsing interlaced video streams, ignoring incoming DTS could
cause the parser to end up with PTS < DTS output buffers, for example
when increasing next_dts using the duration of the last pushed
buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/681>

3 years agodevicemonitor: Stop only the already started providers
Philippe Normand [Wed, 21 Oct 2020 08:43:43 +0000 (09:43 +0100)]
devicemonitor: Stop only the already started providers

If a device provider fails to start (for instance the pulseaudio provider unable
to connect to the PulseAudio daemon) then the monitor should not keep track of
it in its `started` providers list. Otherwise a false positive critical warning
would be raised.

This patch also switches the started_count type from bool to int, for
consistency. This is a counter, after all.

API: gst_device_provider_is_started
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/679>

3 years agofilesrc: Use *Ex Win32 method for UWP
Seungha Yang [Wed, 21 Oct 2020 08:24:01 +0000 (17:24 +0900)]
filesrc: Use *Ex Win32 method for UWP

non-*Ex methods are not allowed for UWP

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/610>

3 years agofilesrc: Don't use fstat() on Windows but use specific Windows APIs
Sebastian Dröge [Wed, 2 Sep 2020 14:01:42 +0000 (17:01 +0300)]
filesrc: Don't use fstat() on Windows but use specific Windows APIs

fstat() fails on Windows in various situations if the file metadata has
invalid values, and we only care about getting attributes and the file
size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/610>

3 years agofilesrc: Remove unused #define on Windows
Sebastian Dröge [Wed, 2 Sep 2020 14:01:35 +0000 (17:01 +0300)]
filesrc: Remove unused #define on Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/610>

3 years agopkgconfig: Fix missing libcheck dependencies in gstreamer-check-1.0
Xavier Claessens [Fri, 16 Oct 2020 14:22:04 +0000 (10:22 -0400)]
pkgconfig: Fix missing libcheck dependencies in gstreamer-check-1.0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/676>

3 years agoaggregator: Include min-upstream-latency in buffering time
Nicolas Dufresne [Fri, 16 Oct 2020 14:39:08 +0000 (10:39 -0400)]
aggregator: Include min-upstream-latency in buffering time

While we can fixe the upstream latency using the min-upstream-latency, we
are now forced to use queues (hence more thread) in order to store the pending
data whenever we have an upstream source that has lower latency.

This fixes the issue by allowing to buffer the fixed upstream latency. This is
particularly handy on single core systems were having too many threads can
cause serious performance issues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/677>

3 years agoidentity: Add a stats property
Olivier Crête [Fri, 8 Sep 2017 23:59:27 +0000 (19:59 -0400)]
identity: Add a stats property

This is inspired by the stats on rtpjitterbuffer, it's useful
to be able to get some simple stats out of the pipeline without having
to write yet another pad probe.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/615>

3 years agomeson: update glib minimum version to 2.56
Stéphane Cerveau [Wed, 3 Jul 2019 07:29:26 +0000 (09:29 +0200)]
meson: update glib minimum version to 2.56

In order to support the symbol g_enum_to_string in various
project using GStreamer ( gst-validate etc.), the glib minimum
version should be 2.56.0.

Remove compat code as glib requirement
is now > 2.56

Version used by Ubuntu 18.04 LTS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/199>

3 years agogstvalue: don't write to const char *
Mathieu Duponchelle [Mon, 12 Oct 2020 23:19:47 +0000 (01:19 +0200)]
gstvalue: don't write to const char *

Our various deserializing functions require NULL terminators
to not over consume substrings (eg fields of an array). Instead
of writing a NULL terminator to the passed-in string, which may
result in segfaults, make a copy of the substring we're interested
in.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/672>

3 years agoMeson: Use pkg-config generator
Xavier Claessens [Sat, 27 Oct 2018 17:01:02 +0000 (13:01 -0400)]
Meson: Use pkg-config generator

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4>

3 years agomeson: Disallow DbgHelp for UWP build
Seungha Yang [Fri, 9 Oct 2020 15:53:42 +0000 (00:53 +0900)]
meson: Disallow DbgHelp for UWP build

Most symbols in DbgHelp.h are not allowed for UWP

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/665>

3 years agoRemove unused valgrind detection
Tim-Philipp Müller [Fri, 14 Aug 2020 15:38:26 +0000 (16:38 +0100)]
Remove unused valgrind detection

Having this just to log a debug message in case we're
running inside valgrind doesn't seem very useful, and
the code that used to use this no longer exists it seems.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595>

3 years agoinfo: Fix build on Windows ARM64 device
Seungha Yang [Tue, 6 Oct 2020 18:49:33 +0000 (03:49 +0900)]
info: Fix build on Windows ARM64 device

gstinfo.c(3086): error C2094: label 'done' was undefined

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/662>

3 years agobuild: use cpu_family for arch checks
Matthew Waters [Fri, 9 Oct 2020 01:13:15 +0000 (12:13 +1100)]
build: use cpu_family for arch checks

e.g. on 32-bit arm, we may have armv6, armv7l, armv7hf, etc which all
generally have the same layouts.  cpu_family() groups all of these into
just 'arm' that the ABI check table is expecting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/664>

3 years agobasetransform: Fix in/outbuf confusion of _default_transform_meta
Jan Alexander Steffens (heftig) [Thu, 8 Oct 2020 11:37:41 +0000 (13:37 +0200)]
basetransform: Fix in/outbuf confusion of _default_transform_meta

The default implementation doesn't actually use its buffer parameters,
but this error might have been the cause of some actual confusion in
the plugins code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/663>

3 years agogst_init: Call gst_init_static_plugins() when available
Xavier Claessens [Sat, 5 Sep 2020 00:47:18 +0000 (20:47 -0400)]
gst_init: Call gst_init_static_plugins() when available

When doing a static build, gstreamer-full-1.0 defines that symbol to
register static plugins. Cerbero's Android build will be updated to
implement that symbol too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/641>

3 years agogstvalue: expose gst_value_deserialize_with_pspec()
Mathieu Duponchelle [Thu, 17 Sep 2020 18:44:43 +0000 (20:44 +0200)]
gstvalue: expose gst_value_deserialize_with_pspec()

Typing hints can only be passed to gst_value_deserialize()
through the type of the passed-in value. This means deserialization
can only target the desired type for the top-level elements,
making it for example impossible to deserialize an array of
flags to the expected type.

This commit exposes a new function, gst_value_deserialize_full(),
that takes an optional pspec as the extra parameter, and updates
the deserialization code to pass around that pspec, or the
element_spec when recursively parsing the elements of a list-type
value.

This allows for example passing arrays of flags through the
command line or gst_util_set_object_arg, eg:

foo="<bar,bar+baz>"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/629>

3 years agoinfo: Load DbgHelp.dll using g_module_open()
Seungha Yang [Tue, 15 Sep 2020 12:07:27 +0000 (21:07 +0900)]
info: Load DbgHelp.dll using g_module_open()

... and update meson file so that enable it only using required headers.

"dependency(...)" is unlikely successful for Windows SDK libraries
since it doesn't ship pkg-config file. So it needs to be changed
to "find_library()" to link corresponding .lib file. That would
result to most MSVC build system will link dbghelp.dll. However,
one drawback of the change is that gstreamer-1.0.dll will mandate
dbghelp.dll although it should be optional. So g_module_open() way
can be the most safe way in this case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/626>

3 years agopadtemplate: mark documentation caps as may be leaked
Matthew Waters [Wed, 30 Sep 2020 01:56:40 +0000 (11:56 +1000)]
padtemplate: mark documentation caps as may be leaked

The template itself is already marked as such and the caps, the
documentation caps are a logical extension of those two.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/650>

3 years agopadtemplate: add missing annotation
Víctor Manuel Jáquez Leal [Sat, 26 Sep 2020 07:11:40 +0000 (09:11 +0200)]
padtemplate: add missing annotation

Adds missing "transfer full" annotation for caps parameter in
gst_pad_template_set_documentation_caps()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/648>

3 years agomemory: fix documentation to display in html
Víctor Manuel Jáquez Leal [Sat, 26 Sep 2020 07:09:48 +0000 (09:09 +0200)]
memory: fix documentation to display in html

Commit e9c99c05 added a deprecation message, but this message is not
displayed in the html page since the format was not correct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/648>

3 years agometa: expose API to register and create custom meta
Mathieu Duponchelle [Tue, 1 Sep 2020 21:03:18 +0000 (23:03 +0200)]
meta: expose API to register and create custom meta

Custom meta is backed by a GstStructure, and does not require
that users of the API expose their GstMeta implementation as
public API for other components to make use of it.

In addition, it provides a simpler interface by ignoring the
impl vs. api distinction that the regular API exposes.

This new API is meant to be the meta counterpart to custom events
and messages, and to be more convenient than the lower-level API
when the absolute best performance isn't a requirement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/609>

3 years agomemory: Deprecate GST_MEMORY_FLAG_NO_SHARE
Olivier Crête [Tue, 11 Jul 2017 22:54:05 +0000 (18:54 -0400)]
memory: Deprecate GST_MEMORY_FLAG_NO_SHARE

This flag always causes problems as it prevents subbuffering,
instead one should create a custom GstAllocator to pool the GstMemory objects
and not rely on the lifetime of the GstBuffer object they were originally
attached to.

https://bugzilla.gnome.org/show_bug.cgi?id=757254

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/614>

3 years agogstmeta: intern registered impl string
Mathieu Duponchelle [Wed, 16 Sep 2020 00:16:52 +0000 (02:16 +0200)]
gstmeta: intern registered impl string

Subsequent lookups in the hashtable are probably better done
on memory we're confident is allocated to us :)

It was easy to trigger invalid reads by calling gst_meta_register
with dynamically allocated memory, freeing that memory, then
calling gst_meta_get_info()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/628>

3 years agodeviceprovider: Returns non-floating devices from gst_device_provider_probe
Olivier Crête [Mon, 6 Jul 2020 18:55:38 +0000 (14:55 -0400)]
deviceprovider: Returns non-floating devices from gst_device_provider_probe

This should make the API usage more consistent. Also document that the subclasses
should just return the devices as floating.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/558>

3 years agoaggregator: don't fail all sink pads when a caps event fails negotiation
Matthew Waters [Fri, 31 Jul 2020 06:02:03 +0000 (16:02 +1000)]
aggregator: don't fail all sink pads when a caps event fails negotiation

If one pad returns not-negotiated from a caps event, then all other sink
pads were returning not-negotiated.

In our case, we can't reliably easily fail at all so just remove that
code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/623>

3 years agobaseparse: prefer upstream caps rather than overriding
Matthew Waters [Thu, 30 Jul 2020 15:10:27 +0000 (01:10 +1000)]
baseparse: prefer upstream caps rather than overriding

e.g. h264parse ! video/x-h264,stream-format=avc receives the following:
- caps: video/x-raw,stream-format=byte-stream
- gap event: baseparse tries to choose some default caps but would
  override the downstream chosen caps field with upstreams value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/581>

3 years agoaggregator: Hold SRC_LOCK while unblocking via SRC_BROADCAST()
Sebastian Dröge [Fri, 18 Sep 2020 06:59:03 +0000 (09:59 +0300)]
aggregator: Hold SRC_LOCK while unblocking via SRC_BROADCAST()

Otherwise the clock id we access might not be a valid pointer anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/630>

3 years agotests: leaks: Allow null tracer string if there's no available stack trace
Seungha Yang [Mon, 14 Sep 2020 21:35:34 +0000 (06:35 +0900)]
tests: leaks: Allow null tracer string if there's no available stack trace

In case that no available stack tracer, leak tracer will set
null string value for `trace` field. I would likely happen
on Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/625>

3 years agotests: element: Don't run too many loop
Seungha Yang [Mon, 14 Sep 2020 19:24:20 +0000 (04:24 +0900)]
tests: element: Don't run too many loop

g_thread_yield() doesn't ensure thread switching actually.
It would result to adding so many pads. Depending on system,
timeout might happen then.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/625>

3 years agotests: seek: Don't use too strict timeout for validation
Seungha Yang [Mon, 14 Sep 2020 15:54:58 +0000 (00:54 +0900)]
tests: seek: Don't use too strict timeout for validation

Expected segment-done message might not be seen within expected
time if system is not powerful enough.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/625>

3 years agovalve: Fix MSVC compile warning
Seungha Yang [Thu, 10 Sep 2020 17:59:51 +0000 (02:59 +0900)]
valve: Fix MSVC compile warning

gstvalve.c(285) : warning C4715: 'gst_valve_event_needs_dropping':
not all control paths return a value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/624>

3 years agoevent: Add optional flags to the GAP event
Sebastian Dröge [Wed, 1 Jul 2020 16:15:42 +0000 (19:15 +0300)]
event: Add optional flags to the GAP event

This allows to signal the reason for the gap, for example missing data
like packet loss.

Based on a patch by Mikhail Fludkov <misha@pexip.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/551>

3 years agoharness: Add gst_harness_set_live()
Sebastian Dröge [Thu, 10 Sep 2020 11:17:26 +0000 (14:17 +0300)]
harness: Add gst_harness_set_live()

By default each harness returns is_live=TRUE in latency queries. This is
often not desired and can now be overridden.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/599>

3 years agoaggregator: Reset latency values in start()
Sebastian Dröge [Wed, 19 Aug 2020 18:17:31 +0000 (21:17 +0300)]
aggregator: Reset latency values in start()

Some base classes like videoaggregator try retrieving the latency during
construction, which causes the latency values to be set already until
reconfiguration happens.

By resetting them the same way as in stop() we ensure that we always
start cleanly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/599>

3 years agoptp_helper_post_install.sh: deal with none
Tom Schoonjans [Tue, 8 Sep 2020 11:45:42 +0000 (12:45 +0100)]
ptp_helper_post_install.sh: deal with none

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/620>

3 years agoskip elements/leak.c if tracer is not available
Xℹ Ruoyao [Tue, 8 Sep 2020 17:23:11 +0000 (01:23 +0800)]
skip elements/leak.c if tracer is not available

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/621>

3 years agoaggregator: Wake up source pad in PAUSED<->PLAYING transitions
Sebastian Dröge [Thu, 20 Aug 2020 08:09:11 +0000 (11:09 +0300)]
aggregator: Wake up source pad in PAUSED<->PLAYING transitions

When going to PLAYING we will now have a clock and can stop waiting on
the condition variable and instead start waiting on the clock if
necessary for the current configuration.

In the other direction when going to PAUSED the clock might have
disappeared and we might need to wait on the condition variable again
instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/601>

3 years agoinput-selector: Wake up blocking pads when releasing them
Sebastian Dröge [Mon, 24 Aug 2020 08:59:51 +0000 (11:59 +0300)]
input-selector: Wake up blocking pads when releasing them

Otherwise deactivating them will cause a deadlock as they're blocking
inside the streaming thread.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/606>

3 years agovalve: Add modes to forward sticky events when dropping and to convert buffers into...
Sebastian Dröge [Fri, 14 Aug 2020 08:40:30 +0000 (11:40 +0300)]
valve: Add modes to forward sticky events when dropping and to convert buffers into gap events

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/587
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/84

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/594>

3 years agoaggregator: make peek() has() pop() drop() buffer API threadsafe
Mathieu Duponchelle [Mon, 31 Aug 2020 22:26:31 +0000 (00:26 +0200)]
aggregator: make peek() has() pop() drop() buffer API threadsafe

Enforce that the last buffer that was peeked (or had its existence
checked) on a pad is the one that gets popped / dropped, resetting
at the end of each aggregation cycle.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/608>

3 years agoptp: Also handle gnu/kfreebsd
Sebastian Dröge [Tue, 8 Sep 2020 10:40:25 +0000 (13:40 +0300)]
ptp: Also handle gnu/kfreebsd

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/619>

3 years agoci: include template from gst-ci master branch again
Tim-Philipp Müller [Tue, 8 Sep 2020 16:30:27 +0000 (17:30 +0100)]
ci: include template from gst-ci master branch again

3 years agoBack to development
Tim-Philipp Müller [Tue, 8 Sep 2020 15:58:20 +0000 (16:58 +0100)]
Back to development

3 years agoRelease 1.18.0
Tim-Philipp Müller [Mon, 7 Sep 2020 23:01:33 +0000 (00:01 +0100)]
Release 1.18.0

3 years agomeson: dist pot file in tarballs
Tim-Philipp Müller [Mon, 7 Sep 2020 19:22:38 +0000 (20:22 +0100)]
meson: dist pot file in tarballs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/618>

3 years agoaggregator: Document that samples_selected() must only be called from the aggregate...
Sebastian Dröge [Fri, 21 Aug 2020 08:06:57 +0000 (11:06 +0300)]
aggregator: Document that samples_selected() must only be called from the aggregate() function

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/607>

3 years agoaggregator: Don't automatically adjust segment if subclass provided one
Sebastian Dröge [Thu, 20 Aug 2020 07:54:12 +0000 (10:54 +0300)]
aggregator: Don't automatically adjust segment if subclass provided one

On the first buffer the base class would update the segment position
based on the start-time-selection. If the subclass provides its own
segment this will caused unexpected behaviour and override segment
information that was explicitly set by the subclass.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/600>

3 years agoRelease 1.17.90
Tim-Philipp Müller [Thu, 20 Aug 2020 15:08:25 +0000 (16:08 +0100)]
Release 1.17.90

3 years agoaggregator: fix documentation for samples-selected and buffer-consumed
Mathieu Duponchelle [Mon, 10 Aug 2020 20:42:54 +0000 (22:42 +0200)]
aggregator: fix documentation for samples-selected and buffer-consumed

GI expects the instance parameter to be documented, omitting it
leads to a msismatched output in the gir.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/592>

3 years agoaggregator: Add optional GstStructure info parameter to "samples-selected" signal
Sebastian Dröge [Fri, 7 Aug 2020 06:30:55 +0000 (09:30 +0300)]
aggregator: Add optional GstStructure info parameter to "samples-selected" signal

Subclasses can use this to provide more information, for example
audioaggregator could provide the offset into the output buffer where
the next data is going to be filled.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/805

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/590>

3 years agoaggregator: add segment, pts, dts and duration to samples-selected
Mathieu Duponchelle [Wed, 5 Aug 2020 14:54:44 +0000 (16:54 +0200)]
aggregator: add segment, pts, dts and duration to samples-selected

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/588>

3 years agoMeson: Override gst-tester-1.0 program to find it in other modules
Xavier Claessens [Tue, 4 Aug 2020 11:10:03 +0000 (07:10 -0400)]
Meson: Override gst-tester-1.0 program to find it in other modules

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/586>

3 years agofix clang 10 warnings
Jordan Petridis [Mon, 3 Aug 2020 13:26:58 +0000 (16:26 +0300)]
fix clang 10 warnings

the typesystem checks in g_atomic_pointer_compare_and_exchange
seem to trigger some false positives with clang 10

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/584>

3 years agoaggregator: fix iteration direction in skip_buffers
Mathieu Duponchelle [Tue, 4 Aug 2020 09:13:51 +0000 (11:13 +0200)]
aggregator: fix iteration direction in skip_buffers

Subclasses use the pad segment to determine whether a buffer
should be skipped, we thus don't want to check if a buffer
needs to be skipped before processing the segment it's part
of.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/585>

3 years agogsturi: Add new API for storing unmodified userinfo / fragment
Nirbheek Chauhan [Thu, 30 Jul 2020 14:01:55 +0000 (19:31 +0530)]
gsturi: Add new API for storing unmodified userinfo / fragment

New API: gst_uri_from_string_escaped()

Identical to gst_uri_from_string() except that the userinfo and
fragment components of the URI will not be unescaped while parsing.

This is needed for correctly parsing usernames or passwords with `:`
in them such as reported at:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/831

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/583>

3 years agotests: Add more tests for gsturi
Nirbheek Chauhan [Fri, 31 Jul 2020 20:27:06 +0000 (01:57 +0530)]
tests: Add more tests for gsturi

Add tests that exercise unescaping of userinfo and fragments.

Also convert to a modular macro-based definition so that we can reuse
the list of tests in the next commit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/583>

3 years agoinspect: Print preset description when available
Thibault Saunier [Thu, 30 Jul 2020 23:53:10 +0000 (19:53 -0400)]
inspect: Print preset description when available

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/582>

3 years agoaggregator: expose sample selection API
Mathieu Duponchelle [Tue, 30 Jun 2020 19:10:05 +0000 (21:10 +0200)]
aggregator: expose sample selection API

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/771
for context.

This exposes new API that subclasses must call from their
aggregate() implementation to signal that they have selected
the next samples they will aggregate: gst_aggregator_selected_samples()

GstAggregator will emit a new signal there, `samples-selected`,
handlers can then look up samples per pad with the newly-added
gst_aggregator_peek_next_sample.

In addition, a new FIXME is logged when subclasses haven't actually
called `selected_samples` from their aggregate() implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/549>

3 years agogsturi: unescape '=' in http query
Hosang Lee [Tue, 28 Jul 2020 01:59:35 +0000 (10:59 +0900)]
gsturi: unescape '=' in http query

Don't use percent-encoding for '=' in http queries.
'=' in the following kind of http query should be maintained.
example:
?token=exp=123~acl=/QualityLevels(*~hmac=0cb ...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/580>

3 years agobasetransform: handle invalid subclass implementation for fixate_caps
Camilo Celis Guzman [Fri, 24 Jul 2020 11:31:47 +0000 (13:31 +0200)]
basetransform: handle invalid subclass implementation for fixate_caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/575>

3 years agobaseparse: Don't push pointless new segment events
Olivier Crête [Fri, 24 Jul 2020 21:53:00 +0000 (17:53 -0400)]
baseparse: Don't push pointless new segment events

In 1.0, there is no concept of segment update, so don't push new
identical segments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/578>

3 years agobaseparse: Fix seqnum handling in pull mode
Thibault Saunier [Fri, 24 Jul 2020 15:38:28 +0000 (11:38 -0400)]
baseparse: Fix seqnum handling in pull mode

After a seek in pull mode, we should use the seek seqnum for all
following operations, not some random seqnums

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/577>

3 years agocheck: suppress g-ir-scanner warnings
Tim-Philipp Müller [Sun, 26 Jul 2020 14:30:26 +0000 (15:30 +0100)]
check: suppress g-ir-scanner warnings

Make g-ir-scanner skip all those check macros that are
not useful for or usable from bindings.

gstcheck.h:209: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_message_error'
gstcheck.h:212: Warning: GstCheck: Unknown namespace for symbol 'assert_message_error'
gstcheck.h:251: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_int'
gstcheck.h:267: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_int'
gstcheck.h:280: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_int_hex'
gstcheck.h:299: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_int_hex'
gstcheck.h:310: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_int64'
gstcheck.h:327: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_int64'
gstcheck.h:340: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_int64_hex'
gstcheck.h:358: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_int64_hex'
gstcheck.h:369: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_uint64'
gstcheck.h:386: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_uint64'
gstcheck.h:399: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_uint64_hex'
gstcheck.h:417: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_uint64_hex'
gstcheck.h:428: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_string'
gstcheck.h:444: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_string'
gstcheck.h:455: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_float'
gstcheck.h:474: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_float'
gstcheck.h:487: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_pointer'
gstcheck.h:506: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_pointer'
gstcheck.h:517: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_clocktime'
gstcheck.h:534: Warning: GstCheck: Unknown namespace for symbol 'MAIN_START_THREADS'
gstcheck.h:547: Warning: GstCheck: Unknown namespace for symbol 'MAIN_START_THREAD_FUNCTIONS'
gstcheck.h:555: Warning: GstCheck: Unknown namespace for symbol 'MAIN_START_THREAD_FUNCTION'
gstcheck.h:626: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_CRITICAL'
gstcheck.h:628: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_CRITICAL'
gstcheck.h:640: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_WARNING'
gstcheck.h:652: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_OBJECT_REFCOUNT'
gstcheck.h:661: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_OBJECT_REFCOUNT_BETWEEN'
gstcheck.h:676: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_CAPS_REFCOUNT'
gstcheck.h:679: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_BUFFER_REFCOUNT'
gstcheck.h:682: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_MINI_OBJECT_REFCOUNT'
gstcheck.h:690: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_SET_STATE'
gstcheck.h:729: Warning: GstCheck: Unknown namespace for symbol 'tcase_skip_broken_test'
gstcheck.h:740: Warning: GstCheck: Unknown namespace for symbol 'tcase_skip_broken_loop_test'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/579>

3 years agoutils: silence g-ir-scanner warnings about float conversion macros
Tim-Philipp Müller [Sun, 26 Jul 2020 13:52:30 +0000 (14:52 +0100)]
utils: silence g-ir-scanner warnings about float conversion macros

663: Warning: Gst: symbol='GFLOAT_TO_LE': Unknown namespace for symbol 'GFLOAT_TO_LE'
664: Warning: Gst: symbol='GFLOAT_TO_BE': Unknown namespace for symbol 'GFLOAT_TO_BE'
665: Warning: Gst: symbol='GDOUBLE_TO_LE': Unknown namespace for symbol 'GDOUBLE_TO_LE'
666: Warning: Gst: symbol='GDOUBLE_TO_BE': Unknown namespace for symbol 'GDOUBLE_TO_BE'
669: Warning: Gst: symbol='GFLOAT_TO_LE': Unknown namespace for symbol 'GFLOAT_TO_LE'
670: Warning: Gst: symbol='GFLOAT_TO_BE': Unknown namespace for symbol 'GFLOAT_TO_BE'
671: Warning: Gst: symbol='GDOUBLE_TO_LE': Unknown namespace for symbol 'GDOUBLE_TO_LE'
672: Warning: Gst: symbol='GDOUBLE_TO_BE': Unknown namespace for symbol 'GDOUBLE_TO_BE'
678: Warning: Gst: symbol='GFLOAT_FROM_LE': Unknown namespace for symbol 'GFLOAT_FROM_LE'
679: Warning: Gst: symbol='GFLOAT_FROM_BE': Unknown namespace for symbol 'GFLOAT_FROM_BE'
680: Warning: Gst: symbol='GDOUBLE_FROM_LE': Unknown namespace for symbol 'GDOUBLE_FROM_LE'
681: Warning: Gst: symbol='GDOUBLE_FROM_BE': Unknown namespace for symbol 'GDOUBLE_FROM_BE'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/579>

3 years agomath-compat.h: silence g-ir-scanner warnings
Tim-Philipp Müller [Sun, 26 Jul 2020 13:48:52 +0000 (14:48 +0100)]
math-compat.h: silence g-ir-scanner warnings

Easier to just make g-ir-scanner skip this header via #ifndef __GI_SCANNER__
than maintain different sets of headers in the meson.build file.

Warning: Gst: symbol="rint": Unknown namespace for symbol "rint"
Warning: Gst: symbol="rintf": Unknown namespace for symbol "rintf"
Warning: Gst: symbol="isnan": Unknown namespace for symbol "isnan"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/579>

3 years agoevent, query: fix g-ir-scanner warnings
Tim-Philipp Müller [Sun, 26 Jul 2020 13:42:39 +0000 (14:42 +0100)]
event, query: fix g-ir-scanner warnings

gstevent.h:72: Warning: Gst: symbol='FLAG': Unknown namespace for symbol 'FLAG'
gstquery.h:76: Warning: Gst: symbol='FLAG': Unknown namespace for symbol 'FLAG'

Use _FLAG(xyz) instead of FLAG(xyz) to silence g-ir-scanner
warnings about this internal helper define.

It's also slightly more hygienic.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/579>

3 years agotracer: declare GstTracer API stable
Tim-Philipp Müller [Fri, 24 Jul 2020 12:30:39 +0000 (13:30 +0100)]
tracer: declare GstTracer API stable

It's been around for more than 4 years and people have built
lots of stuff on top of it, doesn't really make sense to keep
it marked as unstable. We're unlikely to change it now, and
we can always deprecate it and make a new one if needed.

This stabilises the following API:
- gst_tracer_register()
- gst_tracing_get_active_tracers()
- gst_tracing_register_hook()
- gst_tracer_record_new()
- gst_tracer_record_log()

Might also help a bit with #424

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/576>

3 years agoharness: unref sink/src caps after deactivating pads
Matthew Waters [Thu, 23 Jul 2020 04:51:51 +0000 (14:51 +1000)]
harness: unref sink/src caps after deactivating pads

Otherwise, access to the harness' sink/src caps is racy between any caps
query performed by an element and gst_harness_teardown().

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/794
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/574>

3 years agocheck: Always mark _ck_assert_failed as noreturn
Jan Alexander Steffens (heftig) [Wed, 22 Jul 2020 10:44:02 +0000 (12:44 +0200)]
check: Always mark _ck_assert_failed as noreturn

So that we can use `fail` like `g_assert_not_reached`.

The comment is apparently wrong or outdated, as GCC considers it legal
for noreturn-marked functions to return using longjmp.

See the thread at
https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/59#note_576422

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/573>

3 years agobuffer: improve seqnum fallback warning message
Tim-Philipp Müller [Tue, 14 Jul 2020 11:15:34 +0000 (12:15 +0100)]
buffer: improve seqnum fallback warning message

Print target CPU we're building for.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/565>

3 years agobuffer: fix meta sequence number fallback on rpi
Tim-Philipp Müller [Tue, 14 Jul 2020 11:11:57 +0000 (12:11 +0100)]
buffer: fix meta sequence number fallback on rpi

The global seqnum variable wasn't actually increased in
the fallback code path, leading to all buffers getting
a seqnum of 0. Which also made the unit test fail.

This affects platforms/toolchains that don't have
64-bit atomic ops such as when compiling for armv7 rpi.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/565>

3 years agomeson: add a plugin summary
Stéphane Cerveau [Thu, 9 Jul 2020 07:46:07 +0000 (09:46 +0200)]
meson: add a plugin summary

This summary displays a list of plugins which
have been enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/560>

3 years agogst-inspect: fix memory leak
Eero Nurkkala [Wed, 22 Jul 2020 07:51:54 +0000 (10:51 +0300)]
gst-inspect: fix memory leak

With meson configure option: -Db_sanitize=address, the following
issue is seen while running the test "tools_gstinspect":

Running suite(s): gst-inspect

=================================================================
==20880==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 51 byte(s) in 9 object(s) allocated from:
    #0 0x7ffb4dbb0b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
    #1 0x7ffb4cdf1ab8 in g_malloc (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x51ab8)

SUMMARY: AddressSanitizer: 51 byte(s) leaked in 9 allocation(s).
0%: Checks: 1, Failures: 0, Errors: 1

GOptionEntry man page states that: "Please note that parsed arguments need to be freed separately (see GOptionEntry)."
Thus, free the 'min_version' string that has been allocated but never freed.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/572>

3 years agogst/bufferpool: only resize in reset when maxsize is larger
Matthew Waters [Mon, 20 Jul 2020 07:08:32 +0000 (17:08 +1000)]
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>

3 years agobuild/coretracers: add dep on threads
Matthew Waters [Thu, 16 Jul 2020 13:03:35 +0000 (23:03 +1000)]
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>

3 years agodirectcontrolbinding: Properly initialize default `last_value`
Thibault Saunier [Tue, 14 Jul 2020 04:03:18 +0000 (00:03 -0400)]
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>

3 years agoinfo: Fix possible broken debug output on Windows
Seungha Yang [Thu, 16 Jul 2020 09:55:22 +0000 (18:55 +0900)]
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>

3 years agopad: More explicitly explain how to post errors on GST_FLOW_ERROR
Olivier Crête [Thu, 16 Jul 2020 20:34:05 +0000 (16:34 -0400)]
pad: More explicitly explain how to post errors on GST_FLOW_ERROR

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/568>

3 years agolatency tracer: Fix leaks in the reported latency trace
Nicolas Dufresne [Wed, 15 Jul 2020 20:12:02 +0000 (16:12 -0400)]
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>

3 years agolatency tracer: Fix unsafe and NULL pointer accesses
Jan Schmidt [Fri, 30 Aug 2019 13:59:42 +0000 (23:59 +1000)]
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>