tests: don't use deprecated GLib API g_mapped_file_free
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 21 Dec 2009 07:50:26 +0000 (07:50 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 21 Dec 2009 07:50:26 +0000 (07:50 +0000)
Fixes #605100.

tests/examples/app/appsrc-ra.c
tests/examples/app/appsrc-seekable.c
tests/examples/app/appsrc-stream.c
tests/examples/app/appsrc-stream2.c

index 973dabe..46b19ca 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 
+/* FIXME: remove once we depend on GLib >= 2.22 */
+#if !GLIB_CHECK_VERSION (2, 22, 0)
+#define g_mapped_file_unref g_mapped_file_free
+#endif
+
 GST_DEBUG_CATEGORY (appsrc_playbin_debug);
 #define GST_CAT_DEFAULT appsrc_playbin_debug
 
@@ -215,7 +220,7 @@ main (int argc, char *argv[])
   gst_element_set_state (app->playbin, GST_STATE_NULL);
 
   /* free the file */
-  g_mapped_file_free (app->file);
+  g_mapped_file_unref (app->file);
 
   gst_object_unref (bus);
   g_main_loop_unref (app->loop);
index e09a58e..adff5bb 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 
+/* FIXME: remove once we depend on GLib >= 2.22 */
+#if !GLIB_CHECK_VERSION (2, 22, 0)
+#define g_mapped_file_unref g_mapped_file_free
+#endif
+
 GST_DEBUG_CATEGORY (appsrc_playbin_debug);
 #define GST_CAT_DEFAULT appsrc_playbin_debug
 
@@ -220,7 +225,7 @@ main (int argc, char *argv[])
   gst_element_set_state (app->playbin, GST_STATE_NULL);
 
   /* free the file */
-  g_mapped_file_free (app->file);
+  g_mapped_file_unref (app->file);
 
   gst_object_unref (bus);
   g_main_loop_unref (app->loop);
index 7038cd3..ea3286f 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 
+/* FIXME: remove once we depend on GLib >= 2.22 */
+#if !GLIB_CHECK_VERSION (2, 22, 0)
+#define g_mapped_file_unref g_mapped_file_free
+#endif
+
 GST_DEBUG_CATEGORY (appsrc_playbin_debug);
 #define GST_CAT_DEFAULT appsrc_playbin_debug
 
@@ -240,7 +245,7 @@ main (int argc, char *argv[])
   gst_element_set_state (app->playbin, GST_STATE_NULL);
 
   /* free the file */
-  g_mapped_file_free (app->file);
+  g_mapped_file_unref (app->file);
 
   gst_object_unref (bus);
   g_main_loop_unref (app->loop);
index dc1d8ca..e0c8922 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 
+/* FIXME: remove once we depend on GLib >= 2.22 */
+#if !GLIB_CHECK_VERSION (2, 22, 0)
+#define g_mapped_file_unref g_mapped_file_free
+#endif
+
 GST_DEBUG_CATEGORY (appsrc_playbin_debug);
 #define GST_CAT_DEFAULT appsrc_playbin_debug
 
@@ -210,7 +215,7 @@ main (int argc, char *argv[])
   gst_element_set_state (app->playbin, GST_STATE_NULL);
 
   /* free the file */
-  g_mapped_file_free (app->file);
+  g_mapped_file_unref (app->file);
 
   gst_object_unref (bus);
   g_main_loop_unref (app->loop);