summaryrefslogtreecommitdiffstats
path: root/ext/smoothwave/demo-osssrc.c
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-07-17 04:16:42 +0000
committerDavid Schleef <ds@schleef.org>2003-07-17 04:16:42 +0000
commit81f42a53acf8bd084bae3da25fa7b1f4a658a2ff (patch)
treeef354837df9158640088394e563b797b641c6052 /ext/smoothwave/demo-osssrc.c
parent2ff63e563b21cac87489a0d989c3aa957d5f2fb9 (diff)
downloadgst-plugins-bad-81f42a53acf8bd084bae3da25fa7b1f4a658a2ff.tar.gz
gst-plugins-bad-81f42a53acf8bd084bae3da25fa7b1f4a658a2ff.tar.bz2
gst-plugins-bad-81f42a53acf8bd084bae3da25fa7b1f4a658a2ff.zip
Fixes to make it compile without GNOME, and with a modern (>= 0.3) version of GStreamer. Now that I got it compiled,...
Original commit message from CVS: Fixes to make it compile without GNOME, and with a modern (>= 0.3) version of GStreamer. Now that I got it compiled, I want to delete it.
Diffstat (limited to 'ext/smoothwave/demo-osssrc.c')
-rw-r--r--ext/smoothwave/demo-osssrc.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/ext/smoothwave/demo-osssrc.c b/ext/smoothwave/demo-osssrc.c
index 4807a3a4..457900d7 100644
--- a/ext/smoothwave/demo-osssrc.c
+++ b/ext/smoothwave/demo-osssrc.c
@@ -1,4 +1,4 @@
-#include <gnome.h>
+#include <gtk/gtk.h>
#include <gst/gst.h>
extern gboolean _gst_plugin_spew;
@@ -13,36 +13,35 @@ int main(int argc,char *argv[]) {
GstElement *src;
GstElementFactory *wavefactory;
GstElement *wave;
-
+ GtkWidget *wave_widget;
GtkWidget *appwindow;
- _gst_plugin_spew = TRUE;
-
gst_init(&argc,&argv);
gst_plugin_load("libsmoothwave.so");
- gnome_init("Wave","0.0.1",argc,argv);
+ gtk_init(&argc,&argv);
- bin = gst_bin_new("bin");
+ bin = gst_pipeline_new("bin");
- srcfactory = gst_element_factory_find("audiosrc");
+ 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");
- gtk_object_set(GTK_OBJECT(src),"bytes_per_read",(gulong)2048,NULL);
+ //g_object_set(G_OBJECT(src),"bytes_per_read",(gulong)2048,NULL);
wave = gst_element_factory_create(wavefactory,"wave");
- gtk_object_set(GTK_OBJECT(wave),"width",256,"height",100,NULL);
+ 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_pad_connect(gst_element_get_pad(src,"src"),
+ gst_pad_link(gst_element_get_pad(src,"src"),
gst_element_get_pad(wave,"sink"));
- appwindow = gnome_app_new("wave","Wave");
- gnome_app_set_contents(GNOME_APP(appwindow),gst_util_get_pointer_arg(GTK_OBJECT(wave),"widget"));
+ 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);
@@ -55,7 +54,8 @@ int main(int argc,char *argv[]) {
return 0;
}
-gboolean idle_func(gpointer data) {
+gboolean idle_func(gpointer data)
+{
gst_bin_iterate(GST_BIN(data));
return TRUE;
}