This allows using playsink from outside the playback plugin.
Add code to be able to request the sink pads using standard GStreamer API.
TODO : expose GObject properties/signals.
Before, SEEK events would be sent to the video sink, which wouldn't
be linked in any way to the subtitle part of the pipeline and
subparse would never see the SEEK event. This would then seek
the audio/video but the subtitles would continue from the old
position instead.
Fixes bug #591664.
Don't do fallbacks if application specified a sink element. When doing the
fallback use configured default elements instead of hardcoded linux only
elements. Improve error messages accordingly.
When using an audio sink without a "volume" property, volume control
would only work for the first song. For the next song, we'd try to
re-use the existing audio chain, but inadvertently set chain->volume
to NULL instead of to the existing volume element.
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.
Use two flags to remember volume/mute changes at times when we don't have the
audiochain yet (e.g. construction). Only set values when they were actualy
changed. This makes pulseaudio's stream restore functional.
Keep track of the autoplugged custom sinks and configure them in the playsink
element when we have collected all streams.
Also make sure that we only select one custom sink.
When unreffing the internal sink, we don't need to change the state to NULL.
Make playsink go async to the PAUSED state instead of relying on uridecodebin
for async behaviour in playbin. This solves some problems (mainly with DVD)
where the pipeline would go to PLAYING before preroll completed, failing to
select the audiosink clock.
Fixes#581727
Clear the target of our ghostpads before we remove the pad from the element.
This to make sure that the internal pad is not left linked to whatever pad we
were ghosted to. This should only be a problem when we leak the ghostpads.
Also release our subpicture pads.
Fixes#577288.
When reusing playbin with visualisations, reset the async property on the video
sink because some sinks might dynamically recreate their sinks.
Fixes#576188
When we have the textpad configured, enable and disable the subtitles by setting
the silent flag on the overlay element instead of trying to remove elements.
See #576187
Link after doing the state change and unlink before shutting down. Makes the
window for causing races in toggling the visualisations smaller.
See #576187.
Sync the state of the newly added chains to the state of the parent sink element
to avoid lost async-start messages. Fixes cdda:// async-done message storm.
Set the custom sink async=FALSE to not make it participate in preroll because we
are dealing with sparse streams.
Try to set sync=TRUE on the custom text sink.
Add property to playbin2 to configure a custom sink that receives the raw
subtitle buffers instead of using a textoverlay.
Improve the property finding code to make it more usable.
Use property find code to find async properties in custom sinks that are bins.
Improve text overlay code to gracefully handle missing elements.
Make it possible to request a flushing pad from the playsink. We can eventually
use these flushing pads to quickly terminate the dataflow when we are shutting
down.
Rather than only checking for volume property on the audio sink
directly, recursively look for it on sinks within it (if it's a bin).
Allows use of sink-as-volume-control where the application has supplied
an audio-sink bin that includes a real audio sink internally.
Don't keep extra references to volume and mute elements; we don't need
to do so.
Ensure we unref pads that we have references to, and release request
pads.