Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
gluploadmeta; remove convenience helper API
It was not really useful as if one knows about libgstgl, one can just use
GLMemory objects directly.
  • Loading branch information
ystreet authored and tp-m committed Dec 9, 2017
1 parent 3545d34 commit cd584d2
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 550 deletions.
2 changes: 0 additions & 2 deletions gst-libs/gst/gl/Makefile.am
Expand Up @@ -23,7 +23,6 @@ libgstgl_@GST_API_VERSION@_la_SOURCES = \
gstglslstage.c \
gstglcolorconvert.c \
gstglupload.c \
gstgluploadmeta.c \
gstglwindow.c \
gstglapi.c \
gstglfeature.c \
Expand Down Expand Up @@ -51,7 +50,6 @@ libgstgl_@GST_API_VERSION@include_HEADERS = \
gstglsl.h \
gstglslstage.h \
gstglcolorconvert.h \
gstgluploadmeta.h \
gstglupload.h \
gstglapi.h \
gstglfeature.h \
Expand Down
1 change: 0 additions & 1 deletion gst-libs/gst/gl/gl.h
Expand Up @@ -41,7 +41,6 @@
#include <gst/gl/gstglshaderstrings.h>
#include <gst/gl/gstglcolorconvert.h>
#include <gst/gl/gstglupload.h>
#include <gst/gl/gstgluploadmeta.h>
#include <gst/gl/gstglbasebuffer.h>
#include <gst/gl/gstglmemory.h>
#include <gst/gl/gstglbufferpool.h>
Expand Down
4 changes: 0 additions & 4 deletions gst-libs/gst/gl/gstgl_fwd.h
Expand Up @@ -59,10 +59,6 @@ typedef struct _GstGLUpload GstGLUpload;
typedef struct _GstGLUploadClass GstGLUploadClass;
typedef struct _GstGLUploadPrivate GstGLUploadPrivate;

typedef struct _GstGLUploadMeta GstGLUploadMeta;
typedef struct _GstGLUploadMetaClass GstGLUploadMetaClass;
typedef struct _GstGLUploadMetaPrivate GstGLUploadMetaPrivate;

typedef struct _GstGLBufferPool GstGLBufferPool;
typedef struct _GstGLBufferPoolClass GstGLBufferPoolClass;
typedef struct _GstGLBufferPoolPrivate GstGLBufferPoolPrivate;
Expand Down
27 changes: 1 addition & 26 deletions gst-libs/gst/gl/gstglbufferpool.c
Expand Up @@ -54,7 +54,6 @@ struct _GstGLBufferPoolPrivate
GstVideoAlignment valign;
GstGLTextureTarget tex_target;
gboolean add_videometa;
gboolean add_uploadmeta;
gboolean add_glsyncmeta;
gboolean want_eglimage;
GstBuffer *last_buffer;
Expand All @@ -77,7 +76,6 @@ static const gchar **
gst_gl_buffer_pool_get_options (GstBufferPool * pool)
{
static const gchar *options[] = { GST_BUFFER_POOL_OPTION_VIDEO_META,
GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META,
GST_BUFFER_POOL_OPTION_GL_SYNC_META,
GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT,
GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D,
Expand All @@ -99,7 +97,7 @@ gst_gl_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
guint max_align, n;
GstAllocator *allocator = NULL;
GstAllocationParams alloc_params;
gboolean reset = TRUE, ret = TRUE;
gboolean ret = TRUE;
gint p;

if (!gst_buffer_pool_config_get_params (config, &caps, NULL, &min_buffers,
Expand Down Expand Up @@ -135,16 +133,11 @@ gst_gl_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
if (priv->im_format == -1)
goto unknown_format;

if (priv->caps)
reset = !gst_caps_is_equal (priv->caps, caps);

gst_caps_replace (&priv->caps, caps);
priv->info = info;

priv->add_videometa = gst_buffer_pool_config_has_option (config,
GST_BUFFER_POOL_OPTION_VIDEO_META);
priv->add_uploadmeta = gst_buffer_pool_config_has_option (config,
GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META);
priv->add_glsyncmeta = gst_buffer_pool_config_has_option (config,
GST_BUFFER_POOL_OPTION_GL_SYNC_META);

Expand Down Expand Up @@ -188,13 +181,6 @@ gst_gl_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
priv->params = alloc_params;
}

if (reset) {
if (glpool->upload)
gst_object_unref (glpool->upload);

glpool->upload = gst_gl_upload_meta_new (glpool->context);
}

priv->tex_target = 0;
{
GstStructure *s = gst_caps_get_structure (caps, 0);
Expand Down Expand Up @@ -280,11 +266,6 @@ gst_gl_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
static gboolean
gst_gl_buffer_pool_start (GstBufferPool * pool)
{
GstGLBufferPool *glpool = GST_GL_BUFFER_POOL_CAST (pool);
GstGLBufferPoolPrivate *priv = glpool->priv;

gst_gl_upload_meta_set_format (glpool->upload, &priv->info);

return GST_BUFFER_POOL_CLASS (parent_class)->start (pool);
}

Expand Down Expand Up @@ -322,9 +303,6 @@ gst_gl_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
&priv->params, info, valign, buf))
goto mem_create_failed;

if (priv->add_uploadmeta)
gst_gl_upload_meta_add_to_buffer (glpool->upload, buf);

if (priv->add_glsyncmeta)
gst_buffer_add_gl_sync_meta (glpool->context, buf);

Expand Down Expand Up @@ -475,9 +453,6 @@ gst_gl_buffer_pool_finalize (GObject * object)
if (priv->caps)
gst_caps_unref (priv->caps);

if (pool->upload)
gst_object_unref (pool->upload);

G_OBJECT_CLASS (gst_gl_buffer_pool_parent_class)->finalize (object);

/* only release the context once all our memory have been deleted */
Expand Down
1 change: 0 additions & 1 deletion gst-libs/gst/gl/gstglbufferpool.h
Expand Up @@ -46,7 +46,6 @@ struct _GstGLBufferPool
GstBufferPool bufferpool;

GstGLContext *context;
GstGLUploadMeta *upload;

GstGLBufferPoolPrivate *priv;
};
Expand Down

0 comments on commit cd584d2

Please sign in to comment.