Commit graph

17624 commits

Author SHA1 Message Date
Tim-Philipp Müller 530caf58f7 Release 1.12.5 2018-03-28 14:16:41 +01:00
Tim-Philipp Müller c27c2c622c Update docs 2018-03-28 14:16:40 +01:00
Edward Hervey 0280dc1fb9 registrychunks: Make sure we use aligned memory
This is in the same vein as for all other features. Some systems
might not allow unaligned read.
2018-03-18 10:39:59 +02:00
Tim-Philipp Müller c28a2c31d4 docs: add index for new symbols in 1.12 2018-02-14 19:38:53 +00:00
Tim-Philipp Müller 336ff04710 docs: add flow combiner ref/unref to docs
So new-in-1.12 index actually has some entries.
2018-02-14 19:38:53 +00:00
fengalin acd19beac5 flowcombiner: Fix version for ref and unref functions
The functions were introduced in version 1.12.1, GstFlowCombiner was
introduced in 1.4.

https://bugzilla.gnome.org/show_bug.cgi?id=788778
2018-02-14 19:27:03 +00:00
Tim-Philipp Müller 56286c3700 childproxy: gracefully handle methods being NULL
Do this for all method invoke functions for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=750154
2018-01-26 11:11:25 +00:00
Michele Dionisio 2aab4a9722 ptp: fix build failure with #undef USE_MEASUREMENT_FILTERING
"Label ‘out’ used but not defined", since it's also used by
the USE_MEDIAN_PRE_FILTERING branch.

https://bugzilla.gnome.org/show_bug.cgi?id=785631
2018-01-26 11:11:05 +00:00
Tim-Philipp Müller af1cf061d7 plugin: plugin_load() must return a ref even if it was loaded already
Fix refcounting issue when plugin was loaded already.
gst_plugin_load() is supposed to return a ref, so it
must always return a ref.

This also fixes the gstplugin unit test on windows where
fork is not available and where test_load_coreelements()
would unref a plugin ref it didn't get and then mess up
the internal registry plugin list state for the next test,
in case where the test registry does not exist yet.
2018-01-26 11:10:44 +00:00
Tim-Philipp Müller b43f88fef6 info: reset default threshold to LEVEL_DEFAULT not 0
in set_threshold_from_string().
2018-01-26 11:10:23 +00:00
Sebastian Dröge d2dee2d808 streams: GstStreamType/GstStream are available since 1.10
Annotate them as such.
2018-01-17 16:03:38 +02:00
Sebastian Dröge 4d55d17135 downloadbuffer: Don't hold the mutex while posint the download-complete message
Something might handle it from a sync message handler and call back into
downloadbuffer, causing a deadlock.
2018-01-17 16:03:29 +02:00
Sebastian Dröge b61fcea93b systemclock: set_default() clock parameter can be NULL 2018-01-17 16:03:19 +02:00
Sebastian Dröge 1224cfeee8 element: Annotate set_clock() clock parameter with allow-none 2018-01-17 16:03:14 +02:00
Sebastian Dröge 735eb25def element: Annotate set_bus() bus parameter as allow-none
It's possible to replace the bus with NULL/None
2018-01-17 16:03:09 +02:00
Sebastian Dröge 5a01b35e80 plugin: Annotate add_dependency() arguments as NULL-terminated arrays 2018-01-17 16:03:00 +02:00
Sebastian Dröge f0d901b72d event/query/message: Annotate get_structure() return value as nullable 2018-01-17 16:02:54 +02:00
Sebastian Dröge f38479da5c gst: Annotate various strings as type filename if they represent a path/filename 2018-01-17 16:02:48 +02:00
Edward Hervey 4053374e5a gstpad: Avoid stream-dead-lock on deactivation
The following case can happen when two thread try to activate and
deactivate a pad at the same time:
T1: starts to deactivate, calls pre_activate(), sets in_activation
    to TRUE and carries on
T2: starts to activate, calls pre_activate(), in_activation is TRUE
    so it waits on the GCond
T1: calls post_activate(), tries to acquire the streaming lock ..
    but can't because T2 is currently holding it

With this patch, the deadlock will no longer happen but does not
solve the problem that:
T2: will resume activation of the pad, set the pad mode to the target
   one (PUSH or PULL) and eventually the streaming lock gets released.
T1: is able to finish calling post_activate() ... but ... the pad
   wasn't deactivated (T2 was the last one to "activate" the pad.

https://bugzilla.gnome.org/show_bug.cgi?id=792341
2018-01-16 12:10:03 +01:00
Edward Hervey c04b5efdbd gstpad: Release pending g_cond_wait() when stopping/pausing task
Otherwise we would deadlock waiting forever for the streaming lock
to be released

https://bugzilla.gnome.org/show_bug.cgi?id=792341
2018-01-15 18:18:40 +01:00
Sebastian Dröge 505a24ff68 Release 1.12.4 2017-12-07 20:21:55 +02:00
Sebastian Dröge ddfa40b106 Update .po files 2017-12-07 19:17:05 +02:00
Sebastian Dröge fbf739fc7a po: Update translations 2017-12-07 18:56:12 +02:00
Edward Hervey 4a3f747e08 gstpad: Handle GST_PAD_PROBE_HANDLED on sticky event push
When actually pushing an event, if we get GST_FLOW_CUSTOM_SUCCESS_1
(which is the conversion of GST_PAD_PROBE_HANDLED return value),
don't consider the stick event push as ignored, but as handled
2017-12-06 17:11:05 +01:00
Miguel París 38144d1a1c pad: add test to check handled and drop probes
https://bugzilla.gnome.org/show_bug.cgi?id=787243
2017-12-06 17:11:05 +01:00
Edward Hervey 7153205b7a pad: Don't call remaining probes after they return DROPPED|HANDLED
If multiple probes are set on a pad and one probe returns either
GST_PAD_PROBE_HANDLED or GST_PAD_PROBE_DROPPED we need to stop
calling the remaining probes.

https://bugzilla.gnome.org/show_bug.cgi?id=787243
2017-12-06 17:11:05 +01:00
Edward Hervey a4838770c9 bin: iterate_sorted: Ensure sources are always returned last
For linked elements, the resulting gst_bin_iterate_sorted() will
properly return elements from sink to sources.

If we have some elements that are not linked, we *still* want to
ensure that we return:
* In priority any sinks
* Last of all any sources
* And in between any element which is neither source nor sink

For this to work, when looking for the next candidate element,
not only check the degree order, but if there are two candidates
with the same degree order, prefer the non-source one.

Amongst other things, this fixes the case where we activating a
bin containing unlinked sources and other elements. Without this
we could end up activating sources (which might start adding pads
to be linked) before other (to which those new source element pads
might be linked) are not activated

https://bugzilla.gnome.org/show_bug.cgi?id=788434
2017-12-06 17:11:05 +01:00
Sebastian Dröge f76ec3de25 query: Add an empty structure in writable_structure() if there is none yet
This is consistent with how it works for GstEvent already.
2017-12-06 16:39:43 +02:00
Tim-Philipp Müller 3ef7a5999b info: always check match patterns for new debug categories
Not only if a match pattern was set originally via GST_DEBUG.
Patterns might be set programmatically as well after all.
2017-12-06 16:39:33 +02:00
Tim-Philipp Müller 5682141f0f info: fix performance issue with registering categories after gst_init()
When registering a new debug category after gst_init(), simply check
the existing patterns against that new category.

No need to iterate over all categories and recheck them all against
the existing patterns.

Also, no need to re-parse the existing pattern string set via GST_DEBUG
and add the same set of match patterns all over again to the existing
list of match patterns every time we register a new debug category.

Combined with iterating all debug categories on a change this would
make adding debug categories after gst_init() very very very slow.
2017-12-06 16:39:28 +02:00
Edward Hervey 2d0a1669b3 gstinfo: Use free instead of g_free
Because
2017-12-01 09:48:39 +01:00
Edward Hervey 9df84971c7 gstinfo: Don't leak array of strings
The array provided by backtrace_symbols needs to be freed.
2017-12-01 09:48:39 +01:00
Edward Hervey 23ee27987d gstutils: Fix linear regression comparision
The check for dropping precision was wrong when sxx and syy were negative.

if they are negative then "G_MAXINT64 - val" would always overflow

The check was meant to use G_MININT64 (like in the loop contained just
after).
2017-12-01 09:48:39 +01:00
Tim-Philipp Müller e33d740474 ghostpad: access internal pad with lock held 2017-12-01 09:48:39 +01:00
Havard Graff b81223213f ghostpad: fix race-condition while tearing down
An upstream query will take a ref on the internal proxypad, and can
hence end up owning the last reference to that pad, causing a crash.
2017-12-01 09:48:39 +01:00
Edward Hervey 946b17ed10 queue: Only calculate level if we have valid levels
Doing calculations with GST_CLOCK_STIME_NONE would result in
completely bogus levels
2017-12-01 09:48:39 +01:00
Edward Hervey 6019d8c3cd gstpad: Make pad (de)activation atomic
The following could happen previously:
* T1: calls gst_pad_set_active()
* T2: currently (de)activating it
* T1: gst_pad_set_active() returns, caller assumes that the pad has
  completed the requested (de)activation ... whereas it is not
  the case since the actual (de)activation in T2 might still be
  going on.

To ensure atomicity of pad (de)activation, we use a internal
variable (and cond) to ensure only one thread at a time goes through
the actual (de)activation block

https://bugzilla.gnome.org/show_bug.cgi?id=790431
2017-12-01 09:48:39 +01:00
Edward Hervey 4fbdffd8d6 gstpad: Make calls to GstPadActivateFunction MT-safe
checking whether we already were in the target GstPadMode was being
done too early and there was the risk that we *would* end up
(de)activating a pad more than once.

Instead, re-do the check for pad mode when entering the final pad
(de)activation block.

https://bugzilla.gnome.org/show_bug.cgi?id=790431
2017-12-01 09:48:39 +01:00
Edward Hervey 8a70b294ae typefindhelper: Fix overflow some more
Nothing guaranteed that off+size wouldn't exceed a 2**64 value.

Instead we reverse the operation and use a subtraction.
2017-12-01 09:48:39 +01:00
Edward Hervey 4eab314437 typefindhelper: Fix signed integer overflow
Make sure the whole calculation is done with 64bit unsigned values

(To be ready for people want to typefind exabyte files).
2017-12-01 09:48:39 +01:00
Edward Hervey 4cd9898832 gstvalue: Cast GST_MAKE_FOURCC arguments
To make it explicit that we are dealing with uint32 targets

Avoids erroneous  runtime error: left shift of negative value -1

https://bugzilla.gnome.org/show_bug.cgi?id=789700
2017-12-01 09:48:39 +01:00
Michael Tretter 099f22e742 ptpclock: do not require a name to create a clock
The gst_ptp_clock_new() does not actually require a name. However, for
example the rtpjitterbuffer may create a clock without a name, fail, and
fall back to not using the PTP clock.

https://bugzilla.gnome.org/show_bug.cgi?id=791034
2017-12-01 10:06:30 +02:00
Edward Hervey c8d2c69275 concat: Make QoS forward MT-safe
In the same way it's done for other event forwarding.
2017-11-09 17:42:37 +01:00
Mathieu Duponchelle 82fb85403c gstbuffer: fix meta removal in gst_buffer_foreach_meta
When updating the linked list, prev->next = next is correct
if prev is actually updated after being set to the head
of the list at the start.

https://bugzilla.gnome.org/show_bug.cgi?id=788617
2017-10-11 20:13:21 +02:00
Ashish Kumar a2b6dac456 device-provider: gst_device_provider_unhide_provider() always fails
https://bugzilla.gnome.org/show_bug.cgi?id=788520
2017-10-05 09:45:44 +01:00
Sebastian Dröge a6653b617c Release 1.12.3 2017-09-18 17:46:32 +03:00
Sebastian Dröge d821c20a41 Update .po files 2017-09-18 16:01:06 +03:00
Sebastian Dröge fc0d725076 po: Update translations 2017-09-18 15:59:55 +03:00
Sebastian Dröge 63485b0caf Update .po files 2017-09-18 15:54:00 +03:00
Sebastian Dröge 58d1e790cc info: GstStackTraceFlags were added in 1.12 2017-09-17 19:00:50 +03:00