summaryrefslogtreecommitdiff
path: root/gst-libs/gst/gl/gstgluploadmeta.c
diff options
context:
space:
mode:
authorMatthew Waters <ystreet00@gmail.com>2014-07-31 14:07:29 +1000
committerMatthew Waters <ystreet00@gmail.com>2014-07-31 15:19:54 +1000
commit89636392fa3fd2182dd13aa2193aca17edaa102d (patch)
tree21b59d96a31a435fddf38f4af252905aee25073d /gst-libs/gst/gl/gstgluploadmeta.c
parentbd3cefeecc732cb0aa376a508165bcd04e9f950f (diff)
downloadgstreamer-plugins-bad-89636392fa3fd2182dd13aa2193aca17edaa102d.tar.gz
glmemory: use GstVideoInfo everywhere
Simplifies a lot of the calling code https://bugzilla.gnome.org/show_bug.cgi?id=733717
Diffstat (limited to 'gst-libs/gst/gl/gstgluploadmeta.c')
-rw-r--r--gst-libs/gst/gl/gstgluploadmeta.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gst-libs/gst/gl/gstgluploadmeta.c b/gst-libs/gst/gl/gstgluploadmeta.c
index fe70d282b..c2dffd28d 100644
--- a/gst-libs/gst/gl/gstgluploadmeta.c
+++ b/gst-libs/gst/gl/gstgluploadmeta.c
@@ -219,12 +219,11 @@ _perform_with_gl_memory (GstGLUploadMeta * upload, GstVideoGLTextureUploadMeta *
GST_GL_MEMORY_FLAG_SET (in_mem, GST_GL_MEMORY_FLAG_NEED_UPLOAD);
} else {
GstGLMemory *out_mem;
+ gint mem_width, mem_height;
if (!upload->priv->out_tex[i])
upload->priv->out_tex[i] = gst_gl_memory_wrapped_texture (upload->context,
- texture_id[i], meta->texture_type[i],
- GST_VIDEO_INFO_WIDTH (&upload->info),
- GST_VIDEO_INFO_HEIGHT (&upload->info), NULL, NULL);
+ texture_id[i], &upload->info, i, NULL, NULL);
out_mem = upload->priv->out_tex[i];
@@ -233,8 +232,12 @@ _perform_with_gl_memory (GstGLUploadMeta * upload, GstVideoGLTextureUploadMeta *
GST_GL_MEMORY_FLAG_SET (out_mem, GST_GL_MEMORY_FLAG_NEED_DOWNLOAD);
}
+ mem_width = gst_gl_memory_get_texture_width (out_mem);
+ mem_height = gst_gl_memory_get_texture_height (out_mem);
+
if (!(res = gst_gl_memory_copy_into_texture (in_mem, out_mem->tex_id,
- out_mem->tex_type, out_mem->width, out_mem->height, out_mem->stride,
+ out_mem->tex_type, mem_width, mem_height,
+ GST_VIDEO_INFO_PLANE_STRIDE (&out_mem->info, out_mem->plane),
FALSE)))
break;
}
@@ -253,9 +256,7 @@ _perform_with_data_unlocked (GstGLUploadMeta * upload,
for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&upload->info); i++) {
if (!upload->priv->in_tex[i])
upload->priv->in_tex[i] = gst_gl_memory_wrapped (upload->context,
- meta->texture_type[i], GST_VIDEO_INFO_WIDTH (&upload->info),
- GST_VIDEO_INFO_HEIGHT (&upload->info),
- GST_VIDEO_INFO_PLANE_STRIDE (&upload->info, i), data[i], NULL, NULL);
+ &upload->info, i, data[i], NULL, NULL);
upload->priv->in_tex[i]->data = data[i];
}