[gst-devel] small spider patch
Thomas Vander Stichele
thomas at urgent.rug.ac.be
Thu Sep 12 02:46:02 CEST 2002
this patch
a) adds spideridentity as an elment to the gstspider plug-in
b) instantiates instances of it through the gstreamer way instead of
the gobject way
The reason I do b) is because gst-editor crashed (in gst core) when
loading pipelines from xml that involve spider, since spideridentity
didn't have a type set in the xml. Now it does
I know spiders don't work in the editor, but this might go in nonetheless
in anticipation of that joyous day ;)
Can somebody tell me why
a) Company might have decided to make spideridentity an easter egg element
?
b) Company decided to use g_object_new to make them ?
c) he's not been seen since about three months ?
Thomas
--
The Dave/Dina Project : future TV today ! - http://davedina.apestaart.org/
<-*- -*->
If lovin' you is wrong
then I don't wanna be right
<-*- thomas at apestaart.org -*->
URGent, the best radio on the Internet - 24/7 ! - http://urgent.rug.ac.be/
-------------- next part --------------
? spider.patch
Index: gstspider.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/autoplug/gstspider.c,v
retrieving revision 1.18
diff -u -p -r1.18 gstspider.c
--- gstspider.c 12 Sep 2002 09:19:00 -0000 1.18
+++ gstspider.c 12 Sep 2002 09:38:51 -0000
@@ -711,6 +711,11 @@ plugin_init (GModule *module, GstPlugin
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
+ /* add spideridentity */
+ factory = gst_element_factory_new ("spideridentity", GST_TYPE_SPIDER_IDENTITY,
+ &gst_spider_identity_details);
+ gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
+
return TRUE;
}
Index: gstspideridentity.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/autoplug/gstspideridentity.c,v
retrieving revision 1.17
diff -u -p -r1.17 gstspideridentity.c
--- gstspideridentity.c 12 Sep 2002 09:19:00 -0000 1.17
+++ gstspideridentity.c 12 Sep 2002 09:38:51 -0000
@@ -211,9 +211,9 @@ gst_spider_identity_chain (GstPad *pad,
GstSpiderIdentity*
gst_spider_identity_new_src (gchar *name)
{
- GstSpiderIdentity *ret = (GstSpiderIdentity *) g_object_new (gst_spider_identity_get_type (), NULL);
-
- GST_ELEMENT_NAME (ret) = name;
+ //GstSpiderIdentity *ret = (GstSpiderIdentity *) g_object_new (gst_spider_identity_get_type (), NULL);
+ //GST_ELEMENT_NAME (ret) = name;
+ GstSpiderIdentity *ret = (GstSpiderIdentity *) gst_element_factory_make ("spideridentity", name);
/* set the right functions */
gst_element_set_loop_function (GST_ELEMENT (ret), (GstElementLoopFunction) GST_DEBUG_FUNCPTR (gst_spider_identity_src_loop));
@@ -222,9 +222,10 @@ gst_spider_identity_new_src (gchar *name
GstSpiderIdentity*
gst_spider_identity_new_sink (gchar *name)
{
- GstSpiderIdentity *ret = (GstSpiderIdentity *) g_object_new (gst_spider_identity_get_type (), NULL);
+ //GstSpiderIdentity *ret = (GstSpiderIdentity *) g_object_new (gst_spider_identity_get_type (), NULL);
- GST_ELEMENT_NAME (ret) = name;
+ //GST_ELEMENT_NAME (ret) = name;
+ GstSpiderIdentity *ret = (GstSpiderIdentity *) gst_element_factory_make ("spideridentity", name);
/* set the right functions */
gst_element_set_loop_function (GST_ELEMENT (ret), (GstElementLoopFunction) GST_DEBUG_FUNCPTR (gst_spider_identity_dumb_loop));
More information about the gstreamer-devel
mailing list