2003-07-17 04:16:42 +00:00
|
|
|
#include <gtk/gtk.h>
|
2002-01-04 21:53:21 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
extern gboolean _gst_plugin_spew;
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
gboolean idle_func (gpointer data);
|
2002-01-04 21:53:21 +00:00
|
|
|
|
|
|
|
GtkWidget *drawingarea;
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
2002-01-04 21:53:21 +00:00
|
|
|
GstElement *bin;
|
|
|
|
GstElement *src;
|
|
|
|
GstElement *wave;
|
Update libvisual to 0.1.7. Link in the debug handling to gstreamer
Original commit message from CVS:
* configure.ac:
* ext/libvisual/visual.c: (gst_visual_get_type),
(libvisual_log_handler), (gst_visual_getcaps),
(gst_visual_srclink), (gst_visual_change_state), (make_valid_name),
(plugin_init):
Update libvisual to 0.1.7. Link in the debug handling to gstreamer
* ext/smoothwave/Makefile.am:
* ext/smoothwave/demo-osssrc.c: (main):
* ext/smoothwave/gstsmoothwave.c: (gst_smoothwave_class_init),
(gst_smoothwave_init), (gst_smoothwave_dispose), (gst_sw_sinklink),
(gst_sw_srclink), (gst_smoothwave_chain), (gst_sw_change_state),
(plugin_init):
* ext/smoothwave/gstsmoothwave.h:
Make gstsmoothwave a working element in the 20th century.
* gst/chart/gstchart.c: (gst_chart_init), (gst_chart_srcconnect):
Fix incorrect link function
2004-11-12 17:37:49 +00:00
|
|
|
GstElement *ximage;
|
2002-01-04 21:53:21 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
gst_init (&argc, &argv);
|
|
|
|
gst_plugin_load ("libsmoothwave.so");
|
|
|
|
gtk_init (&argc, &argv);
|
2002-01-04 21:53:21 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
bin = gst_pipeline_new ("bin");
|
2002-01-04 21:53:21 +00:00
|
|
|
|
Update libvisual to 0.1.7. Link in the debug handling to gstreamer
Original commit message from CVS:
* configure.ac:
* ext/libvisual/visual.c: (gst_visual_get_type),
(libvisual_log_handler), (gst_visual_getcaps),
(gst_visual_srclink), (gst_visual_change_state), (make_valid_name),
(plugin_init):
Update libvisual to 0.1.7. Link in the debug handling to gstreamer
* ext/smoothwave/Makefile.am:
* ext/smoothwave/demo-osssrc.c: (main):
* ext/smoothwave/gstsmoothwave.c: (gst_smoothwave_class_init),
(gst_smoothwave_init), (gst_smoothwave_dispose), (gst_sw_sinklink),
(gst_sw_srclink), (gst_smoothwave_chain), (gst_sw_change_state),
(plugin_init):
* ext/smoothwave/gstsmoothwave.h:
Make gstsmoothwave a working element in the 20th century.
* gst/chart/gstchart.c: (gst_chart_init), (gst_chart_srcconnect):
Fix incorrect link function
2004-11-12 17:37:49 +00:00
|
|
|
src = gst_element_factory_make ("sinesrc", "src");
|
|
|
|
wave = gst_element_factory_make ("smoothwave", "wave");
|
|
|
|
ximage = gst_element_factory_make ("ximagesink", "sink");
|
|
|
|
g_return_val_if_fail (src != NULL, -1);
|
|
|
|
g_return_val_if_fail (wave != NULL, -1);
|
|
|
|
g_return_val_if_fail (ximage != NULL, -1);
|
2002-01-04 21:53:21 +00:00
|
|
|
|
|
|
|
|
Update libvisual to 0.1.7. Link in the debug handling to gstreamer
Original commit message from CVS:
* configure.ac:
* ext/libvisual/visual.c: (gst_visual_get_type),
(libvisual_log_handler), (gst_visual_getcaps),
(gst_visual_srclink), (gst_visual_change_state), (make_valid_name),
(plugin_init):
Update libvisual to 0.1.7. Link in the debug handling to gstreamer
* ext/smoothwave/Makefile.am:
* ext/smoothwave/demo-osssrc.c: (main):
* ext/smoothwave/gstsmoothwave.c: (gst_smoothwave_class_init),
(gst_smoothwave_init), (gst_smoothwave_dispose), (gst_sw_sinklink),
(gst_sw_srclink), (gst_smoothwave_chain), (gst_sw_change_state),
(plugin_init):
* ext/smoothwave/gstsmoothwave.h:
Make gstsmoothwave a working element in the 20th century.
* gst/chart/gstchart.c: (gst_chart_init), (gst_chart_srcconnect):
Fix incorrect link function
2004-11-12 17:37:49 +00:00
|
|
|
gst_bin_add_many (GST_BIN (bin), src, wave, ximage, NULL);
|
|
|
|
g_return_val_if_fail (gst_element_link_many (src, wave, ximage,
|
|
|
|
NULL) != FALSE, -1);
|
2002-01-04 21:53:21 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
|
|
|
|
g_idle_add (idle_func, bin);
|
2002-01-04 21:53:21 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
gtk_main ();
|
2002-01-04 21:53:21 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
gboolean
|
|
|
|
idle_func (gpointer data)
|
2003-07-17 04:16:42 +00:00
|
|
|
{
|
2004-03-14 22:34:33 +00:00
|
|
|
gst_bin_iterate (GST_BIN (data));
|
2002-01-04 21:53:21 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|