+2005-05-30 Wim Taymans <wim@fluendo.com>
+
+ * gst/gstbuffer.c: (gst_subbuffer_finalize),
+ (gst_buffer_create_sub), (gst_buffer_is_span_fast):
+ * gst/gstbuffer.h:
+ Avoid typechecking in places where not needed.
+ Added accessor for malloc_data.
+
2005-05-30 Wim Taymans <wim@fluendo.com>
* gst/gstpad.c: (gst_real_pad_init), (gst_pad_set_active),
parent);
/* set the right values in the child */
- GST_BUFFER_DATA (GST_BUFFER (subbuffer)) = buffer->data + offset;
- GST_BUFFER_SIZE (GST_BUFFER (subbuffer)) = size;
+ GST_BUFFER_DATA (GST_BUFFER_CAST (subbuffer)) = buffer->data + offset;
+ GST_BUFFER_SIZE (GST_BUFFER_CAST (subbuffer)) = size;
/* we can copy the timestamp and offset if the new buffer starts at
* offset 0 */
GST_BUFFER_CAPS (subbuffer) = NULL;
- return GST_BUFFER (subbuffer);
+ return GST_BUFFER_CAST (subbuffer);
}
/**
#define GST_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BUFFER, GstBufferClass))
#define GST_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_BUFFER, GstBuffer))
#define GST_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_BUFFER, GstBufferClass))
+#define GST_BUFFER_CAST(obj) ((GstBuffer *)(obj))
#define GST_BUFFER_FLAGS(buf) GST_MINI_OBJECT_FLAGS(buf)
#define GST_BUFFER_FLAG_IS_SET(buf,flag) GST_MINI_OBJECT_FLAG_IS_SET (buf, flag)
#define GST_BUFFER_CAPS(buf) (GST_BUFFER(buf)->caps)
#define GST_BUFFER_OFFSET(buf) (GST_BUFFER(buf)->offset)
#define GST_BUFFER_OFFSET_END(buf) (GST_BUFFER(buf)->offset_end)
+#define GST_BUFFER_MALLOCDATA(buf) (GST_BUFFER(buf)->malloc_data)
#define GST_BUFFER_OFFSET_NONE ((guint64)-1)
#define GST_BUFFER_MAXSIZE_NONE ((guint)0)