GNOME Bugzilla – Bug 720728
plugins: fix GLTextureUploadMeta check for native texture changes
Last modified: 2018-11-03 15:44:21 UTC
Currently, in the GLTextureUploadMeta::upload() implementation for GLX, we check that the supplied texture changed by its name. This is OK for the general case but there is still a possibility that the upper layer (e.g. glimagesink) releases that texture, and next create a new one, but with different dimensions. Note: that's not a big deal currently because we usually create a GL texture that is as large as the original VA surface. For performance reasons, e.g. 2160p surface -> 1080p display, it could be enough to upload to a smaller texture. Possible solutions: 1) Fix gst_vaapi_texture_upload() to also check for the supplied texture dimensions. This causes the GL pipeline to sync since a glGetTexLevelParameteriv() would be involved for GL_WIDTH and GL_HEIGHT params. i.e. that doesn't look a good approach for performance reasons, but this is a correct one. 2) Mandate, and document, GLTextureUploadMeta _upload() hook to required that supplied texture characteristics (format, size) need to be consistent for the lifetime of the meta. Benefit: no code change, efficient. Only doc update needed. 3) Change the upload API to let the upper layer (caller) supply the dimensions for the various textures in the _upload() arguments.
Do you mean several texture dimensions within the same gstglbufferpool ? It should not be possible. If the decoder changes it's output resolution it has to send a reconfigure event, so the sink will be advertise of the new WxH through caps negotiation.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/7.