mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
38253a1bc8
Original commit message from CVS: * configure.ac: Put DEFAULT_AUDIOSINK in config.h and use whereever possible. (Fixes #165997) * examples/capsfilter/capsfilter1.c: (main): * examples/dynparams/filter.c: (create_ui): * examples/seeking/cdparanoia.c: (get_track_info), (main): * examples/seeking/chained.c: (main): * examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline), (make_vorbis_pipeline), (make_mp3_pipeline), (make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline): * examples/seeking/spider_seek.c: (make_spider_pipeline): * examples/switch/switcher.c: (main): * ext/dv/demo-play.c: (main): * ext/faad/gstfaad.c: (gst_faad_change_state): * ext/mad/gstmad.c: (gst_mad_chain): * ext/smoothwave/demo-osssrc.c: (main): * gst-libs/gst/gconf/gconf.c: (gst_gconf_set_string), (gst_gconf_render_bin_from_description), (gst_gconf_get_default_audio_sink), (gst_gconf_get_default_video_sink), (gst_gconf_get_default_audio_src), (gst_gconf_get_default_video_src), (gst_gconf_get_default_visualization_element): * gst/level/demo.c: (main): * gst/level/plot.c: (main): * gst/playback/gstplaybin.c: (gen_video_element), (gen_audio_element): * gst/playback/test.c: (gen_video_element), (gen_audio_element): * gst/playondemand/demo-mp3.c: (setup_pipeline): * gst/sine/demo-dparams.c: (main): * gst/spectrum/demo-osssrc.c: (main): * gst/speed/demo-mp3.c: (main): * gst/volume/demo.c: (main): * testsuite/embed/embed.c: (main):
52 lines
1.1 KiB
C
52 lines
1.1 KiB
C
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
#include <gtk/gtk.h>
|
|
#include <gst/gst.h>
|
|
|
|
extern gboolean _gst_plugin_spew;
|
|
|
|
gboolean idle_func (gpointer data);
|
|
|
|
GtkWidget *drawingarea;
|
|
|
|
int
|
|
main (int argc, char *argv[])
|
|
{
|
|
GstElement *bin;
|
|
GstElement *src;
|
|
GstElement *wave;
|
|
GstElement *ximage;
|
|
|
|
gst_init (&argc, &argv);
|
|
gst_plugin_load ("libsmoothwave.so");
|
|
gtk_init (&argc, &argv);
|
|
|
|
bin = gst_pipeline_new ("bin");
|
|
|
|
src = gst_element_factory_make ("sinesrc", "src");
|
|
wave = gst_element_factory_make ("smoothwave", "wave");
|
|
ximage = gst_element_factory_make (DEFAULT_VIDEOSINK, "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);
|
|
|
|
|
|
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);
|
|
|
|
gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
|
|
g_idle_add (idle_func, bin);
|
|
|
|
gtk_main ();
|
|
|
|
return 0;
|
|
}
|
|
|
|
gboolean
|
|
idle_func (gpointer data)
|
|
{
|
|
gst_bin_iterate (GST_BIN (data));
|
|
return TRUE;
|
|
}
|