The audio class had to many attributes for simply tracking connected signals in
my opinion. This change adds a helper for adding and removing signals and storing
the tracking data in a common dictionary instead of a ton of instance attributes.
The appsrc cleanup code was still short circuiting the about to finish handler,
this meant that EOT handling never happened for local files and playback stopped.
With this change proper EOT handling works for all track types.
This ensures that we block about-to-finish and the pipeline until the next URI
is set, alowing for at least EOS free playback. If the uri is set quickly enough
this will also be gapless.
We now ensure that the track we choose has one or more volume channels we can
control. This change also fixes that fact the MIXER_TRACK setting would not
work if we happened to find a track that was flaged as MASTER OUPUT before
finding the right label, so far no one has reported this as an issue.
Adds functions to create buffers, calcalute buffer durations based on number of
samples and the sample rate and converting milliseconds to gst internal clock
time.
This also alows for the removal of all gst imports outside of mopidy.audio.
This fixes an issue where applications which changes volume by 1 level
at a time could fail to change volume if track.max_volume is less than
100. E.g. get volume could return 44 after volume was set to 43, then
the application would just try to set it to 43 again.
With this change we ask the core.playback system to set the next tracks uri and
otherwise update state as needed. With this change we should be able to support
streaming oggs and gapless playback to mention a few of items this fixes.
On the down side, this change breaks test_end_of_track_skips_to_next_track_on_failure
as there is no clean way to handle this with the async nature of this EOT
handling.
Checking the URI inside the new-source handler turned out to tickle some issue
that gave us deadlocks. Getting the source and checking which factory created
it is much safer.