Commit graph

2210 commits

Author SHA1 Message Date
Guillaume Desmottes
f2d37d5132 gstelements_private: sync gst_buffer_get_flags_string() with new flags 2019-06-20 13:49:14 +05:30
Thibault Saunier
eaa39398cc 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-06-20 00:19:24 -04:00
Håvard Graff
3260b2f630 queue: don't report 0 max-latency for leaky queue if max was already 0. 2019-06-13 15:21:03 +00:00
Sebastian Dröge
aaa4353368 concat: Improve debug output a bit 2019-06-05 01:12:42 +00:00
Sebastian Dröge
584c4c6282 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-06-05 01:12:42 +00:00
Mathieu Duponchelle
ca17a6c791 doc: remove xml from comments 2019-05-29 21:33:42 +02:00
Benjamin Otte
73f6f466c2 dataurisrc: Fix crash when semicolon is aprt of data
This URI is valid:
  data:,;base64
(It encodes the literal string ";base64")

But would lead to a crash because the code assumed the semicolon would
be placed before the colon.
2019-05-21 17:22:04 +02:00
Benjamin Otte
3c2312ce6b dataurisrc: Allow case-insensitive scheme
Quoting RFC 2396:

  For resiliency, programs interpreting URI should treat upper case
  letters as equivalent to lower case in scheme names (e.g., allow
  "HTTP" as well as "http").
2019-05-21 17:15:52 +02:00
Sebastian Dröge
eec9bd8db3 filesink: Implement workaround for some (network) filesystems that spuriously return EACCES on write
This seems to happen when another client is accessing the file at the
same time, and retrying after a short amount of time solves it.

Sometimes partial data is written at that point already but we have no
idea how much it is, or if what was written is correct (it sometimes
isn't) so we always first seek back to the current position and repeat
the whole failed write.

It happens at least on Linux and macOS on SMB/CIFS and NFS file systems.

Between write attempts that failed with EACCES we wait 10ms, and after
enough consecutive tries that failed with EACCES we simply time out.

In theory a valid EACCES for files to which we simply have no access
should've happened already during the call to open(), except for NFS
(see open(2)).

This can be enabled with the new max-transient-error-timeout property, and
a new o-sync boolean property was added to open the file in O_SYNC mode
as without that it's not guaranteed that we get EACCES for the actual
writev() call that failed but might only get it at a later time.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/305
2019-05-16 14:15:02 +03:00
Thibault Saunier
a0c65067e0 Port to hotdoc 2019-05-13 16:34:09 -04:00
Thibault Saunier
5b2da0835e doc: Fix and add some missing docstrings 2019-05-13 11:33:49 -04:00
Jonny Lamb
63170d52ae identity: fixes to the eos-after and error-after properties
I copied `error-after` to make the `eos-after` property, but it turned
out there were some problems with that one, so this patch: adds
separate counters (so setting to NULL and reusing the element will
still work); clarifies the properties' min values; and reports an
error when both are set.
2018-12-18 22:55:28 +00:00
Edward Hervey
1bca404191 queue2: Add details of query in debug log 2018-12-17 09:41:45 +01:00
Jonny Lamb
460c0edbfb identity: add eos-after property
Using `num-buffers` can be unpredictable as buffer sizes are often
arbitrary (filesrc, multifilesrc, etc.). The `error-after` property on
`identity` is better but obviously reports an error afterwards. This
adds `eos-after` which does exactly the same thing but reports EOS
instead.
2018-12-11 21:14:11 +00:00
Philippe Normand
9f5e65f0a2 input-selector: Let context queries pass through
By doing so GL source elements can successfully reuse the GL context and display
of downstream elements. This change fixes an issue in playbin when using
gltestsrc where the context query made by the source element would fail and the
source element would create a second (useless) GLDisplay.
2018-11-28 11:00:21 +00:00
Jordan Petridis
84512152c1
Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 05:58:53 +02:00
Niels De Graef
cf3fdbe4c0 typefind: cleanup (un)reffing of several objects.
By using these functions, we can shave off a few lines, and make the
intent of that line more clear.
2018-11-09 08:44:11 +00:00
Matthew Waters
4fc4ad87d5 query: add a new bitrate query
Allows determining from downstream what the expected bitrate of a stream
may be which is useful in queue2 for setting time based limits when
upstream does not provide timing information.

Implement bitrate query handling in queue2

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:04:14 +00:00
Matthew Waters
c4ccff7861 queue2: avoid ping-pong between 0% and 100% buffering messages
If upstream is pushing buffers larger than our limits, only 1 buffer
is ever in the queue at a time.  Once that single buffer has left the
queue, a 0% buffering message would be posted followed immediately by a
100% buffering message when the next buffer was inserted into the queue
a very short time later.  As per the recommendations, This would result
in the application pausing for a short while causing the appearance of
a short stutter.

The first step of a solution involves not posting a buffering message if
there is still data waiting on the sink pad for insertion into the queue.
This successfully drops the 0% messages from being posted however a
message is still posted on each transition to 100% when the new buffer
arrives resulting in a string of 100% buffering messages.  We silence
these by storing the last posted buffering percentage and only posting a
new message when it is different from or last posted message.
2018-11-07 15:04:14 +00:00
Matthew Waters
874ad5faca meson: generate pkg-config files for our plugins 2018-11-05 15:18:41 +00:00
Sebastian Dröge
23e6096d0b typefind: Always forward RECONFIGURE events upstream
Based on a patch by Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/67
2018-11-04 12:45:57 +02:00
Sebastian Dröge
3eb334a7f9 typefind: Lower debug level of some output related to the URI query
It's not a warning if an URI doesn't have an extension, and it's also
not mandatory that sources have an URI or even answer the URI query.
2018-10-26 09:21:42 +01:00
Edward Hervey
127e211004 multiqueue: Don't clamp running times for position calculation
Since we use full signed running times, we no longer need to clamp
the buffer time.

This avoids having the position of single queues not advancing for
buffers that are out of segment and never waking up non-linked
streams (resulting in an apparent "deadlock").
2018-10-22 15:28:45 +02:00
Edward Hervey
98fabd2fa2 queue2: Reset result flow when retrying
If we ever get a GST_FLOW_EOS from downstream, we might retry
pushing new data. But if pushing that data doesn't return a
GstFlowReturn (such as pushing events), we would end up returning
the previous GstFlowReturn (i.e. EOS).

Not properly resetting it would cause cases where queue2 would
stop pushing on the first GstEvent stored (even if there is more
data contained within).
2018-10-22 13:52:30 +02:00
Nicolas Dufresne
c81b2f6207 filesink: Fix wrong printf format
We add a guint64 and a guint, the result is a guint64. On 64bit
architecture, this is the same, but on 32bit architecture, it's not.

https://bugzilla.gnome.org/show_bug.cgi?id=797127
2018-09-11 21:33:51 -04:00
Sebastian Dröge
95fcced84d input-selector: Bring latency handling in sync with GstPad code 2018-08-31 12:16:43 +03:00
Sebastian Dröge
7c179e3f58 input-selector: Apply GstPad default latency handler fixes here too 2018-08-31 11:47:03 +03:00
Sebastian Dröge
6fc136ad84 concat: Improve debug output a bit by printing pad names 2018-08-29 19:26:04 +03:00
Sebastian Dröge
b324e4b802 filesink: Flush buffers before directly writing out buffers with the SYNC_AFTER flag
Otherwise we write out the SYNC_AFTER buffer immediately, and the
previously queued up buffers afterwards which then breaks the order of
data.

Also add various debug output.
2018-08-28 14:23:32 +03:00
Sebastian Dröge
035045c981 filesink: Consider the current buffer size when checking the current position 2018-08-17 17:26:17 +03:00
Sebastian Dröge
cbcad53b45 filesink: Reset the current buffer size to NULL and clear the buffer on close and FLUSH_STOP 2018-08-17 17:26:17 +03:00
Sebastian Dröge
6b4fc62b7b filesink: Implement buffering internally
We use writev() so every call ends up going to the kernel but for small
buffers we generally would prefer to do as few write calls as possible.

https://bugzilla.gnome.org/show_bug.cgi?id=794173
2018-08-16 17:01:07 +03:00
Sebastian Dröge
e975e0cae8 filesink: Remove buffer, deprecate line-buffer mode and don't use fflush()
fflush() has no effect because we use writev() directly, so fsync()
should be used instead which is actually flushing the kernel-side
buffers.

As a next step, a non-line-buffered buffering mode is to be added.

https://bugzilla.gnome.org/show_bug.cgi?id=794173
2018-08-14 13:56:08 +03:00
Sebastian Dröge
ef9619200b inputselector: Forward LATENCY query to all sinkpads
Otherwise downstream will consider the pipeline not live if the active
pad is live, even though some inactive pads might be live and might
require a non-zero latency configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=796901
2018-08-01 14:23:04 +03:00
Sebastian Dröge
41f1a40704 typefind: Add new gst_type_find_helper_get_range_full() that returns flow return
And make use of it in the typefind element. It's useful to distinguish
between the different errors why typefinding can fail, and especially to
not consider GST_FLOW_FLUSHING as an actual error.

https://bugzilla.gnome.org/show_bug.cgi?id=796894
2018-08-01 14:23:04 +03:00
Sebastian Dröge
d196b0b904 typefind: Add _with_extension() variants for typefinding data or a buffer
And make use of that in the typefind element to also be able to make use
of the extension in push mode. It previously only did that in pull mode
and this potentially speeds up typefinding and might also prevent false
positives.

https://bugzilla.gnome.org/show_bug.cgi?id=796865
2018-07-25 01:12:11 +03:00
Edward Hervey
eeb30c2a97 concat: Properly forward the SEGMENT seqnum 2018-06-19 07:27:33 +02:00
Dimitrios Katsaros
ac7f8b6337 queue2: use GstQueueArray
When using queue2 as a queue it was using GQueue with
individually allocated queue items, so two allocs for
each item. With GstQueueArray we can avoid those.

https://bugzilla.gnome.org/show_bug.cgi?id=796483
2018-06-04 11:10:05 +01:00
luz.paz
4a402c1c7d Fix typos in comments and docs
Found via `codespell`

https://bugzilla.gnome.org/show_bug.cgi?id=795610
2018-05-01 11:18:03 +01:00
Xavier Claessens
b00b1d5361 Meson: Use library() to build both static and shared libs
Meson supports building both static and shared libraries in a single
library() call. It has the advantage of reusing the same .o objects and
thus avoid double compilation.

https://bugzilla.gnome.org/show_bug.cgi?id=794627
2018-04-25 00:40:30 +01:00
Tim-Philipp Müller
21decc643b multiqueue, inputselector: show pad properties in gst-inspect-1.0 2018-04-17 18:57:20 +01:00
Tim-Philipp Müller
65e0907798 inputselector, outputselector: add guards for wrong pads being set as active pads
Catch users wrongly setting foreign pads or wrong pads as
the selector's active pad, which leads to all kinds of
other issues. It's a programming error so handle it just
like we would if we had direct API.

https://bugzilla.gnome.org/show_bug.cgi?id=795309
2018-04-17 18:57:17 +01:00
Matthew Waters
5a5a548b09 plugins: Don't force 64-bit file/seek functions variants on android
Most functions are automatically chosen from the _FILE_OFFSET_BITS
define, the remaining one (fstat) is only available on API >= 21 so
check for that
2018-03-02 18:25:21 +11:00
Olivier Crête
23b32d5600 queue: Ignore thresholds if a query is queued
The queue gets filled by the tail, so a query will always be the tail
object, not the head object. Also add a _peek_tail_struct() method to the
GstQueueArray to enable looking at the tail.

With unit test to prevent future regression.

https://bugzilla.gnome.org/show_bug.cgi?id=762875
2018-03-01 16:31:57 -05:00
Jan Alexander Steffens (heftig)
b17d03cb0a multiqueue: Don't start new pads until parented
Start task on new source pads added at runtime after they
have been added to the element, not during activation.

This ensures the pads can post their CREATE stream-status
messages and the application can set thread priorities.

https://bugzilla.gnome.org/show_bug.cgi?id=756867
2017-12-24 11:51:06 +01:00
Jan Alexander Steffens (heftig)
10c3a7bd55 multiqueue: Split task handling from gst_single_queue_flush
https://bugzilla.gnome.org/show_bug.cgi?id=756867
2017-12-24 11:51:06 +01:00
Sebastian Dröge
d431ef7190 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.
2017-12-21 13:47:52 +02:00
Havard Graff
df27ec3e67 gstbasetranform: replace GST_BASE_TRANSFORM with GST_BASE_TRANSFORM_CAST
To avoid a global type-lock on chain etc.
2017-11-24 13:39:39 +01:00
Edward Hervey
922e048379 queue: Only calculate level if we have valid levels
Doing calculations with GST_CLOCK_STIME_NONE would result in
completely bogus levels
2017-11-23 15:28:39 +01:00
Edward Hervey
f03443f90c concat: Handle single-pad use-cases
When EOS reaches concat, it will switch to the next candidate as its
activate pad.

The problem arises when there is only one sinkpad, the "active" pad
becomes NULL. This results in concat becoming unusable after it receives
a *single* EOS on its single sinkpad.

If we detect there is a single sinkpad and there is no current active pad:
* If we are waiting (from selected sink event/buffer), become the current
  active pad.
* If there is a seek request, send it upstream. We don't switch the
  active_sinkpad property at that point in time, since the seek could
  fail. If the seek succeeds, the following SEGMENT (or STREAM_START)
  will cause the pad_wait() to elect that pad as the new active one.
* Flush events get forwarded

https://bugzilla.gnome.org/show_bug.cgi?id=790167
2017-11-10 14:15:46 +01:00
Edward Hervey
08ad748ced concat: Make QoS forward MT-safe
In the same way it's done for other event forwarding.
2017-11-09 17:41:51 +01:00
Reynaldo H. Verdejo Pinochet
402159fb88 Use proper GtkDoc notation for NULL/FALSE/TRUE 2017-10-03 13:54:25 -07:00
Stefan Sauer
21c3f0ff22 tee: don't create a pool if none is needed
If the aggregated size is 0 and we create a pool, the pool would provide
buffers with no memory assigned. Handle that case and skip the pool.
This was the behaviour before cf803ea9f4.

Add a test for this scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-10-02 13:58:04 -04:00
Mathieu Duponchelle
053f1523ad Multiqueue: don't allow dropping SEGMENT_DONE events
https://bugzilla.gnome.org/show_bug.cgi?id=780795
2017-09-18 14:12:06 +02:00
Tim-Philipp Müller
c2917b1ae2 plugins: use new gst_buffer_list_calculate_size() 2017-09-17 12:36:03 +01:00
Nicolas Dufresne
2cc5c539a3 identity: Add a drop-allocation property
When enabled, this property will make the allocation query fail. This is
the same as one could have done using a tee before the tee started
implementing the allocation query.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-06 10:03:20 -04:00
Nicolas Dufresne
1cd0dd3503 tee: Allocate one more buffer when multi-plexing
This extra buffer ensure that the downstream threads are not starved
when multiplexing a stream.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-05 16:00:09 -04:00
Nicolas Dufresne
cf803ea9f4 tee: Implement allocation query aggregation
This will aggregate allocation params, pool and will keep all
meta that has no parameters.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-05 16:00:09 -04:00
Nicolas Dufresne
945322f5a6 tee: Deprecate alloc-pad property
It has no effect, not implemented, and would lead to bad rendering.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-05 15:59:46 -04:00
Sebastian Dröge
82ed369991 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-16 22:50:49 +03:00
Sebastian Dröge
36372a9f4c 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:12:09 +03:00
Edward Hervey
6566eff20d 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-09 16:18:40 +02:00
Edward Hervey
e2f8dc0aef 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-09 10:54:17 +02:00
Edward Hervey
4312119d16 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-07 15:20:55 +02:00
Tim-Philipp Müller
6575389908 downloadbuffer: remove unused struct member
This was used in queue2 when handling in coming serialized
queries, but downloadbuffer just refuses serialized queries.
2017-07-26 14:20:44 +01:00
Edward Hervey
78ee0dfad1 multiqueue: Fix access to NULL pointer
sq can be NULL.

Also fix commit message (it's the queue we are iterating over that we
are logging, not the one passed as argument).

CID #1415569
2017-07-20 14:18:51 +02:00
Seungha Yang
1b0059e0c5 multiqueue: Calculate interleave only within each streaming thread
... and use the biggest interleave value among streaming threads.
This is to optimize multiqueue size adaptation on adaptive streaming
use case with "use-interleave" property.

https://bugzilla.gnome.org/show_bug.cgi?id=784448
2017-07-19 17:19:14 +02:00
Nicolas Dufresne
4a108c7858 meson: Use join_paths and .set_quoted where possible 2017-07-11 14:57:26 -04:00
Nicolas Dufresne
d143af2c77 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 13:29:38 -04:00
Thiago Santos
058bdcfe6b queue: avoid return flushing if we have a not-linked
Return the correct flow return instead of returning always flushing.
This would cause queue to convert not-linked to flushing and making
upstream elements stop.

Based on the previous patch for queue2.

https://bugzilla.gnome.org/show_bug.cgi?id=776999
2017-03-14 22:20:04 -07:00
Thiago Santos
045700e80e queue2: avoid return flushing if we have a not-linked
Return the correct flow return instead of returning always flushing.
This would cause queue2 to convert not-linked to flushing and making
upstream elements stop.

https://bugzilla.gnome.org/show_bug.cgi?id=776999
2017-03-11 11:19:33 -08:00
Wim Taymans
586b34436e buffer: handle gst_buffer_map failures 2017-03-10 10:13:05 +01:00
Wim Taymans
64a1d4ad0b downloadbuffer: unlock mutex in error case 2017-03-10 10:12:49 +01:00
Jan Schmidt
9b0a6ca7ab multiqueue: Make min-interleave-time a configurable property
Remove a FIXME about making the minimum interleave
buffering a configurable property
2017-03-09 12:09:57 +11:00
Seungha Yang
89082272f8 inputselector: Always proxy position/duration query
active-pad switch causes reconfigure event with lock taken,
and upstream element might query the current position or duration
before returning the reconfigure event.
Meanwhile, gst_input_selector_get_linked_pad() is used to get srcpad
inside of default query handle, and it takes also lock.
Since inputselector is still locked by active-pad switch, and so the query
cannot be handled further.

https://bugzilla.gnome.org/show_bug.cgi?id=775445
2017-03-07 12:48:47 +02:00
Thibault Saunier
a87b4551a6 Port gtk-doc comments to their equivalent markdown syntax
Modernizing our documentation and preparing a possible move to hotdoc.
This commits also adds missing @title metadatas to all SECTIONs
2017-01-27 16:36:38 -03:00
Jan Schmidt
0528645f7c identity: Add ts-offset property.
Add a property to delay or advance sync time
when sync=true, with the same behaviour as
the ts-offset property in basesink
2017-01-16 09:40:25 +11:00
Jan Schmidt
748687fc30 queue: Don't generate GST_FLOW_ERROR without logging
At least log a message to the debug log when generating
a GST_FLOW_ERROR, to make it possible to find where it came from.
2017-01-03 02:21:10 +11:00
Jan Schmidt
e64765c0d8 typefind: Switch to normal mode before have-type
Before emitting have-type, switch to NORMAL
mode, as part of the have-type processing sends
the caps event downstream, which might trigger
actions like downstream autoplugging or
flushing seeks - and the latter are only
passed upstream if we've set typefind to NORMAL
mode.
2016-12-21 00:40:10 +11:00
Sebastian Dröge
47f9223750 multiqueue: Protect against spurious wakeups of the condition variable 2016-12-18 13:59:12 +02:00
Sebastian Dröge
3fab00b46a queue/queue2: Protect against spurious condition variable wakeups
Make sure that we only wake up when we have to flush, or when this
specific query was handled.

https://bugzilla.gnome.org/show_bug.cgi?id=776039
2016-12-13 21:03:54 +02:00
Sebastian Dröge
33c239828b queue/queue2: Ensure that the streaming thread is unlocked after deactivating the srcpad
It might happen that the srcpad task function is never called at all, in
which case unlocking everything from there will never happen.

Make sure to unlock everything another time after the task function is
definitely stopped.

https://bugzilla.gnome.org/show_bug.cgi?id=776039
2016-12-13 21:03:54 +02:00
Edward Hervey
6b73bf38d1 filesrc: Set GError in another error case
When changing the location while open, properly set the GError regarding
the failure.
2016-12-12 16:19:13 +01:00
Seungha Yang
ce11ddeb0c multiqueue: Fix overflow on get_buffering_level()
guint64 denominator factor for gst_util_uint64_scale_int() can cause overflow

https://bugzilla.gnome.org/show_bug.cgi?id=775921
2016-12-11 13:30:52 +02:00
Sebastian Dröge
d284be3505 typefind: Use gst_query_has_scheduling_mode_with_flags() convenience function 2016-12-09 18:02:41 +02:00
Tim-Philipp Müller
cf7cfb0a0e fakesink, identity: print metas attached to buffer in silent=false mode 2016-12-05 20:29:25 +00:00
Sebastian Dröge
e02405b284 elements: Handle GstIterator RESYNC return value correctly in gst_iterator_foreach() 2016-12-05 11:01:45 +02:00
Nirbheek Chauhan
ad592f86b6 meson: Add Autotools changes that weren't mirrored
commits:
a7d282d272
6fdb4df0f8
1aceebd67f
2016-11-28 19:28:27 +05:30
Tim-Philipp Müller
1aceebd67f elements: add dataurisrc to build
Moved from -bad.
2016-11-28 11:19:12 +00:00
Tim-Philipp Müller
76c47b7e9c dataurisrc: fix string leak in property getter 2016-11-28 11:19:07 +00:00
Tim-Philipp Müller
a837ff6581 Move dataurisrc element from -bad
https://bugzilla.gnome.org/show_bug.cgi?id=774527
2016-11-28 11:18:39 +00:00
Olivier Crête
5216322d39 fdsink: Block in preroll_wait on unlock
The correct behaviour of anything stuck in the ->render() function
between ->unlock() and ->unlock_stop() is to call
gst_base_sink_wait_preroll() and only return an error if this returns an
error, otherwise, it must continue where it left off!

https://bugzilla.gnome.org/show_bug.cgi?id=773912
2016-11-23 11:58:43 -05:00
Jan Schmidt
fa3eac2d28 multiqueue: Make sure not-linked streams get woken up
When running in sync-by-running-time mode, pad groups
that have exactly 1 pad and it's not-linked might never
wake up after computing a high time, as the per-pad-group
high time was only recomputed when a pad in the group
advances.

Wake those up using the global multiqueue high-time across
all other groups instead.

https://bugzilla.gnome.org/show_bug.cgi?id=774322
2016-11-17 00:46:31 +11:00
Jan Schmidt
a6ca8dfb42 queues: Don't return negative position queries.
When subtracting queued data sizes from upstream queries
in queue, queue2, downloadbuffer and typefind, clamp the
result to not go negative, in case upstream returned
a nonsense value that's too small (as could happen if
upstream is estimating, or just broken)
2016-11-16 00:12:22 +11:00
Sebastian Dröge
abe60a92c4 funnel: Make sure to only lock the stream lock once
We also only unlock it once, and otherwise have it locked forever from
this thread, causing deadlocks on shutdown later.
2016-11-09 11:37:09 +02:00
Jan Schmidt
812d4976f0 fakesink: Add property to not drop out-of-segment buffers
Implement handling in basesink to not unconditionally discard
out-of-segment buffers and expose it as a new property on fakesink
(not unconditionally in all basesink based sinks).

The property defaults to FALSE.

https://bugzilla.gnome.org/show_bug.cgi?id=765734
2016-11-02 11:21:37 +11:00
Sebastian Dröge
c56e1d18c1 funnel: Always push all sticky events whenever we forward a serialized event
Otherwise downstream will have an inconsistent set of sticky events at this
point, e.g. when a TAG event is pushed and downstream wants to relate it to
the stream by looking at the current STREAM_START event.

https://bugzilla.gnome.org/show_bug.cgi?id=768526
2016-11-01 21:01:28 +02:00
Sebastian Dröge
25bf63d6f7 tee: Set GST_PAD_FLAG_PROXY_CAPS before forwarding sticky events
https://bugzilla.gnome.org/show_bug.cgi?id=752213
2016-11-01 20:53:43 +02:00
Sebastian Dröge
cfdb97a135 Revert "queue: Fix race when calculating cur_level.time"
This reverts commit d03bd54780.

It breaks the unit test, although it ensures that only correct values
are used for calculations. Needs to be fixed up.

https://bugzilla.gnome.org/show_bug.cgi?id=773096
2016-10-21 15:23:14 +03:00
Stian Selnes
d03bd54780 queue: Fix race when calculating cur_level.time
On the first buffer, it's possible that sink_segment is set but
src_segment has not been set yet. If this is the case, we should not
calculate cur_level.time since sink_segment.position may be large and
src_segment.position default is 0, with the resulting diff being larger
than max-size-time, causing the queue to start leaking (if
leaky=downstream).

One potential consequence of this is that the segment event may be
stored on the srcpad before the caps event is pushed downstream, causing
a g_warning ("Sticky event misordering, got 'segment' before 'caps'").

https://bugzilla.gnome.org/show_bug.cgi?id=773096
2016-10-20 14:14:20 +03:00