mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
gst/: Remove gst_library_load as it does more harm than good with the new g_module flags.
Original commit message from CVS: * gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active), (gst_pad_set_checkgetrange_function), (gst_pad_link_check_compatible_unlocked), (gst_pad_link_prepare), (gst_pad_check_pull_range), (gst_pad_pull_range), (gst_static_pad_template_get_caps), (gst_pad_start_task), (gst_pad_pause_task), (gst_pad_stop_task): * gst/gstplugin.c: (gst_plugin_load): * gst/gstplugin.h: Remove gst_library_load as it does more harm than good with the new g_module flags. Revert bogus caps template check in pad linking, pad caps are important when linking not the template, which is more general than the current caps.
This commit is contained in:
parent
995c572855
commit
50b44cdd16
4 changed files with 32 additions and 49 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2005-04-25 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
|
||||
(gst_pad_set_checkgetrange_function),
|
||||
(gst_pad_link_check_compatible_unlocked), (gst_pad_link_prepare),
|
||||
(gst_pad_check_pull_range), (gst_pad_pull_range),
|
||||
(gst_static_pad_template_get_caps), (gst_pad_start_task),
|
||||
(gst_pad_pause_task), (gst_pad_stop_task):
|
||||
* gst/gstplugin.c: (gst_plugin_load):
|
||||
* gst/gstplugin.h:
|
||||
Remove gst_library_load as it does more harm than good with
|
||||
the new g_module flags.
|
||||
Revert bogus caps template check in pad linking, pad caps
|
||||
are important when linking not the template, which is more
|
||||
general than the current caps.
|
||||
|
||||
2005-04-25 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst/autoplug/.cvsignore:
|
||||
|
|
38
gst/gstpad.c
38
gst/gstpad.c
|
@ -1382,39 +1382,27 @@ lost_ghostpad:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_pad_link_check_templates_compatible_unlocked (GstRealPad * src,
|
||||
GstRealPad * sink)
|
||||
gst_pad_link_check_compatible_unlocked (GstRealPad * src, GstRealPad * sink)
|
||||
{
|
||||
GstCaps *srccaps;
|
||||
GstCaps *sinkcaps;
|
||||
|
||||
srccaps = gst_real_pad_get_caps_unlocked (src);
|
||||
sinkcaps = gst_real_pad_get_caps_unlocked (sink);
|
||||
GST_CAT_DEBUG (GST_CAT_CAPS, "got caps %p and %p", srccaps, sinkcaps);
|
||||
|
||||
if (srccaps && sinkcaps) {
|
||||
GstCaps *icaps;
|
||||
gboolean ret;
|
||||
|
||||
if (!GST_PAD_PAD_TEMPLATE (src)) {
|
||||
/* FIXME causes check failure */
|
||||
//g_warning ("pad has no pad template");
|
||||
return FALSE;
|
||||
}
|
||||
if (!GST_PAD_PAD_TEMPLATE (sink)) {
|
||||
/* FIXME causes check failure */
|
||||
//g_warning ("pad has no pad template");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
srccaps = GST_PAD_TEMPLATE_CAPS (GST_PAD_PAD_TEMPLATE (src));
|
||||
sinkcaps = GST_PAD_TEMPLATE_CAPS (GST_PAD_PAD_TEMPLATE (sink));
|
||||
|
||||
icaps = gst_caps_intersect (srccaps, sinkcaps);
|
||||
GST_CAT_DEBUG (GST_CAT_CAPS,
|
||||
"intersection caps %p %" GST_PTR_FORMAT, icaps, icaps);
|
||||
|
||||
if (gst_caps_is_empty (icaps)) {
|
||||
ret = FALSE;
|
||||
} else {
|
||||
ret = TRUE;
|
||||
if (!icaps || gst_caps_is_empty (icaps))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gst_caps_unref (icaps);
|
||||
|
||||
return ret;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1457,7 +1445,7 @@ gst_pad_link_prepare (GstPad * srcpad, GstPad * sinkpad,
|
|||
*outrealsink = realsink;
|
||||
|
||||
/* check pad caps for non-empty intersection */
|
||||
if (!gst_pad_link_check_templates_compatible_unlocked (realsrc, realsink)) {
|
||||
if (!gst_pad_link_check_compatible_unlocked (realsrc, realsink)) {
|
||||
goto no_format;
|
||||
}
|
||||
|
||||
|
|
|
@ -884,23 +884,3 @@ gst_plugin_load (const gchar * name)
|
|||
GST_DEBUG ("Could not find %s in registry pool", name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_library_load:
|
||||
* @name: name of library to load
|
||||
*
|
||||
* Load the named library. Name should be given as
|
||||
* "liblibrary.so". (exception to this rule is 'riff', which .so name is 'gstriff')
|
||||
*
|
||||
* Returns: whether the library was loaded or not (and returns TRUE if it was already loaded)
|
||||
*/
|
||||
gboolean
|
||||
gst_library_load (const gchar * name)
|
||||
{
|
||||
gboolean res;
|
||||
|
||||
/* for now this is the same */
|
||||
res = gst_plugin_load (name);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -158,7 +158,6 @@ void gst_plugin_add_feature (GstPlugin *plugin, GstPluginFeature *feature);
|
|||
|
||||
/* shortcuts to load from the registry pool */
|
||||
gboolean gst_plugin_load (const gchar *name);
|
||||
gboolean gst_library_load (const gchar *name);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue