debug: Add a memory ringbuffer based debug logger
[platform/upstream/gstreamer.git] / gst / gst_private.h
index 8c9cb4b..e88bb60 100644 (file)
@@ -38,6 +38,9 @@ extern const char             g_log_domain_gstreamer[];
 #include <stdlib.h>
 #include <string.h>
 
+/* Needed for GST_EXPORT */
+#include "gst/gstconfig.h"
+
 /* Needed for GstRegistry * */
 #include "gstregistry.h"
 #include "gststructure.h"
@@ -62,6 +65,8 @@ extern const char             g_log_domain_gstreamer[];
 
 #include "gstdatetime.h"
 
+#include "gsttracerutils.h"
+
 G_BEGIN_DECLS
 
 /* used by gstparse.c and grammar.y */
@@ -92,7 +97,7 @@ G_GNUC_INTERNAL  gboolean priv_gst_plugin_loading_have_whitelist (void);
 
 G_GNUC_INTERNAL  guint32  priv_gst_plugin_loading_get_whitelist_hash (void);
 
-G_GNUC_INTERNAL  gboolean priv_gst_plugin_desc_is_whitelisted (GstPluginDesc * desc,
+G_GNUC_INTERNAL  gboolean priv_gst_plugin_desc_is_whitelisted (const GstPluginDesc * desc,
                                                                const gchar   * filename);
 
 G_GNUC_INTERNAL  gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin);
@@ -125,14 +130,36 @@ G_GNUC_INTERNAL  void  _priv_gst_context_initialize (void);
 G_GNUC_INTERNAL  void  _priv_gst_toc_initialize (void);
 G_GNUC_INTERNAL  void  _priv_gst_date_time_initialize (void);
 
+/* cleanup functions called from gst_deinit(). */
+G_GNUC_INTERNAL  void  _priv_gst_allocator_cleanup (void);
+G_GNUC_INTERNAL  void  _priv_gst_caps_features_cleanup (void);
+G_GNUC_INTERNAL  void  _priv_gst_caps_cleanup (void);
+
+/* called from gst_task_cleanup_all(). */
+G_GNUC_INTERNAL  void  _priv_gst_element_cleanup (void);
+
 /* Private registry functions */
 G_GNUC_INTERNAL
 gboolean _priv_gst_registry_remove_cache_plugins (GstRegistry *registry);
 
 G_GNUC_INTERNAL  void _priv_gst_registry_cleanup (void);
 
+GST_EXPORT
 gboolean _gst_plugin_loader_client_run (void);
 
+G_GNUC_INTERNAL  GstPlugin * _priv_gst_plugin_load_file_for_registry (const gchar *filename,
+                                                                      GstRegistry * registry,
+                                                                      GError** error);
+
+/* GValue serialization/deserialization */
+
+G_GNUC_INTERNAL const char * _priv_gst_value_gtype_to_abbr (GType type);
+
+G_GNUC_INTERNAL gboolean _priv_gst_value_parse_string (gchar * s, gchar ** end, gchar ** next, gboolean unescape);
+G_GNUC_INTERNAL gboolean _priv_gst_value_parse_simple_string (gchar * str, gchar ** end);
+G_GNUC_INTERNAL gboolean _priv_gst_value_parse_value (gchar * str, gchar ** after, GValue * value, GType default_type);
+G_GNUC_INTERNAL gchar * _priv_gst_value_serialize_any_list (const GValue * value, const gchar * begin, const gchar * end, gboolean print_type);
+
 /* Used in GstBin for manual state handling */
 G_GNUC_INTERNAL  void _priv_gst_element_state_changed (GstElement *element,
                       GstState oldstate, GstState newstate, GstState pending);
@@ -145,6 +172,11 @@ G_GNUC_INTERNAL
 gboolean  priv_gst_structure_append_to_gstring (const GstStructure * structure,
                                                 GString            * s);
 G_GNUC_INTERNAL
+gboolean priv__gst_structure_append_template_to_gstring (GQuark field_id,
+                                                        const GValue *value,
+                                                        gpointer user_data);
+
+G_GNUC_INTERNAL
 void priv_gst_caps_features_append_to_gstring (const GstCapsFeatures * features, GString *s);
 
 G_GNUC_INTERNAL
@@ -152,6 +184,13 @@ gboolean priv_gst_structure_parse_name (gchar * str, gchar **start, gchar ** end
 G_GNUC_INTERNAL
 gboolean priv_gst_structure_parse_fields (gchar *str, gchar ** end, GstStructure *structure);
 
+/* used in gstvalue.c and gststructure.c */
+
+#define GST_WRAPPED_PTR_FORMAT     "p\aa"
+
+G_GNUC_INTERNAL
+gchar *priv_gst_string_take_and_wrap (gchar * s);
+
 /* registry cache backends */
 G_GNUC_INTERNAL
 gboolean               priv_gst_registry_binary_read_cache     (GstRegistry * registry, const char *location);
@@ -180,14 +219,13 @@ gint __gst_date_time_compare (const GstDateTime * dt1, const GstDateTime * dt2);
 G_GNUC_INTERNAL
 gchar * __gst_date_time_serialize (GstDateTime * datetime, gboolean with_usecs);
 
-/* Non-static, for access from the testsuite, but not for external use */
-gboolean
-_priv_gst_do_linear_regression (GstClockTime *times, guint n,
-    GstClockTime * m_num, GstClockTime * m_denom, GstClockTime * b,
-    GstClockTime * xbase, gdouble * r_squared);
+/* For use in gstdebugutils */
+G_GNUC_INTERNAL
+GstCapsFeatures * __gst_caps_get_features_unchecked (const GstCaps * caps, guint idx);
 
 #ifndef GST_DISABLE_REGISTRY
 /* Secret variable to initialise gst without registry cache */
+
 GST_EXPORT gboolean _gst_disable_registry_cache;
 #endif
 
@@ -250,7 +288,10 @@ GST_EXPORT GstDebugCategory *GST_CAT_CONTEXT;
 #define GST_CAT_POLL _priv_GST_CAT_POLL
 extern GstDebugCategory *_priv_GST_CAT_POLL;
 
-extern GstClockTime _priv_gst_info_start_time;
+#define GST_CAT_PROTECTION _priv_GST_CAT_PROTECTION
+extern GstDebugCategory *_priv_GST_CAT_PROTECTION;
+
+extern GstClockTime _priv_gst_start_time;
 
 #else
 
@@ -289,6 +330,7 @@ extern GstClockTime _priv_gst_info_start_time;
 #define GST_CAT_META             NULL
 #define GST_CAT_LOCKING          NULL
 #define GST_CAT_CONTEXT          NULL
+#define GST_CAT_PROTECTION       NULL
 
 #endif
 
@@ -313,8 +355,6 @@ struct _GstPlugin {
   /*< private >*/
   GstPluginDesc        desc;
 
-  GstPluginDesc *orig_desc;
-
   gchar *      filename;
   gchar *      basename;       /* base name (non-dir part) of plugin path */
 
@@ -381,6 +421,27 @@ struct _GstTypeFindFactoryClass {
   gpointer _gst_reserved[GST_PADDING];
 };
 
+struct _GstTracerFactory {
+  GstPluginFeature              feature;
+  /* <private> */
+
+  GType                         type;
+
+  /*
+  gpointer                      user_data;
+  GDestroyNotify                user_data_notify;
+  */
+
+  gpointer _gst_reserved[GST_PADDING];
+};
+
+struct _GstTracerFactoryClass {
+  GstPluginFeatureClass         parent;
+  /* <private> */
+
+  gpointer _gst_reserved[GST_PADDING];
+};
+
 struct _GstElementFactory {
   GstPluginFeature      parent;
 
@@ -426,5 +487,18 @@ struct _GstDeviceProviderFactoryClass {
   gpointer _gst_reserved[GST_PADDING];
 };
 
+struct _GstDynamicTypeFactory {
+  GstPluginFeature           feature;
+
+  GType                      type; /* GType of the type, when loaded. 0 if not */
+};
+
+struct _GstDynamicTypeFactoryClass {
+  GstPluginFeatureClass      parent;
+};
+
+/* privat flag used by GstBus / GstMessage */
+#define GST_MESSAGE_FLAG_ASYNC_DELIVERY (GST_MINI_OBJECT_FLAG_LAST << 0)
+
 G_END_DECLS
 #endif /* __GST_PRIVATE_H__ */