gst/elements/gstelements.c: Set ranks of elements to NONE, so the autoplugger doesn...
authorBenjamin Otte <otte@gnome.org>
Mon, 22 Dec 2003 19:10:41 +0000 (19:10 +0000)
committerBenjamin Otte <otte@gnome.org>
Mon, 22 Dec 2003 19:10:41 +0000 (19:10 +0000)
Original commit message from CVS:
2003-12-22  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* gst/elements/gstelements.c:
Set ranks of elements to NONE, so the autoplugger doesn't use them.
* gst/elements/gstshaper.c: (gst_shaper_getcaps):
Fix proxying to new CAPS stuff. Don't call get_allowed_caps but
gst_caps (peer).

ChangeLog
gst/elements/gstelements.c
gst/elements/gstshaper.c
plugins/elements/gstelements.c
plugins/elements/gstshaper.c

index ddbe9d3..9e777b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2003-12-22  Benjamin Otte  <in7y118@public.uni-hamburg.de>
 
+       * gst/elements/gstelements.c:
+         Set ranks of elements to NONE, so the autoplugger doesn't use them.
+       * gst/elements/gstshaper.c: (gst_shaper_getcaps):
+         Fix proxying to new CAPS stuff. Don't call get_allowed_caps but
+         gst_caps (peer).
+
+2003-12-22  Benjamin Otte  <in7y118@public.uni-hamburg.de>
+
        * gst/autoplug/gstsearchfuncs.c: (gst_autoplug_caps_intersect):
        * gst/autoplug/gstspideridentity.c: (gst_spider_identity_link),
        (gst_spider_identity_getcaps), (gst_spider_identity_change_state),
index 3b30483..cc178c5 100644 (file)
@@ -55,21 +55,21 @@ extern GType gst_filesrc_get_type(void);
 extern GstElementDetails gst_filesrc_details;
 
 static struct _elements_entry _elements[] = {
-  { "aggregator",   GST_RANK_PRIMARY,  gst_aggregator_get_type         },
-  { "fakesrc",             GST_RANK_PRIMARY,   gst_fakesrc_get_type            },
-  { "fakesink",     GST_RANK_PRIMARY,  gst_fakesink_get_type           },
-  { "fdsink",       GST_RANK_PRIMARY,  gst_fdsink_get_type             },
-  { "fdsrc",       GST_RANK_PRIMARY,   gst_fdsrc_get_type              },
-  { "filesrc",             GST_RANK_PRIMARY,   gst_filesrc_get_type            },
-  { "filesink",            GST_RANK_PRIMARY,   gst_filesink_get_type           },
-  { "identity",     GST_RANK_PRIMARY,  gst_identity_get_type           },
-  { "md5sink",      GST_RANK_PRIMARY,  gst_md5sink_get_type            },
-  { "multidisksrc", GST_RANK_PRIMARY,  gst_multidisksrc_get_type       },
-  { "pipefilter",   GST_RANK_PRIMARY,  gst_pipefilter_get_type         },
-  { "shaper",       GST_RANK_PRIMARY,  gst_shaper_get_type             },
-  { "statistics",   GST_RANK_PRIMARY,  gst_statistics_get_type         },
-  { "tee",                 GST_RANK_PRIMARY,   gst_tee_get_type                },
-  { "typefind",     GST_RANK_PRIMARY,  gst_type_find_element_get_type  },
+  { "aggregator",   GST_RANK_NONE,     gst_aggregator_get_type         },
+  { "fakesrc",             GST_RANK_NONE,      gst_fakesrc_get_type            },
+  { "fakesink",     GST_RANK_NONE,     gst_fakesink_get_type           },
+  { "fdsink",       GST_RANK_NONE,     gst_fdsink_get_type             },
+  { "fdsrc",       GST_RANK_NONE,      gst_fdsrc_get_type              },
+  { "filesrc",             GST_RANK_NONE,      gst_filesrc_get_type            },
+  { "filesink",            GST_RANK_NONE,      gst_filesink_get_type           },
+  { "identity",     GST_RANK_NONE,     gst_identity_get_type           },
+  { "md5sink",      GST_RANK_NONE,     gst_md5sink_get_type            },
+  { "multidisksrc", GST_RANK_NONE,     gst_multidisksrc_get_type       },
+  { "pipefilter",   GST_RANK_NONE,     gst_pipefilter_get_type         },
+  { "shaper",       GST_RANK_NONE,     gst_shaper_get_type             },
+  { "statistics",   GST_RANK_NONE,     gst_statistics_get_type         },
+  { "tee",                 GST_RANK_NONE,      gst_tee_get_type                },
+  { "typefind",     GST_RANK_NONE,     gst_type_find_element_get_type  },
   { NULL, 0 },
 };
 
index 95a3f1a..90ca3cd 100644 (file)
@@ -180,7 +180,11 @@ gst_shaper_getcaps (GstPad *pad)
 
   otherpad = (pad == connection->srcpad ? connection->sinkpad : connection->srcpad);
 
-  return gst_caps_copy (gst_pad_get_allowed_caps (otherpad));
+  if (GST_PAD_PEER (otherpad)) {
+    return gst_pad_get_caps (GST_PAD_PEER (otherpad));
+  } else {
+    return gst_caps_new_any ();
+  }
 }
 
 static GList*
index 3b30483..cc178c5 100644 (file)
@@ -55,21 +55,21 @@ extern GType gst_filesrc_get_type(void);
 extern GstElementDetails gst_filesrc_details;
 
 static struct _elements_entry _elements[] = {
-  { "aggregator",   GST_RANK_PRIMARY,  gst_aggregator_get_type         },
-  { "fakesrc",             GST_RANK_PRIMARY,   gst_fakesrc_get_type            },
-  { "fakesink",     GST_RANK_PRIMARY,  gst_fakesink_get_type           },
-  { "fdsink",       GST_RANK_PRIMARY,  gst_fdsink_get_type             },
-  { "fdsrc",       GST_RANK_PRIMARY,   gst_fdsrc_get_type              },
-  { "filesrc",             GST_RANK_PRIMARY,   gst_filesrc_get_type            },
-  { "filesink",            GST_RANK_PRIMARY,   gst_filesink_get_type           },
-  { "identity",     GST_RANK_PRIMARY,  gst_identity_get_type           },
-  { "md5sink",      GST_RANK_PRIMARY,  gst_md5sink_get_type            },
-  { "multidisksrc", GST_RANK_PRIMARY,  gst_multidisksrc_get_type       },
-  { "pipefilter",   GST_RANK_PRIMARY,  gst_pipefilter_get_type         },
-  { "shaper",       GST_RANK_PRIMARY,  gst_shaper_get_type             },
-  { "statistics",   GST_RANK_PRIMARY,  gst_statistics_get_type         },
-  { "tee",                 GST_RANK_PRIMARY,   gst_tee_get_type                },
-  { "typefind",     GST_RANK_PRIMARY,  gst_type_find_element_get_type  },
+  { "aggregator",   GST_RANK_NONE,     gst_aggregator_get_type         },
+  { "fakesrc",             GST_RANK_NONE,      gst_fakesrc_get_type            },
+  { "fakesink",     GST_RANK_NONE,     gst_fakesink_get_type           },
+  { "fdsink",       GST_RANK_NONE,     gst_fdsink_get_type             },
+  { "fdsrc",       GST_RANK_NONE,      gst_fdsrc_get_type              },
+  { "filesrc",             GST_RANK_NONE,      gst_filesrc_get_type            },
+  { "filesink",            GST_RANK_NONE,      gst_filesink_get_type           },
+  { "identity",     GST_RANK_NONE,     gst_identity_get_type           },
+  { "md5sink",      GST_RANK_NONE,     gst_md5sink_get_type            },
+  { "multidisksrc", GST_RANK_NONE,     gst_multidisksrc_get_type       },
+  { "pipefilter",   GST_RANK_NONE,     gst_pipefilter_get_type         },
+  { "shaper",       GST_RANK_NONE,     gst_shaper_get_type             },
+  { "statistics",   GST_RANK_NONE,     gst_statistics_get_type         },
+  { "tee",                 GST_RANK_NONE,      gst_tee_get_type                },
+  { "typefind",     GST_RANK_NONE,     gst_type_find_element_get_type  },
   { NULL, 0 },
 };
 
index 95a3f1a..90ca3cd 100644 (file)
@@ -180,7 +180,11 @@ gst_shaper_getcaps (GstPad *pad)
 
   otherpad = (pad == connection->srcpad ? connection->sinkpad : connection->srcpad);
 
-  return gst_caps_copy (gst_pad_get_allowed_caps (otherpad));
+  if (GST_PAD_PEER (otherpad)) {
+    return gst_pad_get_caps (GST_PAD_PEER (otherpad));
+  } else {
+    return gst_caps_new_any ();
+  }
 }
 
 static GList*