diff options
Diffstat (limited to 'gst/playondemand/demo-mp3.c')
-rw-r--r-- | gst/playondemand/demo-mp3.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gst/playondemand/demo-mp3.c b/gst/playondemand/demo-mp3.c index e239961d..7161aae4 100644 --- a/gst/playondemand/demo-mp3.c +++ b/gst/playondemand/demo-mp3.c @@ -10,7 +10,7 @@ GtkWidget *play_button, *clear_button, *reset_button, *quit_button; GtkWidget **beat_button; GtkWidget *speed_scale; GtkObject *speed_adj; -GstElement *src, *mad, *pod, *sink, *pipeline; +GstElement *src, *mad, *conv, *pod, *sink, *pipeline; GstClock *element_clock; guint32 *beats; @@ -63,6 +63,7 @@ beat (GtkToggleButton *button, gpointer data) void speed (GtkAdjustment *adjustment, gpointer data) { + g_signal_stop_emission_by_name(G_OBJECT(pod), "deep-notify"); g_object_set(G_OBJECT(pod), "tick-rate", adjustment->value, NULL); /*gst_clock_set_speed(element_clock, adjustment->value);*/ } @@ -72,11 +73,12 @@ setup_pipeline (gchar *filename) { src = gst_element_factory_make("filesrc", "filesrc"); mad = gst_element_factory_make("mad", "mad"); + conv = gst_element_factory_make("audioconvert", "audioconvert"); pod = gst_element_factory_make("playondemand", "playondemand"); sink = gst_element_factory_make("alsasink", "alsasink"); g_object_set(G_OBJECT(src), "location", filename, NULL); - g_object_set(G_OBJECT(sink), "period-count", 32, + g_object_set(G_OBJECT(sink), "period-count", 64, "period-size", 512, NULL); g_object_set(G_OBJECT(pod), "total-ticks", NUM_BEATS, "tick-rate", 1.0, @@ -86,8 +88,8 @@ setup_pipeline (gchar *filename) pipeline = gst_pipeline_new("app"); - gst_bin_add_many(GST_BIN(pipeline), src, mad, pod, sink, NULL); - gst_element_link_many(src, mad, pod, sink, NULL); + gst_bin_add_many(GST_BIN(pipeline), src, mad, conv, pod, sink, NULL); + gst_element_link_many(src, mad, conv, pod, sink, NULL); element_clock = gst_bin_get_clock(GST_BIN(pipeline)); gst_element_set_clock(GST_ELEMENT(pod), element_clock); |