The playbin's about-to-finish signal triggers in a different thread,
which Gtk is very much not happy about, and often results in both the
about-to-finish and eos handlers getting called (and therefore multiple
tracks getting picked from the queue).
Fix this by checking how much time is left during the regular position
changed timeout function and triggering about-to-finish manually
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
For calculating what percentage of a song has been played, which is used
to determine if a track can be marked as played or not
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I use the state change callbacks to send a position-changed signal on a
regular interval when playback is going. Seeking is handled by setting
the position property to a new value.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
To set either Gst.State.PLAYING or Gst.State.PAUSED on the playbin. I
also add two signals for playback-start and playback-paused that the
PlayPause button can use.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
My intention is to use this to handle GStreamer stuff so I can separate
out the higher level functions like next(), previous(), and load_track()
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>