GstFormat fmt = GST_FORMAT_TIME;
gint64 current = -1;
- /* We do not want to update anything unless we are in the PLAYING state */
- if (data->state != GST_STATE_PLAYING)
+ /* We do not want to update anything unless we are in the PAUSED or PLAYING states */
+ if (data->state < GST_STATE_PAUSED)
return TRUE;
/* If we didn't know it yet, query the stream duration */
if (GST_MESSAGE_SRC (msg) == GST_OBJECT (data->playbin2)) {
data->state = new_state;
g_print ("State set to %s\n", gst_element_state_get_name (new_state));
+ if (old_state == GST_STATE_READY && new_state == GST_STATE_PAUSED) {
+ /* For extra responsiveness, we refresh the GUI as soon as we reach the PAUSED state */
+ refresh_ui (data);
+ }
}
}