GstCheckABIStruct list[] = {
- {"GstAppBufferClass", sizeof (GstAppBufferClass), 32},
- {"GstAppBuffer", sizeof (GstAppBuffer), 136},
{"GstAppSinkCallbacks", sizeof (GstAppSinkCallbacks), 56},
{"GstAppSinkClass", sizeof (GstAppSinkClass), 800},
{"GstAppSink", sizeof (GstAppSink), 640},
{"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},
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 *