From: Andy W. <wi...@us...> - 2002-04-11 20:44:28
|
CVS Root: /cvsroot/gstreamer Module: gst-player Changes by: wingo Date: Thu Apr 11 2002 13:44:26 PDT Log message: sync with gstreamer core Modified files: libs/gst/player : gstplay.c gstvideowidget.c testvideowidget.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-player/libs/gst/player/gstplay.c.diff?r1=1.5&r2=1.6 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-player/libs/gst/player/gstvideowidget.c.diff?r1=1.1&r2=1.2 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-player/libs/gst/player/testvideowidget.c.diff?r1=1.1&r2=1.2 ====Begin Diffs==== Index: gstplay.c =================================================================== RCS file: /cvsroot/gstreamer/gst-player/libs/gst/player/gstplay.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gstplay.c 5 Mar 2002 20:49:32 -0000 1.5 +++ gstplay.c 11 Apr 2002 20:44:13 -0000 1.6 @@ -161,7 +161,7 @@ while (templs) { - if (GST_PADTEMPLATE_DIRECTION (templs->data) == dir) + if (GST_PAD_TEMPLATE_DIRECTION (templs->data) == dir) { count++; } @@ -195,9 +195,9 @@ /* create those elements */ /* FIXME: we might want to exit gracefully if those elements can't be created */ - play->source = gst_elementfactory_make ("filesrc", "source"); + play->source = gst_element_factory_make ("filesrc", "source"); g_assert (play->source != NULL); - play->autoplugger = gst_elementfactory_make ("spider", "autoplugger"); + play->autoplugger = gst_element_factory_make ("spider", "autoplugger"); g_assert (play->autoplugger != NULL); play->audio_sink = get_default_audio_element(); play->video_sink = get_default_video_element(); @@ -212,16 +212,16 @@ /* add those elements and connect them */ gst_bin_add (GST_BIN (play->pipeline), play->source); gst_bin_add (GST_BIN (play->pipeline), play->autoplugger); - gst_element_connect_elements (play->source, play->autoplugger); + gst_element_connect (play->source, play->autoplugger); if (play->audio_sink) { gst_bin_add (GST_BIN (play->pipeline), play->audio_sink); - gst_element_connect_elements (play->autoplugger, play->audio_sink); + gst_element_connect (play->autoplugger, play->audio_sink); } if (play->video_sink) { gst_bin_add (GST_BIN (play->pipeline), play->video_sink); - gst_element_connect_elements (play->autoplugger, play->video_sink); + gst_element_connect (play->autoplugger, play->video_sink); } /* set variables */ @@ -297,7 +297,7 @@ { GstElement* audio_sink; - audio_sink = gst_elementfactory_make ("osssink", "play_audio"); + audio_sink = gst_element_factory_make ("osssink", "play_audio"); /* g_object_set(G_OBJECT(audio_sink), "fragment", 256, NULL); */ return audio_sink; @@ -311,15 +311,15 @@ GstElement *video_show; GstElement *colorspace; - video_sink = gst_elementfactory_make ("bin", "video_bin"); + video_sink = gst_element_factory_make ("bin", "video_bin"); g_return_val_if_fail (video_sink != NULL, NULL); - video_show = gst_elementfactory_make ("xvideosink", "show"); + video_show = gst_element_factory_make ("xvideosink", "show"); g_return_val_if_fail (video_show != NULL, NULL); gst_bin_add (GST_BIN (video_sink), video_show); - colorspace = gst_elementfactory_make ("colorspace", "colorspace"); + colorspace = gst_element_factory_make ("colorspace", "colorspace"); if (colorspace == NULL) { g_warning ("could not create the 'colorspace' element, doing without"); @@ -331,7 +331,7 @@ { GST_FLAG_SET (video_sink, GST_ELEMENT_THREAD_SUGGESTED); gst_bin_add (GST_BIN (video_sink), colorspace); - gst_element_connect (colorspace, "src", video_show, "sink"); + gst_element_connect_pads (colorspace, "src", video_show, "sink"); gst_element_add_ghost_pad (video_sink, gst_element_get_pad (colorspace, "sink"), "sink"); @@ -430,14 +430,14 @@ { if (play->video_sink) { - gst_element_disconnect_elements (play->autoplugger, play->video_sink); + gst_element_disconnect (play->autoplugger, play->video_sink); gst_bin_remove (GST_BIN (play->pipeline), play->video_sink); } play->video_sink = element; if (play->video_sink) { gst_bin_add (GST_BIN (play->pipeline), play->video_sink); - gst_element_connect_elements (play->autoplugger, play->video_sink); + gst_element_connect (play->autoplugger, play->video_sink); } } void @@ -445,13 +445,13 @@ { if (play->audio_sink) { - gst_element_disconnect_elements (play->autoplugger, play->audio_sink); + gst_element_disconnect (play->autoplugger, play->audio_sink); gst_bin_remove (GST_BIN (play->pipeline), play->audio_sink); } play->audio_sink = element; if (play->audio_sink) { gst_bin_add (GST_BIN (play->pipeline), play->audio_sink); - gst_element_connect_elements (play->autoplugger, play->audio_sink); + gst_element_connect (play->autoplugger, play->audio_sink); } } Index: gstvideowidget.c =================================================================== RCS file: /cvsroot/gstreamer/gst-player/libs/gst/player/gstvideowidget.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gstvideowidget.c 2 Mar 2002 18:23:18 -0000 1.1 +++ gstvideowidget.c 11 Apr 2002 20:44:13 -0000 1.2 @@ -583,7 +583,7 @@ static void gst_video_widget_prepare_sink (GstVideoWidget *video) { - video->sink = gst_elementfactory_make ("videosink", "videosink"); + video->sink = gst_element_factory_make ("videosink", "videosink"); if (video->sink == NULL) { g_warning("GstVideoWidget: could not create video element, aborting\n"); Index: testvideowidget.c =================================================================== RCS file: /cvsroot/gstreamer/gst-player/libs/gst/player/testvideowidget.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- testvideowidget.c 2 Mar 2002 18:23:18 -0000 1.1 +++ testvideowidget.c 11 Apr 2002 20:44:13 -0000 1.2 @@ -89,43 +89,43 @@ /* pipeline */ bin = (GstBin *) gst_pipeline_new("pipeline"); /* src */ - one = gst_elementfactory_make("filesrc", "filesrc"); + one = gst_element_factory_make("filesrc", "filesrc"); gst_bin_add(GST_BIN(bin), one); two = one; if (argc > 1) { g_object_set (G_OBJECT (one), "location", "/Princessa - I Won't Forget You.mp3", NULL); /* mad */ - one = gst_elementfactory_make ("mad", "mad"); + one = gst_element_factory_make ("mad", "mad"); gst_bin_add(GST_BIN (bin), one); - gst_element_connect_elements (two, one); + gst_element_connect (two, one); two = one; /* chart */ - one = gst_elementfactory_make ("chart", "chart"); + one = gst_element_factory_make ("chart", "chart"); gst_bin_add(GST_BIN (bin), one); - gst_element_connect_elements (two, one); + gst_element_connect (two, one); two = one; /* colorspace */ - one = gst_elementfactory_make ("colorspace", "colorspace"); + one = gst_element_factory_make ("colorspace", "colorspace"); gst_bin_add(GST_BIN (bin), one); - gst_element_connect_elements (two, one); + gst_element_connect (two, one); two = one; } else { g_object_set (G_OBJECT (one), "location", "/usr/src/cvs/gst-media/AlienSong.mpg", NULL); /* spider */ - one = gst_elementfactory_make ("spider", "spider"); + one = gst_element_factory_make ("spider", "spider"); gst_bin_add(GST_BIN (bin), one); - gst_element_connect_elements (two, one); + gst_element_connect (two, one); two = one; /* osssink */ - /* one = gst_elementfactory_make ("osssink", "osssink"); + /* one = gst_element_factory_make ("osssink", "osssink"); gst_bin_add(GST_BIN (bin), one); - gst_element_connect_elements (two, one);*/ + gst_element_connect (two, one);*/ } /* video */ one = gst_video_widget_get_element (GST_VIDEOWIDGET (video)); gst_bin_add(GST_BIN (bin), one); - gst_element_connect_elements (two, one); + gst_element_connect (two, one); gtk_widget_show_all (window); |