fixes for gstbuffer, and removed ## from gstcaps.h that was causing all that warning... BRANCH-PLUGINVER1-20010422-ROOT PLUGINVER1-20010422-FREEZE
authorErik Walthinsen <omega@temple-baptist.org>
Sun, 22 Apr 2001 04:38:36 +0000 (04:38 +0000)
committerErik Walthinsen <omega@temple-baptist.org>
Sun, 22 Apr 2001 04:38:36 +0000 (04:38 +0000)
Original commit message from CVS:
fixes for gstbuffer, and removed ## from gstcaps.h that was causing all that warning noise

gst/gstbuffer.c
gst/gstbuffer.h
gst/gstcaps.h

index 8e76f5a68c2fe1a943f3d5882cce988d3b4577a1..6993391efa374116673d168db54ccc94d32ba5e9 100644 (file)
@@ -64,7 +64,6 @@ gst_buffer_new(void)
   buffer->refcount = 1;
 #endif
   buffer->flags = 0;
-  buffer->type = 0;
   buffer->data = NULL;
   buffer->size = 0;
   buffer->maxsize = 0;
@@ -126,7 +125,6 @@ gst_buffer_create_sub (GstBuffer *parent,
 
   // copy flags and type from parent, for lack of better
   buffer->flags = parent->flags;
-  buffer->type = parent->type;
 
   // set the data pointer, size, offset, and maxsize
   buffer->data = parent->data + offset;
@@ -414,7 +412,7 @@ gst_buffer_copy (GstBuffer *buffer)
   newbuf = gst_buffer_new();
   GST_BUFFER_SIZE(newbuf) = GST_BUFFER_SIZE(buffer);
   GST_BUFFER_DATA(newbuf) = malloc(GST_BUFFER_SIZE(buffer));
-  memcpy(GST_BUFFER_DATA(newbuf),GST_BUFFER_DATA(buf),GST_BUFFER_SIZE(buffer));
+  memcpy(GST_BUFFER_DATA(newbuf),GST_BUFFER_DATA(buffer),GST_BUFFER_SIZE(buffer));
   GST_BUFFER_MAXSIZE(newbuf) = GST_BUFFER_MAXSIZE(buffer);
   GST_BUFFER_OFFSET(newbuf) = GST_BUFFER_OFFSET(buffer);
   GST_BUFFER_TIMESTAMP(newbuf) = GST_BUFFER_TIMESTAMP(buffer);
index 1a89f9a8ab66e2c3e7cb0793e3d66274fede886d..0c8f224f1723c3a8bfd83d954d379dde3ebd62e5 100644 (file)
@@ -54,13 +54,14 @@ extern "C" {
   G_STMT_START{ (GST_BUFFER_FLAGS(buf) &= ~(1<<(flag))); }G_STMT_END
 
 
-#define GST_BUFFER_TYPE(buf)           (GST_BUFFER(buf)->type)
 #define GST_BUFFER_DATA(buf)           (GST_BUFFER(buf)->data)
 #define GST_BUFFER_SIZE(buf)           (GST_BUFFER(buf)->size)
 #define GST_BUFFER_OFFSET(buf)         (GST_BUFFER(buf)->offset)
 #define GST_BUFFER_MAXSIZE(buf)                (GST_BUFFER(buf)->maxsize)
 #define GST_BUFFER_TIMESTAMP(buf)      (GST_BUFFER(buf)->timestamp)
+#define GST_BUFFER_MAXAGE(buf)         (GST_BUFFER(buf)->maxage)
 #define GST_BUFFER_BUFFERPOOL(buf)     (GST_BUFFER(buf)->pool)
+#define GST_BUFFER_PARENT(buf)         (GST_BUFFER(buf)->parent)
 #define GST_BUFFER_POOL_PRIVATE(buf)   (GST_BUFFER(buf)->pool_private)
 
 
@@ -96,8 +97,6 @@ struct _GstBuffer {
 #define GST_BUFFER_REFCOUNT(buf)       (GST_BUFFER(buf)->refcount)
 #endif
 
-  /* data type of this buffer */
-  guint16 type;
   /* flags */
   guint16 flags;
 
index 50afb3d88a00d3fd491a2c775f5fca9caa150e28..2665a8d7d524fa37cc150566c217033694f6d97c 100644 (file)
@@ -61,7 +61,7 @@ gst_caps_new (                                  \
   name,                                         \
   type,                                         \
   gst_props_new (                               \
-    ##a,                                        \
+    a,                                        \
     NULL))
 
 #define GST_CAPS_FACTORY(factoryname, a...)    \
@@ -70,7 +70,7 @@ factoryname (void)                              \
 {                                               \
   static GstCaps *caps = NULL;                 \
   if (!caps) {                                 \
-    caps = gst_caps_chain (##a, NULL);         \
+    caps = gst_caps_chain (a, NULL);           \
   }                                             \
   return caps;                                 \
 }