diff options
author | Matthew Waters <matthew@centricular.com> | 2015-12-14 13:43:59 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2015-12-14 16:35:32 +1100 |
commit | 2b7495bbc1ee60c0fa52c980daf440d45ae48d37 (patch) | |
tree | 7d6fc31ce976609988065d7439b51469eefc14a8 /gst-libs/gst/gl/gstglviewconvert.c | |
parent | 6cf8da132b6eb75084871ac4409356be62537b2f (diff) |
glmemory: base classify and add the pbo memory on top
The base class is useful for having multiple backing memory types other
than the default. e.g. IOSurface, EGLImage, dmabuf?
The PBO transfer logic is now inside GstGLMemoryPBO which uses GstGLBuffer
to manage the PBO memory.
This also moves the format utility functions into their own file.
Diffstat (limited to 'gst-libs/gst/gl/gstglviewconvert.c')
-rw-r--r-- | gst-libs/gst/gl/gstglviewconvert.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gst-libs/gst/gl/gstglviewconvert.c b/gst-libs/gst/gl/gstglviewconvert.c index 322ffd656..3f36b408c 100644 --- a/gst-libs/gst/gl/gstglviewconvert.c +++ b/gst-libs/gst/gl/gstglviewconvert.c @@ -1892,7 +1892,7 @@ static gboolean _gen_buffer (GstGLViewConvert * viewconvert, GstBuffer ** target) { *target = gst_buffer_new (); - if (!gst_gl_memory_setup_buffer (viewconvert->context, + if (!gst_gl_memory_pbo_setup_buffer (viewconvert->context, viewconvert->to_texture_target, NULL, &viewconvert->out_info, NULL, *target)) { return FALSE; @@ -2017,7 +2017,7 @@ _do_view_convert (GstGLContext * context, GstGLViewConvert * viewconvert) * the attachments i.e. the smallest attachment size */ if (!priv->out_tex[j]) priv->out_tex[j] = - (GstGLMemory *) gst_gl_memory_alloc (context, + (GstGLMemory *) gst_gl_memory_pbo_alloc (context, viewconvert->to_texture_target, NULL, &temp_info, 0, NULL); } else { priv->out_tex[j] = out_tex; @@ -2069,10 +2069,8 @@ out: res = FALSE; continue; } - gst_gl_memory_copy_into_texture (priv->out_tex[j], - out_tex->tex_id, viewconvert->to_texture_target, out_tex->tex_type, - width, height, - GST_VIDEO_INFO_PLANE_STRIDE (&out_tex->info, out_tex->plane), FALSE); + gst_gl_memory_copy_into (priv->out_tex[j], out_tex->tex_id, + viewconvert->to_texture_target, out_tex->tex_type, width, height); gst_memory_unmap ((GstMemory *) out_tex, &to_info); } |