summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2004-01-26 03:44:14 +0000
committerBenjamin Otte <otte@gnome.org>2004-01-26 03:44:14 +0000
commit074ecb22270d907afe0615009130926303c12e59 (patch)
treecdf963a21a3af58ff07a8c74e420e82fac1e863a /gst
parent8a1bb576b2056c11d76f1e0ffe0f51f3cc3f93a8 (diff)
gst/gstelement.h: remove gst_element_factory_get_version. It doesn't exist anymore.
Original commit message from CVS: 2004-01-26 Benjamin Otte <in7y118@public.uni-hamburg.de> * gst/gstelement.h: remove gst_element_factory_get_version. It doesn't exist anymore. * gst/gstplugin.c: * gst/gstplugin.h: remove gst_plugin_set_name and change gst_plugin_get_longname to gst_plugin_get_description to match code. * gst/gsterror.h: remove GST_LIBRARY_ERROR_ENCODE. It's GST_STREAM_ERROR_ENCODE. * gst/gstpad.c: (gst_pad_try_set_caps): make it work with nonfixed caps. Note that even in the nonfixed case the link function of the pad that tries to set caps isn't called.
Diffstat (limited to 'gst')
-rw-r--r--gst/gstelement.h5
-rw-r--r--gst/gsterror.h1
-rw-r--r--gst/gstpad.c25
-rw-r--r--gst/gstplugin.c2
-rw-r--r--gst/gstplugin.h3
5 files changed, 14 insertions, 22 deletions
diff --git a/gst/gstelement.h b/gst/gstelement.h
index f03a67743..13eb2f479 100644
--- a/gst/gstelement.h
+++ b/gst/gstelement.h
@@ -366,7 +366,9 @@ void gst_element_found_tags_for_pad (GstElement *element, GstPad *pad, GstCloc
void gst_element_set_eos (GstElement *element);
gchar * _gst_element_error_printf (const gchar *format, ...);
-void gst_element_error_full (GstElement *element, GQuark domain, gint code, gchar *message, gchar *debug, const gchar *file, const gchar *function, gint line);
+void gst_element_error_full (GstElement *element, GQuark domain, gint code,
+ gchar *message, gchar *debug,
+ const gchar *file, const gchar *function, gint line);
gboolean gst_element_is_locked_state (GstElement *element);
void gst_element_set_locked_state (GstElement *element, gboolean locked_state);
@@ -435,7 +437,6 @@ GType gst_element_factory_get_element_type (GstElementFactory *factory);
G_CONST_RETURN gchar * gst_element_factory_get_longname (GstElementFactory *factory);
G_CONST_RETURN gchar * gst_element_factory_get_klass (GstElementFactory *factory);
G_CONST_RETURN gchar * gst_element_factory_get_description (GstElementFactory *factory);
-G_CONST_RETURN gchar * gst_element_factory_get_version (GstElementFactory *factory);
G_CONST_RETURN gchar * gst_element_factory_get_author (GstElementFactory *factory);
guint gst_element_factory_get_num_pad_templates (GstElementFactory *factory);
G_CONST_RETURN GList * gst_element_factory_get_pad_templates (GstElementFactory *factory);
diff --git a/gst/gsterror.h b/gst/gsterror.h
index e173fef62..d82ac3c72 100644
--- a/gst/gsterror.h
+++ b/gst/gsterror.h
@@ -64,7 +64,6 @@ typedef enum {
GST_LIBRARY_ERROR_INIT,
GST_LIBRARY_ERROR_SHUTDOWN,
GST_LIBRARY_ERROR_SETTINGS,
- GST_LIBRARY_ERROR_ENCODE,
GST_LIBRARY_ERROR_NUM_ERRORS
}
GstLibraryError;
diff --git a/gst/gstpad.c b/gst/gstpad.c
index db6d0d7e4..6d1a34696 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -1322,28 +1322,21 @@ gst_pad_try_set_caps (GstPad *pad, const GstCaps *caps)
g_return_val_if_fail (GST_IS_REAL_PAD (pad), GST_PAD_LINK_REFUSED);
g_return_val_if_fail (!GST_FLAG_IS_SET (pad, GST_PAD_NEGOTIATING),
GST_PAD_LINK_REFUSED);
-
- /* setting non-fixed caps on a pad is not allowed */
- if (!gst_caps_is_fixed (caps)) {
- GST_CAT_INFO (GST_CAT_CAPS,
- "trying to set unfixed caps on pad %s:%s, not allowed",
- GST_DEBUG_PAD_NAME (pad));
- g_warning ("trying to set non fixed caps on pad %s:%s, not allowed",
- GST_DEBUG_PAD_NAME (pad));
-
- gst_caps_debug (caps, "unfixed caps");
- return GST_PAD_LINK_REFUSED;
- }
-
+
/* we allow setting caps on non-linked pads. It's ignored */
if (!GST_PAD_PEER (pad)) {
return GST_PAD_LINK_OK;
}
/* if the desired caps are already there, it's trivially ok */
- if (GST_PAD_CAPS (pad) && gst_caps_is_equal_fixed (caps,
- GST_PAD_CAPS (pad))) {
- return GST_PAD_LINK_OK;
+ if (GST_PAD_CAPS (pad)) {
+ GstCaps *intersection;
+ intersection = gst_caps_intersect (caps, GST_PAD_CAPS (pad));
+ if (!gst_caps_is_empty (intersection)) {
+ gst_caps_free (intersection);
+ return GST_PAD_LINK_OK;
+ }
+ gst_caps_free (intersection);
}
g_return_val_if_fail (GST_PAD_LINK_SRC (pad), GST_PAD_LINK_REFUSED);
diff --git a/gst/gstplugin.c b/gst/gstplugin.c
index 6bd66638b..fcbda6c19 100644
--- a/gst/gstplugin.c
+++ b/gst/gstplugin.c
@@ -476,7 +476,7 @@ gst_plugin_get_name (GstPlugin *plugin)
}
/**
- * gst_plugin_get_longname:
+ * gst_plugin_get_description:
* @plugin: plugin to get long name of
*
* Get the long descriptive name of the plugin
diff --git a/gst/gstplugin.h b/gst/gstplugin.h
index 8d31d29b0..c9cdc644a 100644
--- a/gst/gstplugin.h
+++ b/gst/gstplugin.h
@@ -128,8 +128,7 @@ void _gst_plugin_initialize (void);
void _gst_plugin_register_static (GstPluginDesc *desc);
G_CONST_RETURN gchar* gst_plugin_get_name (GstPlugin *plugin);
-void gst_plugin_set_name (GstPlugin *plugin, const gchar *name);
-G_CONST_RETURN gchar* gst_plugin_get_longname (GstPlugin *plugin);
+G_CONST_RETURN gchar* gst_plugin_get_description (GstPlugin *plugin);
G_CONST_RETURN gchar* gst_plugin_get_filename (GstPlugin *plugin);
G_CONST_RETURN gchar* gst_plugin_get_license (GstPlugin *plugin);
G_CONST_RETURN gchar* gst_plugin_get_package (GstPlugin *plugin);