Commit graph

38 commits

Author SHA1 Message Date
Edward Hervey f2f87d220f urisourcebin: Don't leak mutexes 2017-11-25 12:45:03 +01:00
Reynaldo H. Verdejo Pinochet e81c334ca9 Use proper GtkDoc notation for NULL/FALSE/TRUE 2017-10-03 14:31:18 -07:00
Edward Hervey ce65017d03 decodebin3/urisourcebin: Switch to actual EOS events internally
Use the intended sequence for re-using elements:
* EOS
* STREAM_START if element is to be re-used

This avoids having elements (such as queue/multiqueue/queue2) not
properly resetting themselves.

When delaying EOS propagation (because we want to wait until all
streams of a group are done for example), we re-trigger them by
first sending the cached STREAM_START and then EOS (which will
cause elements to re-set themselves if needed and accept new
buffers/events).

https://bugzilla.gnome.org/show_bug.cgi?id=785951
2017-08-11 11:23:29 +03:00
Seungha Yang fc67a689af urisourcebin: Push EOS if slot is still eos state
linked input of slot can be old input, so urisourcebin should check
eos state to figure out whether it's new one or not.
If not, urisourcebin never ever forwards EOS to downstream at the end
of presentation, because the old input is still there without removal

https://bugzilla.gnome.org/show_bug.cgi?id=777735
2017-07-13 07:32:42 +02:00
Thibault Saunier 7e94d2824f urisourcebin: Call do_async_done when source state change returns NO_PREROLL
Otherwise for RTSP streams for example, the pipeline will never go to
PLAYING as it will be missing an ASYNC_DONE message.

https://bugzilla.gnome.org/show_bug.cgi?id=780099
2017-06-15 14:35:06 -04:00
Sebastian Dröge 66929f8970 urisourcebin: Use downloadbuffer element
And only set low-percent/high-percent if not using downloadbuffer, just
like in old uridecodebin. using the watermark based buffering causes
playback to hang never finish buffering with downloadbuffer.
2017-06-12 10:24:43 +03:00
Sebastian Dröge efbda07cfa urisourcebin: Unref query with gst_query_unref()
Not gst_object_unref().
2017-05-18 11:03:07 +03:00
Jan Schmidt 546a99026b urisourcebin: Set removed flag when removing buffering msg
Forgot to set the flag, resulting in a missed check for
sending 100% in some cases. Spotted by Coverity.

CID: 1403263
2017-03-27 23:00:34 +11:00
Jan Schmidt a0f870a215 urisourcebin: Mention which queue is being linked in debug output 2017-03-23 00:21:44 +11:00
Seungha Yang 587c417d89 urisourcebin: Fix typefind list leak
https://bugzilla.gnome.org/show_bug.cgi?id=780257
2017-03-20 11:57:11 +02:00
Jan Schmidt 94da76d301 urisourcebin: Fix buffering message aggregation.
Add locking, and handle EOS properly now that urisourcebin
uses custom events in place of real EOS events, so we
need to manually remove buffering messages and potentially
post 100% in that situation
2017-03-18 02:03:47 +11:00
Jan Schmidt 8cb57a4fe8 urisourcebin: Store slot info on the queue object too
The buffering message handling tries to look up the
slot info on the queue itself.
2017-03-18 02:03:47 +11:00
Thibault Saunier 099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Jan Schmidt 4e911760d2 urisourcebin: Shrink queue2 max-size-time buffering
The expanded 4 second buffering was making radio streams that are
being delivered at real-time speeds too slow. We might need
a better plan for matching the queue2 size to incoming bitrate
in the absence of tag information or timestamping.

In uridecodebin, it used tags on the output of decodebin to
adjust the queue2 buffering, but urisourcebin doesn't have that
view - decodebin is downstream from us.
2017-03-09 01:42:14 +11:00
Sebastian Dröge 903a8863ce playbin3/urisourcebin: Enable buffering by default
This only has effect on network streams in these elements, and by
enabling it by default we get the same behaviour as in playbin2.
2017-03-07 14:59:36 +02:00
Sebastian Dröge bd9fd89d61 urisourcebin: Fix inverted check for an existing slot
CID 1363330
2017-02-28 15:15:31 +02:00
Jan Schmidt 5076520502 urisourcebin: Preserve seqnum on EOS events
When converting EOS to/from our custom fake EOS event,
preserve any seqnum on the original event.
2017-01-12 22:28:50 +11:00
Edward Hervey 90e86b8638 urisourcebin: Avoid races when setting up typefind
The state of urisourcebin (and all elements contained within) can
change at any point in time, including when setting up the typefind
element.

In order to avoid ending up with typefind starting without being fully
connected, lock the state and connect to the 'have-type' signal.
2017-01-12 10:51:34 +01:00
Jan Schmidt ef8f0cdd9d urisourcebin: Drop fake EOS if the pad got relinked
If our pad got relinked in since the fake-EOS was sent to the
pad, then drop the fake-EOS event.

CID: 1398546
2017-01-11 23:18:47 +11:00
Arun Raghavan a2c2b22176 urisourcebin: Drop some dead code
The ret == GST_STATE_CHANGE_FAILURE is handled in the previous for loop
already.

CID: 1398544
2017-01-11 17:14:46 +05:30
Seungha Yang 1eedb4ea91 urisourcebin: Clear pad from pending list if it was linked
If not, the other slots might try to link the pad again.
This can happen when the demuxer has multiple src pads
and their caps are identical

https://bugzilla.gnome.org/show_bug.cgi?id=777121
2017-01-11 20:19:45 +11:00
Seungha Yang 7bd7b2209a urisourcebin: Configure typefind element for non-streaming uri
To ensure configuring adaptivedemux if needed,
setup typefind element even if uri is not matched to streaming protocol.

https://bugzilla.gnome.org/show_bug.cgi?id=776458
2017-01-11 00:26:27 +11:00
Seungha Yang 5d0628ff52 urisourcebin: Use GList for typefind elements
We need typefind elements per source element's srcpad

https://bugzilla.gnome.org/show_bug.cgi?id=776458
2017-01-11 00:26:27 +11:00
Seungha Yang 46c6e92abd urisourcebin: Remove unused signal handler variable
Remove never used handler id

https://bugzilla.gnome.org/show_bug.cgi?id=776458
2017-01-11 00:26:27 +11:00
Seungha Yang 87f21a925c urisourcebin: Clear EOS state with stream-start/flush-stop event
The EOS state marker should cleared on stream-start or flush-stop

https://bugzilla.gnome.org/show_bug.cgi?id=777009
2017-01-09 22:38:14 +11:00
Seungha Yang c10e7c5011 urisourcebin: Never push actual EOS event to slot
Due to the special nature of adaptivedemux, reconfigure happens
frequently with seek/track-change.
In very exceptional cases, the following sequence is possible:
  * EOS event is pushed to queue element and still buffers are queued
  * During draining remaining buffers, reconfiguration downstream
happens due to track switch.
  * The queue gets a not-linked flow return from downstream
  * Because the sinkpad is EOS, the queue registers an
    error on the bus, causing the pipeline to fail.

Avoid the sinkpad getting marked EOS in the first place, by using a
custom event in place of EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=777009
2017-01-09 22:31:46 +11:00
Seungha Yang cbd4bcd7a4 urisourcebin: Try to link output slot before cleanup
Before cleaning up output slot, check pending pads first, if available.
Then, cleanup it only if linking was failed.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang 5760bd4543 urisourcebin: Cleanup unused output slot
Since urisourcebin cannot cleanup unused output slot
in streaming thread, it will be handled in thread pool
with gst_element_call_async ().

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Changbok Chea 14ce96a459 urisourcebin: Fix adaptive demuxer's property checking and buffering setting
- Add adaptive demuxer's 'connection-speed' property checking
- Set adaptive demuxer q2 buffering property via urisrc use_buffering value

https://bugzilla.gnome.org/show_bug.cgi?id=772550
2016-11-02 11:23:44 +11:00
Seungha Yang 6dbfbead61 urisourcebin: Remove trailing whitespace
https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-11-01 20:06:43 +02:00
Wonchul Lee dc7fd9c1f1 urisourcebin: Fix GST_TYPE_URI_SOURCE_BIN macro typo
https://bugzilla.gnome.org/show_bug.cgi?id=772445
2016-11-01 20:00:27 +02:00
Wonchul Lee 7c9626a3f4 urisourcebin: fix to log event pointer
https://bugzilla.gnome.org/show_bug.cgi?id=772445
2016-11-01 20:00:27 +02:00
Wonchul Lee 9e8c0d224b urisourcebin: Make use of adaptive demuxer variable
https://bugzilla.gnome.org/show_bug.cgi?id=772445
2016-11-01 20:00:27 +02:00
Sebastian Dröge d5e8b7df6c playback: Use new gst_bin_set_suppressed_flags() API instead of worrying about the flags in multiple places 2016-09-12 18:37:21 +02:00
Wonchul Lee 0cc3f199ca playbackutils: Move compare_factories_func
Move _decode_bin_compare_factories_func function to playbackutils

https://bugzilla.gnome.org/show_bug.cgi?id=770692
2016-09-01 13:06:51 +03:00
Tim-Philipp Müller e1eed66eb8 docs: urisourcebin: fix typo 2016-07-22 14:42:31 +01:00
Jan Schmidt e68c85e5a5 playback: Flesh out docs a bit for new elements
Add some more text to the docs for urisourcebin,
parsebin, decodebin3 and playbin3, including a warning
that they are unstable API for now
2016-07-22 23:21:36 +10:00
Edward Hervey d514e79bee playback: New elements
With contributions from Jan Schmidt <jan@centricular.com>

* decodebin3 and playbin3 have the same purpose as the decodebin and
playbin elements, except make usage of more 1.x features and the new
GstStream API. This allows them to be more memory/cpu efficient.

* parsebin is a new element that demuxers/depayloads/parses an incoming
stream and exposes elementary streams. It is used by decodebin3.
It also automatically creates GstStream and GstStreamCollection for
elements that don't natively create them and sends the corresponding
events and messages

* Any application using playbin can use playbin3 by setting the env
variable USE_PLAYBIN3=1 without reconfiguration/recompilation.
2016-06-30 14:15:47 +02:00