From bae61bae48eed73797cc51dbc7f0059a66e11501 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 31 Mar 2011 18:40:48 +0200 Subject: [PATCH] fixes for new API --- tests/check/libs/libsabi.c | 4 ++++ tests/check/libs/struct_x86_64.h | 4 ---- tests/check/libs/xmpwriter.c | 19 +++++++++++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/tests/check/libs/libsabi.c b/tests/check/libs/libsabi.c index 513126be36..bebd67dcac 100644 --- a/tests/check/libs/libsabi.c +++ b/tests/check/libs/libsabi.c @@ -98,6 +98,10 @@ #endif #endif +/* disabled for 0.11 */ +#undef HAVE_ABI_SIZES +#define HAVE_ABI_SIZES FALSE + GST_START_TEST (test_ABI) { gst_check_abi_list (list, HAVE_ABI_SIZES); diff --git a/tests/check/libs/struct_x86_64.h b/tests/check/libs/struct_x86_64.h index 3029e56457..ad8bc7c2a4 100644 --- a/tests/check/libs/struct_x86_64.h +++ b/tests/check/libs/struct_x86_64.h @@ -1,7 +1,5 @@ GstCheckABIStruct list[] = { - {"GstAppBufferClass", sizeof (GstAppBufferClass), 32}, - {"GstAppBuffer", sizeof (GstAppBuffer), 136}, {"GstAppSinkCallbacks", sizeof (GstAppSinkCallbacks), 56}, {"GstAppSinkClass", sizeof (GstAppSinkClass), 800}, {"GstAppSink", sizeof (GstAppSink), 640}, @@ -49,8 +47,6 @@ GstCheckABIStruct list[] = { {"GstMixerTrack", sizeof (GstMixerTrack), 48}, {"GstNavigationInterface", sizeof (GstNavigationInterface), 56}, {"GstNetAddress", sizeof (GstNetAddress), 56}, - {"GstNetBufferClass", sizeof (GstNetBufferClass), 64}, - {"GstNetBuffer", sizeof (GstNetBuffer), 264}, {"GstPropertyProbeInterface", sizeof (GstPropertyProbeInterface), 88}, {"gst_riff_acid", sizeof (gst_riff_acid), 24}, {"gst_riff_dmlh", sizeof (gst_riff_dmlh), 4}, diff --git a/tests/check/libs/xmpwriter.c b/tests/check/libs/xmpwriter.c index 99b84ae855..3227b077df 100644 --- a/tests/check/libs/xmpwriter.c +++ b/tests/check/libs/xmpwriter.c @@ -143,11 +143,22 @@ tag_list_equals (GstTagList * taglist, GstTagList * taglist2) static gboolean gst_buffer_equals (GstBuffer * buf_a, GstBuffer * buf_b) { - if (GST_BUFFER_SIZE (buf_a) != GST_BUFFER_SIZE (buf_b)) - return FALSE; + gboolean res; + gpointer data1, data2; + gsize size1, size2; - return memcmp (GST_BUFFER_DATA (buf_a), GST_BUFFER_DATA (buf_b), - GST_BUFFER_SIZE (buf_a)) == 0; + data1 = gst_buffer_map (buf_a, &size1, NULL, GST_MAP_READ); + data2 = gst_buffer_map (buf_b, &size2, NULL, GST_MAP_READ); + + if (size1 == size2) { + res = memcmp (data1, data2, size1) == 0; + } else { + res = FALSE; + } + gst_buffer_unmap (buf_a, data1, size1); + gst_buffer_unmap (buf_b, data2, size2); + + return res; } static GstTagList *