gstreamer_core/libs/gst/dataprotocol/dataprotocol.c
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
--- a/gstreamer_core/libs/gst/dataprotocol/dataprotocol.c	Tue Aug 31 15:30:33 2010 +0300
+++ b/gstreamer_core/libs/gst/dataprotocol/dataprotocol.c	Wed Sep 01 12:16:41 2010 +0100
@@ -85,7 +85,7 @@
 
 /* helper macros */
 
-/* write first 6 bytes of header */
+/* write first 6 bytes of header, as well as ABI padding */
 #define GST_DP_INIT_HEADER(h, version, flags, type)		\
 G_STMT_START {							\
   gint maj = 0, min = 0;					\
@@ -98,6 +98,9 @@
   h[2] = (guint8) flags;					\
   h[3] = 0; /* padding byte */					\
   GST_WRITE_UINT16_BE (h + 4, type);				\
+								\
+  GST_WRITE_UINT64_BE (h + 42, (guint64) 0); /* ABI padding */	\
+  GST_WRITE_UINT64_BE (h + 50, (guint64) 0); /* ABI padding */	\
 } G_STMT_END
 
 #define GST_DP_SET_CRC(h, flags, payload, length);		\
@@ -128,6 +131,7 @@
 
 /*** HELPER FUNCTIONS ***/
 
+
 static gboolean
 gst_dp_header_from_buffer_any (const GstBuffer * buffer, GstDPHeaderFlag flags,
     guint * length, guint8 ** header, GstDPVersion version)
@@ -221,8 +225,7 @@
 #if defined(__WINSCW__) || defined(__WINS__)
   /* version, flags, type */
   GST_DP_INIT_HEADER (h, version, flags, GST_DP_PAYLOAD_CAPS);
-
-  /* buffer properties */
+  
   GST_WRITE_UINT32_BE (h + 6, payload_length);
   GST_WRITE_UINT64_BE (h + 10, (guint64) 0);
   GST_WRITE_UINT64_BE (h + 18, (guint64) 0);
@@ -597,6 +600,7 @@
       GST_DP_PAYLOAD_EVENT_NONE + GST_EVENT_TYPE (event));
 
   /* length */
+  
   GST_WRITE_UINT32_BE (h + 6, (guint32) pl_length);
   /* timestamp */
   GST_WRITE_UINT64_BE (h + 10, GST_EVENT_TIMESTAMP (event));
@@ -675,7 +679,7 @@
   /* timestamp */
   GST_WRITE_UINT64_BE (h + 10, GST_EVENT_TIMESTAMP (event));
 
-  GST_DP_SET_CRC (h, flags, string, pl_length);
+  GST_DP_SET_CRC (h, flags, *payload, pl_length);
 
   GST_LOG ("created header from event:");
   gst_dp_dump_byte_array (h, GST_DP_HEADER_LENGTH);
@@ -693,7 +697,7 @@
     tmp = tmp + 10;
     GST_WRITE_UINT64_BE (tmp, GST_EVENT_TIMESTAMP (event));
 
-    GST_DP_SET_CRC ((guint8 *)h, flags, string, pl_length);
+    GST_DP_SET_CRC ((guint8 *)h, flags, *payload, pl_length);
 
     GST_LOG ("created header from event:");
     gst_dp_dump_byte_array ((guint8 *)h, GST_DP_HEADER_LENGTH);