summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog37
-rw-r--r--configure.ac6
-rw-r--r--examples/capsfilter/capsfilter1.c2
-rw-r--r--examples/dynparams/filter.c5
-rw-r--r--examples/seeking/cdparanoia.c13
-rw-r--r--examples/seeking/chained.c13
-rw-r--r--examples/seeking/seek.c41
-rw-r--r--examples/seeking/spider_seek.c7
-rw-r--r--examples/switch/switcher.c2
-rw-r--r--ext/faad/gstfaad.c2
-rw-r--r--ext/smoothwave/demo-osssrc.c5
-rw-r--r--gst-libs/gst/gconf/gconf.c54
-rw-r--r--gst/playondemand/demo-mp3.c5
-rw-r--r--gst/smoothwave/demo-osssrc.c5
-rw-r--r--gst/spectrum/demo-osssrc.c5
-rw-r--r--gst/speed/demo-mp3.c13
16 files changed, 143 insertions, 72 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e30214b..4447210a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+2005-02-02 David Schleef <ds@schleef.org>
+
+ * 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 <thaytan@mad.scientist.com>
* gst/tcp/gsttcpclientsink.c: (gst_tcpclientsink_class_init),
diff --git a/configure.ac b/configure.ac
index 4938d32a..70b349b8 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 617b89dd..a59f728e 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 333820df..087a5b28 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 <string.h>
#include <gtk/gtk.h>
#include <gst/gst.h>
@@ -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 fd41187e..d0e7bc94 100644
--- a/examples/seeking/cdparanoia.c
+++ b/examples/seeking/cdparanoia.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <stdlib.h>
#include <gst/gst.h>
#include <string.h>
@@ -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 5bd0e12d..bf23e05a 100644
--- a/examples/seeking/chained.c
+++ b/examples/seeking/chained.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <stdlib.h>
#include <gst/gst.h>
#include <string.h>
@@ -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 4a5d51ab..fdd7c45d 100644
--- a/examples/seeking/seek.c
+++ b/examples/seeking/seek.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <stdlib.h>
#include <glib.h>
#include <gtk/gtk.h>
@@ -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 46197c01..d63d3bde 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 <stdlib.h>
#include <glib.h>
#include <gtk/gtk.h>
@@ -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 6296f6ad..92bf501e 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/ext/faad/gstfaad.c b/ext/faad/gstfaad.c
index 491c187d..5cac22ed 100644
--- a/ext/faad/gstfaad.c
+++ b/ext/faad/gstfaad.c
@@ -692,7 +692,7 @@ gst_faad_change_state (GstElement * element)
conf = faacDecGetCurrentConfiguration (faad->handle);
conf->defObjectType = LC;
- conf->dontUpSampleImplicitSBR = 1;
+ //conf->dontUpSampleImplicitSBR = 1;
faacDecSetConfiguration (faad->handle, conf);
}
break;
diff --git a/ext/smoothwave/demo-osssrc.c b/ext/smoothwave/demo-osssrc.c
index 6e5d2760..9c55a3b3 100644
--- a/ext/smoothwave/demo-osssrc.c
+++ b/ext/smoothwave/demo-osssrc.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gtk/gtk.h>
#include <gst/gst.h>
@@ -23,7 +26,7 @@ main (int argc, char *argv[])
src = gst_element_factory_make ("sinesrc", "src");
wave = gst_element_factory_make ("smoothwave", "wave");
- ximage = gst_element_factory_make ("ximagesink", "sink");
+ 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);
diff --git a/gst-libs/gst/gconf/gconf.c b/gst-libs/gst/gconf/gconf.c
index e89dc3a1..de3182f0 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/playondemand/demo-mp3.c b/gst/playondemand/demo-mp3.c
index efae8ebf..ca41a9eb 100644
--- a/gst/playondemand/demo-mp3.c
+++ b/gst/playondemand/demo-mp3.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <stdlib.h>
#include <glib.h>
#include <gtk/gtk.h>
@@ -78,7 +81,7 @@ setup_pipeline (gchar * filename)
src = gst_element_factory_make ("filesrc", "source");
dec = gst_element_factory_make ("vorbisfile", "decoder");
pod = gst_element_factory_make ("playondemand", "sequencer");
- sink = gst_element_factory_make ("alsasink", "sink");
+ sink = gst_element_factory_make (DEFAULT_AUDIOSINK, "sink");
g_object_set (G_OBJECT (src), "location", filename, NULL);
g_object_set (G_OBJECT (sink), "period-count", 64, "period-size", 512, NULL);
diff --git a/gst/smoothwave/demo-osssrc.c b/gst/smoothwave/demo-osssrc.c
index 6e5d2760..9c55a3b3 100644
--- a/gst/smoothwave/demo-osssrc.c
+++ b/gst/smoothwave/demo-osssrc.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gtk/gtk.h>
#include <gst/gst.h>
@@ -23,7 +26,7 @@ main (int argc, char *argv[])
src = gst_element_factory_make ("sinesrc", "src");
wave = gst_element_factory_make ("smoothwave", "wave");
- ximage = gst_element_factory_make ("ximagesink", "sink");
+ 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);
diff --git a/gst/spectrum/demo-osssrc.c b/gst/spectrum/demo-osssrc.c
index bba27b3a..b51e8c2a 100644
--- a/gst/spectrum/demo-osssrc.c
+++ b/gst/spectrum/demo-osssrc.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/gst.h>
#include <gtk/gtk.h>
@@ -38,7 +41,7 @@ main (int argc, char *argv[])
bin = gst_pipeline_new ("bin");
- src = gst_element_factory_make ("osssrc", "src");
+ src = gst_element_factory_make (DEFAULT_AUDIOSRC, "src");
g_object_set (G_OBJECT (src), "buffersize", (gulong) 1024, NULL);
spectrum = gst_element_factory_make ("spectrum", "spectrum");
g_object_set (G_OBJECT (spectrum), "width", 256, NULL);
diff --git a/gst/speed/demo-mp3.c b/gst/speed/demo-mp3.c
index f9a169ae..3b551941 100644
--- a/gst/speed/demo-mp3.c
+++ b/gst/speed/demo-mp3.c
@@ -18,6 +18,9 @@
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <stdlib.h>
#include <gtk/gtk.h>
#include <gst/gst.h>
@@ -34,7 +37,7 @@ int
main (int argc, char **argv)
{
GtkWidget *window, *vbox, *hscale, *button;
- GstElement *filesrc, *mad, *stereo2mono, *speed, *osssink, *pipeline;
+ GstElement *filesrc, *mad, *stereo2mono, *speed, *audiosink, *pipeline;
gst_init (&argc, &argv);
gtk_init (&argc, &argv);
@@ -64,16 +67,16 @@ main (int argc, char **argv)
mad = gst_element_factory_make ("mad", "mad");
stereo2mono = gst_element_factory_make ("stereo2mono", "stereo2mono");
speed = gst_element_factory_make ("speed", "speed");
- osssink = gst_element_factory_make ("osssink", "osssink");
- g_object_set (osssink, "fragment", 0x00180008, NULL);
+ audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, "audiosink");
+ g_object_set (audiosink, "fragment", 0x00180008, NULL);
gtk_signal_connect (GTK_OBJECT (gtk_range_get_adjustment (GTK_RANGE
(hscale))), "value_changed", G_CALLBACK (set_speed), speed);
pipeline = gst_pipeline_new ("app");
gst_bin_add_many (GST_BIN (pipeline), filesrc, mad, stereo2mono, speed,
- osssink, NULL);
- gst_element_link_many (filesrc, mad, stereo2mono, speed, osssink, NULL);
+ audiosink, NULL);
+ gst_element_link_many (filesrc, mad, stereo2mono, speed, audiosink, NULL);
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);