GNOME Bugzilla – Bug 703344
Add support for GstVideoMeta and GstVideoCropMeta
Last modified: 2014-04-30 11:14:44 UTC
Most importantly support for arbitrary strides and cropping would need to be added. Separate to that support for different color matrices and gamma transfer functions could be implemented but those are less important.
Created attachment 267714 [details] [review] upload: add support for arbitrary strides
Review of attachment 267714 [details] [review]: In general this looks good... but you don't use GstVideoMeta or GstVideoFrame anywhere, only GstVideoInfo. So for each buffer you'll have to look at the videometa to get the current buffer's strides and offsets, and then use them in the shaders. And to get the videometa you will need to add it in the GL buffer pool and other elements into the reply of the allocation query.
Also take a look at the code in eglglessink for this.
(In reply to comment #2) > Review of attachment 267714 [details] [review]: > > In general this looks good... but you don't use GstVideoMeta or GstVideoFrame > anywhere, only GstVideoInfo. So for each buffer you'll have to look at the > videometa to get the current buffer's strides and offsets, and then use them in > the shaders. There are three upload paths in GstGLUpload 1. GstGLMemory - needs to be updated for strides. 2. GstVideoGLTextureUploadMeta - not relevant 3. System Memory - depending on which function you call depends on if you get proper stride support. Two paths are available for this: 3a. gst_gl_upload_perform_with_buffer() - wraps (3b.) with GstVideoFrame map/unmap which will update upload->in_info with stride and offsets. 3b. gst_gl_upload_perform_with_data() - At the moment, does not touch upload->in_info so you get whatever is set. All the elements use gst_gl_upload_perform_with_buffer() anyway. > And to get the videometa you will need to add it in the GL buffer pool and > other elements into the reply of the allocation query. Already there.
Oh right, sorry for the memory leaks in my brain :) Will take another look at the patch and then merge it, unless you get your account until then already.
Created attachment 267739 [details] [review] glmem: use GstVideoInfo for format configuration
commit 259e6f80ed63d307b0bf60fc405151d567363812 Author: Matthew Waters <ystreet00@gmail.com> Date: Sat Feb 1 03:14:48 2014 +1100 glmem: use GstVideoInfo for format configuration Allows use of strides commit 9a4c65faa997ef63f4896da3525c1f2bc37d81a7 Author: Matthew Waters <ystreet00@gmail.com> Date: Fri Jan 31 06:53:54 2014 +1100 upload: support for arbitrary strides Using GL_UNPACK_ALIGNMENT for GLES2 and GL_UNPACK_ROW_LENGTH for everything else
Matthew, I noticed that "make check" fails to compile right now. Can you fix that (in another bug)?