diff --git a/ChangeLog b/ChangeLog index ad4a67bfab..60cc2d98fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,41 @@ +2007-12-12 Tim-Philipp Müller + + * Makefile.am: + Add check-exports target and run it as part of 'make check' + (see #499140 and #493983). + + * gst/gst_private.h: + * gst/gstelementfactory.h: + * gst/gstghostpad.c: (gst_proxy_pad_class_init): + * gst/gstinfo.c: (_priv_gst_in_valgrind), (_gst_debug_init), + (_priv_gst_in_valgrind): + * gst/gstinfo.h: (GstLogFunction): + * gst/gsttypefind.c: (type_find_debug), (GST_CAT_DEFAULT), + (gst_type_find_register): + * gst/gsttypefindfactory.c: (type_find_debug), (GST_CAT_DEFAULT), + (gst_type_find_factory_get_type): + * libs/gst/controller/gstcontroller.c: (GST_CAT_DEFAULT), + (GST_CAT_DEFAULT), (parent_class), (priv_gst_controller_key), + (gst_controller_new_valist), (gst_controller_new_list), + (_gst_controller_dispose), (_gst_controller_class_init): + * libs/gst/controller/gstcontrolsource.c: (GST_CAT_DEFAULT): + * libs/gst/controller/gsthelper.c: (GST_CAT_DEFAULT), + (GST_CAT_DEFAULT), (gst_object_uncontrol_properties), + (gst_object_get_controller), (gst_object_set_controller), + (gst_object_suggest_next_sync), (gst_object_sync_values), + (gst_object_set_control_source), (gst_object_get_control_source), + (gst_object_get_value_arrays), (gst_object_get_value_array), + (gst_object_get_control_rate), (gst_object_set_control_rate): + * libs/gst/controller/gstinterpolation.c: (GST_CAT_DEFAULT): + * libs/gst/controller/lib.c: (GST_CAT_DEFAULT): + Make some functions that should be static static; rename some + private symbols so that they don't get exported; add some FIXME + comments so we can move accidentally exported functions into + our private section in 0.11. + + * win32/common/libgstreamer.def: + Add gst_utils_get_timestamp(). + 2007-12-12 Stefan Kost * gst/gstvalue.c: diff --git a/Makefile.am b/Makefile.am index 67abb18f1e..098b82ce93 100644 --- a/Makefile.am +++ b/Makefile.am @@ -112,3 +112,21 @@ win32-update: $(top_srcdir)/tools/gst-indent win32/common/gstenumtypes.c include $(top_srcdir)/common/coverage/lcov.mak + +# make sure all symbols we export on linux are defined in the win32 .def too +# (don't care about other unixes for now, it's enough if it works on one of +# the linux build bots; we assume .so ) +corelibs='libgstreamer libgstbase libgstcontroller libgstdataprotocol libgstnet' +check-exports: + for l in `eval echo $(corelibs)`; do \ + libso=`find "$(top_builddir)" -name "$$l-0.10.so"`; \ + libdef="$(top_srcdir)/win32/common/$$l.def"; \ + if test "x$$libso" != "x"; then \ + echo Checking symbols in $$libso; \ + $(top_srcdir)/common/check-exports $$libdef $$libso || exit 1; \ + fi; \ + done + +check: check-exports + + diff --git a/common b/common index 423e2ea96b..4f261af78b 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 423e2ea96b5f79281f4dd20d734bd968b3d95e89 +Subproject commit 4f261af78b1128862cb847afb1b7254b8f458834 diff --git a/gst/gst_private.h b/gst/gst_private.h index 34b7e75a61..0e83253950 100644 --- a/gst/gst_private.h +++ b/gst/gst_private.h @@ -42,7 +42,7 @@ extern const char g_log_domain_gstreamer[]; G_BEGIN_DECLS -gboolean __gst_in_valgrind (void); +gboolean _priv_gst_in_valgrind (void); /* Initialize GStreamer private quark storage */ void _priv_gst_quarks_initialize (void); diff --git a/gst/gstelementfactory.h b/gst/gstelementfactory.h index ddd5cf9b5c..a07b75942f 100644 --- a/gst/gstelementfactory.h +++ b/gst/gstelementfactory.h @@ -153,6 +153,7 @@ GstElement* gst_element_factory_create (GstElementFactory *factory, const gchar *name); GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name); +/* FIXME 0.11: move these two into our private headers */ void __gst_element_factory_add_static_pad_template (GstElementFactory *elementfactory, GstStaticPadTemplate *templ); void __gst_element_factory_add_interface (GstElementFactory *elementfactory, diff --git a/gst/gstghostpad.c b/gst/gstghostpad.c index f53dcfa76c..6996491c4b 100644 --- a/gst/gstghostpad.c +++ b/gst/gstghostpad.c @@ -87,6 +87,8 @@ struct _GstProxyPadClass gpointer _gst_reserved[1]; }; +static GType gst_proxy_pad_get_type (void); + G_DEFINE_TYPE (GstProxyPad, gst_proxy_pad, GST_TYPE_PAD); static GstPad *gst_proxy_pad_get_target (GstPad * pad); @@ -118,7 +120,7 @@ gst_proxy_pad_class_init (GstProxyPadClass * klass) #endif } -const GstQueryType * +static const GstQueryType * gst_proxy_pad_do_query_type (GstPad * pad) { GstPad *target = gst_proxy_pad_get_target (pad); diff --git a/gst/gstinfo.c b/gst/gstinfo.c index d7edcf5df9..0f1c05658d 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -237,7 +237,7 @@ GstDebugCategory *GST_CAT_QOS = NULL; /* FIXME: export this? */ gboolean -__gst_in_valgrind (void) +_priv_gst_in_valgrind (void) { static enum { @@ -358,7 +358,7 @@ _gst_debug_init (void) /* print out the valgrind message if we're in valgrind */ - __gst_in_valgrind (); + _priv_gst_in_valgrind (); } /* we can't do this further above, because we initialize the GST_CAT_DEFAULT struct */ @@ -1330,7 +1330,7 @@ gst_debug_remove_log_function_by_data (gpointer data) } gboolean -__gst_in_valgrind (void) +_priv_gst_in_valgrind (void) { return FALSE; } diff --git a/gst/gstinfo.h b/gst/gstinfo.h index 11e2e9e6cd..b23f91741c 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -253,6 +253,7 @@ typedef void (*GstLogFunction) (GstDebugCategory * category, #ifndef GST_DISABLE_GST_DEBUG +/* FIXME 0.11: move this into private headers */ void _gst_debug_init (void); diff --git a/gst/gsttypefind.c b/gst/gsttypefind.c index b268365d0d..dafc8e165f 100644 --- a/gst/gsttypefind.c +++ b/gst/gsttypefind.c @@ -35,8 +35,8 @@ #include "gstregistry.h" #include "gsttypefindfactory.h" -GST_DEBUG_CATEGORY_EXTERN (gst_type_find_debug); -#define GST_CAT_DEFAULT gst_type_find_debug +GST_DEBUG_CATEGORY_EXTERN (type_find_debug); +#define GST_CAT_DEFAULT type_find_debug GType gst_type_find_get_type (void) diff --git a/gst/gsttypefindfactory.c b/gst/gsttypefindfactory.c index ab249404f3..2cb7c9a9a3 100644 --- a/gst/gsttypefindfactory.c +++ b/gst/gsttypefindfactory.c @@ -86,8 +86,8 @@ #include "gsttypefindfactory.h" #include "gstregistry.h" -GST_DEBUG_CATEGORY (gst_type_find_debug); -#define GST_CAT_DEFAULT gst_type_find_debug +GST_DEBUG_CATEGORY (type_find_debug); +#define GST_CAT_DEFAULT type_find_debug static void gst_type_find_factory_class_init (gpointer g_class, gpointer class_data); @@ -118,7 +118,7 @@ gst_type_find_factory_get_type (void) typefind_type = g_type_register_static (GST_TYPE_PLUGIN_FEATURE, "GstTypeFindFactory", &typefind_info, 0); - GST_DEBUG_CATEGORY_INIT (gst_type_find_debug, "GST_TYPEFIND", + GST_DEBUG_CATEGORY_INIT (type_find_debug, "GST_TYPEFIND", GST_DEBUG_FG_GREEN, "typefinding subsystem"); } diff --git a/libs/gst/controller/gstcontroller.c b/libs/gst/controller/gstcontroller.c index 68ab01b586..6ae5f5f03c 100644 --- a/libs/gst/controller/gstcontroller.c +++ b/libs/gst/controller/gstcontroller.c @@ -78,11 +78,11 @@ #include "gstcontrolsource.h" #include "gstinterpolationcontrolsource.h" -#define GST_CAT_DEFAULT gst_controller_debug +#define GST_CAT_DEFAULT controller_debug GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DEFAULT); static GObjectClass *parent_class = NULL; -GQuark __gst_controller_key; +GQuark priv_gst_controller_key; /* property ids */ enum @@ -221,7 +221,7 @@ gst_controller_new_valist (GObject * object, va_list var_args) GST_INFO ("setting up a new controller"); - self = g_object_get_qdata (object, __gst_controller_key); + self = g_object_get_qdata (object, priv_gst_controller_key); /* create GstControlledProperty for each property */ while ((name = va_arg (var_args, gchar *))) { /* test if this property isn't yet controlled */ @@ -233,7 +233,7 @@ gst_controller_new_valist (GObject * object, va_list var_args) self = g_object_new (GST_TYPE_CONTROLLER, NULL); self->object = g_object_ref (object); /* store the controller */ - g_object_set_qdata (object, __gst_controller_key, self); + g_object_set_qdata (object, priv_gst_controller_key, self); ref_existing = FALSE; } else { /* only want one single _ref(), even for multiple properties */ @@ -282,7 +282,7 @@ gst_controller_new_list (GObject * object, GList * list) GST_INFO ("setting up a new controller"); - self = g_object_get_qdata (object, __gst_controller_key); + self = g_object_get_qdata (object, priv_gst_controller_key); /* create GstControlledProperty for each property */ for (node = list; node; node = g_list_next (node)) { name = (gchar *) node->data; @@ -295,7 +295,7 @@ gst_controller_new_list (GObject * object, GList * list) self = g_object_new (GST_TYPE_CONTROLLER, NULL); self->object = g_object_ref (object); /* store the controller */ - g_object_set_qdata (object, __gst_controller_key, self); + g_object_set_qdata (object, priv_gst_controller_key, self); ref_existing = FALSE; } else { /* only want one single _ref(), even for multiple properties */ @@ -863,7 +863,7 @@ _gst_controller_dispose (GObject * object) } /* remove controller from object's qdata list */ - g_object_set_qdata (self->object, __gst_controller_key, NULL); + g_object_set_qdata (self->object, priv_gst_controller_key, NULL); g_object_unref (self->object); self->object = NULL; g_mutex_unlock (self->lock); @@ -910,7 +910,7 @@ _gst_controller_class_init (GstControllerClass * klass) gobject_class->dispose = _gst_controller_dispose; gobject_class->finalize = _gst_controller_finalize; - __gst_controller_key = g_quark_from_static_string ("gst::controller"); + priv_gst_controller_key = g_quark_from_static_string ("gst::controller"); /* register properties */ g_object_class_install_property (gobject_class, PROP_CONTROL_RATE, diff --git a/libs/gst/controller/gstcontrolsource.c b/libs/gst/controller/gstcontrolsource.c index ad705f0cb1..4dc9045cdc 100644 --- a/libs/gst/controller/gstcontrolsource.c +++ b/libs/gst/controller/gstcontrolsource.c @@ -46,7 +46,7 @@ #include "gstcontrolsource.h" -#define GST_CAT_DEFAULT gst_controller_debug +#define GST_CAT_DEFAULT controller_debug GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DEFAULT); static void gst_control_source_class_init (GstControlSourceClass * klass); diff --git a/libs/gst/controller/gsthelper.c b/libs/gst/controller/gsthelper.c index 9c87f60a6a..ff71ed2fcc 100644 --- a/libs/gst/controller/gsthelper.c +++ b/libs/gst/controller/gsthelper.c @@ -38,10 +38,10 @@ #include "gstcontrollerprivate.h" #include "gstcontroller.h" -#define GST_CAT_DEFAULT gst_controller_debug +#define GST_CAT_DEFAULT controller_debug GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DEFAULT); -extern GQuark __gst_controller_key; +extern GQuark priv_gst_controller_key; /** * gst_object_control_properties: @@ -93,7 +93,7 @@ gst_object_uncontrol_properties (GObject * object, ...) g_return_val_if_fail (G_IS_OBJECT (object), FALSE); - if ((ctrl = g_object_get_qdata (object, __gst_controller_key))) { + if ((ctrl = g_object_get_qdata (object, priv_gst_controller_key))) { va_list var_args; va_start (var_args, object); @@ -117,7 +117,7 @@ gst_object_get_controller (GObject * object) { g_return_val_if_fail (G_IS_OBJECT (object), FALSE); - return (g_object_get_qdata (object, __gst_controller_key)); + return (g_object_get_qdata (object, priv_gst_controller_key)); } /** @@ -138,8 +138,8 @@ gst_object_set_controller (GObject * object, GstController * controller) g_return_val_if_fail (G_IS_OBJECT (object), FALSE); g_return_val_if_fail (controller, FALSE); - if (!(ctrl = g_object_get_qdata (object, __gst_controller_key))) { - g_object_set_qdata (object, __gst_controller_key, controller); + if (!(ctrl = g_object_get_qdata (object, priv_gst_controller_key))) { + g_object_set_qdata (object, priv_gst_controller_key, controller); return (TRUE); } return (FALSE); @@ -161,7 +161,7 @@ gst_object_suggest_next_sync (GObject * object) g_return_val_if_fail (G_IS_OBJECT (object), GST_CLOCK_TIME_NONE); - if ((ctrl = g_object_get_qdata (object, __gst_controller_key))) { + if ((ctrl = g_object_get_qdata (object, priv_gst_controller_key))) { return gst_controller_suggest_next_sync (ctrl); } return (GST_CLOCK_TIME_NONE); @@ -185,7 +185,7 @@ gst_object_sync_values (GObject * object, GstClockTime timestamp) g_return_val_if_fail (G_IS_OBJECT (object), FALSE); g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (timestamp), FALSE); - if ((ctrl = g_object_get_qdata (object, __gst_controller_key))) { + if ((ctrl = g_object_get_qdata (object, priv_gst_controller_key))) { return gst_controller_sync_values (ctrl, timestamp); } return (FALSE); @@ -214,7 +214,7 @@ gst_object_set_control_source (GObject * object, gchar * property_name, g_return_val_if_fail (G_IS_OBJECT (object), FALSE); g_return_val_if_fail (GST_IS_CONTROL_SOURCE (csource), FALSE); - if ((ctrl = g_object_get_qdata (object, __gst_controller_key))) { + if ((ctrl = g_object_get_qdata (object, priv_gst_controller_key))) { return gst_controller_set_control_source (ctrl, property_name, csource); } return FALSE; @@ -240,7 +240,7 @@ gst_object_get_control_source (GObject * object, gchar * property_name) g_return_val_if_fail (G_IS_OBJECT (object), FALSE); - if ((ctrl = g_object_get_qdata (object, __gst_controller_key))) { + if ((ctrl = g_object_get_qdata (object, priv_gst_controller_key))) { return gst_controller_get_control_source (ctrl, property_name); } return FALSE; @@ -273,7 +273,7 @@ gst_object_get_value_arrays (GObject * object, GstClockTime timestamp, g_return_val_if_fail (G_IS_OBJECT (object), FALSE); g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (timestamp), FALSE); - if ((ctrl = g_object_get_qdata (object, __gst_controller_key))) { + if ((ctrl = g_object_get_qdata (object, priv_gst_controller_key))) { return gst_controller_get_value_arrays (ctrl, timestamp, value_arrays); } return (FALSE); @@ -304,7 +304,7 @@ gst_object_get_value_array (GObject * object, GstClockTime timestamp, g_return_val_if_fail (G_IS_OBJECT (object), FALSE); g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (timestamp), FALSE); - if ((ctrl = g_object_get_qdata (object, __gst_controller_key))) { + if ((ctrl = g_object_get_qdata (object, priv_gst_controller_key))) { return gst_controller_get_value_array (ctrl, timestamp, value_array); } return (FALSE); @@ -336,7 +336,7 @@ gst_object_get_control_rate (GObject * object) g_return_val_if_fail (G_IS_OBJECT (object), FALSE); - if ((ctrl = g_object_get_qdata (object, __gst_controller_key))) { + if ((ctrl = g_object_get_qdata (object, priv_gst_controller_key))) { g_object_get (ctrl, "control-rate", &control_rate, NULL); } return (control_rate); @@ -364,7 +364,7 @@ gst_object_set_control_rate (GObject * object, GstClockTime control_rate) g_return_if_fail (G_IS_OBJECT (object)); - if ((ctrl = g_object_get_qdata (object, __gst_controller_key))) { + if ((ctrl = g_object_get_qdata (object, priv_gst_controller_key))) { g_object_set (ctrl, "control-rate", control_rate, NULL); } } diff --git a/libs/gst/controller/gstinterpolation.c b/libs/gst/controller/gstinterpolation.c index ae87f42889..ac32fa18f8 100644 --- a/libs/gst/controller/gstinterpolation.c +++ b/libs/gst/controller/gstinterpolation.c @@ -28,7 +28,7 @@ #include "gstinterpolationcontrolsource.h" #include "gstinterpolationcontrolsourceprivate.h" -#define GST_CAT_DEFAULT gst_controller_debug +#define GST_CAT_DEFAULT controller_debug GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DEFAULT); #define EMPTY(x) (x) diff --git a/libs/gst/controller/lib.c b/libs/gst/controller/lib.c index e6454ba905..3444e753b0 100644 --- a/libs/gst/controller/lib.c +++ b/libs/gst/controller/lib.c @@ -27,7 +27,7 @@ /* library initialisation */ -#define GST_CAT_DEFAULT gst_controller_debug +#define GST_CAT_DEFAULT controller_debug GST_DEBUG_CATEGORY (GST_CAT_DEFAULT); /** diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index 710b7df4b6..400d86ecb8 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -890,6 +890,7 @@ EXPORTS gst_uri_type_get_type gst_util_dump_mem gst_util_gdouble_to_guint64 + gst_util_get_timestamp gst_util_guint64_to_gdouble gst_util_set_object_arg gst_util_set_value_from_string