summaryrefslogtreecommitdiffstats
path: root/examples/seeking
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2005-02-02 08:14:01 +0000
committerDavid Schleef <ds@schleef.org>2005-02-02 08:14:01 +0000
commit7438894f77941806cd32f2f83dd853a9f4d7bc37 (patch)
treee063b17a38594b7d8241162b867baec12e8e19c9 /examples/seeking
parentb7c895ea8d3a891695bee439ef14402a7666d4c2 (diff)
downloadgst-plugins-bad-7438894f77941806cd32f2f83dd853a9f4d7bc37.tar.gz
gst-plugins-bad-7438894f77941806cd32f2f83dd853a9f4d7bc37.tar.bz2
gst-plugins-bad-7438894f77941806cd32f2f83dd853a9f4d7bc37.zip
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):
Diffstat (limited to 'examples/seeking')
-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
4 files changed, 43 insertions, 31 deletions
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);