API: make gst_dp_crc() public
authorThomas Vander Stichele <thomas@apestaart.org>
Fri, 2 Jun 2006 10:08:31 +0000 (10:08 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Fri, 2 Jun 2006 10:08:31 +0000 (10:08 +0000)
Original commit message from CVS:

* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/tmpl/gstdataprotocol.sgml:
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_crc):
* libs/gst/dataprotocol/dataprotocol.h:
API: make gst_dp_crc() public

ChangeLog
docs/libs/gstreamer-libs-sections.txt
docs/libs/tmpl/gstdataprotocol.sgml
libs/gst/dataprotocol/dataprotocol.c
libs/gst/dataprotocol/dataprotocol.h

index 9445785..c1901fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-06-02  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       * docs/libs/gstreamer-libs-sections.txt:
+       * docs/libs/tmpl/gstdataprotocol.sgml:
+       * libs/gst/dataprotocol/dataprotocol.c: (gst_dp_crc):
+       * libs/gst/dataprotocol/dataprotocol.h:
+         API: make gst_dp_crc() public
+
 2006-06-01  Stefan Kost  <ensonic@users.sf.net>
 
        * plugins/indexers/gstindexers.c: (plugin_init):
index 03edbf3..4b1d3e0 100644 (file)
@@ -25,6 +25,8 @@ GST_DP_VERSION_MINOR
 
 gst_dp_init
 
+gst_dp_crc
+
 gst_dp_header_payload_length
 gst_dp_header_payload_type
 
index c5446c9..b60af0d 100644 (file)
@@ -78,6 +78,16 @@ network connections also need a protocol to do this.
 
 
 
+<!-- ##### FUNCTION gst_dp_crc ##### -->
+<para>
+
+</para>
+
+@buffer: 
+@length: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gst_dp_header_payload_length ##### -->
 <para>
 
index 6d06246..8453b3c 100644 (file)
@@ -46,8 +46,17 @@ GST_DEBUG_CATEGORY (data_protocol_debug);
 #define POLY       0x1021
 #define CRC_INIT   0xFFFF
 
-static guint16
-gst_dp_crc (const guint8 * buffer, register guint length)
+/**
+ * gst_dp_crc:
+ *
+ * Calculate a CRC for the given buffer over the given number of bytes.
+ * This is only provided for verification purposes; typical GDP users
+ * will not need this function.
+ *
+ * Returns: a two-byte CRC checksum.
+ */
+guint16
+gst_dp_crc (const guint8 * buffer, guint length)
 {
   static gboolean initialized = FALSE;
   static guint16 crc_table[256];
index 0f60248..25c09c6 100644 (file)
@@ -84,6 +84,10 @@ typedef enum {
 
 void           gst_dp_init                     (void);
 
+/* crc checksum */
+guint16         gst_dp_crc                      (const guint8 * buffer,
+                                                 guint length);
+
 /* payload information from header */
 guint32                gst_dp_header_payload_length    (const guint8 * header);
 GstDPPayloadType