diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-14 22:34:33 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-14 22:34:33 +0000 |
commit | 7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2 (patch) | |
tree | f863b467dea9559a6ec9c48affbfae11f8104164 /gst/smoothwave/demo-osssrc.c | |
parent | a19db4bbdc4a15ea0d8f4d28e9a1302c9c3d1657 (diff) | |
download | gst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.tar.gz gst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.tar.bz2 gst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.zip |
gst-indent
Original commit message from CVS:
gst-indent
Diffstat (limited to 'gst/smoothwave/demo-osssrc.c')
-rw-r--r-- | gst/smoothwave/demo-osssrc.c | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/gst/smoothwave/demo-osssrc.c b/gst/smoothwave/demo-osssrc.c index 457900d7..c39bc72c 100644 --- a/gst/smoothwave/demo-osssrc.c +++ b/gst/smoothwave/demo-osssrc.c @@ -3,11 +3,13 @@ extern gboolean _gst_plugin_spew; -gboolean idle_func(gpointer data); +gboolean idle_func (gpointer data); GtkWidget *drawingarea; -int main(int argc,char *argv[]) { +int +main (int argc, char *argv[]) +{ GstElement *bin; GstElementFactory *srcfactory; GstElement *src; @@ -16,46 +18,47 @@ int main(int argc,char *argv[]) { GtkWidget *wave_widget; GtkWidget *appwindow; - gst_init(&argc,&argv); - gst_plugin_load("libsmoothwave.so"); - gtk_init(&argc,&argv); + gst_init (&argc, &argv); + gst_plugin_load ("libsmoothwave.so"); + gtk_init (&argc, &argv); - bin = gst_pipeline_new("bin"); + bin = gst_pipeline_new ("bin"); - srcfactory = gst_element_factory_find("sinesrc"); - g_return_val_if_fail(srcfactory != NULL, -1); - wavefactory = gst_element_factory_find("smoothwave"); - g_return_val_if_fail(wavefactory != NULL, -1); + srcfactory = gst_element_factory_find ("sinesrc"); + g_return_val_if_fail (srcfactory != NULL, -1); + wavefactory = gst_element_factory_find ("smoothwave"); + g_return_val_if_fail (wavefactory != NULL, -1); - src = gst_element_factory_create(srcfactory,"src"); + src = gst_element_factory_create (srcfactory, "src"); //g_object_set(G_OBJECT(src),"bytes_per_read",(gulong)2048,NULL); - wave = gst_element_factory_create(wavefactory,"wave"); - g_object_set(G_OBJECT(wave),"width",256,"height",100,NULL); + wave = gst_element_factory_create (wavefactory, "wave"); + g_object_set (G_OBJECT (wave), "width", 256, "height", 100, NULL); - gst_bin_add(GST_BIN(bin),GST_ELEMENT(src)); - gst_bin_add(GST_BIN(bin),GST_ELEMENT(wave)); + gst_bin_add (GST_BIN (bin), GST_ELEMENT (src)); + gst_bin_add (GST_BIN (bin), GST_ELEMENT (wave)); - gst_pad_link(gst_element_get_pad(src,"src"), - gst_element_get_pad(wave,"sink")); + gst_pad_link (gst_element_get_pad (src, "src"), + gst_element_get_pad (wave, "sink")); - appwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); - g_object_get(G_OBJECT(wave),"widget",&wave_widget,NULL); - gtk_container_add(GTK_CONTAINER(appwindow), wave_widget); - gtk_widget_show_all(appwindow); + appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + g_object_get (G_OBJECT (wave), "widget", &wave_widget, NULL); + gtk_container_add (GTK_CONTAINER (appwindow), wave_widget); + gtk_widget_show_all (appwindow); - gst_element_set_state(GST_ELEMENT(bin),GST_STATE_READY); - gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING); + gst_element_set_state (GST_ELEMENT (bin), GST_STATE_READY); + gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING); - g_idle_add(idle_func,bin); + g_idle_add (idle_func, bin); - gtk_main(); + gtk_main (); return 0; } -gboolean idle_func(gpointer data) +gboolean +idle_func (gpointer data) { - gst_bin_iterate(GST_BIN(data)); + gst_bin_iterate (GST_BIN (data)); return TRUE; } |