Commit graph

17590 commits

Author SHA1 Message Date
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
Nicolas Dufresne
8dca248e10 Also use default visibility for plugins symbol 2017-09-08 14:30:45 +03:00
Tim-Philipp Müller
0352283f43 gstconfig.h: use default visibility for GST_EXPORT for gcc/clang too
This will be needed later when we switch to using -fvisibility=hidden.
2017-09-08 14:30:38 +03:00
Carlos Rafael Giani
2d358f8a4a configure: Add switches for enabling/disabling libdw and libunwind
https://bugzilla.gnome.org/show_bug.cgi?id=778193
2017-09-07 12:40:55 +03:00
Tim-Philipp Müller
1c7f9a5025 meson: pkgconfig: add libunwind/libdw to gstreamer-1.0 Requires.private
https://bugzilla.gnome.org/show_bug.cgi?id=784795
2017-09-07 12:40:44 +03:00
Edward Hervey
e7c33f24ed pkgconfig: Add private requirements
Add libunwind and dw to the .pc Requires.private. Fixes static library
compilation if gstreamer was compiled with one of those dependencies

https://bugzilla.gnome.org/show_bug.cgi?id=784795
2017-09-07 12:40:44 +03:00
Tim-Philipp Müller
d8079ae1fe baseparse: fix taglist update spam
We would constantly re-post the taglist because
posted_avg_rate only gets set to avg_bitrate if
parse->priv->post_avg_bitrate is true, so if it's
false the posted rate will always differ from the
current average rate and we'd queue an update,
which leads to us spamming downstream and the
application with taglist updates.

Fix this by only queuing an update if the average
rate will actually be posted.

These taglists updates could cause expensive
operations on the application side, e.g. in Totem.

https://bugzilla.gnome.org/show_bug.cgi?id=786561
2017-09-01 12:14:09 +03:00
Thibault Saunier
6a0b0b653e value: Handle serializing NULL GValueArray
Consider them as an empty array and do not segfault...

https://bugzilla.gnome.org/show_bug.cgi?id=786670
2017-08-26 13:51:57 -03:00
Tim-Philipp Müller
311df0166f Automatic update of common submodule
From 48a5d85 to dd9d403
2017-08-17 12:13:31 +01:00
Sebastian Dröge
e0696c5432 identity: Return FLUSHING instead of EOS and don't start waiting for anything if currently flushing
Otherwise we might try unscheduling a clock id (that does not exist
yet), then the streaming thread waits for id and the state change never
continues because the streaming thread is blocked.

Also shutting down and flushing and similar should return FLUSHING, not
EOS. The stream is not over, we're just not accepting any buffers
anymore.
2017-08-17 13:39:46 +03:00
Sebastian Dröge
d3cfdad8c8 queue: Allow re-usability after EOS
After EOS, it is possible for a pad to be resetted by sending
either a STREAM_START or SEGMENT event

Mimic the same behaviour when receiving STREAM_START/SEGMENT events
in queue if we are EOS'd

https://bugzilla.gnome.org/show_bug.cgi?id=786056
2017-08-11 11:15:07 +03:00
Edward Hervey
41bc32d45d queue2: Allow re-usability after EOS
After EOS, it is possible for a pad to be resetted by sending
either a STREAM_START or SEGMENT event

Mimic the same behaviour when receiving STREAM_START/SEGMENT events
in queue2 if we are EOS'd

https://bugzilla.gnome.org/show_bug.cgi?id=786056
2017-08-11 11:01:03 +03:00
Edward Hervey
f303529ebb plugins: *queue* elements: Handle STREAM_START in EOS situation
When queue-like elements are in "EOS" situation (received GST_FLOW_EOS
from downstream or EOS was pushed), they drain buffers/events that
wouldn't be processed anyway and let through events that might
modify the EOS situation.

Previously only GST_EVENT_EOS and GST_EVENT_SEGMENT events were let
through, but we also need to allow GST_EVENT_STREAM_START to go
through since it resets the EOS state of pads since 1.6

https://bugzilla.gnome.org/show_bug.cgi?id=786034
2017-08-11 11:00:57 +03:00
Edward Hervey
52e8961e16 queue2: Handle buffering levels on NOT_LINKED
When downstream returns NOT_LINKED, we return the buffering level
as being 100%.

Since the queue is no longer being consumed/used downstream, we
want applications to essentially "ignore" this queue for buffering
purposes.

If other streams are still being used, those stream buffering levels
will be used. If none are used, upstream will post an error message
on the bus indicating no streams are used.

https://bugzilla.gnome.org/show_bug.cgi?id=785799
2017-08-11 11:00:50 +03:00
Sebastian Dröge
f36083a99f pad: Recheck sticky events after non-blocking buffer probes and blocking event probes
Without the former, event changes (e.g. setting a pad offset) does not
take effect for the current buffer but only for the next one. Without
the latter, non-blocking event probes would not see any updated events
yet.
2017-08-11 11:00:38 +03:00
Sebastian Dröge
2225448db4 segment: Add missing out annotations for various parameters 2017-08-11 11:00:30 +03:00
Sebastian Dröge
dca812c58c Release 1.12.2 2017-07-14 14:01:13 +03:00
Sebastian Dröge
808b61e7d0 Update .po files 2017-07-14 13:19:58 +03:00
Jason Lin
d7c47d1562 basesink: fix buffer leaks if preroll failed
buffer is not unreferened if preroll failed

:Detailed Notes:
- Problem : video freeze when switching from pause to 1/2-FF repeatedly
- RootCause : buffer leaks in basesink
- Solution : unref the buffer if prerolled failed

:Testing Preformed:
How to Test :
pause -> 1/2 FF -> resume -> pause -> 1/2 FF ...

https://bugzilla.gnome.org/show_bug.cgi?id=784932
2017-07-14 16:54:09 +10:00
Tim-Philipp Müller
97dde4b0cc meson: check for ppoll() as well 2017-07-03 20:49:20 +01:00
Thibault Saunier
41bb7c66e2 meson: Add configinc as include_directory in tools/
Otherwise when the glib is used as a subproject config.h is the glib
one, not ours.
2017-07-03 20:49:14 +01:00
Tim-Philipp Müller
64fb438b69 meson: fix with-package-name option
https://bugzilla.gnome.org/show_bug.cgi?id=784082
2017-07-03 20:48:52 +01:00
Nicolas Dufresne
486dd447e6 baseparse: sinkcaps can be NULL in default caps negotiation
This was causing harmless assertion about the unreffed caps not being of
type caps.

https://bugzilla.gnome.org/show_bug.cgi?id=784041
2017-07-03 20:47:39 +01:00
Sebastian Dröge
ab3f333dd0 Release 1.12.1 2017-06-20 12:04:50 +03:00
Sebastian Dröge
04ca079069 Update .po files 2017-06-20 11:11:23 +03:00
Sebastian Dröge
c7f2c157dc po: Update translations 2017-06-20 11:06:16 +03:00
Sebastian Dröge
2aac816811 Update .po files 2017-06-20 11:04:33 +03:00
Heekyoung Seo
a0207baabd utils: Fix leak in failed case of regression overflow checking
https://bugzilla.gnome.org/show_bug.cgi?id=783978
2017-06-20 10:58:22 +03:00
Heekyoung Seo
9fc5d66ed1 registrychunk: Fix leak in failed case of reading plugin dependency string
https://bugzilla.gnome.org/show_bug.cgi?id=783978
2017-06-20 10:58:22 +03:00
Sebastian Dröge
70a0ee4c75 controller: Export boxed type copy/free functions for GstControlPoint 2017-06-20 10:09:06 +03:00
Sebastian Dröge
226d01a941 base: Export boxed type copy/free functions for the remaining types 2017-06-20 10:08:38 +03:00
Andrejs Vasiljevs
ac31a3c1d1 ptp: Unref timeout GSource for delay requests
https://bugzilla.gnome.org/show_bug.cgi?id=783864
2017-06-17 10:52:45 +03:00
Sebastian Dröge
326541ee7e gsturi: Fixed incorrect escaping of path as a generic string
The gst_uri_construct function was escaping the location string
as a generic uri string. This is incorrect since the slash('/')
characters are reserved for use in this exact case. The patch
changes the escape_string function mode to handle the path correctly.

In 1.14 this function will be deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=783787
2017-06-15 11:40:51 +03:00
Olivier Crête
2325d00eee basesrc: Hold object lock while updating latency
Otherwise in gst_base_src_query_latency(), it ended up
sometimes thinking it wasn't -1 when it was actually.
2017-05-29 10:55:31 +03:00
Sebastian Dröge
b43f6b016e object: Add missing annotations to get_value_array() / get_value_g_array()
Same as already used in GstControlBinding.
2017-05-29 10:55:25 +03:00