gst: add some _priv prefixes to private methods

This commit is contained in:
Wim Taymans 2011-08-29 13:27:26 +02:00
parent 1e59b651ba
commit 4145598972
16 changed files with 43 additions and 51 deletions

View file

@ -666,10 +666,10 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
_priv_gst_quarks_initialize (); _priv_gst_quarks_initialize ();
_gst_memory_init (); _gst_memory_init ();
_gst_format_initialize (); _priv_gst_format_initialize ();
_gst_query_initialize (); _priv_gst_query_initialize ();
_gst_structure_initialize (); _priv_gst_structure_initialize ();
_gst_caps_initialize (); _priv_gst_caps_initialize ();
_gst_meta_init (); _gst_meta_init ();
g_type_class_ref (gst_object_get_type ()); g_type_class_ref (gst_object_get_type ());
@ -759,16 +759,16 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
g_type_class_ref (gst_probe_return_get_type ()); g_type_class_ref (gst_probe_return_get_type ());
g_type_class_ref (gst_segment_flags_get_type ()); g_type_class_ref (gst_segment_flags_get_type ());
_gst_event_initialize (); _priv_gst_event_initialize ();
_gst_buffer_initialize (); _priv_gst_buffer_initialize ();
_gst_message_initialize (); _priv_gst_message_initialize ();
_gst_buffer_list_initialize (); _priv_gst_buffer_list_initialize ();
_gst_value_initialize (); _priv_gst_value_initialize ();
g_type_class_ref (gst_param_spec_fraction_get_type ()); g_type_class_ref (gst_param_spec_fraction_get_type ());
_gst_tag_initialize (); _priv_gst_tag_initialize ();
gst_parse_context_get_type (); gst_parse_context_get_type ();
_gst_plugin_initialize (); _priv_gst_plugin_initialize ();
gst_g_error_get_type (); gst_g_error_get_type ();

View file

@ -91,25 +91,19 @@ gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin);
gboolean _priv_gst_in_valgrind (void); gboolean _priv_gst_in_valgrind (void);
/* Initialize GStreamer private quark storage */ /* init functions called from gst_init(). */
void _priv_gst_quarks_initialize (void); void _priv_gst_quarks_initialize (void);
void _priv_gst_buffer_initialize (void);
/* Other init functions called from gst_init(). void _priv_gst_buffer_list_initialize (void);
* FIXME 0.11: rename to _priv_gst_foo_init() so they don't get exported void _priv_gst_structure_initialize (void);
* (can't do this now because these functions used to be in our public void _priv_gst_caps_initialize (void);
* headers, so at least the symbols need to continue to be available unless void _priv_gst_event_initialize (void);
* we want enterprise edition packagers dancing on our heads) */ void _priv_gst_format_initialize (void);
void _gst_buffer_initialize (void); void _priv_gst_message_initialize (void);
void _gst_buffer_list_initialize (void); void _priv_gst_plugin_initialize (void);
void _gst_structure_initialize (void); void _priv_gst_query_initialize (void);
void _gst_caps_initialize (void); void _priv_gst_tag_initialize (void);
void _gst_event_initialize (void); void _priv_gst_value_initialize (void);
void _gst_format_initialize (void);
void _gst_message_initialize (void);
void _gst_plugin_initialize (void);
void _gst_query_initialize (void);
void _gst_tag_initialize (void);
void _gst_value_initialize (void);
/* Private registry functions */ /* Private registry functions */
gboolean _priv_gst_registry_remove_cache_plugins (GstRegistry *registry); gboolean _priv_gst_registry_remove_cache_plugins (GstRegistry *registry);
@ -126,9 +120,8 @@ void _priv_gst_element_state_changed (GstElement *element, GstState oldstate,
gboolean priv_gst_structure_append_to_gstring (const GstStructure * structure, gboolean priv_gst_structure_append_to_gstring (const GstStructure * structure,
GString * s); GString * s);
/* registry cache backends */ /* registry cache backends */
/* FIXME 0.11: use priv_ prefix */ gboolean priv_gst_registry_binary_read_cache (GstRegistry * registry, const char *location);
gboolean gst_registry_binary_read_cache (GstRegistry * registry, const char *location); gboolean priv_gst_registry_binary_write_cache (GstRegistry * registry, const char *location);
gboolean gst_registry_binary_write_cache (GstRegistry * registry, const char *location);
/* used in gstvalue.c and gststructure.c */ /* used in gstvalue.c and gststructure.c */
#define GST_ASCII_IS_STRING(c) (g_ascii_isalnum((c)) || ((c) == '_') || \ #define GST_ASCII_IS_STRING(c) (g_ascii_isalnum((c)) || ((c) == '_') || \

View file

@ -224,7 +224,7 @@ _memory_add (GstBuffer * buffer, guint idx, GstMemory * mem)
} }
void void
_gst_buffer_initialize (void) _priv_gst_buffer_initialize (void)
{ {
if (G_LIKELY (_gst_buffer_type == 0)) { if (G_LIKELY (_gst_buffer_type == 0)) {
_gst_buffer_type = gst_mini_object_register ("GstBuffer"); _gst_buffer_type = gst_mini_object_register ("GstBuffer");

View file

@ -55,7 +55,7 @@ struct _GstBufferList
GType _gst_buffer_list_type = 0; GType _gst_buffer_list_type = 0;
void void
_gst_buffer_list_initialize (void) _priv_gst_buffer_list_initialize (void)
{ {
if (G_LIKELY (_gst_buffer_list_type == 0)) { if (G_LIKELY (_gst_buffer_list_type == 0)) {
_gst_buffer_list_type = gst_mini_object_register ("GstBufferList"); _gst_buffer_list_type = gst_mini_object_register ("GstBufferList");

View file

@ -116,7 +116,7 @@ static gboolean gst_caps_from_string_inplace (GstCaps * caps,
GType _gst_caps_type = 0; GType _gst_caps_type = 0;
void void
_gst_caps_initialize (void) _priv_gst_caps_initialize (void)
{ {
_gst_caps_type = gst_mini_object_register ("GstCaps"); _gst_caps_type = gst_mini_object_register ("GstCaps");

View file

@ -129,7 +129,7 @@ static GstEventQuarks event_quarks[] = {
}; };
void void
_gst_event_initialize (void) _priv_gst_event_initialize (void)
{ {
gint i; gint i;

View file

@ -53,7 +53,7 @@ static GstFormatDefinition standard_definitions[] = {
}; };
void void
_gst_format_initialize (void) _priv_gst_format_initialize (void)
{ {
GstFormatDefinition *standards = standard_definitions; GstFormatDefinition *standards = standard_definitions;

View file

@ -110,7 +110,7 @@ static GstMessageQuarks message_quarks[] = {
}; };
void void
_gst_message_initialize (void) _priv_gst_message_initialize (void)
{ {
gint i; gint i;

View file

@ -298,7 +298,7 @@ gst_plugin_register_static_full (gint major_version, gint minor_version,
} }
void void
_gst_plugin_initialize (void) _priv_gst_plugin_initialize (void)
{ {
const gchar *whitelist; const gchar *whitelist;
guint i; guint i;

View file

@ -109,7 +109,7 @@ static GstQueryTypeDefinition standard_definitions[] = {
}; };
void void
_gst_query_initialize (void) _priv_gst_query_initialize (void)
{ {
GstQueryTypeDefinition *standards = standard_definitions; GstQueryTypeDefinition *standards = standard_definitions;

View file

@ -1571,7 +1571,7 @@ scan_and_update_registry (GstRegistry * default_registry,
} }
GST_INFO ("Registry cache changed. Writing new registry cache"); GST_INFO ("Registry cache changed. Writing new registry cache");
if (!gst_registry_binary_write_cache (default_registry, registry_file)) { if (!priv_gst_registry_binary_write_cache (default_registry, registry_file)) {
g_set_error (error, GST_CORE_ERROR, GST_CORE_ERROR_FAILED, g_set_error (error, GST_CORE_ERROR, GST_CORE_ERROR_FAILED,
_("Error writing registry cache to %s: %s"), _("Error writing registry cache to %s: %s"),
registry_file, g_strerror (errno)); registry_file, g_strerror (errno));
@ -1600,7 +1600,7 @@ ensure_current_registry (GError ** error)
if (!_gst_disable_registry_cache) { if (!_gst_disable_registry_cache) {
GST_INFO ("reading registry cache: %s", registry_file); GST_INFO ("reading registry cache: %s", registry_file);
have_cache = gst_registry_binary_read_cache (default_registry, have_cache = priv_gst_registry_binary_read_cache (default_registry,
registry_file); registry_file);
/* Only ever read the registry cache once, then disable it for /* Only ever read the registry cache once, then disable it for
* subsequent updates during the program lifetime */ * subsequent updates during the program lifetime */

View file

@ -353,7 +353,8 @@ gst_registry_binary_initialize_magic (GstBinaryRegistryMagic * m)
* Returns: %TRUE on success. * Returns: %TRUE on success.
*/ */
gboolean gboolean
gst_registry_binary_write_cache (GstRegistry * registry, const char *location) priv_gst_registry_binary_write_cache (GstRegistry * registry,
const char *location)
{ {
GList *walk; GList *walk;
GstBinaryRegistryMagic magic; GstBinaryRegistryMagic magic;
@ -503,7 +504,8 @@ fail:
* Returns: %TRUE on success. * Returns: %TRUE on success.
*/ */
gboolean gboolean
gst_registry_binary_read_cache (GstRegistry * registry, const char *location) priv_gst_registry_binary_read_cache (GstRegistry * registry,
const char *location)
{ {
GMappedFile *mapped = NULL; GMappedFile *mapped = NULL;
gchar *contents = NULL; gchar *contents = NULL;

View file

@ -114,7 +114,7 @@ static gboolean gst_structure_parse_simple_string (gchar * s, gchar ** end);
GType _gst_structure_type = 0; GType _gst_structure_type = 0;
void void
_gst_structure_initialize (void) _priv_gst_structure_initialize (void)
{ {
_gst_structure_type = g_boxed_type_register_static ("GstStructure", _gst_structure_type = g_boxed_type_register_static ("GstStructure",
(GBoxedCopyFunc) gst_structure_copy_conditional, (GBoxedCopyFunc) gst_structure_copy_conditional,

View file

@ -89,7 +89,7 @@ gst_tag_list_get_type (void)
} }
void void
_gst_tag_initialize (void) _priv_gst_tag_initialize (void)
{ {
__tag_mutex = g_mutex_new (); __tag_mutex = g_mutex_new ();
__tags = g_hash_table_new (g_direct_hash, g_direct_equal); __tags = g_hash_table_new (g_direct_hash, g_direct_equal);

View file

@ -4689,7 +4689,7 @@ gst_date_time_get_type (void)
void void
_gst_value_initialize (void) _priv_gst_value_initialize (void)
{ {
gst_value_table = g_array_new (FALSE, FALSE, sizeof (GstValueTable)); gst_value_table = g_array_new (FALSE, FALSE, sizeof (GstValueTable));
gst_value_hash = g_hash_table_new (NULL, NULL); gst_value_hash = g_hash_table_new (NULL, NULL);

View file

@ -33,7 +33,6 @@ EXPORTS
__gst_debug_enabled DATA __gst_debug_enabled DATA
__gst_debug_min DATA __gst_debug_min DATA
_gst_alloc_trace_register _gst_alloc_trace_register
_gst_buffer_list_initialize
_gst_buffer_list_type DATA _gst_buffer_list_type DATA
_gst_buffer_type DATA _gst_buffer_type DATA
_gst_caps_type DATA _gst_caps_type DATA
@ -912,8 +911,6 @@ EXPORTS
gst_registry_add_feature gst_registry_add_feature
gst_registry_add_path gst_registry_add_path
gst_registry_add_plugin gst_registry_add_plugin
gst_registry_binary_read_cache
gst_registry_binary_write_cache
gst_registry_feature_filter gst_registry_feature_filter
gst_registry_find_feature gst_registry_find_feature
gst_registry_find_plugin gst_registry_find_plugin