From 4785be863a6113072b4f275ca6138393b2dec162 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 2 Feb 2005 08:14:01 +0000 Subject: [PATCH] configure.ac: Put DEFAULT_AUDIOSINK in config.h and use whereever possible. (Fixes #165997) 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): --- ChangeLog | 37 ++++++++++++++ configure.ac | 6 +++ examples/capsfilter/capsfilter1.c | 2 +- examples/dynparams/filter.c | 5 +- examples/seeking/cdparanoia.c | 13 +++-- examples/seeking/chained.c | 13 +++-- examples/seeking/seek.c | 41 ++++++++-------- examples/seeking/spider_seek.c | 7 ++- examples/switch/switcher.c | 2 +- gst-libs/gst/gconf/gconf.c | 54 ++++++++++----------- gst/playback/gstplaybin.c | 4 +- gst/playback/test.c | 7 ++- gst/sine/demo-dparams.c | 15 +++--- gst/volume/demo.c | 2 +- tests/examples/seek/seek.c | 41 ++++++++-------- tests/examples/seek/spider_seek.c | 7 ++- tests/old/examples/capsfilter/capsfilter1.c | 2 +- tests/old/examples/dynparams/filter.c | 5 +- tests/old/examples/seek/cdparanoia.c | 13 +++-- tests/old/examples/seek/chained.c | 13 +++-- tests/old/examples/seek/spider_seek.c | 7 ++- tests/old/examples/switch/switcher.c | 2 +- tests/old/testsuite/embed/embed.c | 5 +- testsuite/embed/embed.c | 5 +- 24 files changed, 197 insertions(+), 111 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e30214b22..4447210a05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,40 @@ +2005-02-02 David Schleef + + * 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): + 2005-02-02 Jan Schmidt * gst/tcp/gsttcpclientsink.c: (gst_tcpclientsink_class_init), diff --git a/configure.ac b/configure.ac index 4938d32afe..70b349b8e3 100644 --- a/configure.ac +++ b/configure.ac @@ -119,10 +119,15 @@ case "$host" in esac AC_SUBST(DEFAULT_AUDIOSINK) +AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK,"$DEFAULT_AUDIOSINK",[Default audio sink]) AC_SUBST(DEFAULT_AUDIOSRC) +AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC,"$DEFAULT_AUDIOSRC",[Default audio source]) AC_SUBST(DEFAULT_VIDEOSINK) +AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK,"$DEFAULT_VIDEOSINK",[Default video sink]) AC_SUBST(DEFAULT_VIDEOSRC) +AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC,"$DEFAULT_VIDEOSRC",[Default video source]) AC_SUBST(DEFAULT_VISUALIZER) +AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER,"$DEFAULT_VISUALIZER",[Default visualizer]) dnl ############################################ dnl # Super Duper options for plug-in building # @@ -335,6 +340,7 @@ fi AM_CONDITIONAL(HAVE_GDK_LOADERS, test "x$HAVE_GDK_LOADERS" = "xyes") PKG_CHECK_MODULES(LIBOIL, liboil-0.2, HAVE_LIBOIL=yes, HAVE_LIBOIL=no) +#PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.0, HAVE_LIBOIL=yes, HAVE_LIBOIL=no) AC_SUBST(LIBOIL_CFLAGS) AC_SUBST(LIBOIL_LIBS) if test "x${HAVE_LIBOIL}" = xyes ; then diff --git a/examples/capsfilter/capsfilter1.c b/examples/capsfilter/capsfilter1.c index 617b89dd0e..a59f728e55 100644 --- a/examples/capsfilter/capsfilter1.c +++ b/examples/capsfilter/capsfilter1.c @@ -54,7 +54,7 @@ main (gint argc, gchar * argv[]) g_return_val_if_fail (mpeg2dec, -1); colorspace = gst_element_factory_make ("ffmpegcolorspace", "colorspace"); g_return_val_if_fail (colorspace, -1); - videosink = gst_element_factory_make ("ximagesink", "videosink"); + videosink = gst_element_factory_make (DEFAULT_VIDEOSINK, "videosink"); g_return_val_if_fail (videosink, -1); gst_bin_add (GST_BIN (pipeline), filesrc); diff --git a/examples/dynparams/filter.c b/examples/dynparams/filter.c index 333820df1f..087a5b284f 100644 --- a/examples/dynparams/filter.c +++ b/examples/dynparams/filter.c @@ -7,6 +7,9 @@ * you can also enter an input and output part of a pipeline */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -481,7 +484,7 @@ create_ui (_filter_ui_t * fui, _filter_data_t * fd) widget = gtk_label_new ("Output Pipe"); gtk_container_add (GTK_CONTAINER (vbox), widget); fui->output = gtk_entry_new (); - gtk_entry_set_text (GTK_ENTRY (fui->output), "osssink fragment=1572872"); /* fixme: gconf default ? */ + gtk_entry_set_text (GTK_ENTRY (fui->output), DEFAULT_AUDIOSINK); gtk_container_add (GTK_CONTAINER (vbox), fui->output); gtk_container_add (GTK_CONTAINER (fui->selection), vbox); g_signal_connect (G_OBJECT (fui->output), "activate", diff --git a/examples/seeking/cdparanoia.c b/examples/seeking/cdparanoia.c index fd41187ebb..d0e7bc94ba 100644 --- a/examples/seeking/cdparanoia.c +++ b/examples/seeking/cdparanoia.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -132,7 +135,7 @@ main (int argc, char **argv) { GstElement *pipeline; GstElement *cdparanoia; - GstElement *osssink; + GstElement *audiosink; GstPad *pad; GstFormat track_format; GstEvent *event; @@ -147,13 +150,13 @@ main (int argc, char **argv) g_assert (cdparanoia); g_object_set (G_OBJECT (cdparanoia), "paranoia_mode", 0, NULL); - osssink = gst_element_factory_make ("osssink", "osssink"); - g_assert (osssink); + audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, DEFAULT_AUDIOSINK); + g_assert (audiosink); gst_bin_add (GST_BIN (pipeline), cdparanoia); - gst_bin_add (GST_BIN (pipeline), osssink); + gst_bin_add (GST_BIN (pipeline), audiosink); - gst_element_link_pads (cdparanoia, "src", osssink, "sink"); + gst_element_link_pads (cdparanoia, "src", audiosink, "sink"); g_signal_connect (G_OBJECT (pipeline), "deep_notify", G_CALLBACK (gst_element_default_deep_notify), NULL); diff --git a/examples/seeking/chained.c b/examples/seeking/chained.c index 5bd0e12df3..bf23e05a80 100644 --- a/examples/seeking/chained.c +++ b/examples/seeking/chained.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -44,7 +47,7 @@ main (int argc, char **argv) GstElement *oggdemux; GstElement *vorbisdec; GstElement *audioconvert; - GstElement *osssink; + GstElement *audiosink; gst_init (&argc, &argv); @@ -75,14 +78,14 @@ main (int argc, char **argv) g_assert (vorbisdec); audioconvert = gst_element_factory_make ("audioconvert", "audioconvert"); g_assert (audioconvert); - osssink = gst_element_factory_make ("osssink", "osssink"); - g_assert (osssink); + audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, DEFAULT_AUDIOSINK); + g_assert (audiosink); gst_bin_add (GST_BIN (bin), vorbisdec); gst_bin_add (GST_BIN (bin), audioconvert); - gst_bin_add (GST_BIN (bin), osssink); + gst_bin_add (GST_BIN (bin), audiosink); gst_element_link_pads (vorbisdec, "src", audioconvert, "sink"); - gst_element_link_pads (audioconvert, "src", osssink, "sink"); + gst_element_link_pads (audioconvert, "src", audiosink, "sink"); gst_element_add_ghost_pad (bin, gst_element_get_pad (vorbisdec, "sink"), "sink"); diff --git a/examples/seeking/seek.c b/examples/seeking/seek.c index 4a5d51ab01..fdd7c45d18 100644 --- a/examples/seeking/seek.c +++ b/examples/seeking/seek.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -88,7 +91,7 @@ make_mod_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("modplug", "decoder"); - audiosink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); //g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -119,8 +122,8 @@ make_dv_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("dvdec", "decoder"); - videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink"); - audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink"); + videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink"); //g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -156,7 +159,7 @@ make_wav_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("wavparse", "decoder"); - audiosink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); //g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -187,7 +190,7 @@ make_flac_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("flacdec", "decoder"); - audiosink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -218,7 +221,7 @@ make_sid_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("siddec", "decoder"); - audiosink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); //g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -281,7 +284,7 @@ make_vorbis_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("vorbisfile", "decoder"); - audiosink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); g_object_set (G_OBJECT (audiosink), "sync", TRUE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -305,7 +308,7 @@ static GstElement * make_mp3_pipeline (const gchar * location) { GstElement *pipeline; - GstElement *src, *decoder, *osssink, *queue, *audio_thread; + GstElement *src, *decoder, *audiosink, *queue, *audio_thread; GstPad *seekable; pipeline = gst_pipeline_new ("app"); @@ -313,24 +316,24 @@ make_mp3_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("mad", "dec"); queue = gst_element_factory_make_or_warn ("queue", "queue"); - osssink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); audio_thread = gst_thread_new ("a_decoder_thread"); - seekable_elements = g_list_prepend (seekable_elements, osssink); + seekable_elements = g_list_prepend (seekable_elements, audiosink); g_object_set (G_OBJECT (src), "location", location, NULL); - g_object_set (G_OBJECT (osssink), "fragment", 0x00180008, NULL); + g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); gst_bin_add (GST_BIN (pipeline), src); gst_bin_add (GST_BIN (pipeline), decoder); gst_bin_add (GST_BIN (audio_thread), queue); - gst_bin_add (GST_BIN (audio_thread), osssink); + gst_bin_add (GST_BIN (audio_thread), audiosink); gst_bin_add (GST_BIN (pipeline), audio_thread); gst_element_link (src, decoder); gst_element_link (decoder, queue); - gst_element_link (queue, osssink); + gst_element_link (queue, audiosink); seekable = gst_element_get_pad (queue, "src"); seekable_pads = g_list_prepend (seekable_pads, seekable); @@ -364,7 +367,7 @@ make_avi_pipeline (const gchar * location) audio_bin = gst_bin_new ("a_decoder_bin"); a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec"); audio_thread = gst_thread_new ("a_decoder_thread"); - audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink"); //g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); a_queue = gst_element_factory_make_or_warn ("queue", "a_queue"); gst_element_link (a_decoder, a_queue); @@ -389,7 +392,7 @@ make_avi_pipeline (const gchar * location) //v_decoder = gst_element_factory_make_or_warn ("windec", "v_dec"); v_decoder = gst_element_factory_make_or_warn ("ffmpegdecall", "v_dec"); video_thread = gst_thread_new ("v_decoder_thread"); - videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink"); + videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink"); //videosink = gst_element_factory_make_or_warn ("fakesink", "v_sink"); //g_object_set (G_OBJECT (videosink), "sync", TRUE, NULL); v_queue = gst_element_factory_make_or_warn ("queue", "v_queue"); @@ -442,7 +445,7 @@ make_mpeg_pipeline (const gchar * location) a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec"); audio_thread = gst_thread_new ("a_decoder_thread"); a_queue = gst_element_factory_make_or_warn ("queue", "a_queue"); - audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink"); g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); gst_element_link (a_decoder, a_queue); gst_element_link (a_queue, audiosink); @@ -466,7 +469,7 @@ make_mpeg_pipeline (const gchar * location) //g_object_set (G_OBJECT (video_thread), "priority", 2, NULL); v_queue = gst_element_factory_make_or_warn ("queue", "v_queue"); v_filter = gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_filter"); - videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink"); + videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink"); gst_element_link_many (v_decoder, v_queue, v_filter, NULL); gst_element_link (v_filter, videosink); @@ -512,7 +515,7 @@ make_mpegnt_pipeline (const gchar * location) a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec"); audio_thread = gst_thread_new ("a_decoder_thread"); a_queue = gst_element_factory_make_or_warn ("queue", "a_queue"); - audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink"); //g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); gst_element_link (a_decoder, a_queue); @@ -534,7 +537,7 @@ make_mpegnt_pipeline (const gchar * location) video_bin = gst_bin_new ("v_decoder_bin"); v_decoder = gst_element_factory_make_or_warn ("mpeg2dec", "v_dec"); v_filter = gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_filter"); - videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink"); + videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink"); gst_element_link_many (v_decoder, v_filter, videosink, NULL); gst_bin_add_many (GST_BIN (video_bin), v_decoder, v_filter, videosink, NULL); diff --git a/examples/seeking/spider_seek.c b/examples/seeking/spider_seek.c index 46197c016f..d63d3bde84 100644 --- a/examples/seeking/spider_seek.c +++ b/examples/seeking/spider_seek.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -37,12 +40,12 @@ make_spider_pipeline (const gchar * location, gboolean thread) decoder = gst_element_factory_make ("spider", "decoder"); a_thread = gst_thread_new ("a_thread"); a_queue = gst_element_factory_make ("queue", "a_queue"); - audiosink = gst_element_factory_make ("osssink", "a_sink"); + audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, "a_sink"); //g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); v_thread = gst_thread_new ("v_thread"); v_queue = gst_element_factory_make ("queue", "v_queue"); - videosink = gst_element_factory_make ("xvimagesink", "v_sink"); + videosink = gst_element_factory_make (DEFAULT_VIDEOSINK, "v_sink"); //g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); diff --git a/examples/switch/switcher.c b/examples/switch/switcher.c index 6296f6adcb..92bf501ec9 100644 --- a/examples/switch/switcher.c +++ b/examples/switch/switcher.c @@ -77,7 +77,7 @@ main (int argc, char *argv[]) src2 = gst_element_factory_make ("videotestsrc", "src2"); g_object_set (G_OBJECT (src2), "pattern", 1, NULL); video_switch = gst_element_factory_make ("switch", "video_switch"); - video_sink = gst_element_factory_make ("ximagesink", "video_sink"); + video_sink = gst_element_factory_make (DEFAULT_VIDEOSINK, "video_sink"); gst_bin_add_many (GST_BIN (pipeline), src1, src2, video_switch, video_sink, NULL); diff --git a/gst-libs/gst/gconf/gconf.c b/gst-libs/gst/gconf/gconf.c index e89dc3a151..de3182f0b1 100644 --- a/gst-libs/gst/gconf/gconf.c +++ b/gst-libs/gst/gconf/gconf.c @@ -123,7 +123,7 @@ gst_gconf_set_string (const gchar * key, const gchar * value) gconf_client_set_string (gst_gconf_get_client (), full_key, value, &error); if (error) { - g_print ("gst_gconf_set_string: error: %s\n", error->message); + GST_ERROR ("gst_gconf_set_string: error: %s\n", error->message); g_error_free (error); } g_free (full_key); @@ -150,7 +150,7 @@ gst_gconf_render_bin_from_description (const gchar * description) bin = GST_ELEMENT (gst_parse_launch (desc, &error)); g_free (desc); if (error) { - g_print ("DEBUG: gstgconf: error parsing pipeline %s\n%s\n", + GST_ERROR ("gstgconf: error parsing pipeline %s\n%s\n", description, error->message); g_error_free (error); return NULL; @@ -191,7 +191,8 @@ gst_gconf_render_bin_from_key (const gchar * key) * gst_gconf_get_default_audio_sink: * * Render audio output bin from GStreamer GConf key : "default/audiosink". - * If key is invalid osssink is used as default output plugin. + * If key is invalid, the default audio sink for the platform is used + * (typically osssink or sunaudiosink). * * Returns: a #GstElement containing the audio output bin, or NULL if * everything failed. @@ -202,12 +203,11 @@ gst_gconf_get_default_audio_sink (void) GstElement *ret = gst_gconf_render_bin_from_key ("default/audiosink"); if (!ret) { - ret = gst_element_factory_make ("osssink", NULL); + ret = gst_element_factory_make (DEFAULT_AUDIOSINK, NULL); if (!ret) - g_warning ("No GConf default audio sink key and osssink doesn't work"); - else - g_print ("GConf audio sink not found, using osssink\n"); + g_warning ("No GConf default audio sink key and %s doesn't work", + DEFAULT_AUDIOSINK); } return ret; @@ -217,7 +217,8 @@ gst_gconf_get_default_audio_sink (void) * gst_gconf_get_default_video_sink: * * Render video output bin from GStreamer GConf key : "default/videosink". - * If key is invalid ximagesink is used as default output plugin. + * If key is invalid, the default video sink for the platform is used + * (typically xvimagesink or ximagesink). * * Returns: a #GstElement containing the video output bin, or NULL if * everything failed. @@ -228,12 +229,11 @@ gst_gconf_get_default_video_sink (void) GstElement *ret = gst_gconf_render_bin_from_key ("default/videosink"); if (!ret) { - ret = gst_element_factory_make ("ximagesink", NULL); + ret = gst_element_factory_make (DEFAULT_VIDEOSINK, NULL); if (!ret) - g_warning ("No GConf default video sink key and ximagesink doesn't work"); - else - g_print ("GConf video sink not found, using ximagesink\n"); + g_warning ("No GConf default video sink key and %s doesn't work", + DEFAULT_VIDEOSINK); } return ret; @@ -243,7 +243,8 @@ gst_gconf_get_default_video_sink (void) * gst_gconf_get_default_audio_src: * * Render audio acquisition bin from GStreamer GConf key : "default/audiosrc". - * If key is invalid osssrc is used as default source. + * If key is invalid, the default audio source for the plaform is used. + * (typically osssrc or sunaudiosrc). * * Returns: a #GstElement containing the audio source bin, or NULL if * everything failed. @@ -254,12 +255,11 @@ gst_gconf_get_default_audio_src (void) GstElement *ret = gst_gconf_render_bin_from_key ("default/audiosrc"); if (!ret) { - ret = gst_element_factory_make ("osssrc", NULL); + ret = gst_element_factory_make (DEFAULT_AUDIOSRC, NULL); if (!ret) - g_warning ("No GConf default audio src key and osssrc doesn't work"); - else - g_print ("GConf audio src not found, using osssrc\n"); + g_warning ("No GConf default audio src key and %s doesn't work", + DEFAULT_AUDIOSRC); } return ret; @@ -269,8 +269,8 @@ gst_gconf_get_default_audio_src (void) * gst_gconf_get_default_video_src: * * Render video acquisition bin from GStreamer GConf key : - * "default/videosrc". If key is invalid videotestsrc - * is used as default source. + * "default/videosrc". If key is invalid, the default video source + * for the platform is used (typically videotestsrc). * * Returns: a #GstElement containing the video source bin, or NULL if * everything failed. @@ -281,12 +281,11 @@ gst_gconf_get_default_video_src (void) GstElement *ret = gst_gconf_render_bin_from_key ("default/videosrc"); if (!ret) { - ret = gst_element_factory_make ("videotestsrc", NULL); + ret = gst_element_factory_make (DEFAULT_VIDEOSRC, NULL); if (!ret) - g_warning ("No GConf default video src key and videotestrc doesn't work"); - else - g_print ("GConf video src not found, using videotestrc\n"); + g_warning ("No GConf default video src key and %s doesn't work", + DEFAULT_VIDEOSRC); } return ret; @@ -296,7 +295,7 @@ gst_gconf_get_default_video_src (void) * gst_gconf_get_default_visualization_element: * * Render visualization bin from GStreamer GConf key : "default/visualization". - * If key is invalid goom is used as default visualization element. + * If key is invalid, the default visualization element is used. * * Returns: a #GstElement containing the visualization bin, or NULL if * everything failed. @@ -307,13 +306,12 @@ gst_gconf_get_default_visualization_element (void) GstElement *ret = gst_gconf_render_bin_from_key ("default/visualization"); if (!ret) { - ret = gst_element_factory_make ("goom", NULL); + ret = gst_element_factory_make (DEFAULT_VISUALIZER, NULL); if (!ret) g_warning - ("No GConf default visualization plugin key and goom doesn't work"); - else - g_print ("GConf visualization plugin not found, using goom\n"); + ("No GConf default visualization plugin key and %s doesn't work", + DEFAULT_VISUALIZER); } return ret; diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index 89becb7fcc..85c8f9f6c6 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -406,7 +406,7 @@ gen_video_element (GstPlayBin * play_bin) if (play_bin->video_sink) { sink = play_bin->video_sink; } else { - sink = gst_element_factory_make ("xvimagesink", "sink"); + sink = gst_element_factory_make (DEFAULT_VIDEOSINK, "sink"); } gst_object_ref (GST_OBJECT (sink)); g_hash_table_insert (play_bin->cache, "video_sink", sink); @@ -511,7 +511,7 @@ gen_audio_element (GstPlayBin * play_bin) if (play_bin->audio_sink) { sink = play_bin->audio_sink; } else { - sink = gst_element_factory_make ("osssink", "sink"); + sink = gst_element_factory_make (DEFAULT_AUDIOSINK, "sink"); play_bin->audio_sink = GST_ELEMENT (gst_object_ref (GST_OBJECT (sink))); } diff --git a/gst/playback/test.c b/gst/playback/test.c index a53133d511..61dbaa4e81 100644 --- a/gst/playback/test.c +++ b/gst/playback/test.c @@ -16,6 +16,9 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include static GstElement * @@ -27,7 +30,7 @@ gen_video_element () element = gst_thread_new ("vbin"); conv = gst_element_factory_make ("ffmpegcolorspace", "conv"); - sink = gst_element_factory_make ("ximagesink", "sink"); + sink = gst_element_factory_make (DEFAULT_VIDEOSINK, "sink"); gst_bin_add (GST_BIN (element), conv); gst_bin_add (GST_BIN (element), sink); @@ -48,7 +51,7 @@ gen_audio_element () element = gst_thread_new ("abin"); conv = gst_element_factory_make ("audioconvert", "conv"); - sink = gst_element_factory_make ("osssink", "sink"); + sink = gst_element_factory_make (DEFAULT_AUDIOSINK, "sink"); gst_bin_add (GST_BIN (element), conv); gst_bin_add (GST_BIN (element), sink); diff --git a/gst/sine/demo-dparams.c b/gst/sine/demo-dparams.c index 085bc5d5b4..02798aef60 100644 --- a/gst/sine/demo-dparams.c +++ b/gst/sine/demo-dparams.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -50,7 +53,7 @@ main (int argc, char *argv[]) GtkWidget *volume_slider; GtkWidget *freq_slider; - GstElement *thread, *sinesrc, *volfilter, *osssink; + GstElement *thread, *sinesrc, *volfilter, *audiosink; GstDParamManager *dpman; GstDParam *volume; GstDParam *freq; @@ -65,13 +68,13 @@ main (int argc, char *argv[]) g_print ("creating elements\n"); thread = gst_thread_new ("live-example"); sinesrc = gst_element_factory_make ("sinesrc", "sine-source"); - osssink = gst_element_factory_make ("osssink", "sound-sink"); + audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, "sound-sink"); volfilter = gst_element_factory_make ("volume", "volume-filter"); - gst_bin_add_many (GST_BIN (thread), sinesrc, volfilter, osssink, NULL); - gst_element_link_many (sinesrc, volfilter, osssink, NULL); + gst_bin_add_many (GST_BIN (thread), sinesrc, volfilter, audiosink, NULL); + gst_element_link_many (sinesrc, volfilter, audiosink, NULL); /* this breaks with current alsa oss compat lib */ - g_object_set (G_OBJECT (osssink), "fragment", 0x00180008, NULL); - g_object_set (G_OBJECT (osssink), "sync", FALSE, NULL); + g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); + g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (sinesrc), "samplesperbuffer", 1024, NULL); diff --git a/gst/volume/demo.c b/gst/volume/demo.c index ef5b4797aa..1dfc6ba54e 100644 --- a/gst/volume/demo.c +++ b/gst/volume/demo.c @@ -112,7 +112,7 @@ main (int argc, char *argv[]) if (error) { g_print ("pipeline could not be constructed: %s\n", error->message); g_print ("Please give a complete pipeline with a 'volume' element.\n"); - g_print ("Example: sinesrc ! volume ! osssink\n"); + g_print ("Example: sinesrc ! volume ! %s\n", DEFAULT_AUDIOSINK); g_error_free (error); return 1; } diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index 4a5d51ab01..fdd7c45d18 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -88,7 +91,7 @@ make_mod_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("modplug", "decoder"); - audiosink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); //g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -119,8 +122,8 @@ make_dv_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("dvdec", "decoder"); - videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink"); - audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink"); + videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink"); //g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -156,7 +159,7 @@ make_wav_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("wavparse", "decoder"); - audiosink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); //g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -187,7 +190,7 @@ make_flac_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("flacdec", "decoder"); - audiosink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -218,7 +221,7 @@ make_sid_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("siddec", "decoder"); - audiosink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); //g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -281,7 +284,7 @@ make_vorbis_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("vorbisfile", "decoder"); - audiosink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); g_object_set (G_OBJECT (audiosink), "sync", TRUE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); @@ -305,7 +308,7 @@ static GstElement * make_mp3_pipeline (const gchar * location) { GstElement *pipeline; - GstElement *src, *decoder, *osssink, *queue, *audio_thread; + GstElement *src, *decoder, *audiosink, *queue, *audio_thread; GstPad *seekable; pipeline = gst_pipeline_new ("app"); @@ -313,24 +316,24 @@ make_mp3_pipeline (const gchar * location) src = gst_element_factory_make_or_warn (SOURCE, "src"); decoder = gst_element_factory_make_or_warn ("mad", "dec"); queue = gst_element_factory_make_or_warn ("queue", "queue"); - osssink = gst_element_factory_make_or_warn ("osssink", "sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink"); audio_thread = gst_thread_new ("a_decoder_thread"); - seekable_elements = g_list_prepend (seekable_elements, osssink); + seekable_elements = g_list_prepend (seekable_elements, audiosink); g_object_set (G_OBJECT (src), "location", location, NULL); - g_object_set (G_OBJECT (osssink), "fragment", 0x00180008, NULL); + g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); gst_bin_add (GST_BIN (pipeline), src); gst_bin_add (GST_BIN (pipeline), decoder); gst_bin_add (GST_BIN (audio_thread), queue); - gst_bin_add (GST_BIN (audio_thread), osssink); + gst_bin_add (GST_BIN (audio_thread), audiosink); gst_bin_add (GST_BIN (pipeline), audio_thread); gst_element_link (src, decoder); gst_element_link (decoder, queue); - gst_element_link (queue, osssink); + gst_element_link (queue, audiosink); seekable = gst_element_get_pad (queue, "src"); seekable_pads = g_list_prepend (seekable_pads, seekable); @@ -364,7 +367,7 @@ make_avi_pipeline (const gchar * location) audio_bin = gst_bin_new ("a_decoder_bin"); a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec"); audio_thread = gst_thread_new ("a_decoder_thread"); - audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink"); //g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); a_queue = gst_element_factory_make_or_warn ("queue", "a_queue"); gst_element_link (a_decoder, a_queue); @@ -389,7 +392,7 @@ make_avi_pipeline (const gchar * location) //v_decoder = gst_element_factory_make_or_warn ("windec", "v_dec"); v_decoder = gst_element_factory_make_or_warn ("ffmpegdecall", "v_dec"); video_thread = gst_thread_new ("v_decoder_thread"); - videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink"); + videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink"); //videosink = gst_element_factory_make_or_warn ("fakesink", "v_sink"); //g_object_set (G_OBJECT (videosink), "sync", TRUE, NULL); v_queue = gst_element_factory_make_or_warn ("queue", "v_queue"); @@ -442,7 +445,7 @@ make_mpeg_pipeline (const gchar * location) a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec"); audio_thread = gst_thread_new ("a_decoder_thread"); a_queue = gst_element_factory_make_or_warn ("queue", "a_queue"); - audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink"); g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); gst_element_link (a_decoder, a_queue); gst_element_link (a_queue, audiosink); @@ -466,7 +469,7 @@ make_mpeg_pipeline (const gchar * location) //g_object_set (G_OBJECT (video_thread), "priority", 2, NULL); v_queue = gst_element_factory_make_or_warn ("queue", "v_queue"); v_filter = gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_filter"); - videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink"); + videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink"); gst_element_link_many (v_decoder, v_queue, v_filter, NULL); gst_element_link (v_filter, videosink); @@ -512,7 +515,7 @@ make_mpegnt_pipeline (const gchar * location) a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec"); audio_thread = gst_thread_new ("a_decoder_thread"); a_queue = gst_element_factory_make_or_warn ("queue", "a_queue"); - audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink"); + audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink"); //g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); gst_element_link (a_decoder, a_queue); @@ -534,7 +537,7 @@ make_mpegnt_pipeline (const gchar * location) video_bin = gst_bin_new ("v_decoder_bin"); v_decoder = gst_element_factory_make_or_warn ("mpeg2dec", "v_dec"); v_filter = gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_filter"); - videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink"); + videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink"); gst_element_link_many (v_decoder, v_filter, videosink, NULL); gst_bin_add_many (GST_BIN (video_bin), v_decoder, v_filter, videosink, NULL); diff --git a/tests/examples/seek/spider_seek.c b/tests/examples/seek/spider_seek.c index 46197c016f..d63d3bde84 100644 --- a/tests/examples/seek/spider_seek.c +++ b/tests/examples/seek/spider_seek.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -37,12 +40,12 @@ make_spider_pipeline (const gchar * location, gboolean thread) decoder = gst_element_factory_make ("spider", "decoder"); a_thread = gst_thread_new ("a_thread"); a_queue = gst_element_factory_make ("queue", "a_queue"); - audiosink = gst_element_factory_make ("osssink", "a_sink"); + audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, "a_sink"); //g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); v_thread = gst_thread_new ("v_thread"); v_queue = gst_element_factory_make ("queue", "v_queue"); - videosink = gst_element_factory_make ("xvimagesink", "v_sink"); + videosink = gst_element_factory_make (DEFAULT_VIDEOSINK, "v_sink"); //g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); diff --git a/tests/old/examples/capsfilter/capsfilter1.c b/tests/old/examples/capsfilter/capsfilter1.c index 617b89dd0e..a59f728e55 100644 --- a/tests/old/examples/capsfilter/capsfilter1.c +++ b/tests/old/examples/capsfilter/capsfilter1.c @@ -54,7 +54,7 @@ main (gint argc, gchar * argv[]) g_return_val_if_fail (mpeg2dec, -1); colorspace = gst_element_factory_make ("ffmpegcolorspace", "colorspace"); g_return_val_if_fail (colorspace, -1); - videosink = gst_element_factory_make ("ximagesink", "videosink"); + videosink = gst_element_factory_make (DEFAULT_VIDEOSINK, "videosink"); g_return_val_if_fail (videosink, -1); gst_bin_add (GST_BIN (pipeline), filesrc); diff --git a/tests/old/examples/dynparams/filter.c b/tests/old/examples/dynparams/filter.c index 333820df1f..087a5b284f 100644 --- a/tests/old/examples/dynparams/filter.c +++ b/tests/old/examples/dynparams/filter.c @@ -7,6 +7,9 @@ * you can also enter an input and output part of a pipeline */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -481,7 +484,7 @@ create_ui (_filter_ui_t * fui, _filter_data_t * fd) widget = gtk_label_new ("Output Pipe"); gtk_container_add (GTK_CONTAINER (vbox), widget); fui->output = gtk_entry_new (); - gtk_entry_set_text (GTK_ENTRY (fui->output), "osssink fragment=1572872"); /* fixme: gconf default ? */ + gtk_entry_set_text (GTK_ENTRY (fui->output), DEFAULT_AUDIOSINK); gtk_container_add (GTK_CONTAINER (vbox), fui->output); gtk_container_add (GTK_CONTAINER (fui->selection), vbox); g_signal_connect (G_OBJECT (fui->output), "activate", diff --git a/tests/old/examples/seek/cdparanoia.c b/tests/old/examples/seek/cdparanoia.c index fd41187ebb..d0e7bc94ba 100644 --- a/tests/old/examples/seek/cdparanoia.c +++ b/tests/old/examples/seek/cdparanoia.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -132,7 +135,7 @@ main (int argc, char **argv) { GstElement *pipeline; GstElement *cdparanoia; - GstElement *osssink; + GstElement *audiosink; GstPad *pad; GstFormat track_format; GstEvent *event; @@ -147,13 +150,13 @@ main (int argc, char **argv) g_assert (cdparanoia); g_object_set (G_OBJECT (cdparanoia), "paranoia_mode", 0, NULL); - osssink = gst_element_factory_make ("osssink", "osssink"); - g_assert (osssink); + audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, DEFAULT_AUDIOSINK); + g_assert (audiosink); gst_bin_add (GST_BIN (pipeline), cdparanoia); - gst_bin_add (GST_BIN (pipeline), osssink); + gst_bin_add (GST_BIN (pipeline), audiosink); - gst_element_link_pads (cdparanoia, "src", osssink, "sink"); + gst_element_link_pads (cdparanoia, "src", audiosink, "sink"); g_signal_connect (G_OBJECT (pipeline), "deep_notify", G_CALLBACK (gst_element_default_deep_notify), NULL); diff --git a/tests/old/examples/seek/chained.c b/tests/old/examples/seek/chained.c index 5bd0e12df3..bf23e05a80 100644 --- a/tests/old/examples/seek/chained.c +++ b/tests/old/examples/seek/chained.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -44,7 +47,7 @@ main (int argc, char **argv) GstElement *oggdemux; GstElement *vorbisdec; GstElement *audioconvert; - GstElement *osssink; + GstElement *audiosink; gst_init (&argc, &argv); @@ -75,14 +78,14 @@ main (int argc, char **argv) g_assert (vorbisdec); audioconvert = gst_element_factory_make ("audioconvert", "audioconvert"); g_assert (audioconvert); - osssink = gst_element_factory_make ("osssink", "osssink"); - g_assert (osssink); + audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, DEFAULT_AUDIOSINK); + g_assert (audiosink); gst_bin_add (GST_BIN (bin), vorbisdec); gst_bin_add (GST_BIN (bin), audioconvert); - gst_bin_add (GST_BIN (bin), osssink); + gst_bin_add (GST_BIN (bin), audiosink); gst_element_link_pads (vorbisdec, "src", audioconvert, "sink"); - gst_element_link_pads (audioconvert, "src", osssink, "sink"); + gst_element_link_pads (audioconvert, "src", audiosink, "sink"); gst_element_add_ghost_pad (bin, gst_element_get_pad (vorbisdec, "sink"), "sink"); diff --git a/tests/old/examples/seek/spider_seek.c b/tests/old/examples/seek/spider_seek.c index 46197c016f..d63d3bde84 100644 --- a/tests/old/examples/seek/spider_seek.c +++ b/tests/old/examples/seek/spider_seek.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -37,12 +40,12 @@ make_spider_pipeline (const gchar * location, gboolean thread) decoder = gst_element_factory_make ("spider", "decoder"); a_thread = gst_thread_new ("a_thread"); a_queue = gst_element_factory_make ("queue", "a_queue"); - audiosink = gst_element_factory_make ("osssink", "a_sink"); + audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, "a_sink"); //g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL); v_thread = gst_thread_new ("v_thread"); v_queue = gst_element_factory_make ("queue", "v_queue"); - videosink = gst_element_factory_make ("xvimagesink", "v_sink"); + videosink = gst_element_factory_make (DEFAULT_VIDEOSINK, "v_sink"); //g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL); g_object_set (G_OBJECT (src), "location", location, NULL); diff --git a/tests/old/examples/switch/switcher.c b/tests/old/examples/switch/switcher.c index 6296f6adcb..92bf501ec9 100644 --- a/tests/old/examples/switch/switcher.c +++ b/tests/old/examples/switch/switcher.c @@ -77,7 +77,7 @@ main (int argc, char *argv[]) src2 = gst_element_factory_make ("videotestsrc", "src2"); g_object_set (G_OBJECT (src2), "pattern", 1, NULL); video_switch = gst_element_factory_make ("switch", "video_switch"); - video_sink = gst_element_factory_make ("ximagesink", "video_sink"); + video_sink = gst_element_factory_make (DEFAULT_VIDEOSINK, "video_sink"); gst_bin_add_many (GST_BIN (pipeline), src1, src2, video_switch, video_sink, NULL); diff --git a/tests/old/testsuite/embed/embed.c b/tests/old/testsuite/embed/embed.c index 1678a8b130..ed4a93cc7b 100644 --- a/tests/old/testsuite/embed/embed.c +++ b/tests/old/testsuite/embed/embed.c @@ -2,6 +2,9 @@ * Sample app for element embedding. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -29,7 +32,7 @@ main (int argc, char *argv[]) pipeline = gst_element_factory_make ("pipeline", NULL); testsrc = gst_element_factory_make ("videotestsrc", NULL); csp = gst_element_factory_make ("ffmpegcolorspace", NULL); - videosink = gst_element_factory_make ("xvimagesink", NULL); + videosink = gst_element_factory_make (DEFAULT_VIDEOSINK, NULL); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size (GTK_WINDOW (window), 640, 480); diff --git a/testsuite/embed/embed.c b/testsuite/embed/embed.c index 1678a8b130..ed4a93cc7b 100644 --- a/testsuite/embed/embed.c +++ b/testsuite/embed/embed.c @@ -2,6 +2,9 @@ * Sample app for element embedding. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -29,7 +32,7 @@ main (int argc, char *argv[]) pipeline = gst_element_factory_make ("pipeline", NULL); testsrc = gst_element_factory_make ("videotestsrc", NULL); csp = gst_element_factory_make ("ffmpegcolorspace", NULL); - videosink = gst_element_factory_make ("xvimagesink", NULL); + videosink = gst_element_factory_make (DEFAULT_VIDEOSINK, NULL); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size (GTK_WINDOW (window), 640, 480);