Commit graph

292 commits

Author SHA1 Message Date
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
Sebastian Dröge
f68b6c2626 playbin: Change sink ownership handling to be a bit more sane
playbin will now only activate the sinks in a single place and
will never change the states of any sinks that are owned by
playsink.

Also handle text-sinks the same way as audio/video sinks inside
playbin.
2013-07-09 14:57:05 +02:00
Sebastian Dröge
7c28c180ec playbin: If we had a previous autoplugged sink, try to reuse it
https://bugzilla.gnome.org/show_bug.cgi?id=701997
2013-07-02 14:25:28 +02:00
Sebastian Dröge
841d738f7c playbin: Don't change the state of sinks that we passed to playsink already 2013-07-02 14:02:57 +02:00
Sebastian Dröge
a0e61534ef playbin: Improve debug output regarding sink selection 2013-07-02 12:27:03 +02:00
Brendan Long
d3acb2b01a playbin: Post an error message if a stream combiner doesn't return a request pad. 2013-07-02 09:34:19 +02:00
Sebastian Dröge
f39d1dc3b4 playbin: Only intersect to check if a sink can handle raw caps
Doing a subset check requires fixed caps, which we might not have here.

https://bugs.webkit.org/show_bug.cgi?id=116042
2013-07-01 13:46:51 +02:00
Brendan Long
b5f7a621bb playbin: Emit {audio,text,video}-changed signals when pads are removed
https://bugzilla.gnome.org/show_bug.cgi?id=702195
2013-06-14 14:23:11 +02:00
Sebastian Dröge
4465741222 playbin: When activating a fixed sink, proxy error messages too
If activating a fixed sink fails, everything will fail later anyway
and we can just error out early.
2013-06-08 23:51:13 +02:00
Sebastian Dröge
44352deadb playbin: Improve autoplugging of decoder/sink combinations by trying to activate the sink
And if that fails don't bother autoplugging that sink. Also gives
us more accurate sink caps.
2013-06-08 23:34:53 +02:00
Sebastian Dröge
ff8839d97b playbin: Proxy the playbin context to the sinks 2013-06-08 23:22:54 +02:00
Sebastian Dröge
77af24c493 playbin: Proxy sink messages if we activate a sink in playbin already
This makes sure the application gets any context related messages and
can do whatever is required to a) get the sink a context or b) share
the context with other elements in the pipeline.

The proxying is necessary because the sink is not a child element of
playbin, but instead will at a later point be a child of some bin
inside playsink.

https://bugzilla.gnome.org/show_bug.cgi?id=700967
2013-06-08 23:22:54 +02:00
Brendan Long
96aab6d8a5 playbin: Don't take an extra reference to the custom stream combiners
They are automatically reffed when added to the bin because they're
already not floating anymore.
2013-05-29 20:12:48 +02:00
Sebastian Dröge
0dee7777ff playbin: Set custom stream-combiners to NULL and unref before finalizing 2013-05-29 10:35:11 +02:00
Brendan Long
53caa99a59 playbin: Rename select to combine and selector to combiner in playbin 2013-05-29 09:53:34 +02:00
Brendan Long
ba5f6cfe72 playbin: Add support for custom stream-combiners
This allows to chose something else than input-selector
for multiple audio/video/text streams, e.g. an adder could
be used for audio.

It is needed for example to implement some of the more
advanced HTML5 video features.

https://bugzilla.gnome.org/show_bug.cgi?id=698851
2013-05-29 09:52:32 +02:00
Sebastian Dröge
e482b5b8e6 playbin: In autoplug-queries, add the actual decoder/parser/etc template caps
Add the actual decoder/parser/etc caps at the very end to
make sure we don't cause empty caps to be returned, e.g.
if a parser asks us but a decoder is required after it
because no sink can handle the format directly.
2013-05-28 13:23:40 +02:00
Sebastian Dröge
a4ec6fe0b7 playbin: Forward CONTEXT queries to the corresponding sink if we have one
https://bugzilla.gnome.org/show_bug.cgi?id=700967
2013-05-28 13:14:15 +02:00
Sebastian Dröge
e5064ee723 playbin: Refactor autoplug-query handling
We now only check sinks and factories of the corresponding media
type. It doesn't make sense to pass audio/subtitle caps to a video
decoder.
2013-05-28 13:08:00 +02:00
Sebastian Dröge
9513b770f4 decodebin: Pass the element in the autoplug-query signal too 2013-05-28 12:10:33 +02:00
Sebastian Dröge
db8d53bc17 playbin: Refactor autoplug-query handling a bit 2013-05-28 11:05:21 +02:00
Sebastian Dröge
d802c7395a playback: Only do a subset filtering for the factories if we have fixed caps
Otherwise we're plugging a parser/converter currently and have unfixed caps.
2013-05-15 17:15:18 +02:00
Sebastian Dröge
74a31a02fc playbin: Fix deadlock caused by lock order inversion
First the source group lock, then the elements list lock.
2013-05-15 13:38:32 +02:00
Sebastian Dröge
450a47c0a5 playback: Use subset checks instead of intersection
https://bugzilla.gnome.org/show_bug.cgi?id=700272
2013-05-14 10:07:44 +02:00
Sebastian Dröge
b0ec886cb9 playbin2: Chose more balanced metric to compare ranks of decoder/sink combinations 2013-05-09 15:05:21 +02:00
Sebastian Dröge
b23f4e4ab9 playbin: Fix infinite loop in GSequence iteration code 2013-05-08 21:27:17 +02:00
Sebastian Dröge
7ff4f8f4d4 playbin: Use the GSequence more efficiently
This makes it possible to take advantage of the O(log n) lookups
of GSequence on the ~1000 element lists and only do iterations
on <10 element lists. Previously the code iterated over ~1000 element
lists multiple times.
2013-05-07 15:23:05 +02:00
Sreerenj Balachandran
52c5115ff0 playbin: Use GSequence instead of GList to store the GstAVElement list.
The GstAVElement list might be big. Use GSequence to optimize it.
2013-05-07 15:23:05 +02:00
Sreerenj Balachandran
a8d1b45491 playbin: autoplug the audio/video decoders and sinks based on capsfeatures.
Autoplug the decoder elements and sink elements based on
the number of common capsfeatures if the ranks are the same.
This will also helps to autoplug the h/w_decoder and h/w_renderer.

https://bugzilla.gnome.org/show_bug.cgi?id=698712
2013-05-07 15:23:05 +02:00
Sreerenj Balachandran
9c94a1812f playbin: use _plugin_feature_rank_compare API instead of duplicating the code. 2013-04-18 13:59:52 +02:00
Sreerenj Balachandran
9b33c75cd4 playbin: use ascending order for name based sorting of pluginfeatures.
The compare_factories_func() should return negative value
if the rank of both PluginFeatures are equal and the name of
first PluginFeature comes before the second one (== ascending order).
2013-04-15 12:05:22 +02:00
Tim-Philipp Müller
1c0288db38 playbin: fix jpeg passthrough to decoder sinks by marking image/* as video stream 2013-04-12 11:51:30 +01:00
Sebastian Dröge
7f78f7f9e3 playbin: Ignore caps from audio/video sink factories if there are fixed sinks already 2013-03-30 12:15:38 +01:00
Sebastian Dröge
57a0806b3a playbin: Handle caps queries from unlinked elements
Pass them to all possible sinks and the current sinks to
allow elements to chose a more optimal initial caps.
2013-03-30 11:49:42 +01:00
Tim-Philipp Müller
5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Wim Taymans
3591df23b1 docs: playbin2 -> playbin 2012-10-09 12:20:10 +02:00
Mark Nauwelaerts
e491d24341 use gst_element_factory_get_metadata to replace obsolete API 2012-09-15 18:57:09 +02:00
Tim-Philipp Müller
2079a8c12b Remove glib-compat-private.h stuff we don't need any more
It's all been ported to the latest GLib API now.
2012-09-09 18:36:49 +01:00
Tim-Philipp Müller
0301aaa30d playbin: automatically deinterlace interlaced content by default 2012-08-26 22:26:08 +01:00
Tim-Philipp Müller
5b715cdb90 video/x-dvd-subpicture -> subpicture/x-dvd 2012-08-20 21:36:15 +01:00
Edward Hervey
a0fbf92d43 playback: Remove custom stream-change event
Applications can now use the STREAM_START message to know if a new
stream has started
2012-07-12 09:51:35 +02:00
Sebastian Dröge
ecb22ebd63 playbin2: Proxy the force-aspect-ratio property of video sinks
Fixes bug #678020.

Conflicts:

	gst/playback/gstplaybin2.c
2012-06-14 09:35:44 +02:00
Sebastian Dröge
e729ad1c9c playback: Always prefer parsers over decoders
...and in playbin2 additionally prefer sinks over parsers.

This makes sure that we a) always directly plug a sink if it supports
the (compressed) format and b) always plug parsers in front of decoders.
2012-06-12 11:59:39 +02:00
Vincent Penquerc'h
512f96906e playbin2: remove uridecodebin from bin when it fails to switch to PAUSED
This avoids that bin being leftover and being found when reusing playbin2,
and fixes restarting on a new URI after failing to activate with a previous
URI.

https://bugzilla.gnome.org/show_bug.cgi?id=673888
2012-06-08 17:35:06 +01:00
Andre Moreira Magalhaes (andrunko)
88d3b7aeee playbin2: Send flush events when changing subtitle tracks and use new input-selector modes for subtitle tracks
For audio/video we should flush too for fastest stream switches but this
currently isn't possible because the flushes would need to go to the sink,
which then causes state changes and causes all timing information to be
changed.

Should work out of the box in 0.11 with the flush-stop that doesn't reset
the times.

Conflicts:

	gst/playback/gstplaybin2.c
	gst/playback/gstplaysink.c
	gst/playback/gstsubtitleoverlay.c
2012-06-06 16:31:09 -03:00
Andre Moreira Magalhaes (andrunko)
b41d19fa5f playbin2: Properly change subtitles
Conflicts:

	gst/playback/gstplaysink.c
2012-06-06 16:31:08 -03:00
Thiago Santos
605d5c110c playbin2: fix subtitle only seeks when switching to external subs
Sending a non-flushing seek might not be enough for switching
to an external sub that has already been used because the flushes
are needed to reset the state of its decodebin's queue.

For example, if the subtitle is short enough, the queue might get
and EOS and keep its 'unexpected' return state. If the user switches
to another subtitle and back to the external one, the buffers
won't get past the queue.

This patch fixes this by adding the flush flag to the seek and
preventing that this flush leaves the suburidecodebin.

https://bugzilla.gnome.org/show_bug.cgi?id=638168

Conflicts:

	gst/playback/gstplaybin2.c
2012-06-06 16:31:08 -03:00
Wim Taymans
a2172bdb4b update for tag event change 2012-06-06 13:05:47 +02:00