debug: Add a memory ringbuffer based debug logger
[platform/upstream/gstreamer.git] / gst / gstregistrybinary.c
index 5848066..f7cc991 100644 (file)
@@ -18,8 +18,8 @@
  *
  * 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.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 /* FIXME:
@@ -56,6 +56,8 @@
 #include <gst/gstelement.h>
 #include <gst/gsttypefind.h>
 #include <gst/gsttypefindfactory.h>
+#include <gst/gstdeviceproviderfactory.h>
+#include <gst/gstdynamictypefactory.h>
 #include <gst/gsturi.h>
 #include <gst/gstinfo.h>
 #include <gst/gstenumtypes.h>
@@ -355,7 +357,8 @@ gst_registry_binary_initialize_magic (GstBinaryRegistryMagic * m)
  * Returns: %TRUE on success.
  */
 gboolean
-gst_registry_binary_write_cache (GstRegistry * registry, const char *location)
+priv_gst_registry_binary_write_cache (GstRegistry * registry, GList * plugins,
+    const char *location)
 {
   GList *walk;
   GstBinaryRegistryMagic magic;
@@ -371,13 +374,13 @@ gst_registry_binary_write_cache (GstRegistry * registry, const char *location)
     goto fail;
 
   /* iterate trough the list of plugins and fit them into binary structures */
-  for (walk = registry->plugins; walk; walk = g_list_next (walk)) {
+  for (walk = plugins; walk != NULL; walk = walk->next) {
     GstPlugin *plugin = GST_PLUGIN (walk->data);
 
     if (!plugin->filename)
       continue;
 
-    if (plugin->flags & GST_PLUGIN_FLAG_CACHED) {
+    if (GST_OBJECT_FLAG_IS_SET (plugin, GST_PLUGIN_FLAG_CACHED)) {
       GStatBuf statbuf;
 
       if (g_stat (plugin->filename, &statbuf) < 0 ||
@@ -505,7 +508,8 @@ fail:
  * Returns: %TRUE on success.
  */
 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;
   gchar *contents = NULL;
@@ -523,7 +527,8 @@ gst_registry_binary_read_cache (GstRegistry * registry, const char *location)
   /* make sure these types exist */
   GST_TYPE_ELEMENT_FACTORY;
   GST_TYPE_TYPE_FIND_FACTORY;
-  GST_TYPE_INDEX_FACTORY;
+  GST_TYPE_DEVICE_PROVIDER_FACTORY;
+  GST_TYPE_DYNAMIC_TYPE_FACTORY;
 
 #ifndef GST_DISABLE_GST_DEBUG
   timer = g_timer_new ();
@@ -629,27 +634,3 @@ Error:
   }
   return res;
 }
-
-#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
-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)
-{
-  return FALSE;
-}
-#endif /* GST_REMOVE_DEPRECATED */