Commit graph

339 commits

Author SHA1 Message Date
Stefan Sauer 015bd9285a playback: use the new gst_object api
Use gst_object_has_as_anchestor instead of the now deprecated _has_ancestor.
2015-05-15 14:49:47 +02:00
Tim-Philipp Müller ec5c93f169 docs: update element example pipelines
- gst-launch -> gst-launch-1.0
- use autoaudiosink and audiovideosink more often
- review pipeline examples and descriptions
2015-05-10 11:38:19 +01:00
Luis de Bethencourt df08f5eabe remove unused enum items PROP_LAST
This were probably added to the enums due to cargo cult programming and are
unused. Removing them.
2015-04-24 17:11:01 +01:00
Luis de Bethencourt 985ed4847f playbin: avoid possible deference of null pointer
For safety, check the pointer playbin->curr_group is valid before
reading parameters of the structure.

CID #1291624
2015-03-30 10:50:48 +01:00
Thiago Santos d54d51d0d2 playbin: ignore new pads if it is shutting down
If a new pad is added after playbin has been put to READY/NULL it
should ignore new pads as it is shutting down.

This can happen when the pipeline fails to preroll (is still in READY)
and the user gives up on waiting or an error that doesn't reach
the demuxer occurs (on some event handling) and it will continue to
work and exposing pads while playbin has been put to NULL.

Without this check an input-selector is created and set to PAUSED
state, preventing playbin from properly shutting down in case it
has data blocked inside it.
2015-03-25 08:32:33 -03:00
Ramiro Polla b636fe29f3 playbin: don't escape percent sign in documentation code sample 2015-03-14 14:20:17 +00:00
Sebastian Dröge 8093e3ba94 playbin: Disconnect signals and invalidate group if it fails to activate
Otherwise playbin might move to the group directly after EOS of the next
group, and then error out again.
2015-03-12 12:18:30 +00:00
Vincent Penquerc'h a2ca6459a6 playbin: forward template and ring buffer settings to existing decodebins
https://bugzilla.gnome.org/show_bug.cgi?id=744844
2015-02-24 10:02:19 +00:00
Stefan Sauer c51bf98af4 playbin: improve debug log
Log the human readable pad_link_return desc as well.
2015-02-11 22:16:53 -08:00
Thibault Saunier b9cbfcdeb4 playbin: Do not mix up stream type when getting stream combiner element
We were always returning the video stream combiner whatever stream type
combiner was wanted.
2014-12-11 13:47:58 +01:00
Thiago Santos 7e801a5f26 playbin2: always unref the combiner sinkpad when removing the srcpad
Create a function to do the pad cleanup of the GstSourceCombine struct
and use it to not forget to also cleanup the sink pad and fix a memory
leak.

https://bugzilla.gnome.org/show_bug.cgi?id=741198
2014-12-10 13:36:37 -03:00
Edward Hervey 6a2f017bfa playbin: Only check sinks which are in >= GST_STATE_READY
Otherwise we endup with bogus caps intersection (from the pad template
caps and not from what the actual hardware/device supports)

https://bugzilla.gnome.org/show_bug.cgi?id=738131
2014-12-05 07:58:44 +01:00
Tim-Philipp Müller 9c5d53c7e3 docs: fix some gtk-doc warnings
Deprecated entities found in documentation for xyz:Long_description
.
2014-11-15 23:13:42 +00: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
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 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
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
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 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 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 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
Tim-Philipp Müller bcb8068e27 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 23:28:57 +01:00
Jan Schmidt 98482c3a0e playbin: Drop reference to any source element in NULL state
Drop the reference instead of waiting for either finalize(), or
for a new source when reused. Everyone else already forgot about
the old source.
2014-04-04 02:15:53 +11:00
Arun Raghavan f4cab18ec1 playback: Add video-/audio-filter properties
This provides an audio-filter and video-filter property to allow
applications to set filter elements/bins. The idea is that these will
e
applied if possible -- for non-raw sinks, the filters will be skipped.

If the application wishes to force the application of the filters, this
can be done by setting the new flag introduced on playsink -
GST_PLAY_FLAG_FORCE_FILTERS.

https://bugzilla.gnome.org/show_bug.cgi?id=679031
2014-03-16 18:38:29 +01:00
Sebastian Dröge 1bda077374 Revert "playback: Add video-/audio-filter properties"
This reverts commit fb8fdedb4f.
2014-03-16 18:38:25 +01:00
Arun Raghavan fb8fdedb4f playback: Add video-/audio-filter properties
This provides an audio-filter and video-filter property to allow
applications to set filter elements/bins. The idea is that these will be
applied if possible -- for non-raw sinks, the filters will be skipped.

If the application wishes to force the application of the filters, this
can be done by setting the new flag introduced on playsink -
GST_PLAY_FLAG_FORCE_FILTERS.

https://bugzilla.gnome.org/show_bug.cgi?id=679031
2014-03-16 18:35:57 +01:00
Matthieu Bouron 45dfceacdb playbin: improve autoplug_query_caps return
Makes autoplug_query_caps return
downstream_caps + intersect_first(filter_caps, element_caps)

https://bugzilla.gnome.org/show_bug.cgi?id=724828
2014-02-27 21:23:12 +01:00
Sebastian Dröge a5918b0ab5 playbin: Keep inputselector around until we release its pads
Otherwise there's an interesting race condition when we destroy
the inputselector (actually it will be destroyed later when its state
change message gets destroyed) and afterwards release its sinkpad.

This is the code path when the last channel is removed from the
input selector.

Gave this warning sometimes, for chained oggs or whenever else
we change decode groups:
GStreamer-CRITICAL **: Padname '':sink_0 does not belong to element inputselector0 when removing
2014-02-18 15:06:25 +01:00
Sebastian Dröge a02678057e playbin: First try to get the pad's current caps, then query caps
The caps query might give us ANY caps while the pad has fixed caps
configured currently.
2014-02-11 16:36:20 +01:00
Sebastian Dröge 57295753d5 playbin: Fix memory leak in autoplugging code
We should not leak element factories ideally.
2014-02-10 16:33:50 +01:00
Wonchul Lee c2746d753e playbin: Remove unnecessary assignment
Remove duplicated assignment

https://bugzilla.gnome.org/show_bug.cgi?id=722491
2014-01-18 13:33:57 +01:00
Sebastian Dröge 4f8f5918be playbin: Insert decoders without GstAVElement information between the other decoders
Otherwise they would be preferred over all decoders independent
of their ranks.

https://bugzilla.gnome.org/show_bug.cgi?id=722316
2014-01-18 13:33:57 +01:00
Sebastian Dröge 6b46019abf playbin: Only put parsers and sinks first, not all non-decoders
https://bugzilla.gnome.org/show_bug.cgi?id=722316
2014-01-18 13:33:57 +01:00
Matthieu Bouron 98e0dec715 playback: add ANY caps features to default audio/video raw caps
Allows elements using audio/video caps features to be used by playbin.
2013-12-30 11:25:49 +01:00
Tim-Philipp Müller b1ff48c1a1 docs: remove old 0.10 Since markers
They're just confusing.
2013-11-16 16:10:07 +00:00
Thiago Santos f8d8a56d7b playbin: make sure elements are in null before disposing
If a pipeline fails to preroll, it might happen that the sinks are
put into READY state from playbin's sink activation, but they are never
set to playsink, so they aren't being managed by a GstBin and will keep
their READY state until they are unreffed, leading to a warning.

Prevent this by always forcing them to NULL when deactivating a group

https://bugzilla.gnome.org/show_bug.cgi?id=708789
2013-10-01 17:53:05 -03:00
Sebastian Dröge cac572ec5d playbin: Make sure to cache context types we did not store yet
https://bugzilla.gnome.org/show_bug.cgi?id=708668
2013-09-24 12:47:26 +02:00
Sebastian Dröge 78b0e16773 playbin: Implement context caching for sinks that are not in playsink yet 2013-09-18 22:39:25 +02:00
Sebastian Dröge e21d3d214a playbin: No need to set the GstContext on the sink before activating it
This is all handled by the GstBin code now.
2013-09-18 22:39:25 +02:00
Loïc Minier 8492b956cd playback: fix docs of convert-sample action signal
convert-sample returns a GstSample, not a GstBuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=707660
2013-09-07 14:58:46 +01:00
Arnaud Vrac a8df760c96 playbin: check for tags on the right combiner instance
The get-tags actions are not working in all cases, because the track
number is used to resolve the stream combiner instead of the stream
type.

https://bugzilla.gnome.org/show_bug.cgi?id=705369
2013-08-03 17:17:10 +01:00
Sebastian Dröge f92da706fd playbin: Ensure that everything in a GstSourceGroup gets the same group-id
Including streams from external subtitle files. If not everything implements
the group-ids playbin invents its own.
2013-07-23 12:42:50 +02:00
Sebastian Dröge 432b092247 playbin: Don't prefer decoders for which we found a matching sink
It doesn't make much sense.
2013-07-16 12:21:44 +02:00
Sebastian Dröge 4cfda00120 playbin: Also consider possible converters for raw streams when selecting compatible sink/source combinations
https://bugzilla.gnome.org/show_bug.cgi?id=704285
2013-07-16 11:22:35 +02:00
Sebastian Dröge 5ee98c146e playbin: Fix sorting for decoder factories for which we didn't find a compatible sink
They might just need some converters for raw audio/video.

https://bugzilla.gnome.org/show_bug.cgi?id=704285
2013-07-16 09:32:31 +02:00
Sebastian Dröge 10c91ea5b5 playbin: Don't print a warning when setting a sink to NULL
https://bugzilla.gnome.org/show_bug.cgi?id=704194
2013-07-15 09:10:30 +02:00
Sebastian Dröge edecd7eec3 playbin: Properly destroy and set to NULL sinks that don't work 2013-07-12 12:05:37 +02:00
Alban Browaeys f174c450c9 playbin: Fix logic to detect if a stream-change is currently pending
Fixes duration reporting in gapless playback between files.

https://bugzilla.gnome.org/show_bug.cgi?id=585969
2013-07-12 09:54:06 +02:00
Sebastian Dröge 9ab6ab4257 playbin: Only give sinks a new bus if they have no parent yet
Otherwise we will remove the bus that would proxy messages to playsink
and never set it again. If the sink is already in playsink, all failures
are fatal anyway as it's either a sink that worked before or one that
was set by the user.

https://bugzilla.gnome.org/show_bug.cgi?id=701997
2013-07-10 17:17:05 +02:00
Sebastian Dröge d7f1d9954f playbin: Store a/v/t sinks locally too, not just in playsink 2013-07-10 13:22:04 +02:00