Changing the URIs in a state > READY results in unexpected behaviour,
i.e. the new URIs are only used after the current track has finished.
Fixes bug #607226.
This is necessary because the sinks don't notice the group switches
and the decoders/demuxers have a different running time than the
sinks.
Fixes bug #537050.
Just counting how many messages were sent and how many were received
is not good enough because they might've been duplicated (e.g. by the
visualization audio tee). Comparing the sequence numbers should give
better results in that case.
Otherwise the async state change from READY->PAUSED of the
uridecodebins will take playbin2 from PLAYING->PAUSED again
during gapless group switches.
Fixes bug #602000.
During a group switch return the cached duration of the old group
because the old group still didn't finish playback. If we have no
cached duration return FALSE.
Fixes bug #585969.
Make sure, to only "simulate" subtitle no-more-pads if it was still
pending and also handle errors in the subtitle pipeline as warnings
after the subtitles prerolled.
Don't set the suburidecodebin to READY after errors, handle_message
will usually be called from the streaming thread and doing that
from there is obviously not a good idea.
Now the caps property isn't set anymore for the subtitle caps
but instead in the autoplug-continue signal it is detected
if the caps belong to a supported subtitle stream.
This makes automatic use of newly installed plugins.
First of all, make sure that suburidecodebin never
errors out because of not-linked in case external subtitles
are used but then subtitles are disabled.
And then make sure that external subtitles always start from
the correct position and are not racing until EOS if they
get unselected and selected again.
This will make sure that no subparse is ever plugged and subtitleoverlay,
that subpicture streams are handled the same was as subtitles and that
subtitle renderers are used if available.
Fixes bugs #595123, #570753, #591662, #591706.
We want to return NOT_LINKED for unselected pads but only for pads
from the normal uridecodebin. This makes sure that subtitle streams
are not raced past audio/video from decodebin2's multiqueue.
For pads from suburidecodebin OK should always be returned, otherwise
it will most likely stop with an error.
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a sixteenth of a polar bear.
g_value_set_object() increases the refcount of the sink, which is not needed
because the object should already be refcounted. Make sure this is always the
case and use g_value_take_object().
Fixes: #592884
We shouldn't really depend on elements from -bad for stream
selection in playbin2, so use a private copy of input-selector
until the selector plugin is ready to be moved to -base or -good.
Fixes#586356.
If READY->PAUSED failed in the source element we would've swapped
the current and next group already. To allow READY->PAUSED to succeed
after the first failure we have to swap the current and next group
back again. This also ensure that we're again in the same state
as before the failed state change and not at the next group.
This was especially a problem for playbin2 pipelines that use the
new mounting support in giosrc as the source would fail for READY->PAUSED
the first time, the application mounts the location and then tries
to go READY->PAUSED again (and this time it would succeed).
Fixes bug #588078.
Set the target state of the newly added uridecodebins to somthing else that
PAUSED so that we keep their state in sync with the playsink state.
Fixes#585268
uridecodebin expects the passed connection-speed value in kbps, so we
need to divide the value stored in bps by 1000. Also, lower the upper
limit on the properties to the value that we can actually store in our
internal guint (which is plenty high enough)
Recognise PGS subpicture streams and connect them to the SPU pad
in playsink. Unfortunately this fails badly with negotiation errors
if the SPU is not recent enough to support the stream. I'm not sure
how to add format negotiation in yet.
playbin2 inadvertently used autoaudiosink and autovideosink up to now,
since it would overwrite the sinks configured via the "audio-sink"
and "video-sink" properties with the stream-specific group sinks when
configuring the outputs. Those are usually NULL however, so that would
overwrite the configured sinks with NULL which makes playbin2 then
default to the auto sinks. Fix this by keeping a reference to each
configured sink in playbin2 and setting up the right sinks depending
on whether there is a stream-specific sink or not.
Fixes#584020.