mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
Work with staticpadtemplates in elementfactories.
Original commit message from CVS: * ext/ogg/gstoggdemux.c: (gst_ogg_demux_factory_filter): * gst/playback/gstdecodebin.c: (find_compatibles): Work with staticpadtemplates in elementfactories.
This commit is contained in:
parent
50e2f24b44
commit
fe44dafa4b
3 changed files with 14 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-04-12 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
|
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_factory_filter):
|
||||||
|
* gst/playback/gstdecodebin.c: (find_compatibles):
|
||||||
|
Work with staticpadtemplates in elementfactories.
|
||||||
|
|
||||||
2005-04-12 Wim Taymans <wim@fluendo.com>
|
2005-04-12 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/playback/README:
|
* gst/playback/README:
|
||||||
|
|
|
@ -468,18 +468,18 @@ gst_ogg_demux_factory_filter (GstPluginFeature * feature, GstCaps * caps)
|
||||||
GList *walk;
|
GList *walk;
|
||||||
|
|
||||||
/* get the templates from the element factory */
|
/* get the templates from the element factory */
|
||||||
templates = gst_element_factory_get_pad_templates (factory);
|
templates = gst_element_factory_get_static_pad_templates (factory);
|
||||||
|
|
||||||
for (walk = (GList *) templates; walk; walk = g_list_next (walk)) {
|
for (walk = (GList *) templates; walk; walk = g_list_next (walk)) {
|
||||||
GstPadTemplate *templ = GST_PAD_TEMPLATE (walk->data);
|
GstStaticPadTemplate *templ = walk->data;
|
||||||
|
|
||||||
/* we only care about the sink templates */
|
/* we only care about the sink templates */
|
||||||
if (templ->direction == GST_PAD_SINK) {
|
if (templ->direction == GST_PAD_SINK) {
|
||||||
GstCaps *intersect;
|
GstCaps *intersect;
|
||||||
|
|
||||||
/* try to intersect the caps with the caps of the template */
|
/* try to intersect the caps with the caps of the template */
|
||||||
intersect =
|
intersect = gst_caps_intersect (caps,
|
||||||
gst_caps_intersect (caps, gst_pad_template_get_caps (templ));
|
gst_static_caps_get (&templ->static_caps));
|
||||||
|
|
||||||
/* check if the intersection is empty */
|
/* check if the intersection is empty */
|
||||||
if (!gst_caps_is_empty (intersect)) {
|
if (!gst_caps_is_empty (intersect)) {
|
||||||
|
|
|
@ -412,17 +412,17 @@ find_compatibles (GstDecodeBin * decode_bin, const GstCaps * caps)
|
||||||
GList *walk;
|
GList *walk;
|
||||||
|
|
||||||
/* get the templates from the element factory */
|
/* get the templates from the element factory */
|
||||||
templates = gst_element_factory_get_pad_templates (factory);
|
templates = gst_element_factory_get_static_pad_templates (factory);
|
||||||
for (walk = (GList *) templates; walk; walk = g_list_next (walk)) {
|
for (walk = (GList *) templates; walk; walk = g_list_next (walk)) {
|
||||||
GstPadTemplate *templ = GST_PAD_TEMPLATE (walk->data);
|
GstStaticPadTemplate *templ = walk->data;
|
||||||
|
|
||||||
/* we only care about the sink templates */
|
/* we only care about the sink templates */
|
||||||
if (templ->direction == GST_PAD_SINK) {
|
if (templ->direction == GST_PAD_SINK) {
|
||||||
GstCaps *intersect;
|
GstCaps *intersect;
|
||||||
|
|
||||||
/* try to intersect the caps with the caps of the template */
|
/* try to intersect the caps with the caps of the template */
|
||||||
intersect =
|
intersect = gst_caps_intersect (caps,
|
||||||
gst_caps_intersect (caps, gst_pad_template_get_caps (templ));
|
gst_static_caps_get (&templ->static_caps));
|
||||||
/* check if the intersection is empty */
|
/* check if the intersection is empty */
|
||||||
if (!gst_caps_is_empty (intersect)) {
|
if (!gst_caps_is_empty (intersect)) {
|
||||||
/* non empty intersection, we can use this element */
|
/* non empty intersection, we can use this element */
|
||||||
|
|
Loading…
Reference in a new issue