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.
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
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).
...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.
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
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
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
Make the uri property getter return the next uri, like it was configured in the
setter.
Make a new current-uri and current-suburi property that reflects the currently
playing uri and suburi.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676665
This makes sure that we always prefer sinks that support a format without
decoding, independant of its rank. Previously we only sorted by rank.
Conflicts:
gst/playback/gstplaybin2.c
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We'll change these
over to the new API once we depend on glib >= 2.32.
Replace g_thread_create() with g_thread_try_new().
Make appsink return a GstSample. Remove the pull_buffer_list method because it
is not very useful anymore.
Pass GstSample to the conversion function.
Update playbin2 and examples
If the sink supports raw audio/video, we first check
if the decoder could output any raw audio/video format
and assume it is compatible with the sink then. We don't
do a complete compatibility check here if converters
are plugged between the decoder and the sink because
the converters will convert between raw formats and
even if the decoder format is not supported by the decoder
a converter will convert it.
We assume here that the converters can convert between
any raw format.
Fixes bug #665120.
The new code was checking for a prefix, and would find video/
first. Check in two passes, first checking for a perfect match,
and falling back to a prefix check if nothing was found.
https://bugzilla.gnome.org/show_bug.cgi?id=657261
The fact that a decoder is not compatible with the fixed sink
is currently happenning in the case where we have hardware accelerated
video decoders on the system (especially vaapi elements that are actually plugged),
and the user is providing a sink that doesn't support the surface.
A simple example that shows how it used to crash on a system where gstreamer-vaapi
is installed:
gst-launch playbin2 video-sink=xvimagesink uri=/codec/supported/by/vaapi
What we are now doing in this case, is avoid using the accelerated
decoder and plug a "normal" decoder instead (if avalaible).
This commit doesn't handle the case where we have hardware accelerated
demuxing.
This reverts commit b0b4e286c8.
We agreed that the previous (pre-.35) behaviour is broken and a bug and the
current behaviour is correct, deterministic and allows the application to
handle stuff properly while the old behaviour can't be handled properly by
applications and just worked in some applications by luck.
The solution to the problem that was solved by relying on the old, broken
behaviour would be, to make decodebin2/playbin2 more aware of decoders and
improve the autoplugging of decoders by considering the caps supported by the
sink instead of just using something with the highest rank.
See bug #656923.
Fixes regression since 0.10.33 where sinks that can cope with non raw
caps or custom caps are not autoplugged if there's a sink configured
with the properties video-sink and audio-sink which cannot handle
the stream. This change checks for compatibility on the configured one
and use it if success. Otherwhise it tries with the found factories.
Only log in debug log for now, since the check is a bit
half-hearted, its purpose is mostly to make sure people
use gst_filename_to_uri() or g_filename_to_uri().
https://bugzilla.gnome.org/show_bug.cgi?id=654673
When we don't have specific {audio|video|text}-sink properties, don't
set them on playsink when reconfiguring.
If we do that, we end up setting the previous configured sink to
GST_STATE_NULL resulting in any potentially pending push being returned
with GST_FLOW_WRONG_STATE which will cause the upstream elements to
silently stop.
https://bugzilla.gnome.org/show_bug.cgi?id=655279
This is especially needed when switching between a non-sparse and sparse
video stream, see bug #537382. It also lowers the time needed for switching
between streams a bit.