summaryrefslogtreecommitdiff
path: root/gst-libs/gst/cairo/gstcairobuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/cairo/gstcairobuffer.c')
-rw-r--r--gst-libs/gst/cairo/gstcairobuffer.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gst-libs/gst/cairo/gstcairobuffer.c b/gst-libs/gst/cairo/gstcairobuffer.c
index 3f12311..c13cc87 100644
--- a/gst-libs/gst/cairo/gstcairobuffer.c
+++ b/gst-libs/gst/cairo/gstcairobuffer.c
@@ -29,6 +29,36 @@
# include "gstcairoxbuffer.h"
#endif
+/**
+ * SECTION:gstcairobuffer
+ * @title: Buffers
+ * @short_description: using video data
+ *
+ * This section describes how to modify buffers when using the GStreamer
+ * Cairo library.
+ *
+ * If at all possible, modifying buffers should be done using the Cairo
+ * library and without accessing the buffer data directly. This allows
+ * high performance and ensures portability of elements.
+ *
+ * Rendering is done by acquiring the #cairo_surface_t for all the buffers
+ * involved with gst_cairo_create_surface() and then using the Cairo API
+ * for modifications. Afterwards, all surfaces should be discarded. Do not
+ * keep a reference to surfaces. If you want to keep references, please
+ * keep the buffer around and use gst_cairo_create_surface() again later.
+ *
+ * To create buffers for use in your element, use
+ * gst_cairo_pad_alloc_buffer(). This way, you'll automatically take
+ * advantage of hardware acceleration provided by the sink elements.
+ *
+ * If you are writing sink or source elements, the GStreamer Cairo library
+ * provides a way to create buffers using gst_cairo_buffer_new_similar() and
+ * surfaces using gst_cairo_create_similar_surface(). These functions are
+ * similar to cairo_surface_create_similar() in that they take extra steps
+ * to provide buffers or surfaces that are as compatible as possible with
+ * the provided surface and can take full advatange of hardware acceleration.
+ */
+
G_DEFINE_TYPE (GstCairoBuffer, gst_cairo_buffer, GST_TYPE_BUFFER)
static void gst_cairo_buffer_finalize (GstMiniObject * object)