From 7e7f51f61735d3f38c370c20c2a0bd5ab206611d Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 2 Mar 2010 22:58:06 +0100 Subject: [PATCH] Fixes for -Wmissing-declarations -Wmissing-prototypes Also adds those flags to the configure warning flags https://bugzilla.gnome.org/show_bug.cgi?id=611692 --- configure.ac | 2 +- docs/gst/Makefile.am | 1 + gst/Makefile.am | 1 + gst/gstelement.c | 8 ++-- gst/gstelementdetails.h | 69 ++++++++++++++++++++++++++++ gst/gstelementfactory.c | 41 +---------------- gst/gstpad.c | 8 ++++ gst/gstparse.c | 6 +-- gst/gstpipeline.c | 7 +++ gst/gstplugin.c | 3 ++ gst/gstregistry.c | 8 ++-- gst/gstregistrybinary.c | 8 ++++ gst/gstutils.c | 13 +++++- gst/parse/types.h | 3 ++ libs/gst/check/gstcheck.h | 2 +- libs/gst/controller/gstcontroller.c | 27 +++++++++++ libs/gst/dataprotocol/dataprotocol.c | 15 ++++++ plugins/elements/gstfilesink.c | 2 +- plugins/elements/gstfilesrc.c | 2 +- plugins/indexers/Makefile.am | 3 ++ plugins/indexers/gstfileindex.c | 2 + plugins/indexers/gstindexers.c | 6 +-- plugins/indexers/gstindexers.h | 35 ++++++++++++++ plugins/indexers/gstmemindex.c | 2 + tests/check/elements/tee.c | 4 +- tests/check/gst/gstminiobject.c | 2 + tests/check/libs/typefindhelper.c | 2 +- win32/common/libgstreamer.def | 1 - 28 files changed, 217 insertions(+), 66 deletions(-) create mode 100644 gst/gstelementdetails.h create mode 100644 plugins/indexers/gstindexers.h diff --git a/configure.ac b/configure.ac index 0a43abe36f..edca1f97ad 100644 --- a/configure.ac +++ b/configure.ac @@ -600,7 +600,7 @@ GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0" AC_SUBST(GST_PKG_DEPS) dnl define an ERROR_CFLAGS Makefile variable -AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wredundant-decls -Wundef -Wwrite-strings]) +AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings]) dnl define correct level for debugging messages AG_GST_SET_LEVEL_DEFAULT($GST_GIT) diff --git a/docs/gst/Makefile.am b/docs/gst/Makefile.am index d4db483931..4fa8f31053 100644 --- a/docs/gst/Makefile.am +++ b/docs/gst/Makefile.am @@ -67,6 +67,7 @@ IGNORE_HFILES= \ gst-i18n-app.h \ gst-i18n-lib.h \ gst_private.h \ + gstelementdetails.h \ gstmarshal.h \ gstmacros.h \ \ diff --git a/gst/Makefile.am b/gst/Makefile.am index b7e1bec92e..73ca337472 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -202,6 +202,7 @@ noinst_HEADERS = \ glib-compat-private.h \ gst-i18n-lib.h \ gst-i18n-app.h \ + gstelementdetails.h \ gstpluginloader.h \ gstquark.h \ gstregistrybinary.h \ diff --git a/gst/gstelement.c b/gst/gstelement.c index c5cd1bfca0..62e55654aa 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -82,6 +82,7 @@ #include #include "gstelement.h" +#include "gstelementdetails.h" #include "gstenumtypes.h" #include "gstbus.h" #include "gstmarshal.h" @@ -108,10 +109,6 @@ enum /* FILL ME */ }; -extern void __gst_element_details_clear (GstElementDetails * dp); -extern void __gst_element_details_copy (GstElementDetails * dest, - const GstElementDetails * src); - static void gst_element_class_init (GstElementClass * klass); static void gst_element_init (GstElement * element); static void gst_element_base_class_init (gpointer g_class); @@ -1071,6 +1068,9 @@ gst_element_get_request_pad (GstElement * element, const gchar * name) * depending on the type of the pad. */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +GstPad *gst_element_get_pad (GstElement * element, const gchar * name); +#endif GstPad * gst_element_get_pad (GstElement * element, const gchar * name) { diff --git a/gst/gstelementdetails.h b/gst/gstelementdetails.h new file mode 100644 index 0000000000..b59878a89a --- /dev/null +++ b/gst/gstelementdetails.h @@ -0,0 +1,69 @@ +/* GStreamer + * Copyright (C) 1999,2000 Erik Walthinsen + * 2000,2004 Wim Taymans + * + * gstelement.h: Header for GstElement + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GST_ELEMENT_DETAILS_H__ +#define __GST_ELEMENT_DETAILS_H__ + +G_BEGIN_DECLS + +static inline void +__gst_element_details_clear (GstElementDetails * dp) +{ + g_free (dp->longname); + g_free (dp->klass); + g_free (dp->description); + g_free (dp->author); + memset (dp, 0, sizeof (GstElementDetails)); +} + +#define VALIDATE_SET(__dest, __src, __entry) \ +G_STMT_START { \ + if (g_utf8_validate (__src->__entry, -1, NULL)) { \ + __dest->__entry = g_strdup (__src->__entry); \ + } else { \ + g_warning ("Invalid UTF-8 in " G_STRINGIFY (__entry) ": %s", \ + __src->__entry); \ + __dest->__entry = g_strdup ("[ERROR: invalid UTF-8]"); \ + } \ +} G_STMT_END + +static inline void +__gst_element_details_set (GstElementDetails * dest, + const GstElementDetails * src) +{ + VALIDATE_SET (dest, src, longname); + VALIDATE_SET (dest, src, klass); + VALIDATE_SET (dest, src, description); + VALIDATE_SET (dest, src, author); +} + +static inline void +__gst_element_details_copy (GstElementDetails * dest, + const GstElementDetails * src) +{ + __gst_element_details_clear (dest); + __gst_element_details_set (dest, src); +} + +G_END_DECLS + +#endif /* __GST_ELEMENT_DETAILS_H__ */ diff --git a/gst/gstelementfactory.c b/gst/gstelementfactory.c index 0483eef0cd..abdcec8aa8 100644 --- a/gst/gstelementfactory.c +++ b/gst/gstelementfactory.c @@ -60,6 +60,7 @@ #include "gst_private.h" #include "gstelement.h" +#include "gstelementdetails.h" #include "gstinfo.h" #include "gsturi.h" #include "gstregistry.h" @@ -70,7 +71,6 @@ GST_DEBUG_CATEGORY_STATIC (element_factory_debug); #define GST_CAT_DEFAULT element_factory_debug static void gst_element_factory_finalize (GObject * object); -void __gst_element_details_clear (GstElementDetails * dp); static void gst_element_factory_cleanup (GstElementFactory * factory); static GstPluginFeatureClass *parent_class = NULL; @@ -148,45 +148,6 @@ gst_element_factory_find (const gchar * name) return NULL; } -void -__gst_element_details_clear (GstElementDetails * dp) -{ - g_free (dp->longname); - g_free (dp->klass); - g_free (dp->description); - g_free (dp->author); - memset (dp, 0, sizeof (GstElementDetails)); -} - -#define VALIDATE_SET(__dest, __src, __entry) \ -G_STMT_START { \ - if (g_utf8_validate (__src->__entry, -1, NULL)) { \ - __dest->__entry = g_strdup (__src->__entry); \ - } else { \ - g_warning ("Invalid UTF-8 in " G_STRINGIFY (__entry) ": %s", \ - __src->__entry); \ - __dest->__entry = g_strdup ("[ERROR: invalid UTF-8]"); \ - } \ -} G_STMT_END - -void -__gst_element_details_set (GstElementDetails * dest, - const GstElementDetails * src) -{ - VALIDATE_SET (dest, src, longname); - VALIDATE_SET (dest, src, klass); - VALIDATE_SET (dest, src, description); - VALIDATE_SET (dest, src, author); -} - -void -__gst_element_details_copy (GstElementDetails * dest, - const GstElementDetails * src) -{ - __gst_element_details_clear (dest); - __gst_element_details_set (dest, src); -} - static void gst_element_factory_cleanup (GstElementFactory * factory) { diff --git a/gst/gstpad.c b/gst/gstpad.c index eb006104d2..7b8bb89324 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -1471,6 +1471,11 @@ gst_pad_set_iterate_internal_links_function (GstPad * pad, * Deprecated: Use the thread-safe gst_pad_set_iterate_internal_links_function() */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +void +gst_pad_set_internal_link_function (GstPad * pad, + GstPadIntLinkFunction intlink); +#endif void gst_pad_set_internal_link_function (GstPad * pad, GstPadIntLinkFunction intlink) { @@ -3387,6 +3392,9 @@ no_parent: * gst_pad_iterate_internal_links() instead. */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +GList *gst_pad_get_internal_links (GstPad * pad); +#endif GList * gst_pad_get_internal_links (GstPad * pad) { diff --git a/gst/gstparse.c b/gst/gstparse.c index f72b6b3ba4..d41b97e513 100644 --- a/gst/gstparse.c +++ b/gst/gstparse.c @@ -37,9 +37,9 @@ #include "gstparse.h" #include "gsterror.h" #include "gstinfo.h" - -extern GstElement *_gst_parse_launch (const gchar *, GError **, - GstParseContext *, GstParseFlags); +#ifndef GST_DISABLE_PARSE +#include "parse/types.h" +#endif /** * gst_parse_error_quark: diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c index 639fe502b0..73c8f99169 100644 --- a/gst/gstpipeline.c +++ b/gst/gstpipeline.c @@ -604,6 +604,10 @@ gst_pipeline_get_bus (GstPipeline * pipeline) * gst_element_set_start_time(). */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +void +gst_pipeline_set_new_stream_time (GstPipeline * pipeline, GstClockTime time); +#endif void gst_pipeline_set_new_stream_time (GstPipeline * pipeline, GstClockTime time) { @@ -637,6 +641,9 @@ gst_pipeline_set_new_stream_time (GstPipeline * pipeline, GstClockTime time) * gst_element_get_start_time(). */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +GstClockTime gst_pipeline_get_last_stream_time (GstPipeline * pipeline); +#endif GstClockTime gst_pipeline_get_last_stream_time (GstPipeline * pipeline) { diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 6c7e0013ce..0f146ae4f5 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -163,6 +163,9 @@ gst_plugin_error_quark (void) } #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +void _gst_plugin_register_static (GstPluginDesc * desc); +#endif /* this function can be called in the GCC constructor extension, before * the _gst_plugin_initialize() was called. In that case, we store the * plugin description in a list to initialize it when we open the main diff --git a/gst/gstregistry.c b/gst/gstregistry.c index 6d3b371cde..426bdd341e 100644 --- a/gst/gstregistry.c +++ b/gst/gstregistry.c @@ -999,10 +999,10 @@ gst_registry_scan_plugin_file (GstRegistryScanContext * context, gboolean changed = FALSE; GstPlugin *newplugin = NULL; - #ifdef G_OS_WIN32 - /* Disable external plugin loader on Windows until it is ported properly. */ - context->helper_state = REGISTRY_SCAN_HELPER_DISABLED; - #endif +#ifdef G_OS_WIN32 + /* Disable external plugin loader on Windows until it is ported properly. */ + context->helper_state = REGISTRY_SCAN_HELPER_DISABLED; +#endif /* Have a plugin to load - see if the scan-helper needs starting */ diff --git a/gst/gstregistrybinary.c b/gst/gstregistrybinary.c index e7c41cf962..19f7d4540d 100644 --- a/gst/gstregistrybinary.c +++ b/gst/gstregistrybinary.c @@ -609,6 +609,10 @@ Error: } #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +gboolean +gst_registry_xml_read_cache (GstRegistry * registry, const char *location); +#endif /* FIXME 0.11: these symbols are here for backwards compatibility and should * be removed or made private */ gboolean @@ -617,6 +621,10 @@ gst_registry_xml_read_cache (GstRegistry * registry, const char *location) return FALSE; } +#ifdef GST_DISABLE_DEPRECATED +gboolean +gst_registry_xml_write_cache (GstRegistry * registry, const char *location); +#endif gboolean gst_registry_xml_write_cache (GstRegistry * registry, const char *location) { diff --git a/gst/gstutils.c b/gst/gstutils.c index da32ca7330..f0997906b5 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -993,7 +993,7 @@ gst_element_get_pad_from_template (GstElement * element, GstPadTemplate * templ) return ret; } -/** +/* * gst_element_request_compatible_pad: * @element: a #GstElement. * @templ: the #GstPadTemplate to which the new pad should be able to link. @@ -1003,7 +1003,7 @@ gst_element_get_pad_from_template (GstElement * element, GstPadTemplate * templ) * * Returns: a #GstPad, or %NULL if one could not be found or created. */ -GstPad * +static GstPad * gst_element_request_compatible_pad (GstElement * element, GstPadTemplate * templ) { @@ -2620,6 +2620,9 @@ gst_buffer_join (GstBuffer * buf1, GstBuffer * buf2) * control. */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +void gst_buffer_stamp (GstBuffer * dest, const GstBuffer * src); +#endif void gst_buffer_stamp (GstBuffer * dest, const GstBuffer * src) { @@ -3044,6 +3047,9 @@ gst_pad_query_peer_convert (GstPad * pad, GstFormat src_format, gint64 src_val, * */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +void gst_atomic_int_set (gint * atomic_int, gint value); +#endif void gst_atomic_int_set (gint * atomic_int, gint value) { @@ -3526,6 +3532,9 @@ gst_bin_find_unlinked_pad (GstBin * bin, GstPadDirection direction) * Deprecated: use gst_bin_find_unlinked_pad() instead. */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +GstPad *gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction); +#endif GstPad * gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction) { diff --git a/gst/parse/types.h b/gst/parse/types.h index 27aee32144..e938b94822 100644 --- a/gst/parse/types.h +++ b/gst/parse/types.h @@ -84,4 +84,7 @@ gst_parse_unescape (gchar *str) *str = '\0'; } +GstElement *_gst_parse_launch (const gchar *, GError **, + GstParseContext *, GstParseFlags); + #endif /* __GST_PARSE_TYPES_H__ */ diff --git a/libs/gst/check/gstcheck.h b/libs/gst/check/gstcheck.h index cb57ea6d44..5812b51087 100644 --- a/libs/gst/check/gstcheck.h +++ b/libs/gst/check/gstcheck.h @@ -79,7 +79,7 @@ GstPad * gst_check_setup_sink_pad_by_name (GstElement * element, GstStaticPadTemplate * template, const gchar *name); void gst_check_teardown_pad_by_name (GstElement * element, const gchar *name); void gst_check_teardown_src_pad (GstElement * element); -void gst_check_drop_buffers (); +void gst_check_drop_buffers (void); void gst_check_caps_equal (GstCaps * caps1, GstCaps * caps2); void gst_check_element_push_buffer_list (const gchar * element_name, GList * buffer_in, GList * buffer_out, GstFlowReturn last_flow_return); diff --git a/libs/gst/controller/gstcontroller.c b/libs/gst/controller/gstcontroller.c index 8a3c4ed162..325b6e2d02 100644 --- a/libs/gst/controller/gstcontroller.c +++ b/libs/gst/controller/gstcontroller.c @@ -1021,6 +1021,11 @@ gst_controlled_property_set_interpolation_mode (GstControlledProperty * self, * Returns: FALSE if the values couldn't be set (ex : properties not handled by controller), TRUE otherwise */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +gboolean +gst_controller_set (GstController * self, const gchar * property_name, + GstClockTime timestamp, GValue * value); +#endif gboolean gst_controller_set (GstController * self, const gchar * property_name, GstClockTime timestamp, GValue * value) @@ -1065,6 +1070,11 @@ out: * Returns: %FALSE if the values couldn't be set (ex : properties not handled by controller), %TRUE otherwise */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +gboolean +gst_controller_set_from_list (GstController * self, const gchar * property_name, + GSList * timedvalues); +#endif gboolean gst_controller_set_from_list (GstController * self, const gchar * property_name, GSList * timedvalues) @@ -1111,6 +1121,11 @@ out: * Returns: %FALSE if the values couldn't be unset (ex : properties not handled by controller), %TRUE otherwise */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +gboolean +gst_controller_unset (GstController * self, const gchar * property_name, + GstClockTime timestamp); +#endif gboolean gst_controller_unset (GstController * self, const gchar * property_name, GstClockTime timestamp) @@ -1154,6 +1169,9 @@ out: * Since: 0.10.5 */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +gboolean gst_controller_unset_all (GstController * self, const gchar * property_name); +#endif gboolean gst_controller_unset_all (GstController * self, const gchar * property_name) { @@ -1194,6 +1212,10 @@ out: * Returns: a copy of the list, or %NULL if the property isn't handled by the controller */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +const GList *gst_controller_get_all (GstController * self, + const gchar * property_name); +#endif const GList * gst_controller_get_all (GstController * self, const gchar * property_name) { @@ -1237,6 +1259,11 @@ out: * Returns: %TRUE if the property is handled by the controller, %FALSE otherwise */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +gboolean +gst_controller_set_interpolation_mode (GstController * self, + const gchar * property_name, GstInterpolateMode mode); +#endif gboolean gst_controller_set_interpolation_mode (GstController * self, const gchar * property_name, GstInterpolateMode mode) diff --git a/libs/gst/dataprotocol/dataprotocol.c b/libs/gst/dataprotocol/dataprotocol.c index 61705ca93a..ac0a9ce259 100644 --- a/libs/gst/dataprotocol/dataprotocol.c +++ b/libs/gst/dataprotocol/dataprotocol.c @@ -378,6 +378,11 @@ gst_dp_header_payload_type (const guint8 * header) * Returns: %TRUE if the header was successfully created. */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +gboolean +gst_dp_header_from_buffer (const GstBuffer * buffer, GstDPHeaderFlag flags, + guint * length, guint8 ** header); +#endif gboolean gst_dp_header_from_buffer (const GstBuffer * buffer, GstDPHeaderFlag flags, guint * length, guint8 ** header) @@ -410,6 +415,11 @@ gst_dp_header_from_buffer_1_0 (const GstBuffer * buffer, GstDPHeaderFlag flags, * Returns: %TRUE if the packet was successfully created. */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +gboolean +gst_dp_packet_from_caps (const GstCaps * caps, GstDPHeaderFlag flags, + guint * length, guint8 ** header, guint8 ** payload); +#endif gboolean gst_dp_packet_from_caps (const GstCaps * caps, GstDPHeaderFlag flags, guint * length, guint8 ** header, guint8 ** payload) @@ -442,6 +452,11 @@ gst_dp_packet_from_caps_1_0 (const GstCaps * caps, GstDPHeaderFlag flags, * Returns: %TRUE if the packet was successfully created. */ #ifndef GST_REMOVE_DEPRECATED +#ifdef GST_DISABLE_DEPRECATED +gboolean +gst_dp_packet_from_event (const GstEvent * event, GstDPHeaderFlag flags, + guint * length, guint8 ** header, guint8 ** payload); +#endif gboolean gst_dp_packet_from_event (const GstEvent * event, GstDPHeaderFlag flags, guint * length, guint8 ** header, guint8 ** payload) diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c index c8e5c87d3c..e9e5c653cf 100644 --- a/plugins/elements/gstfilesink.c +++ b/plugins/elements/gstfilesink.c @@ -105,7 +105,7 @@ enum /* Copy of glib's g_fopen due to win32 libc/cross-DLL brokenness: we can't * use the 'file pointer' opened in glib (and returned from this function) * in this library, as they may have unrelated C runtimes. */ -FILE * +static FILE * gst_fopen (const gchar * filename, const gchar * mode) { #ifdef G_OS_WIN32 diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index 4669cc4eaf..46ef3e7afe 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -87,7 +87,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", /* Copy of glib's g_open due to win32 libc/cross-DLL brokenness: we can't * use the 'file descriptor' opened in glib (and returned from this function) * in this library, as they may have unrelated C runtimes. */ -int +static int gst_open (const gchar * filename, int flags, int mode) { #ifdef G_OS_WIN32 diff --git a/plugins/indexers/Makefile.am b/plugins/indexers/Makefile.am index 5d8046a59f..42337d6c40 100644 --- a/plugins/indexers/Makefile.am +++ b/plugins/indexers/Makefile.am @@ -14,6 +14,9 @@ GST_LOADSAVE_SRC = GST_FILEINDEX_LIBS = endif +noinst_HEADERS = \ + gstindexers.h + libgstcoreindexers_la_DEPENDENCIES = $(top_builddir)/gst/libgstreamer-@GST_MAJORMINOR@.la libgstcoreindexers_la_SOURCES = gstindexers.c gstmemindex.c $(GST_LOADSAVE_SRC) libgstcoreindexers_la_CFLAGS = $(GST_OBJ_CFLAGS) diff --git a/plugins/indexers/gstfileindex.c b/plugins/indexers/gstfileindex.c index a90ce36838..4bcd3592a3 100644 --- a/plugins/indexers/gstfileindex.c +++ b/plugins/indexers/gstfileindex.c @@ -27,6 +27,8 @@ #include #include +#include "gstindexers.h" + #define GST_TYPE_FILE_INDEX \ (gst_file_index_get_type ()) #define GST_FILE_INDEX(obj) \ diff --git a/plugins/indexers/gstindexers.c b/plugins/indexers/gstindexers.c index 5b08998d8b..9513f67413 100644 --- a/plugins/indexers/gstindexers.c +++ b/plugins/indexers/gstindexers.c @@ -21,11 +21,7 @@ #include #include -extern gboolean gst_mem_index_plugin_init (GstPlugin * plugin); - -#ifndef GST_DISABLE_LOADSAVE -extern gboolean gst_file_index_plugin_init (GstPlugin * plugin); -#endif +#include "gstindexers.h" static gboolean plugin_init (GstPlugin * plugin) diff --git a/plugins/indexers/gstindexers.h b/plugins/indexers/gstindexers.h new file mode 100644 index 0000000000..03e8e464e4 --- /dev/null +++ b/plugins/indexers/gstindexers.h @@ -0,0 +1,35 @@ +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GST_INDEXERS_H__ +#define __GST_INDEXERS_H__ + +G_BEGIN_DECLS + + +gboolean gst_mem_index_plugin_init (GstPlugin * plugin); + +#ifndef GST_DISABLE_LOADSAVE +gboolean gst_file_index_plugin_init (GstPlugin * plugin); +#endif + + +G_END_DECLS + +#endif /* __GST_INDEXERS_H__ */ diff --git a/plugins/indexers/gstmemindex.c b/plugins/indexers/gstmemindex.c index 2ea08222ca..c680eaa408 100644 --- a/plugins/indexers/gstmemindex.c +++ b/plugins/indexers/gstmemindex.c @@ -19,6 +19,8 @@ #include +#include "gstindexers.h" + #define GST_TYPE_MEM_INDEX \ (gst_index_get_type ()) #define GST_MEM_INDEX(obj) \ diff --git a/tests/check/elements/tee.c b/tests/check/elements/tee.c index 5adb1ef6ce..e0fed0fa31 100644 --- a/tests/check/elements/tee.c +++ b/tests/check/elements/tee.c @@ -184,7 +184,7 @@ typedef struct gboolean bufferalloc_blocked; } BufferAllocHarness; -void +static void buffer_alloc_harness_setup (BufferAllocHarness * h, gint countdown) { h->tee = gst_check_setup_element ("tee"); @@ -223,7 +223,7 @@ buffer_alloc_harness_setup (BufferAllocHarness * h, gint countdown) GST_PAD_LINK_OK); } -void +static void buffer_alloc_harness_teardown (BufferAllocHarness * h) { g_thread_join (h->app_thread); diff --git a/tests/check/gst/gstminiobject.c b/tests/check/gst/gstminiobject.c index ac5f5d344d..1477328d3e 100644 --- a/tests/check/gst/gstminiobject.c +++ b/tests/check/gst/gstminiobject.c @@ -252,6 +252,7 @@ my_buffer_pool_drain_one (MyBufferPool * self) return buf; } +GType my_recycle_buffer_get_type (void); G_DEFINE_TYPE (MyRecycleBuffer, my_recycle_buffer, GST_TYPE_BUFFER); static void my_recycle_buffer_finalize (GstMiniObject * mini_object); @@ -365,6 +366,7 @@ enum PROP_BUFFER = 1 }; +GType my_foo_get_type (void); G_DEFINE_TYPE (MyFoo, my_foo, G_TYPE_OBJECT); static void diff --git a/tests/check/libs/typefindhelper.c b/tests/check/libs/typefindhelper.c index fceaca09d3..e0ead01908 100644 --- a/tests/check/libs/typefindhelper.c +++ b/tests/check/libs/typefindhelper.c @@ -42,7 +42,7 @@ static GstStaticCaps foobar_caps = GST_STATIC_CAPS ("foo/x-bar"); /* make sure the entire data in the buffer is available for peeking */ GST_START_TEST (test_buffer_range) { - static const gchar *foobar_exts[] = { "foobar", NULL }; + static gchar *foobar_exts[] = { (char *) "foobar", NULL }; GstStructure *s; GstBuffer *buf; diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index 09d7a8869f..04c59a56b8 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -329,7 +329,6 @@ EXPORTS gst_element_register gst_element_release_request_pad gst_element_remove_pad - gst_element_request_compatible_pad gst_element_requires_clock gst_element_seek gst_element_seek_simple