mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
eglglessink: Use a separate texture for the custom textures
This commit is contained in:
parent
3233c6163a
commit
9e2af116f6
1 changed files with 7 additions and 7 deletions
|
@ -1476,12 +1476,12 @@ gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
||||||
if (!eglglessink->have_texture) {
|
if (!eglglessink->have_texture) {
|
||||||
GST_INFO_OBJECT (eglglessink, "Performing initial texture setup");
|
GST_INFO_OBJECT (eglglessink, "Performing initial texture setup");
|
||||||
|
|
||||||
glGenTextures (eglglessink->eglglesctx.n_textures,
|
glGenTextures (eglglessink->eglglesctx.n_textures+1,
|
||||||
eglglessink->eglglesctx.texture);
|
eglglessink->eglglesctx.texture);
|
||||||
if (got_gl_error ("glGenTextures"))
|
if (got_gl_error ("glGenTextures"))
|
||||||
goto HANDLE_ERROR_LOCKED;
|
goto HANDLE_ERROR_LOCKED;
|
||||||
|
|
||||||
for (i = 0; i < eglglessink->eglglesctx.n_textures; i++) {
|
for (i = 0; i < eglglessink->eglglesctx.n_textures+1; i++) {
|
||||||
glBindTexture (GL_TEXTURE_2D, eglglessink->eglglesctx.texture[i]);
|
glBindTexture (GL_TEXTURE_2D, eglglessink->eglglesctx.texture[i]);
|
||||||
if (got_gl_error ("glBindTexture"))
|
if (got_gl_error ("glBindTexture"))
|
||||||
goto HANDLE_ERROR;
|
goto HANDLE_ERROR;
|
||||||
|
@ -2182,11 +2182,11 @@ gst_eglglessink_upload (GstEglGlesSink * eglglessink, GstBuffer * buf)
|
||||||
|
|
||||||
if (upload_meta) {
|
if (upload_meta) {
|
||||||
glActiveTexture (GL_TEXTURE0);
|
glActiveTexture (GL_TEXTURE0);
|
||||||
glBindTexture (GL_TEXTURE_2D, eglglessink->eglglesctx.texture[0]);
|
glBindTexture (GL_TEXTURE_2D,
|
||||||
if (!gst_video_gl_texture_upload_meta_upload (upload_meta,
|
eglglessink->eglglesctx.texture[eglglessink->eglglesctx.n_textures]);
|
||||||
(eglglessink->configured_info.finfo->format ==
|
if (!gst_video_gl_texture_upload_meta_upload (upload_meta, GL_RGBA,
|
||||||
GST_VIDEO_FORMAT_RGBA ? GL_RGBA : GL_RGB),
|
eglglessink->eglglesctx.texture[eglglessink->
|
||||||
eglglessink->eglglesctx.texture[0]))
|
eglglesctx.n_textures]))
|
||||||
goto HANDLE_ERROR;
|
goto HANDLE_ERROR;
|
||||||
|
|
||||||
eglglessink->orientation = GST_EGL_IMAGE_ORIENTATION_X_NORMAL_Y_NORMAL;
|
eglglessink->orientation = GST_EGL_IMAGE_ORIENTATION_X_NORMAL_Y_NORMAL;
|
||||||
|
|
Loading…
Reference in a new issue