I'd like to make a simple music player using the GI library, including the recent Gstreamer1.0. The interface is just comprised of 2 buttons (play/pause) and a scale to seek the current playback time:
I pretty much well understood the pipeline and element stuff, I also figured out how to seek to a wanted playback time (when the user changes the value of the scale), but i wonder what's the best way to automatically update the slider/scale when the file is playing. One way, implemented here using the old API, is to use a timer that periodically reads the current player position and updates the slider's position:
Glib.timeout_add(100, update_slider_callback)
I don't find it very elegant, is there any better way to do this using the new GI API?
EDIT: for anyone curious, I implemented it here