From f8386fbaa0e657fcbfeca6e81611053d687cddb0 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 14 Dec 2000 17:21:29 +0000 Subject: [PATCH] Some plugins are adjusted to the new pad template mechanisms. Original commit message from CVS: Some plugins are adjusted to the new pad template mechanisms. --- gst/gstpad.c | 19 ++++++++++++++++++- gst/gstplugin.c | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/gst/gstpad.c b/gst/gstpad.c index d8cf3c6..d1f88aa 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -595,6 +595,14 @@ gst_pad_connect (GstPad *srcpad, } g_return_if_fail((srcpad->direction == GST_PAD_SRC) && (sinkpad->direction == GST_PAD_SINK)); + + /* chack pad compatibility */ + if (srcpad->caps && sinkpad->caps) { + if (!gst_caps_check_compatibility (srcpad->caps, sinkpad->caps)) + g_warning ("gstpad: connecting incompatible pads"); + else + g_print ("gstpad: connecting compatible pads\n"); + } /* first set peers */ srcpad->peer = sinkpad; @@ -904,7 +912,16 @@ gst_padtemplate_create (gchar *name_template, GstPadDirection direction, GstPadPresence presence, GstCaps *caps, ...) { - return NULL; + GstPadTemplate *new; + + new = g_new0 (GstPadTemplate, 1); + + new->name_template = name_template; + new->direction = direction; + new->presence = presence; + new->caps = caps; + + return new; } diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 3eff53c..37b3334 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -43,7 +43,7 @@ GList *_gst_libraries; gint _gst_libraries_seqno; /* whether or not to spew library load issues */ -gboolean _gst_plugin_spew = FALSE; +gboolean _gst_plugin_spew = TRUE; void _gst_plugin_initialize() { -- 2.7.4