Commit graph

1501 commits

Author SHA1 Message Date
Sreerenj Balachandran
f60da86ae2 decodebin: Fix typo in comment
https://bugzilla.gnome.org/show_bug.cgi?id=738416
2014-10-21 11:05:53 +02:00
Heinrich Fink
4497b73806 playsink: Use correct property enum value for video-filter property installation 2014-10-10 12:14:57 +03:00
Andrei Sarakeev
a391dfe17f decodebin: Only emit the drain signal for the main decode chain, not any subchains
https://bugzilla.gnome.org/show_bug.cgi?id=738064
2014-10-07 14:48:54 +03:00
Sebastian Dröge
72eb84a900 decodebin: Free factories array when delaying autoplugging due to non-final caps 2014-10-06 10:15:13 +03:00
Aurélien Zanelli
796fd16550 decodebin: unref decode pad after usage
https://bugzilla.gnome.org/show_bug.cgi?id=737757
2014-10-06 09:53:39 +03:00
Andres Gomez
09872442f8 uridecodebin: Removed setting "iradio-mode" property in the source element
The "iradio-mode" property used to have a default FALSE value in HTTP
source elements but now it should default to TRUE or just do not exist
as a property so it is not really needed to set it any more in
uridecodebin.

Apart from that this code could've never worked as uridecodebin looks for a
string-typed iradio-mode property, but it's a boolean in all sources.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725383
2014-10-02 09:50:48 +03:00
Andrei Sarakeev
2133a98eb1 playbin: Don't leak input-selector sinkpads
https://bugzilla.gnome.org/show_bug.cgi?id=736861
2014-09-18 12:52:02 +03:00
Sebastian Dröge
52e97f59ba playsink: Add audio/videoconvert in front of the audio/video-filters
audioresample and videoscale is something the application will have to do if
required, but we can at least help here by adding the
audioconvert/videoconvert elements.

https://bugzilla.gnome.org/show_bug.cgi?id=735748
2014-09-16 21:42:46 +03:00
Thiago Santos
3657929e1f decodebin: protect buffering message handling
Use the object lock to avoid concurrent processing which leads
to small disasters (assertions or crashes)
2014-09-11 17:16:18 -03:00
George Kiagiadakis
a2122f04ec playbin: filter out buffering messages when switching uri
When switching URI from about-to-finish, playbin starts decoding the new
URI and the queue2 inside uridecodebin starts emitting buffering messages
immediately. However, the queue(s) inside playsink still have buffers to
play and the pipeline doesn't need to pause for buffering, so we should
not send those buffering messages up to the application, otherwise there
is an audible glitch caused by pausing the pipeline for a very short time.

https://bugzilla.gnome.org/show_bug.cgi?id=727255
2014-09-05 12:44:27 -03:00
Sebastian Dröge
5cbefaa9a2 decodebin: Also include the raw caps in the error message, not just the human readable description 2014-09-02 15:37:38 +03:00
Sebastian Dröge
56899b596e decodebin: Include codec description for missing plugins in the error message
If we had plugins and an error occurred we only include the error message
caused by this, otherwise we will include the codec description as generated
from the caps.

This allows to detect which exact codec was missing instead of getting a
generic "no suitable decoders found" error message.
2014-09-02 13:00:48 +03:00
Sebastian Dröge
2434af3d31 playsinkconvertbin: setcaps() always returns TRUE and the return value is unused
Change it to a void return value. The caps are forwarded afterwards via
gst_pad_event_default() and not inside this function.

CID 1226477
2014-08-28 17:13:05 +03:00
Sebastian Dröge
a5cf0a4572 decodebin: Include information from the error messages of tried but failed elements in the missing plugin errors 2014-08-25 21:01:16 +03:00
Sebastian Dröge
22a138b716 decodebin: Initialize local variables for every retry 2014-08-25 21:01:16 +03:00
Sebastian Dröge
21e9f84486 decodebin: Remove error case that resulted in two error messages
We already send one in gst_decode_bin_expose() for this case. Only
if we're unable to typefind the caps another error message is needed.
2014-08-25 21:01:16 +03:00
Thiago Santos
98ed3ddc8f playsinkconvertbin: only intersect with the filter at the end
Otherwise we might change some capsfeatures from ANY to the specific
value from the filter and do not filter those out in case the
sink doesn't support them

https://bugzilla.gnome.org/show_bug.cgi?id=734822
2014-08-15 18:24:36 -03:00
Thiago Santos
14d79a3a47 decodebin: handle group switching for deadend group
Gracefully handle switching groups that all pads are deadend.

This can happen when quickly switching programs on mpegts as the
output is unaligned it can happen that not enough data was accumulated at
parsers to generate any buffers, causing the stream to receive EOS before
any data can be decoded.

To handle this scenario, the _expose function now also gets if there is
any next group to be exposed along with the list of endpads. If there are
no endpads and there is another group to expose it will switch to this next
group and then retry exposing the streams.

Also, the requirement to only switch from the chain that has the endpad had
to be modified to care for when the drainpad is NULL

https://bugzilla.gnome.org/show_bug.cgi?id=733169
2014-08-13 18:51:37 +03:00
Thiago Santos
9c09c8ae17 decodebin: consider all deadend pads as drained
Otherwise when switching out a group with a deadend pad it will block
as it would be waiting for EOS on a deadend that already got one

https://bugzilla.gnome.org/show_bug.cgi?id=733169
2014-08-13 18:51:37 +03:00
Sebastian Dröge
d280bba126 playsinkconvertbin: Make sure to intersect raw caps with our converter caps
Otherwise we end up allowing video/x-raw with arbitrary caps features that are
not handled by our converters.

https://bugzilla.gnome.org/show_bug.cgi?id=734683
2014-08-13 14:28:05 +03:00
Sebastian Dröge
59fb749ef6 decodebin: Remove buffering special casing for adaptive streaming demuxers
They output smaller buffers now and we should be able to handle the buffering
limits like in every other situation now.
2014-08-11 10:57:43 +02:00
Sebastian Dröge
a0a9fd004b playbin: Keep a reference to the playsink sinkpads
Otherwise playsink might get shut down without us noticing
that our pad references are gone now.

Probably fixes https://bugzilla.gnome.org/show_bug.cgi?id=733165
2014-08-01 15:00:46 +02:00
Mohammed Sameer
b34e0ba91c streamsynchronizer: don't unset DISCONT flag
Unsetting DISCONT flag means we need to copy the buffer. This copy operation
mandates that all GstMemory should be copy-able which is not always the case

https://bugzilla.gnome.org/show_bug.cgi?id=727409
2014-08-01 14:23:07 +02:00
Thiago Santos
cf50b45ff6 decodebin: add missing 'time' word to debug message
It prints the buffers, bytes and time limits, but 'time' was missing
from the string.
2014-07-29 15:55:27 -03:00
Sebastian Dröge
362e9a547b playbin: Pass through NO_PREROLL state change returns
Fixes playback of live pipelines.
2014-07-28 16:57:00 +02:00
Sebastian Dröge
f3f55e1758 uridecodebin: Pass through NO_PREROLL state change returns
Fixes playback of live pipelines.
2014-07-28 16:57:00 +02:00
Tim-Philipp Müller
1ed192abb0 playbin: fix 'attempt to unlock mutex that was not locked' in error code path
Fixes playbin unit test with latest GLib.
2014-07-26 14:52:01 +01:00
Sebastian Dröge
f173fa15b1 decodebin: Don't unref caps for which we don't own a reference... get one first
https://bugzilla.gnome.org/show_bug.cgi?id=733615
2014-07-23 19:51:36 +02:00
Sebastian Dröge
73646bd04f playbin: Go asynchronously from READY to PAUSED
We now add all our elements to uridecodebin *after*
GstBin::change_state(READY->PAUSED), so we need to post async-start
and async-done messages ourselves if we want to work async.

https://bugzilla.gnome.org/show_bug.cgi?id=733495
2014-07-23 12:46:48 +02:00
Sebastian Dröge
5c038192e2 uridecodebin: Go asynchronously from READY to PAUSED
We now add all our elements to uridecodebin *after*
GstBin::change_state(READY->PAUSED), so we need to post async-start
and async-done messages ourselves if we want to work async.

https://bugzilla.gnome.org/show_bug.cgi?id=733495
2014-07-23 12:46:48 +02:00
Sebastian Dröge
c051b378d7 uridecodebin: Create new sources after chaining up to the parent class
Otherwise we start the new sources already before the parent class
got ready to start.
2014-07-21 09:35:36 +02:00
Sebastian Dröge
5bf3c92462 playbin: Create new sources after chaining up to the parent class
Otherwise we start the new sources already before the parent class
got ready to start.
2014-07-21 09:35:36 +02:00
Sebastian Dröge
b15a47aa19 decodebin: Link Parser/Converter directly and already connect to pad-added and other signals before setting elements to PAUSED
otherwise we're going to
a) start Parser/Converter before they are linked to their capsfilter,
   breaking their negotiation of a proper stream format
b) start demuxers without having connected to their pad-added signals. We
   miss pads and in the worst case don't link any pads at all
2014-07-21 09:35:36 +02:00
Sebastian Dröge
57999c28fd decodebin: Send sticky events to the new element after setting it to PAUSED
... and if this fails for whatever reason we skip the element and instead
try with the next element. This allows us to handle elements that fail
when setting caps on them by just skipping to the next alternative element.
2014-07-21 09:35:36 +02:00
Sebastian Dröge
994680b04e decodebin: Only link elements further after setting them to PAUSED
They might fail to go to PAUSED, and when connecting them further
we might already expose their srcpads on decodebin if we're unlucky.
This prevents us to handle failures going to PAUSED gracefully.
2014-07-21 09:35:36 +02:00
Sebastian Dröge
83d508a552 decodebin: Remove ERROR message filter after we set the element to PAUSED
This allows us to catch more errors gracefully and switch to an alternative
element instead.
2014-07-21 09:35:05 +02:00
Sebastian Dröge
f66555668a decodebin: Only continue autoplugging once the pad has final caps
If the caps query returned us fixed caps this doesn't mean yet
that these caps are actually complete (fields might be missing).

It allows to do us some decisions, but the selection of the next
element should be delayed as only complete caps allow proper selection
of the next element.
2014-07-21 09:35:05 +02:00
Sebastian Dröge
424ff91394 decodebin: Consider the caps after the capsfilter after parsers for autoplugging
Otherwise we might try to continue autoplugging e.g. for a specific
stream-format although the parser could convert to something else, thus giving
us potentially less options for decoders.
2014-07-21 09:35:05 +02:00
Arun Raghavan
40699e020a playsink: Fix filter property getter
The switch-case set was incomplete.

https://bugzilla.gnome.org/show_bug.cgi?id=733012
2014-07-12 13:01:45 +05:30
Thiago Santos
693f3f9ce2 playsinkconvertbin: fix caps leak
Let go the reference to the converter caps after using it
2014-06-27 14:25:05 -03:00
Sebastian Dröge
9d33b38969 playsinkconvertbin: Filter out ANY capsfeatures from the converter caps
We can't convert to ANY capsfeatures, they are only there so that we
can passthrough whatever downstream can support... but we definitely
don't want to return them to upstream.
2014-06-22 20:42:43 +02:00
Sebastian Dröge
1f41a1606a uridecodebin: Also catch CODEC_NOT_FOUND errors and delay them until all decodebins are done 2014-06-05 15:35:31 +02:00
Sebastian Dröge
0f43e801f2 uridecodebin: Ignore missing-plugin messages unless all decodebins post one
When playing RTSP streams there will be one decodebin per stream. If some of
them fail because of a missing plugin we should not fail completely but play
the supported streams at least.

https://bugzilla.gnome.org/show_bug.cgi?id=730868
2014-06-04 17:00:43 +02:00
Sebastian Dröge
393f090197 decodebin: Do async-done on expose errors too 2014-06-04 17:00:43 +02:00
Thiago Santos
783195ccef decodebin: aggregate buffering messages
Aggregate buffering messages to only post the lower value
to avoid setting pipeline to playing while any multiqueue
is still buffering.

There are 3 scenarios where the entries should be removed from
the list:

1) When decodebin is set to READY
2) When an element posts a 100% buffering (already implemented)
3) When a multiqueue is removed from decodebin.

For item 3 we don't need to handle it because this should only
happen when either 1 is hapenning or when it is playing a
chained file, for which number 2 should have happened for the
previous stream to finish

https://bugzilla.gnome.org/show_bug.cgi?id=726423
2014-05-29 18:59:30 -03:00
Sebastian Dröge
0760fe8625 playsink: Always take the playsink lock when adding or removing pad probes
Otherwise we might end up inside the callback without having stored
the probe id... then try to remove that probe (not!) from the callback
and wait forever for the pad to unblock.
2014-05-20 09:51:07 +02:00
Wim Taymans
0e8b47443e uridecodebin: use downloadbuffer for download buffering
Use the new downloadbuffer element to implement the download buffering
feature

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680183
2014-05-08 17:12:54 +02:00
Sebastian Dröge
0d87f8fdb2 playbin: Don't block on non-serialized events
https://bugzilla.gnome.org/show_bug.cgi?id=729321
2014-05-01 13:18:11 +02:00
Sebastian Dröge
4d062b230a playsink: Don't block on non-serialized events
https://bugzilla.gnome.org/show_bug.cgi?id=729321
2014-05-01 13:18:10 +02:00
Sebastian Dröge
67289fd184 playsinkconvertbin: Don't block on non-serialized events
https://bugzilla.gnome.org/show_bug.cgi?id=729321
2014-05-01 13:18:10 +02:00