=== modified file 'docs/gst/gstreamer-docs.sgml'
--- docs/gst/gstreamer-docs.sgml	2008-07-31 14:35:19 +0000
+++ docs/gst/gstreamer-docs.sgml	2008-07-31 15:28:33 +0000
@@ -42,6 +42,7 @@
 <!ENTITY GstRegistry SYSTEM "xml/gstregistry.xml">
 <!ENTITY GstSegment SYSTEM "xml/gstsegment.xml">
 <!ENTITY GstStructure SYSTEM "xml/gststructure.xml">
+<!ENTITY GstSubBuffer SYSTEM "xml/gstsubbuffer.xml">
 <!ENTITY GstSystemClock SYSTEM "xml/gstsystemclock.xml">
 <!ENTITY GstTagList SYSTEM "xml/gsttaglist.xml">
 <!ENTITY GstTagSetter SYSTEM "xml/gsttagsetter.xml">
@@ -136,6 +137,7 @@
     &GstRegistry;
     &GstSegment;
     &GstStructure;
+    &GstSubBuffer;
     &GstSystemClock;
     &GstTagList;
     &GstTagSetter;

=== modified file 'docs/gst/gstreamer-sections.txt'
--- docs/gst/gstreamer-sections.txt	2008-07-31 14:35:19 +0000
+++ docs/gst/gstreamer-sections.txt	2008-07-31 15:27:37 +0000
@@ -132,6 +132,7 @@
 GstBusPrivate
 </SECTION>
 
+
 <SECTION>
 <FILE>gstbuffer</FILE>
 <TITLE>GstBuffer</TITLE>
@@ -1925,6 +1926,18 @@
 gst_structure_get_type
 </SECTION>
 
+<SECTION>
+<FILE>gstsubbuffer</FILE>
+<TITLE>GstSubBuffer</TITLE>
+GstSubBuffer
+GST_SUBBUFFER_PARENT
+<SUBSECTION Standard>
+GstSubBufferClass
+GST_IS_SUBBUFFER
+GST_SUBBUFFER_CAST
+<SUBSECTION Private>
+gst_subbuffer_get_type
+</SECTION>
 
 <SECTION>
 <FILE>gstsystemclock</FILE>

=== modified file 'docs/gst/gstreamer.types.in'
--- docs/gst/gstreamer.types.in	2008-07-31 14:35:19 +0000
+++ docs/gst/gstreamer.types.in	2008-07-31 15:24:49 +0000
@@ -35,6 +35,7 @@
 % these are not GObject derived types
 % this works with gtk-doc 1.10 at least
 %gst_buffer_get_type
+%gst_subbuffer_get_type
 %gst_mini_object_get_type
 %gst_message_get_type
 %gst_query_get_type

=== modified file 'gst/Makefile.am'
--- gst/Makefile.am	2008-07-31 14:35:19 +0000
+++ gst/Makefile.am	2008-07-31 15:57:14 +0000
@@ -78,6 +78,7 @@
 	gstobject.c		\
 	gstbin.c		\
 	gstbuffer.c		\
+	gstsubbuffer.c		\
 	gstbus.c		\
 	gstcaps.c		\
 	gstchildproxy.c		\
@@ -159,7 +160,6 @@
 gst_headers =			\
 	gst.h			\
 	glib-compat.h		\
-	gstobject.h		\
 	gstbin.h		\
 	gstbuffer.h		\
 	gstbus.h		\
@@ -183,6 +183,7 @@
 	gstmacros.h		\
 	gstmessage.h		\
 	gstminiobject.h		\
+	gstobject.h		\
 	gstpad.h		\
 	gstpadtemplate.h	\
 	gstparamspecs.h		\
@@ -194,6 +195,7 @@
 	gstquery.h		\
 	gstsegment.h		\
 	gststructure.h		\
+	gstsubbuffer.h		\
 	gstsystemclock.h	\
 	gsttaglist.h		\
 	gsttagsetter.h		\

=== modified file 'gst/gst.h'
--- gst/gst.h	2008-07-31 14:35:19 +0000
+++ gst/gst.h	2008-07-31 15:56:07 +0000
@@ -60,6 +60,7 @@
 #include <gst/gstregistry.h>
 #include <gst/gstsegment.h>
 #include <gst/gststructure.h>
+#include <gst/gstsubbuffer.h>
 #include <gst/gstsystemclock.h>
 #include <gst/gsttaglist.h>
 #include <gst/gsttagsetter.h>

=== modified file 'gst/gstbuffer.c'
--- gst/gstbuffer.c	2008-07-31 14:35:19 +0000
+++ gst/gstbuffer.c	2008-07-31 15:03:48 +0000
@@ -116,6 +116,7 @@
 #include "gst_private.h"
 
 #include "gstbuffer.h"
+#include "gstsubbuffer.h"
 #include "gstinfo.h"
 #include "gstutils.h"
 #include "gstminiobject.h"
@@ -124,9 +125,7 @@
 static void gst_buffer_class_init (gpointer g_class, gpointer class_data);
 static void gst_buffer_finalize (GstBuffer * buffer);
 static GstBuffer *_gst_buffer_copy (GstBuffer * buffer);
-static GType gst_subbuffer_get_type (void);
 
-static GType _gst_subbuffer_type = 0;
 static GType _gst_buffer_type = 0;
 
 static GstMiniObjectClass *parent_class = NULL;
@@ -470,79 +469,6 @@
   return ret;
 }
 
-typedef struct _GstSubBuffer GstSubBuffer;
-typedef struct _GstSubBufferClass GstSubBufferClass;
-
-#define GST_IS_SUBBUFFER(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), _gst_subbuffer_type))
-#define GST_SUBBUFFER_CAST(obj) ((GstSubBuffer *)(obj))
-
-struct _GstSubBuffer
-{
-  GstBuffer buffer;
-
-  GstBuffer *parent;
-};
-
-struct _GstSubBufferClass
-{
-  GstBufferClass buffer_class;
-};
-
-static GstBufferClass *sub_parent_class;
-
-static void gst_subbuffer_init (GTypeInstance * instance, gpointer g_class);
-static void gst_subbuffer_class_init (gpointer g_class, gpointer class_data);
-static void gst_subbuffer_finalize (GstSubBuffer * buffer);
-
-static GType
-gst_subbuffer_get_type (void)
-{
-  if (G_UNLIKELY (_gst_subbuffer_type == 0)) {
-    static const GTypeInfo subbuffer_info = {
-      sizeof (GstSubBufferClass),
-      NULL,
-      NULL,
-      gst_subbuffer_class_init,
-      NULL,
-      NULL,
-      sizeof (GstSubBuffer),
-      0,
-      gst_subbuffer_init,
-      NULL
-    };
-
-    _gst_subbuffer_type = g_type_register_static (GST_TYPE_BUFFER,
-        "GstSubBuffer", &subbuffer_info, 0);
-  }
-  return _gst_subbuffer_type;
-}
-
-static void
-gst_subbuffer_class_init (gpointer g_class, gpointer class_data)
-{
-  GstBufferClass *buffer_class = GST_BUFFER_CLASS (g_class);
-
-  sub_parent_class = g_type_class_peek_parent (g_class);
-
-  buffer_class->mini_object_class.finalize =
-      (GstMiniObjectFinalizeFunction) gst_subbuffer_finalize;
-}
-
-static void
-gst_subbuffer_finalize (GstSubBuffer * buffer)
-{
-  gst_buffer_unref (buffer->parent);
-
-  GST_MINI_OBJECT_CLASS (sub_parent_class)->
-      finalize (GST_MINI_OBJECT_CAST (buffer));
-}
-
-static void
-gst_subbuffer_init (GTypeInstance * instance, gpointer g_class)
-{
-  GST_BUFFER_FLAG_SET (GST_BUFFER_CAST (instance), GST_BUFFER_FLAG_READONLY);
-}
-
 /**
  * gst_buffer_create_sub:
  * @parent: a #GstBuffer.
@@ -583,7 +509,7 @@
   gst_buffer_ref (parent);
 
   /* create the new buffer */
-  subbuffer = (GstSubBuffer *) gst_mini_object_new (_gst_subbuffer_type);
+  subbuffer = (GstSubBuffer *) gst_mini_object_new (gst_subbuffer_get_type());
   subbuffer->parent = parent;
 
   GST_CAT_LOG (GST_CAT_BUFFER, "new subbuffer %p (parent %p)", subbuffer,

=== added file 'gst/gstsubbuffer.c'
--- gst/gstsubbuffer.c	1970-01-01 00:00:00 +0000
+++ gst/gstsubbuffer.c	2008-07-31 15:46:16 +0000
@@ -0,0 +1,93 @@
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
+ *                    2000 Wim Taymans <wtay@chello.be>
+ *
+ * gstsubbuffer.c: GstSubBuffer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:gstsubbuffer
+ * @short_description: A buffer containing data-pointer from another buffer
+ * @see_also: #GstBuffer, #GstMiniObject
+ *
+ */
+
+#include "gst_private.h"
+#include "gstbuffer.h"
+#include "gstsubbuffer.h"
+#include "gstinfo.h"
+#include "gstutils.h"
+#include "gstminiobject.h"
+
+static void gst_subbuffer_init (GTypeInstance * instance, gpointer g_class);
+static void gst_subbuffer_class_init (gpointer g_class, gpointer class_data);
+static void gst_subbuffer_finalize (GstSubBuffer * buffer);
+
+static GstBufferClass *sub_parent_class;
+
+static GType _gst_subbuffer_type = 0;
+
+GType
+gst_subbuffer_get_type (void)
+{
+  if (G_UNLIKELY (_gst_subbuffer_type == 0)) {
+    static const GTypeInfo subbuffer_info = {
+      sizeof (GstSubBufferClass),
+      NULL,
+      NULL,
+      gst_subbuffer_class_init,
+      NULL,
+      NULL,
+      sizeof (GstSubBuffer),
+      0,
+      gst_subbuffer_init,
+      NULL
+    };
+
+    _gst_subbuffer_type = g_type_register_static (GST_TYPE_BUFFER,
+        "GstSubBuffer", &subbuffer_info, 0);
+  }
+  return _gst_subbuffer_type;
+}
+
+static void
+gst_subbuffer_class_init (gpointer g_class, gpointer class_data)
+{
+  GstBufferClass *buffer_class = GST_BUFFER_CLASS (g_class);
+
+  sub_parent_class = g_type_class_peek_parent (g_class);
+
+  buffer_class->mini_object_class.finalize =
+      (GstMiniObjectFinalizeFunction) gst_subbuffer_finalize;
+}
+
+static void
+gst_subbuffer_finalize (GstSubBuffer * buffer)
+{
+  gst_buffer_unref (buffer->parent);
+
+  GST_MINI_OBJECT_CLASS (sub_parent_class)->
+      finalize (GST_MINI_OBJECT_CAST (buffer));
+}
+
+static void
+gst_subbuffer_init (GTypeInstance * instance, gpointer g_class)
+{
+  GST_BUFFER_FLAG_SET (GST_BUFFER_CAST (instance), GST_BUFFER_FLAG_READONLY);
+}
+

=== added file 'gst/gstsubbuffer.h'
--- gst/gstsubbuffer.h	1970-01-01 00:00:00 +0000
+++ gst/gstsubbuffer.h	2008-07-31 15:55:29 +0000
@@ -0,0 +1,65 @@
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
+ *                    2000 Wim Taymans <wtay@chello.be>
+ *
+ * gstsubbuffer.h: Header for GstSubBuffer object
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GST_SUBBUFFER_H__
+#define __GST_SUBBUFFER_H__
+
+#include <gst/gstminiobject.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GstSubBuffer GstSubBuffer;
+typedef struct _GstSubBufferClass GstSubBufferClass;
+
+#define GST_IS_SUBBUFFER(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), gst_subbuffer_get_type ()))
+#define GST_SUBBUFFER_CAST(obj) ((GstSubBuffer *)(obj))
+
+/**
+ * GST_SUBBUFFER_PARENT:
+ * @obj: a #GstSubBuffer
+ *
+ * Get the parent buffer of this #GstSubBuffer
+ */
+#define GST_SUBBUFFER_PARENT(obj)   ((GST_SUBBUFFER_CAST (obj))->parent)
+
+/**
+ * GstSubBuffer:
+ * @buffer:
+ * @parent:
+ */
+struct _GstSubBuffer
+{
+  GstBuffer buffer;
+
+  GstBuffer *parent;
+};
+
+struct _GstSubBufferClass
+{
+  GstBufferClass buffer_class;
+};
+
+GType gst_subbuffer_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_SUBBUFFER_H__ */

