Skip to content

Commit

Permalink
[600/906] docs: add docs for new objects and expand on some existing …
Browse files Browse the repository at this point in the history
…ones
  • Loading branch information
ystreet authored and tp-m committed Dec 9, 2017
1 parent 7baddfb commit d55bbf7
Show file tree
Hide file tree
Showing 11 changed files with 617 additions and 197 deletions.
23 changes: 21 additions & 2 deletions gst-libs/gst/gl/gstglbufferpool.c
Expand Up @@ -24,6 +24,19 @@

#include "gstglbufferpool.h"

/**
* SECTION:gstglbufferpool
* @short_description: buffer pool for #GstGLMemory objects
* @see_also: #GstBufferPool, #GstGLMemory
*
* a #GstGLBufferPool is an object that allocates buffers with #GstGLMemory
*
* A #GstGLBufferPool is created with gst_gl_buffer_pool_new()
*
* #GstGLBufferPool implements the VideoMeta buffer pool option
* #GST_BUFFER_POOL_OPTION_VIDEO_META
*/

/* bufferpool */
struct _GstGLBufferPoolPrivate
{
Expand Down Expand Up @@ -159,7 +172,7 @@ gst_gl_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
gst_buffer_append_memory (buf, gl_mem);

if (priv->add_videometa) {
GST_DEBUG_OBJECT (pool, "adding GstGLMeta");
GST_DEBUG_OBJECT (pool, "adding GstVideoMeta");
/* these are just the defaults for now */
gst_buffer_add_video_meta (buf, 0,
GST_VIDEO_INFO_FORMAT (info), GST_VIDEO_INFO_WIDTH (info),
Expand All @@ -179,11 +192,17 @@ gst_gl_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,

mem_create_failed:
{
GST_WARNING_OBJECT (pool, "Could create GL Memory");
GST_WARNING_OBJECT (pool, "Could not create GL Memory");
return GST_FLOW_ERROR;
}
}

/**
* gst_gl_buffer_pool_new:
* @display: the #GstGLDisplay to use
*
* Returns: a #GstBufferPool that allocates buffers with #GstGLMemory
*/
GstBufferPool *
gst_gl_buffer_pool_new (GstGLDisplay * display)
{
Expand Down
12 changes: 11 additions & 1 deletion gst-libs/gst/gl/gstglbufferpool.h
Expand Up @@ -35,11 +35,17 @@ typedef struct _GstGLBufferPoolClass GstGLBufferPoolClass;
typedef struct _GstGLBufferPoolPrivate GstGLBufferPoolPrivate;

/* buffer pool functions */
GType gst_gl_buffer_pool_get_type (void);
#define GST_TYPE_GL_BUFFER_POOL (gst_gl_buffer_pool_get_type())
#define GST_IS_GL_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_BUFFER_POOL))
#define GST_GL_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_BUFFER_POOL, GstGLBufferPool))
#define GST_GL_BUFFER_POOL_CAST(obj) ((GstGLBufferPool*)(obj))

/**
* GstGLBufferPool:
*
* Opaque GstGLBufferPool struct
*/
struct _GstGLBufferPool
{
GstBufferPool bufferpool;
Expand All @@ -49,12 +55,16 @@ struct _GstGLBufferPool
GstGLBufferPoolPrivate *priv;
};

/**
* GstGLBufferPoolClass:
*
* The #GstGLBufferPoolClass structure contains only private data
*/
struct _GstGLBufferPoolClass
{
GstBufferPoolClass parent_class;
};

GType gst_gl_buffer_pool_get_type (void);
GstBufferPool *gst_gl_buffer_pool_new (GstGLDisplay * display);

G_END_DECLS
Expand Down

0 comments on commit d55bbf7

Please sign in to comment.