Commit graph

18600 commits

Author SHA1 Message Date
Seungha Yang
3ffd1e4f1d gst-launch: Use gst_print* instead of g_print* to fix broken stdout on Windows
Concurrent Windows' colored debug message and g_print will print
string hard to read. Instead, use gst_print* which serialize
debug output and the APIs call.
2019-10-01 12:40:32 +01:00
Seungha Yang
32b7108d54 info: Take lock around all prinf on Windows
On Windows, concurrent colored gstreamr debug output and usual
stdout/stderr string will cause broken output on terminal.
Since it's OS specific behavior, that's hard to completely avoid it
but we can protect it at least among our printing interfaces side.
2019-10-01 12:40:32 +01:00
Tim-Philipp Müller
de0a7c4bc8 Release 1.16.1 2019-09-23 11:01:52 +01:00
Tim-Philipp Müller
60ce375e9c Update docs 2019-09-23 11:01:50 +01:00
Tim-Philipp Müller
e77fa2581d Update translations 2019-09-23 11:01:47 +01:00
Sebastian Dröge
ce43de8690 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
2019-09-15 00:26:54 +01:00
Sebastian Dröge
cc6342d853 device: Enforce that elements created by gst_device_create_element() 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
2019-09-15 00:26:54 +01:00
Sebastian Dröge
937a6ca6d3 device: gst_device_create_element() is transfer floating, not transfer full
Fixing the annotation fixes leaking of the created element in all
bindings using GObject-Introspection.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/444
2019-09-15 00:26:54 +01:00
Jim Mason
abeb5e677f consolidated IOV_MAX/UIO_MAXIOV handling per GLib + legacy behaviour for osx/ios 2019-09-08 20:57:25 +00:00
Jim Mason
c2d10bd6c4 gst_writev: respect IOV_MAX for the writev iovec array #439 2019-09-08 20:57:25 +00:00
David Svensson Fors
e6bd5b4193 miniobject: free qdata array when the last qdata is removed
In cases with many long-lived buffers that have qdata only very
briefly, the memory overhead of keeping an array of 16 GstQData
structs for each buffer can be significant. We free the array when
the last qdata is removed, like it was done in 1.14.

Fixes #436
2019-09-08 19:42:59 +00:00
Nicolas Dufresne
94ba1cea88 bin: Fix minor race when adding to a bin
This patch simply add a null check around a case where a child may have
been unparented concurrently to the deep_add_remove operation. This was
found by accident in the form of an "IS_GST_OBJECT" assertion, but had
no other known side effect in that test.
2019-09-03 22:27:38 +01:00
Tim-Philipp Müller
090a928329 meson: fix warning about configure_file() install kwarg
The install kwarg on configure_file() was only added in
Meson 0.50 but we're targetting older versions as well,
which caused a warning. The install kwarg is not needed
here as we specify install_dir, so we can just drop it.

Fixes #379
2019-08-15 14:16:51 +01:00
Sebastian Dröge
549cc941eb aggregator: Actually handle NEED_DATA return from update_src_caps()
The documentation says that this allows the subclass to signal that it
needs more data before it can decide on caps, so let's actually
implement it that way.
2019-08-14 14:49:53 +01:00
Sebastian Dröge
5bf13cdd53 aggregator: Assert if the sink/src pad type that is to be used is not a GstAggregatorPad or subclass thereof 2019-08-14 13:35:31 +01:00
Sebastian Dröge
8f3fa68504 aggregator: Ensure that the source pad is created as a GstAggregatorPad if no type is given in the pad template
Otherwise we would create a GstPad and that causes invalid memory
accesses later.
2019-08-14 13:35:31 +01:00
Guillaume Desmottes
a9bc30b51c latency: fix custom event leaks
If the element before the sink needs $n buffers to produce one output
buffer, we were reffing $n events and unreffing only one.
Prevent this by using g_object_set_qdata_full() to handle the event
unreffing so we're sure no ref will be lost.
2019-08-14 08:51:06 +05:30
Guillaume Desmottes
de9ff83533 tracers: set MAY_BE_LEAKED on tracer records
The records are static and so appear as false positives when using those
tracers with the leaks tracer as well.
The leaks tracer was already setting this flag on its record so let's
set it on the other ones as well.
2019-08-14 08:51:02 +05:30
Guillaume Desmottes
3e04aa2afc latency: display event pointer in logs
This is quite useful for debugging when tracer is reporting the wrong
latency because of an element breaking the events/buffers ordering.
2019-08-14 08:50:42 +05:30
Alicia Boya García
5dbaaa1e51 downloadbuffer: Check for flush after seek
In gst_download_buffer_wait_for_data(), when a seek is made with
perform_seek_to_offset() the `qlock` is released temporarily. Therefore,
the flushing condition can be set during this period and should be
checked.

This was not being checked before, causing occasional deadlocks when
GST_DOWNLOAD_BUFFER_WAIT_ADD_CHECK() was called.

GST_DOWNLOAD_BUFFER_WAIT_ADD_CHECK() assumes that the caller has already
checked that we're not flushing before, since this is done when
acquiring the lock; so if we release it temporarily somewhere, we need
to check for flush again.

Without that check, the function would keep waiting for the condition
variable to be notified before checking for flushing condition again,
and that may very well never happen. This was reproduced when during pad
deactivation when running WebKit in gdb.
2019-08-11 12:37:45 +01:00
Sebastian Dröge
684796f45a registry: Use plugin directory from the build system for relocateable Windows builds
Instead of guessing something based on preprocessor defines and magic.
2019-08-09 12:29:37 +01:00
Tim-Philipp Müller
dc7b9cec1e message: fix up enum value for GST_MESSAGE_DEVICE_CHANGED
This was added in 1.16 and accidentally duplicated the value of
the existing GST_MESSAGE_REDIRECT.

As the only known user of this message is GStreamer core itself,
and it is quite an obscure message, it seems best to just fix up
the enum value even if that technically breaks API.

Fixes #418
2019-08-09 09:10:04 +01:00
Doug Nazar
815acd88ee info: Fix deadlock in gst_ring_buffer_logger_log
gst_ring_buffer_logger_log calls several functions while formatting
the message which may in turn log a message while we already hold
the mutex. Do all formatting first before acquiring the mutex to
avoid this and reduce the time we hold the mutex.
2019-08-09 00:27:04 +01:00
Nicolas Dufresne
819b316e03 identity: Non-live upstream have no max latency
sync=TRUE implementation changes the latency query of a non-live
upstream into live, though it wrongly set the upstream max latency to 0.
As non-live sources won't loose data if we wait longer, this should have
been reported as have no max latency limite (-1).
2019-08-08 23:27:10 +01:00
Philippe Normand
66e1ee5137 identity: Fix the ts-offset property getter
Previous code was a copy/paste from the property setter function.
2019-08-08 22:15:43 +01:00
Sebastian Dröge
99aeb91cc0 aggregator: Make parsing of explicit sink pad names more robust
When passing "sink_%d" twice to aggregator before it would create two
pads called "sink_0", because it failed to parse "%d" as integer and
used 0 instead then.

Instead validate that parsing was actually successful and also don't
even try to parse if the requested pad name contains a '%'.
2019-08-08 21:03:42 +01:00
Nicolas Dufresne
53bf06c088 bufferpool: Fix the buffer size reset code
The offset in gst_buffer_resize() is additive. So to move back the
offset to zero, we need to pass the opposite of the current offset. This
was raised through the related unit test failingon 32bit as on 64bit
the alignment padding was enough to hide the issue. The test was
modified to also fail on 64bit. This patch will remove spurious
assertions like:

  assertion 'bufmax >= bufoffs + offset + size' failed

Fixes #316
2019-08-08 18:49:40 +01:00
Guillaume Desmottes
84707d088f gstelements_private: sync gst_buffer_get_flags_string() with new flags 2019-08-08 16:57:56 +01:00
Thibault Saunier
a5d22be74b multiqueue: never unref queries we do not own
The `query` argument of gst_pad_query is "transfer none".

Query objects are "borrowed" by the pad query handlers and those
should never unref them.

This was leading to double freed queries in a very racy way with nested
GESTimelines.
2019-08-08 14:58:52 +01:00
Sebastian Dröge
80c5dacfb3 concat: Reset last_stop on FLUSH_STOP too
Otherwise when seeking backwards we would keep the last_stop at the last
position we saw until playback passed the seek position again, and if
switching to the next pad happens in the meantime we would set the wrong
offset in the outgoing segment.
2019-08-08 13:12:19 +01:00
Sebastian Dröge
9d27e5d70d concat: Improve debug output a bit 2019-08-08 13:12:19 +01:00
Tim-Philipp Müller
edc1a5be3e aggregator: fix flow-return boolean return type mismatch
Not that it matters, since we don't check the return value
anyway. Unclear why the aggregator pad flush function should
have a return value at all really, and perhaps it should be
called reset anyway. Spotted by dv on irc.
2019-08-08 11:05:53 +01:00
Edward Hervey
53e879c750 gstpad: Probes that return HANDLED can reset the data info field
Before GST_PAD_PROBE_HANDLED was introduced, we had to handle the case
where some probes would reset the probe info data field to NULL. This would
be considered an invalid use-case.

But with GST_PAD_PROBE_HANDLED it is totally fine to reset that, since
the probe has "handled" it.
2019-08-08 09:49:31 +01:00
Nirbheek Chauhan
3a8910f53b meson: Link to objects instea of static helper library
Otherwise the objects from that static helper library are not included
in the gstreamer-1.0 static library. This was supposed to be fixed in
Meson, but the pull request hasn't been merged yet:
https://github.com/mesonbuild/meson/pull/3939

Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/398
2019-08-08 00:01:09 +01:00
Nirbheek Chauhan
f5ed89dc83 meson: Pass -DGST_STATIC_COMPILATION for static builds
This is only needed on Windows when building with MSVC, but it is safe
to pass it everywhere.

Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/398
2019-08-08 00:01:09 +01:00
Michael Olbrich
6a331c4e4d meson: set correct install path for gdb helper
The original version of the patch used glib-2.0 but that was later changed
to gstreamer-1.0 for autotools. The meson file was forgotten.

Fix the path to match the one used in libgstreamer-gdb.py.in.
2019-08-07 20:39:38 +01:00
Niels De Graef
a8ec2d9910 gst: Add support for g_autoptr(GstPromise) 2019-08-07 13:53:41 +01:00
Niklas Hambüchen
8cf0df152a Make get_flex_version.py script executable
Like all other scripts in the same dir.

It has a hashbang, so it should be executable.
2019-08-07 11:10:36 +01:00
Andoni Morales Alastruey
04a637ae64 gst-inspect: fix unused-const-variable error in windows
../tools/gst-inspect.c:44:20: error: 'DEFAULT_PAGER' defined but not used [-Werror=unused-const-variable=]
2019-08-07 09:07:08 +01:00
Sebastian Dröge
124ed4d363 base: Include gstbitwriter.h in the single-include header 2019-08-06 23:35:46 +01:00
Sebastian Dröge
68645e1e9b bitwriter: Fix inclusion of header in C++ code
../subprojects/gstreamer/libs/gst/base/gstbitwriter.h: In function 'gboolean _gst_bit_writer_check_remaining(GstBitWriter*, guint32)':
../subprojects/gstreamer/libs/gst/base/gstbitwriter.h:161:31: error: invalid conversion from 'gpointer' {aka 'void*'} to 'guint8*' {aka 'unsigned char*'} [-fpermissive]
   bitwriter->data = g_realloc (bitwriter->data, (new_bit_size >> 3));
                     ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-08-06 23:35:46 +01:00
Sebastian Dröge
62296b2bad bitwriter: Mark the whole type as Since: 1.16 2019-08-06 16:00:11 +01:00
Sebastian Dröge
66ce092881 caps: Add Since: 1.16 marker to gst_caps_copy() 2019-08-06 16:00:11 +01:00
Sebastian Dröge
a1eb31afb1 aggregator: Mark all public structs as Since: 1.14 2019-08-06 16:00:11 +01:00
Sebastian Dröge
e749ad0ecf libs: Fix various Since markers 2019-08-06 16:00:11 +01:00
Sebastian Dröge
2fa00da84e gst: Fix various Since markers 2019-08-06 16:00:11 +01:00
Tim-Philipp Müller
41e3ecb080 ci: use template from 1.16 branch 2019-05-02 12:35:17 +01:00
Tim-Philipp Müller
89c221a697 Release 1.16.0 2019-04-19 00:15:22 +01:00
Tim-Philipp Müller
7a391b42ae Update docs 2019-04-19 00:15:21 +01:00
Tim-Philipp Müller
dcc48e7950 Update translations 2019-04-19 00:15:19 +01:00