fixes for new API

This commit is contained in:
Wim Taymans 2011-03-31 18:40:48 +02:00
parent d96a8c1aa7
commit bae61bae48
3 changed files with 19 additions and 8 deletions

View file

@ -98,6 +98,10 @@
#endif #endif
#endif #endif
/* disabled for 0.11 */
#undef HAVE_ABI_SIZES
#define HAVE_ABI_SIZES FALSE
GST_START_TEST (test_ABI) GST_START_TEST (test_ABI)
{ {
gst_check_abi_list (list, HAVE_ABI_SIZES); gst_check_abi_list (list, HAVE_ABI_SIZES);

View file

@ -1,7 +1,5 @@
GstCheckABIStruct list[] = { GstCheckABIStruct list[] = {
{"GstAppBufferClass", sizeof (GstAppBufferClass), 32},
{"GstAppBuffer", sizeof (GstAppBuffer), 136},
{"GstAppSinkCallbacks", sizeof (GstAppSinkCallbacks), 56}, {"GstAppSinkCallbacks", sizeof (GstAppSinkCallbacks), 56},
{"GstAppSinkClass", sizeof (GstAppSinkClass), 800}, {"GstAppSinkClass", sizeof (GstAppSinkClass), 800},
{"GstAppSink", sizeof (GstAppSink), 640}, {"GstAppSink", sizeof (GstAppSink), 640},
@ -49,8 +47,6 @@ GstCheckABIStruct list[] = {
{"GstMixerTrack", sizeof (GstMixerTrack), 48}, {"GstMixerTrack", sizeof (GstMixerTrack), 48},
{"GstNavigationInterface", sizeof (GstNavigationInterface), 56}, {"GstNavigationInterface", sizeof (GstNavigationInterface), 56},
{"GstNetAddress", sizeof (GstNetAddress), 56}, {"GstNetAddress", sizeof (GstNetAddress), 56},
{"GstNetBufferClass", sizeof (GstNetBufferClass), 64},
{"GstNetBuffer", sizeof (GstNetBuffer), 264},
{"GstPropertyProbeInterface", sizeof (GstPropertyProbeInterface), 88}, {"GstPropertyProbeInterface", sizeof (GstPropertyProbeInterface), 88},
{"gst_riff_acid", sizeof (gst_riff_acid), 24}, {"gst_riff_acid", sizeof (gst_riff_acid), 24},
{"gst_riff_dmlh", sizeof (gst_riff_dmlh), 4}, {"gst_riff_dmlh", sizeof (gst_riff_dmlh), 4},

View file

@ -143,11 +143,22 @@ tag_list_equals (GstTagList * taglist, GstTagList * taglist2)
static gboolean static gboolean
gst_buffer_equals (GstBuffer * buf_a, GstBuffer * buf_b) gst_buffer_equals (GstBuffer * buf_a, GstBuffer * buf_b)
{ {
if (GST_BUFFER_SIZE (buf_a) != GST_BUFFER_SIZE (buf_b)) gboolean res;
return FALSE; gpointer data1, data2;
gsize size1, size2;
return memcmp (GST_BUFFER_DATA (buf_a), GST_BUFFER_DATA (buf_b), data1 = gst_buffer_map (buf_a, &size1, NULL, GST_MAP_READ);
GST_BUFFER_SIZE (buf_a)) == 0; 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 * static GstTagList *