summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-01-09 14:53:58 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-01-09 14:53:58 +0000
commitac59af4fcd0e9011e4d959471339fc4229273ca9 (patch)
tree1d1978753c4189adc0bc11dd0c6738cf2a2fc244 /examples
parent3081a40cc80149b9a188c2daab8ade55f1c20a99 (diff)
downloadgst-plugins-bad-ac59af4fcd0e9011e4d959471339fc4229273ca9.tar.gz
gst-plugins-bad-ac59af4fcd0e9011e4d959471339fc4229273ca9.tar.bz2
gst-plugins-bad-ac59af4fcd0e9011e4d959471339fc4229273ca9.zip
Remove all references to xvideosink, fix examples (#140845).
Original commit message from CVS: * configure.ac: * examples/capsfilter/capsfilter1.c: (main): * examples/seeking/spider_seek.c: (make_spider_pipeline): * ext/dvdread/Makefile.am: * ext/dvdread/demo-play: * ext/dvdread/demo-play.c: * gconf/gstreamer.schemas.in: * gst-libs/gst/gconf/gconf.c: * sys/v4l/TODO: * testsuite/Makefile.am: * testsuite/embed/Makefile.am: * testsuite/embed/embed.c: (cb_expose), (main): Remove all references to xvideosink, fix examples (#140845). * gst/playback/gstplaybasebin.c: (group_destroy): Apparently, disposal does not unlink - so do explicitely. * ext/alsa/gstalsasink.c: (gst_alsa_sink_check_event): Add debug.
Diffstat (limited to 'examples')
-rw-r--r--examples/capsfilter/capsfilter1.c28
-rw-r--r--examples/seeking/spider_seek.c2
2 files changed, 14 insertions, 16 deletions
diff --git a/examples/capsfilter/capsfilter1.c b/examples/capsfilter/capsfilter1.c
index 5948d601..617b89dd 100644
--- a/examples/capsfilter/capsfilter1.c
+++ b/examples/capsfilter/capsfilter1.c
@@ -1,3 +1,4 @@
+#include <string.h>
#include <gst/gst.h>
/* This app uses a filter to connect colorspace and videosink
@@ -28,7 +29,7 @@ main (gint argc, gchar * argv[])
GstElement *queue;
GstElement *mpeg2dec;
GstElement *colorspace;
- GstElement *xvideosink;
+ GstElement *videosink;
gboolean res;
gst_init (&argc, &argv);
@@ -51,11 +52,10 @@ main (gint argc, gchar * argv[])
queue = gst_element_factory_make ("queue", "queue");
mpeg2dec = gst_element_factory_make ("mpeg2dec", "mpeg2dec");
g_return_val_if_fail (mpeg2dec, -1);
- colorspace = gst_element_factory_make ("colorspace", "colorspace");
+ colorspace = gst_element_factory_make ("ffmpegcolorspace", "colorspace");
g_return_val_if_fail (colorspace, -1);
- xvideosink = gst_element_factory_make ("xvideosink", "xvideosink");
- g_return_val_if_fail (xvideosink, -1);
- g_object_set (G_OBJECT (xvideosink), "toplevel", TRUE, NULL);
+ videosink = gst_element_factory_make ("ximagesink", "videosink");
+ g_return_val_if_fail (videosink, -1);
gst_bin_add (GST_BIN (pipeline), filesrc);
gst_bin_add (GST_BIN (pipeline), demux);
@@ -63,19 +63,17 @@ main (gint argc, gchar * argv[])
gst_bin_add (GST_BIN (thread), queue);
gst_bin_add (GST_BIN (thread), mpeg2dec);
gst_bin_add (GST_BIN (thread), colorspace);
- gst_bin_add (GST_BIN (thread), xvideosink);
+ gst_bin_add (GST_BIN (thread), videosink);
gst_bin_add (GST_BIN (pipeline), thread);
- gst_element_link (filesrc, "src", demux, "sink");
- gst_element_link (queue, "src", mpeg2dec, "sink");
- gst_element_link (mpeg2dec, "src", colorspace, "sink");
- /* force RGB data passing between colorspace and xvideosink */
- res = gst_element_link_filtered (colorspace, "src", xvideosink, "sink",
- GST_CAPS_NEW ("filtercaps",
- "video/raw", "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("RGB "))
- ));
+ gst_element_link_pads (filesrc, "src", demux, "sink");
+ gst_element_link_pads (queue, "src", mpeg2dec, "sink");
+ gst_element_link_pads (mpeg2dec, "src", colorspace, "sink");
+ /* force RGB data passing between colorspace and videosink */
+ res = gst_element_link_pads_filtered (colorspace, "src", videosink, "sink",
+ gst_caps_new_simple ("video/x-raw-rgb", NULL));
if (!res) {
- g_print ("could not connect colorspace and xvideosink\n");
+ g_print ("could not connect colorspace and videosink\n");
return -1;
}
diff --git a/examples/seeking/spider_seek.c b/examples/seeking/spider_seek.c
index 54c10897..46197c01 100644
--- a/examples/seeking/spider_seek.c
+++ b/examples/seeking/spider_seek.c
@@ -42,7 +42,7 @@ make_spider_pipeline (const gchar * location, gboolean thread)
v_thread = gst_thread_new ("v_thread");
v_queue = gst_element_factory_make ("queue", "v_queue");
- videosink = gst_element_factory_make ("xvideosink", "v_sink");
+ videosink = gst_element_factory_make ("xvimagesink", "v_sink");
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
g_object_set (G_OBJECT (src), "location", location, NULL);