tests/examples/seek/: Some small cosmetic changes.

Original commit message from CVS:
* tests/examples/seek/scrubby.c: (stop_cb), (main):
* tests/examples/seek/seek.c: (do_seek):
Some small cosmetic changes.
This commit is contained in:
Wim Taymans 2007-05-09 11:25:34 +00:00
parent 736a5c082f
commit a8e8bb44d6
3 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2007-05-09 Wim Taymans <wim@fluendo.com>
* tests/examples/seek/scrubby.c: (stop_cb), (main):
* tests/examples/seek/seek.c: (do_seek):
Some small cosmetic changes.
2007-05-08 Stefan Kost <ensonic@users.sf.net> 2007-05-08 Stefan Kost <ensonic@users.sf.net>
* gst/adder/gstadder.c (gst_adder_src_event, gst_adder_collected, * gst/adder/gstadder.c (gst_adder_src_event, gst_adder_collected,

View file

@ -364,9 +364,10 @@ stop_cb (GtkButton * button, gpointer data)
gst_element_get_state (pipeline, &state, NULL, GST_CLOCK_TIME_NONE); gst_element_get_state (pipeline, &state, NULL, GST_CLOCK_TIME_NONE);
if (state != GST_STATE_READY) { if (state != GST_STATE_READY) {
g_print ("READY pipeline\n"); g_print ("READY pipeline\n");
gst_element_set_state (pipeline, GST_STATE_PAUSED);
gst_element_set_state (pipeline, GST_STATE_READY); gst_element_set_state (pipeline, GST_STATE_READY);
/* position and speed return to their default values */
gtk_adjustment_set_value (adjustment, 0.0); gtk_adjustment_set_value (adjustment, 0.0);
gtk_adjustment_set_value (sadjustment, 1.0);
g_source_remove (update_id); g_source_remove (update_id);
} }
} }
@ -507,7 +508,7 @@ main (int argc, char **argv)
gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS); gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS);
sadjustment = sadjustment =
GTK_ADJUSTMENT (gtk_adjustment_new (1.0, 0.0, 5.0, 0.1, 1.0, 1.0)); GTK_ADJUSTMENT (gtk_adjustment_new (1.0, 0.0, 5.0, 0.1, 1.0, 0.0));
shscale = gtk_hscale_new (sadjustment); shscale = gtk_hscale_new (sadjustment);
gtk_scale_set_digits (GTK_SCALE (shscale), 2); gtk_scale_set_digits (GTK_SCALE (shscale), 2);
gtk_range_set_update_policy (GTK_RANGE (shscale), GTK_UPDATE_CONTINUOUS); gtk_range_set_update_policy (GTK_RANGE (shscale), GTK_UPDATE_CONTINUOUS);

View file

@ -1134,8 +1134,10 @@ do_seek (GtkWidget * widget)
} else { } else {
set_update_scale (TRUE); set_update_scale (TRUE);
} }
} else } else {
g_print ("seek failed\n"); g_print ("seek failed\n");
set_update_scale (TRUE);
}
} }
static void static void