Commit graph

1851 commits

Author SHA1 Message Date
Edward Hervey
8386ea706f playbin3: Remove setting 'subtitle-encoding' on decodebin
That property doesn't exist
2018-02-10 12:17:39 +01:00
Edward Hervey
7b8cfb9e53 playbin3: Clarify documentation of combiner properties 2018-02-10 12:17:39 +01:00
Edward Hervey
4ed0708f78 playbin3: Remove unused define 2018-02-10 12:17:39 +01:00
Edward Hervey
9e7401bedf decodebin3: Use GST_GROUP_ID_INVALID 2018-02-10 12:17:39 +01:00
Edward Hervey
dd7a1407a4 decodebin3: Don't forward already-handling SELECT_STREAMS
Upstream might respond negatively to the event, whereas we actually
handled it.
2018-02-10 12:17:38 +01:00
Edward Hervey
401cadfd74 decodebin3: Add new about-to-finish signal 2018-02-10 12:17:38 +01:00
Edward Hervey
c136acf27a decodebin3: Remove unused definition 2018-02-10 12:17:38 +01:00
Edward Hervey
fa710a59aa decodebin3: Don't take the lock when creating a new input
We only need to take the input lock when adding/removing
inputs from the list.
2018-02-10 12:17:38 +01:00
Edward Hervey
fa9adbe986 playbin3: Remove unused variable
The lock is never used
2018-02-10 12:17:38 +01:00
Edward Hervey
1717e33da5 urisourcebin: Remove auto-plugging signals
They were never used and we need a better system
2018-02-10 12:17:36 +01:00
Edward Hervey
e5157ca400 urisourcebin: Remove ASYNC behaviour
It is not needed in the new streams-aware world
2018-02-10 12:16:09 +01:00
Edward Hervey
f4035e430a urisourcebin: Remove 'unknown-type' signal
It was never used and makes no sense in the new streams-based world
2018-02-10 12:16:09 +01:00
Edward Hervey
0f51dde728 playbin3: Disable autoplug-related code
The signals were never emitted from decodebin3. This needs
switching to a new signalling system
2018-02-10 12:16:09 +01:00
Edward Hervey
29f57e23c7 playbin3: fix "no-more-pads" handling
That signal is never emitted by decodebin3 and is handled differently
2018-02-10 12:14:47 +01:00
Edward Hervey
9f1063e4a3 playbin3: Remove duration caching
This is now handled directly via sinks and queries through pads
2018-02-10 12:14:47 +01:00
Edward Hervey
fc93302087 parsebin: Remove async behaviour
There's no reason to do async changing
2018-02-10 12:14:17 +01:00
Ashish Kumar
b927d60371 playback-utils: Fix caps leak on failure
https://bugzilla.gnome.org/show_bug.cgi?id=789358
2018-01-17 12:18:41 +00:00
Dongil Park
a8a5905ec6 playbin3: Fix accessing invalid index in GstStream when received select-stream event
If select-stream event was send to playbin3 as missing any GstStream of ES type
(V or A or TEX) of collection then, playbin will access to invalid address of
GstStream due to invalid index limit. This caused SIGSEGV.

https://bugzilla.gnome.org/show_bug.cgi?id=791638
2017-12-15 09:03:12 +01:00
Jun Xie
f88b20397f decodebin: Fix typo in docs
https://bugzilla.gnome.org/show_bug.cgi?id=791058
2017-12-01 10:03:40 +02:00
Edward Hervey
f2f87d220f urisourcebin: Don't leak mutexes 2017-11-25 12:45:03 +01:00
Edward Hervey
38c835ec1e decodebin2: Don't spawn threads on shutdown
If we are shutting down, don't spawn a cleanup thread to cleanup old
groups and instead queue them to be cleaned up in the state change
thread.

This avoids (hopefully for good) having a race between the state change
thread and other threads trying to deactivate elements/pads.
2017-11-16 18:22:20 +01:00
Edward Hervey
e72aa501b0 decodebin2: Avoid deactivation races
Deactivating pads from two threads isn't 100% MT-safe. There is a
slim chance that the GstPadActivateFunc might be called twice with
the same values (in this case from the cleanup thread *and* from
the GstElement change_state function when going from PAUSED to READY).

In order to avoid that, call any existing cleanup function *before*
calling the parent change_state implementation on downwards state
changes.
2017-11-16 06:44:10 +01:00
Edward Hervey
ce8f51e30e decodebin2: Don't try to add pads when shutting down
Be even more agressive than before and just hold the DYN lock when/if
adding pads and return if we are shutting down.
2017-11-14 13:40:50 +01:00
Edward Hervey
77e5a71a15 decodebin2: Don't take locks when deactivating pads
When deactivating pads, we need to ensure that the streaming threads
going through the pads we wish to deactivate can cleanly return.
Failure to do that would result in the streaming locks of those
pads never being released. The end result would be a deadlock
when stopping decodebin2.

In order to avoid that situation, release the "dyn" lock around
the deactivation code. And refactor the code to cope with the
list of blocked pads having potentially changed when re-acquiring
the lock.
2017-11-14 13:40:48 +01:00
Edward Hervey
6280547be7 playbin3: Remove unneeded blacklisting
Blacklisted mimetypes have been empty in almost 10 years ...
2017-11-10 17:22:36 +01:00
Edward Hervey
cd508aff97 playbin3: Remove context caching
This is now handled by the GstBin baseclass
2017-11-10 17:22:22 +01:00
Edward Hervey
3dd0888d1e playbin3: Remove source property
And instead use the "setup-source" signal. This opens the way to deal
with more than one 'source' for a given playlist entry
2017-11-10 17:06:46 +01:00
Edward Hervey
35a8d42724 parsebin: Don't let thread run after unref
We have a dedicated one-shot thread to handle cleanup of old groups.

While this is a good idea. It's an even better idea to make sure
that thread is *completed* before the parsebin element to which
it is related isn't freed/gone.

* There can only be one cleanup thread happening at any point in time.
  If there is already one, we wait for the previous one to finish.
* When shutting down (NULL=>READY) make sure the thread is finished

https://bugzilla.gnome.org/show_bug.cgi?id=790007
2017-11-10 17:06:45 +01:00
Edward Hervey
43b9bcbddb decodebin2: Don't let thread run after unref
We have a dedicated one-shot thread to handle cleanup of old groups.

While this is a good idea. It's an even better idea to make sure
that thread is *completed* before the decodebin2 element to which
it is related isn't freed/gone.

* There can only be one cleanup thread happening at any point in time.
  If there is already one, we wait for the previous one to finish.
* When shutting down (NULL=>READY) make sure the thread is finished

https://bugzilla.gnome.org/show_bug.cgi?id=790007
2017-11-10 17:06:10 +01:00
Edward Hervey
d53ccfd8e5 parsebin: Check for shutdown before exposing pads
We already checked previously, but we need to do it before adding
pads.
2017-11-10 17:06:10 +01:00
Edward Hervey
92e8876844 parsebin: Emit 'drained' only for the top-level chain
Instead of emitting 'drained' whenever every single chain is drained
(which would result in plenty of signal emission, and would also
occur when switching groups), only emit it when the top-level chain
is drained.

Furthermore, mark unknown (and therefore unexposed) pads as drained
since we'll never get EOS on them.

https://bugzilla.gnome.org/show_bug.cgi?id=787367
2017-11-10 10:05:26 +01:00
shakin chou
2ec51ef998 playbin: Don't ref_sink() the sinks twice
Since we're already sunk floating reference, we shouldn't call ref_sink
again, which increases the ref_count and cause leaks.

https://bugzilla.gnome.org/show_bug.cgi?id=789547
2017-11-07 10:32:34 +02:00
Edward Hervey
f448cecceb decodebin2: Recheck shutdown behaviour in error case
If we can expose the main chain, recheck whether we are shutting
down or not.

decodebin2 might have been set to READY/NULL during the attempt
to expose, which would cause it to fail ... but it is not a fatal
issue.
2017-11-02 07:55:16 +01:00
Seungha Yang
466cbef6ab decodebin3: Allow configure output stream without reassign slot
By select-streams event, current implementation of decodebin3
supports deactivate output stream (i.e., decoder element)
in reassign slot(), but cannot activate any slot without track change.

https://bugzilla.gnome.org/show_bug.cgi?id=778015
2017-10-27 09:55:59 +02:00
Seungha Yang
969ab3f48c playbin3: Use STREAMS_SELECTED message to update selected stream types
Application might choose only specific type among all available types
using select-streams event. In this case, it is desired that reconfigure
of playsink to clear unused stream path.

https://bugzilla.gnome.org/show_bug.cgi?id=778015
2017-10-27 09:55:59 +02:00
Reynaldo H. Verdejo Pinochet
e81c334ca9 Use proper GtkDoc notation for NULL/FALSE/TRUE 2017-10-03 14:31:18 -07:00
Mark Nauwelaerts
2372894c63 playbin: ref_sink() sink rather than pointer to sink 2017-08-20 12:25:29 +02: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
Sebastian Dröge
b4899a5a65 playbin: Make sure to ref_sink() any sinks before calling activate_sink()
It is forwarding messages to the playbin bus, thus forwarding messages
that contain a floating reference to the application. This generally
makes bindings unhappy, we must not leak floating references to them.
2017-08-07 15:27:45 +03:00
Seungha Yang
bf32c0b3b0 decodebin3: Remove FIXME and do remove_input_stream() only for the corresponding parsebin
Do not remove other parsebin's input streams. It will cause unexpected
removal of any input streams in multi-parsebin use case.

Basically, the purpose of blocking buffers is similar to checking
no-more-pads of chain/group. That is, it gives hint to know the timing
to remove old (EOSed) streams of the parsebin and to add/reuse slots
for new input streams. But, that doesn't mean that we need to remove
other parsebin's EOSed stream. Each parsebin has most likely its
own streaming thread and therefore EOSed time can be much different.
(i.e., much early EOS of subtitle only parsebin)

https://bugzilla.gnome.org/show_bug.cgi?id=785120
2017-07-19 17:13:20 +02:00
Seungha Yang
abe1183c17 parsebin: Ensure StreamType and Caps of GstStream object before exposing it
The final StreamType and Caps might not be set yet on GstStream at exposing the pads.

https://bugzilla.gnome.org/show_bug.cgi?id=785120
2017-07-19 17:13:20 +02:00
Seungha Yang
7a236e2302 playbin3: Delay linking text output until video stream is shown
We are not sure that which stream's collection arrives first
when there are multiple parsebins such as adaptive streaming.

https://bugzilla.gnome.org/show_bug.cgi?id=785120
2017-07-19 17:13:20 +02:00
Edward Hervey
6ccba23752 playbin3: We only care about source pads going away 2017-07-18 13:05:06 +02:00
Edward Hervey
651a0fe312 decodebin3: use lock macro where applicable 2017-07-18 13:05:06 +02:00
Thibault Saunier
4b3798fedc decodebin3: Protect fields related to streams handling with the SELECTION_LOCK
Fields related to stream handling (input_streams,
output_streams, slots, guint slot_id) where used totally unprotected
until know.

This lead to several races, especially playing back RTSP streams.

To protect those fields, the OBJECT_LOCK can not be used as we sometimes
need to be able to post message on the bus while holding it.

decodebin3 already has a lock to manage stream selection, and in the end
it makes sense to protect all the stream management fields with the same
lock which is why we reuse the SELECTION_LOCK here.

https://bugzilla.gnome.org/show_bug.cgi?id=784012
2017-07-18 13:05:06 +02:00
Edward Hervey
1188345886 decodebin3: Protect dbin->collection usage
Use the selection lock to protect dbin->collection access

https://bugzilla.gnome.org/show_bug.cgi?id=784012
2017-07-18 11:25:53 +02:00
Seungha Yang
60cae68c4e decodebin3: Push EOS to output stream if they are all drained
decodebin3 checks input streams and pushes EOS if all input streams
are EOSed. If not, fake EOS is pushed to the corresponding slot.

When adaptivedemux is used with multi-track configuration,
adaptivedemux never ever push EOS to non-selected track
because streaming thread for the slot stops with not-linked flow return.
So, decodebin3 should generate EOS itself to finish playback.

https://bugzilla.gnome.org/show_bug.cgi?id=777735
2017-07-13 07:32:42 +02: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
Seungha Yang
06cf7440ce decodebin3: Don't send duplicated stream-start event
group-id in stream-start event might be updated in
parse_chain_output_probe (). This cause duplicated stream-start
twice with identical stream-id and seq-num, but only group-id is
different. Although there is no change, stream-start event will
be followed by the first buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=771088
2017-07-12 15:55:26 +02:00
Mathieu Duponchelle
bfba213437 uridecodebin: aggregate topology messages
This makes it possible for GstDiscoverer to work with sources that
have multiple source pads and hence will trigger the creation of multiple
decodebin instances such as rtspsrc.

Based on the work of Vineeth TM <vineeth.tm@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=754178
2017-07-03 20:08:55 -04: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
d5069d27ef Revert "decodebin2: Set a time limit on "upstream" multiqueues"
This reverts commit 07dc9ba071. It causes
timeouts in validate because queues run full before prerolling.
2017-05-31 12:30:40 +03:00
Edward Hervey
07dc9ba071 decodebin2: Set a time limit on "upstream" multiqueues
Those multiqueue are the ones dealing with adaptive demuxers. They should
have a time limit set so that they don't end up buffering too much data.

They would previously be set with no limits at all, which would cause them
to grow indefinitely until downstream blocks.
2017-05-31 10:27:19 +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
Nicolas Dufresne
8e6c6266d7 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:42:07 -04:00
Vincent Penquerc'h
b97cbe678f decodebin2: fix use after free from demuxer flush pad probe
In some cases, we could get a flush-stop event after the chain structure
containing the demuxer was freed.

https://bugzilla.gnome.org/show_bug.cgi?id=782095
2017-05-03 17:37:12 +01:00
Tim-Philipp Müller
6a3640f367 playbin: minor docs fix
The "frame" property is no more, it's "sample" these days.
2017-04-28 15:54:04 +01: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
Haihua Hu
6749e81ce2 streamsynchronizer: every stream need keep their own send_gap_event flag
When a clip has video audio and subtitle, if need send gap event
to audio and subtitle, we should make sure all has been sent, so
need every stream keep one send_gap_event.

https://bugzilla.gnome.org/show_bug.cgi?id=780429
2017-03-23 12:55:57 +02: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
0b6a933e01 decodebin: Close a small race posting 100% buffering
When posting 100% buffering due to removing the last
buffering element, we still need to hold the posting
lock as well, to avoid any race with other elements
that might post a buffering message at that exact
moment
2017-03-18 02:03:47 +11: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
033057cf74 decodebin3: Fix potential NULL pointer dereference on slot deactivation
CID 1363331
2017-02-28 15:17:24 +02:00
Sebastian Dröge
bd9fd89d61 urisourcebin: Fix inverted check for an existing slot
CID 1363330
2017-02-28 15:15:31 +02:00
Sebastian Dröge
f41198db9d decodebin3: Handle stream-start events without group id correctly
CID 1363327
2017-02-28 15:13:49 +02:00
Seungha Yang
6b5617c2a7 decodebin3: Fix crash caused by slot double freeing
Probe for MultiQueue source pad might receive EOS twice,
the first is fake-eos and the other is actual EOS.
And the slot can be freed with fake-eos/EOS if the slot has no input.

Since slot freeing is async, double free can be possible.
So, decodebin3 needs to remove the probe also with slot freeing.

https://bugzilla.gnome.org/show_bug.cgi?id=777530
2017-01-31 17:16:16 +01:00
Seungha Yang
e6ee68a34f decodebin3: Fix list leak on handle_stream_switch()
Free no more used list variables

https://bugzilla.gnome.org/show_bug.cgi?id=775553
2017-01-31 16:48:04 +01:00
Seungha Yang
44bc10219c decodebin3: Change requested_selection to have its own memory for stream-id
"requested_selection" list might be generated by select-streams event.
And memory of stream-id(s) in select-streams is independent from that of stream-collection.

https://bugzilla.gnome.org/show_bug.cgi?id=775553
2017-01-31 16:48:04 +01:00
Seungha Yang
30fe123fdb decodebin3: Change return types of stream_in_{list,collection}
Change return types of functions to get memory address of stream-id.

https://bugzilla.gnome.org/show_bug.cgi?id=775553
2017-01-31 16:48:04 +01:00
Seungha Yang
10fe0497b2 playback: Fix leak on select_streams
Since gst_event_parse_select_streams() returns newly allocated
memory for stream-id(s), it should be freed explicitly.

https://bugzilla.gnome.org/show_bug.cgi?id=775553
2017-01-31 16:48:04 +01:00
Jan Schmidt
54bf104274 decodebin: Don't leak blocked pad references on errors
When the decodebin state change fails because of an error
message, we might not go through PAUSED->READY. Don't leak
a ref to decodebin pads due to pad blocking in that case.

This is because we return ASYNC going to PAUSED, and if
we fail before reaching PAUSED the only transition we'll
see is READY->NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=775893
2017-01-18 13:09:06 +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
Mark Nauwelaerts
28f4e7db12 playsink: do not link to audio or video filter using padname
... as a sinkpad need not be called "sink", and it is not the case
for e.g. timeoverlay (and friends).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=776623
2017-01-04 15:09:00 +01:00
Jan Schmidt
c2a91d2cfd playback: Fix a small race on decodebin/parsebin shutdown.
When shutting down decodebin2 and parsebin, they set their
output pads to flushing, and there is a very small window
where elements might send a sticky event such as a tag event
(which silently fails due to flushing) and then sends a buffer,
and the buffer will return GST_FLOW_ERROR because it can't
forward sticky events. The element will then send an error
message on the bus. This can also happen when elements send EOS
just as shutdown is happening. Since we're about to destroy all
the elements inside parsebin and decodebin anyway, just discard
error messages from them.

A nicer but more difficult fix for GStreamer 2.0 is to make
all event pushing / handling in core return a GstFlowReturn
like buffers do, so we can report a FLUSHING state cleanly.
2017-01-03 02:27:51 +11:00
Jan Schmidt
9517bd9b34 parsebin: Ignore failure to send sticky events
When plugging and then exposing a parser, don't fail
if it fails to send sticky events. The most likely
reason is that things were flushed due to the app
immediately doing a seek, but we can't detect flushing
separately to other error conditions without a
gst_pad_send_event_full() core function that returns
a GstFlowReturn.
2016-12-21 00:44:45 +11:00
Sebastian Dröge
ce693174f4 decodebin2: Put the correct element srcpad into the topology for the very last element of a chain
We were putting the decode pad there, which is the ghostpad linked to
the last element. The decode pad is already in the pad field.
2016-12-17 22:01:10 +02:00
Sebastian Dröge
46835f550d decodebin2: Put the correct pad into the stream-topology if a parser/converter is used
We have to take the capsfilter into account then as the elements are not
linked directly. Previously this caused NULL be set in these cases.
2016-12-17 22:01:10 +02:00
Sebastian Dröge
991758c3d6 decodebin: For adaptive streaming, ensure to put the buffering multiqueue after a parser or demuxer
There are cases when there is no demuxer involved that could do the
buffering, e.g. HLS with raw MP3 or AAC. In this case we want to place
the buffering multiqueue after the parser.

Before this change, we've considered the first element after the
adaptive streaming demuxer as a parser. This is not always true, e.g.
id3demux. Instead we now wait until we actually have a parser (or
decoder).

Fixes playback on such HLS streams.
2016-12-15 16:31:20 +02:00
Seungha Yang
c4929b8647 playback: Add ANY caps features to default text raw caps
Raw text caps with any caps features should be also default raw caps

https://bugzilla.gnome.org/show_bug.cgi?id=775967
2016-12-12 11:10:50 +02:00
Seungha Yang
49653b058a decodebin3: Remove unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
582c7cef18 decodebin3: More cleanup DecodebinOutputStream and MultiQueueSlot
When removing DecodebinInputStream, cleanup DecodebinOutputStream and
MultiQueueSlot also if they were drained.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
6bd7a5602c decodebin3: Drop duration query during _input_pad_unlink ()
Playbin3 takes lock when querying duration and handling
stream-collection message. So,to post stream-collection message,
duration query should be dropped when input pad is being unlinked.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
7e76405895 decodebin3: Update stream-collection with _input_pad_unlink()
Since parsebin does not post new stream-collection message when
it was being removed, decodebin3 should update it itself.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
f08e4592a4 decodebin3: Cleanup no more used DecodebinInput
Remove DecodebinInput using gst_element_call_async() API.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
bd6ec225b9 decodebin3: Cleanup no more used MultiQueueSlot
Since MultiQueueSlot cannot be removed inside of streaming thread,
use gst_element_call_async() API.

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00