From: Benjamin O. <co...@pd...> - 2004-01-26 03:43:00
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: company Date: Sun Jan 25 2004 19:44:26 PST Log message: 2004-01-26 Benjamin Otte <in...@pu...> * 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. Modified files: . : ChangeLog gst : gstelement.h gsterror.h gstpad.c gstplugin.c gstplugin.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.135&r2=1.136 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.h.diff?r1=1.154&r2=1.155 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gsterror.h.diff?r1=1.3&r2=1.4 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstpad.c.diff?r1=1.265&r2=1.266 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstplugin.c.diff?r1=1.113&r2=1.114 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstplugin.h.diff?r1=1.36&r2=1.37 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.135 retrieving revision 1.136 diff -u -d -r1.135 -r1.136 --- ChangeLog 25 Jan 2004 02:50:09 -0000 1.135 +++ ChangeLog 26 Jan 2004 03:44:13 -0000 1.136 @@ -1,3 +1,18 @@ +2004-01-26 Benjamin Otte <in...@pu...> + + * 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. + 2004-01-25 Benjamin Otte <in...@pu...> * gst/elements/gstbufferstore.c: (gst_buffer_store_get_buffer): Index: gstelement.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.h,v retrieving revision 1.154 retrieving revision 1.155 diff -u -d -r1.154 -r1.155 --- gstelement.h 20 Jan 2004 10:53:20 -0000 1.154 +++ gstelement.h 26 Jan 2004 03:44:14 -0000 1.155 @@ -366,7 +366,9 @@ 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 @@ 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); Index: gsterror.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gsterror.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gsterror.h 20 Jan 2004 12:42:56 -0000 1.3 +++ gsterror.h 26 Jan 2004 03:44:14 -0000 1.4 @@ -64,7 +64,6 @@ GST_LIBRARY_ERROR_INIT, GST_LIBRARY_ERROR_SHUTDOWN, GST_LIBRARY_ERROR_SETTINGS, - GST_LIBRARY_ERROR_ENCODE, GST_LIBRARY_ERROR_NUM_ERRORS } GstLibraryError; Index: gstpad.c =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstpad.c,v retrieving revision 1.265 retrieving revision 1.266 diff -u -d -r1.265 -r1.266 --- gstpad.c 18 Jan 2004 21:36:19 -0000 1.265 +++ gstpad.c 26 Jan 2004 03:44:14 -0000 1.266 @@ -1322,28 +1322,21 @@ 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); Index: gstplugin.c =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstplugin.c,v retrieving revision 1.113 retrieving revision 1.114 diff -u -d -r1.113 -r1.114 --- gstplugin.c 24 Dec 2003 14:39:45 -0000 1.113 +++ gstplugin.c 26 Jan 2004 03:44:14 -0000 1.114 @@ -476,7 +476,7 @@ } /** - * gst_plugin_get_longname: + * gst_plugin_get_description: * @plugin: plugin to get long name of * * Get the long descriptive name of the plugin Index: gstplugin.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstplugin.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- gstplugin.h 22 Dec 2003 01:39:34 -0000 1.36 +++ gstplugin.h 26 Jan 2004 03:44:14 -0000 1.37 @@ -128,8 +128,7 @@ 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); |