mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
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.
This commit is contained in:
parent
9847d06827
commit
3d31fdcac9
8 changed files with 45 additions and 184 deletions
20
ChangeLog
20
ChangeLog
|
@ -1,3 +1,23 @@
|
|||
2005-01-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* 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.
|
||||
|
||||
2005-01-09 Maciej Katafiasz <mathrick@freedesktop.org>
|
||||
|
||||
* README: fix PKG_CONFIG_PATH instructions, what was there
|
||||
|
|
|
@ -2104,6 +2104,7 @@ examples/indexing/Makefile
|
|||
examples/gstplay/Makefile
|
||||
examples/switch/Makefile
|
||||
examples/Makefile
|
||||
testsuite/embed/Makefile
|
||||
testsuite/spider/Makefile
|
||||
testsuite/alsa/Makefile
|
||||
testsuite/multifilesink/Makefile
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -11,12 +11,6 @@ libgstdvdreadsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
|||
|
||||
noinst_HEADERS = dvdreadsrc.h
|
||||
|
||||
# fix this
|
||||
|
||||
#noinst_PROGRAMS = demo-play
|
||||
#
|
||||
#demo_play_SOURCES = demo-play.c
|
||||
#demo_play_CFLAGS = $(GST_CFLAGS) $(GNOME_CFLAGS)
|
||||
#demo_play_LDFLAGS = $(GST_LIBS) $(GNOME_LIBS)
|
||||
|
||||
EXTRA_DIST = demo-play.c README
|
||||
EXTRA_DIST = \
|
||||
README \
|
||||
demo-play
|
||||
|
|
6
ext/dvdread/demo-play
Executable file
6
ext/dvdread/demo-play
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
AUDIOSINK=`gconftool-2 -g /system/gstreamer/0.8/default/audiosink`
|
||||
VIDEOSINK=`gconftool-2 -g /system/gstreamer/0.8/default/videosink`
|
||||
gst-launch dvdreadsrc ! dvddemux name=demux .video_00 ! \
|
||||
{ queue ! mpeg2dec ! ffmpegcolorspace ! videoscale ! $VIDEOSINK } \
|
||||
{ demux.audio_00 ! queue ! a52dec ! audioconvert ! audioscale ! $AUDIOSINK }
|
|
@ -1,158 +0,0 @@
|
|||
#include <gnome.h>
|
||||
#include <gst/gst.h>
|
||||
|
||||
GstPipeline *pipeline;
|
||||
GstElement *v_queue, *a_queue, *v_thread, *a_thread;
|
||||
GtkWidget *appwindow;
|
||||
GtkWidget *gtk_socket;
|
||||
|
||||
void
|
||||
eof (GstElement * src)
|
||||
{
|
||||
g_print ("have eos, quitting\n");
|
||||
exit (0);
|
||||
}
|
||||
|
||||
gboolean
|
||||
idle_func (gpointer data)
|
||||
{
|
||||
gst_bin_iterate (GST_BIN (data));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
mpeg2parse_newpad (GstElement * parser, GstPad * pad, GstElement * pipeline)
|
||||
{
|
||||
|
||||
g_print ("***** a new pad %s was created\n", gst_pad_get_name (pad));
|
||||
|
||||
if (strncmp (gst_pad_get_name (pad), "video_", 6) == 0) {
|
||||
gst_pad_link (pad, gst_element_get_pad (v_queue, "sink"));
|
||||
gst_bin_add (GST_BIN (pipeline), v_thread);
|
||||
gst_element_set_state (v_thread, GST_STATE_PLAYING);
|
||||
} else if (strcmp (gst_pad_get_name (pad), "private_stream_1.0") == 0) {
|
||||
gst_pad_link (pad, gst_element_get_pad (a_queue, "sink"));
|
||||
gst_bin_add (GST_BIN (pipeline), a_thread);
|
||||
gst_element_set_state (a_thread, GST_STATE_PLAYING);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
mpeg2parse_have_size (GstElement * videosink, gint width, gint height)
|
||||
{
|
||||
gtk_widget_set_usize (gtk_socket, width, height);
|
||||
gtk_widget_show_all (appwindow);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GstElement *src, *parse;
|
||||
GstElement *v_decode, *show, *color;
|
||||
GstElement *a_decode, *osssink;
|
||||
|
||||
if (argc < 5) {
|
||||
g_print ("usage: %s dvdlocation title chapter angle\n", argv[0]);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
gnome_init ("MPEG2 Video player", "0.0.1", argc, argv);
|
||||
|
||||
/* ***** construct the main pipeline ***** */
|
||||
pipeline = GST_PIPELINE (gst_pipeline_new ("pipeline"));
|
||||
g_return_val_if_fail (pipeline != NULL, -1);
|
||||
|
||||
src = gst_element_factory_make ("dvdreadsrc", "src");
|
||||
g_return_val_if_fail (src != NULL, -1);
|
||||
gtk_object_set (GTK_OBJECT (src), "location", argv[1], NULL);
|
||||
gtk_object_set (GTK_OBJECT (src), "title", atoi (argv[2]), NULL);
|
||||
gtk_object_set (GTK_OBJECT (src), "chapter", atoi (argv[3]), NULL);
|
||||
gtk_object_set (GTK_OBJECT (src), "angle", atoi (argv[4]), NULL);
|
||||
|
||||
parse = gst_element_factory_make ("mpeg2parse", "parse");
|
||||
/*parse = gst_element_factory_make("mpeg1parse","parse"); */
|
||||
g_return_val_if_fail (parse != NULL, -1);
|
||||
|
||||
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (src));
|
||||
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (parse));
|
||||
|
||||
gst_element_link (src, "src", parse, "sink");
|
||||
|
||||
|
||||
/* ***** pre-construct the video thread ***** */
|
||||
v_thread = GST_ELEMENT (gst_thread_new ("v_thread"));
|
||||
g_return_val_if_fail (v_thread != NULL, -1);
|
||||
|
||||
v_queue = gst_element_factory_make ("queue", "v_queue");
|
||||
g_return_val_if_fail (v_queue != NULL, -1);
|
||||
|
||||
v_decode = gst_element_factory_make ("mpeg2dec", "decode_video");
|
||||
g_return_val_if_fail (v_decode != NULL, -1);
|
||||
|
||||
color = gst_element_factory_make ("colorspace", "color");
|
||||
g_return_val_if_fail (color != NULL, -1);
|
||||
|
||||
show = gst_element_factory_make ("xvideosink", "show");
|
||||
g_return_val_if_fail (show != NULL, -1);
|
||||
|
||||
gst_bin_add (GST_BIN (v_thread), GST_ELEMENT (v_queue));
|
||||
gst_bin_add (GST_BIN (v_thread), GST_ELEMENT (v_decode));
|
||||
gst_bin_add (GST_BIN (v_thread), GST_ELEMENT (color));
|
||||
gst_bin_add (GST_BIN (v_thread), GST_ELEMENT (show));
|
||||
|
||||
gst_element_link (v_queue, "src", v_decode, "sink");
|
||||
gst_element_link (v_decode, "src", color, "sink");
|
||||
gst_element_link (color, "src", show, "sink");
|
||||
|
||||
|
||||
/* ***** pre-construct the audio thread ***** */
|
||||
a_thread = GST_ELEMENT (gst_thread_new ("a_thread"));
|
||||
g_return_val_if_fail (a_thread != NULL, -1);
|
||||
|
||||
a_queue = gst_element_factory_make ("queue", "a_queue");
|
||||
g_return_val_if_fail (a_queue != NULL, -1);
|
||||
|
||||
a_decode = gst_element_factory_make ("a52dec", "decode_audio");
|
||||
g_return_val_if_fail (a_decode != NULL, -1);
|
||||
|
||||
osssink = gst_element_factory_make ("osssink", "osssink");
|
||||
g_return_val_if_fail (osssink != NULL, -1);
|
||||
|
||||
gst_bin_add (GST_BIN (a_thread), GST_ELEMENT (a_queue));
|
||||
gst_bin_add (GST_BIN (a_thread), GST_ELEMENT (a_decode));
|
||||
gst_bin_add (GST_BIN (a_thread), GST_ELEMENT (osssink));
|
||||
|
||||
gst_element_link (a_queue, "src", a_decode, "sink");
|
||||
gst_element_link (a_decode, "src", osssink, "sink");
|
||||
|
||||
|
||||
/* ***** construct the GUI ***** */
|
||||
appwindow = gnome_app_new ("DVD Player", "DVD Player");
|
||||
|
||||
gtk_socket = gtk_socket_new ();
|
||||
gtk_widget_show (gtk_socket);
|
||||
|
||||
gnome_app_set_contents (GNOME_APP (appwindow), GTK_WIDGET (gtk_socket));
|
||||
|
||||
gtk_widget_realize (gtk_socket);
|
||||
gtk_socket_steal (GTK_SOCKET (gtk_socket),
|
||||
gst_util_get_int_arg (GTK_OBJECT (show), "xid"));
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (parse), "new_pad", mpeg2parse_newpad,
|
||||
pipeline);
|
||||
gtk_signal_connect (GTK_OBJECT (src), "eos", GTK_SIGNAL_FUNC (eof), NULL);
|
||||
gtk_signal_connect (GTK_OBJECT (show), "have_size", mpeg2parse_have_size,
|
||||
pipeline);
|
||||
|
||||
g_print ("setting to PLAYING state\n");
|
||||
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
|
||||
|
||||
gtk_idle_add (idle_func, pipeline);
|
||||
|
||||
gdk_threads_enter ();
|
||||
gtk_main ();
|
||||
gdk_threads_leave ();
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -217,7 +217,7 @@ 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 xvideosink is used as default output plugin.
|
||||
* If key is invalid ximagesink is used as default output plugin.
|
||||
*
|
||||
* Returns: a #GstElement containing the video output bin, or NULL if
|
||||
* everything failed.
|
||||
|
|
Loading…
Reference in a new issue