diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-10-23 14:56:11 -0400 |
---|---|---|
committer | Wim Taymans <wim@metal.(none)> | 2009-10-23 14:56:11 -0400 |
commit | c043298fa41173cbec175f3a6fb7c4c70dc25bd2 (patch) | |
tree | 759bbd15c8da387c6a958f57df932359ff9ee58a | |
parent | c7a0b05f4496212da433400a1452a507ae06074b (diff) |
seek: add checkbox to enable bufferingqnx-buffering
-rw-r--r-- | tests/examples/seek/seek.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index 8ea5da948..6e0d2f0d8 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -112,7 +112,7 @@ static GtkWidget *video_combo, *audio_combo, *text_combo, *vis_combo; static GtkWidget *vis_checkbox, *video_checkbox, *audio_checkbox; static GtkWidget *text_checkbox, *mute_checkbox, *volume_spinbutton; static GtkWidget *skip_checkbox, *video_window, *download_checkbox; -static GtkWidget *rate_spinbutton; +static GtkWidget *buffer_checkbox, *rate_spinbutton; static GStaticMutex state_mutex = G_STATIC_MUTEX_INIT; @@ -1740,6 +1740,15 @@ download_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline) } static void +buffer_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline) +{ + gboolean state; + + state = gtk_toggle_button_get_active (button); + update_flag (pipeline, 8, state); +} + +static void clear_streams (GstElement * pipeline) { gint i; @@ -2759,6 +2768,7 @@ main (int argc, char **argv) text_checkbox = gtk_check_button_new_with_label ("Text"); mute_checkbox = gtk_check_button_new_with_label ("Mute"); download_checkbox = gtk_check_button_new_with_label ("Download"); + buffer_checkbox = gtk_check_button_new_with_label ("Buffer"); volume_label = gtk_label_new ("Volume"); volume_spinbutton = gtk_spin_button_new_with_range (0, 10.0, 0.1); gtk_spin_button_set_value (GTK_SPIN_BUTTON (volume_spinbutton), 1.0); @@ -2768,6 +2778,7 @@ main (int argc, char **argv) gtk_box_pack_start (GTK_BOX (boxes), vis_checkbox, TRUE, TRUE, 2); gtk_box_pack_start (GTK_BOX (boxes), mute_checkbox, TRUE, TRUE, 2); gtk_box_pack_start (GTK_BOX (boxes), download_checkbox, TRUE, TRUE, 2); + gtk_box_pack_start (GTK_BOX (boxes), buffer_checkbox, TRUE, TRUE, 2); gtk_box_pack_start (GTK_BOX (boxes), volume_label, TRUE, TRUE, 2); gtk_box_pack_start (GTK_BOX (boxes), volume_spinbutton, TRUE, TRUE, 2); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (vis_checkbox), FALSE); @@ -2776,6 +2787,7 @@ main (int argc, char **argv) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (text_checkbox), TRUE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mute_checkbox), FALSE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (download_checkbox), FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (buffer_checkbox), FALSE); g_signal_connect (G_OBJECT (vis_checkbox), "toggled", G_CALLBACK (vis_toggle_cb), pipeline); g_signal_connect (G_OBJECT (audio_checkbox), "toggled", @@ -2788,6 +2800,8 @@ main (int argc, char **argv) G_CALLBACK (mute_toggle_cb), pipeline); g_signal_connect (G_OBJECT (download_checkbox), "toggled", G_CALLBACK (download_toggle_cb), pipeline); + g_signal_connect (G_OBJECT (buffer_checkbox), "toggled", + G_CALLBACK (buffer_toggle_cb), pipeline); g_signal_connect (G_OBJECT (volume_spinbutton), "value_changed", G_CALLBACK (volume_spinbutton_changed_cb), pipeline); /* playbin2 panel for snapshot */ |