Matthew Waters
18a812a30f
gl*memory: document new functionality and objects
2017-12-09 19:32:17 +00:00
Matthew Waters
0cf1eaf71a
glbasememory: Free the actual memory object when requested
...
Otherwise we are leaking ~400B on each GstMemory allocation.
Freeing in the base class matches the GObject semantics.
2017-12-09 19:32:14 +00:00
Matthew Waters
880d2798b0
glmemorypbo: don't double read pixels
...
The optimistic download_transfer was not setting the required flag to not
perform glReadPixels on subsequent map (READ). resulting in glReadPixels
happening twice.
2017-12-09 19:32:14 +00:00
Matthew Waters
5ba0ab3da9
glmemory: expose gst_gl_memory_texsubimage
...
Removes extremely similar code from glmemorypbo.
2017-12-09 19:32:14 +00:00
Matthew Waters
48fbc9e096
glmemorypbo: remove unused code
...
https://bugzilla.gnome.org/show_bug.cgi?id=759679
2017-12-09 19:32:14 +00:00
Matthew Waters
633c26884e
glmemorypbo: fix wrapping data on GL 2.1
...
GL 2.1 only supports pbo upload.
The wrapped data pointer was only being set on the pbo memory and on the
glmemory so when a download was requested (in GL 2.1), glmemory was
allocating a new data pointer and thus not returning the wrapped data.
2017-12-09 19:32:14 +00:00
Matthew Waters
5aca58ce86
glmemorypbo: only create a pbo memory if the context actually supports it
...
e.g. GL <= 2.0 does not support pbo usage and GL 2.1 only supports pbo upload.
2017-12-09 19:32:14 +00:00
Matthew Waters
3695ab353d
glmemory: small code reformat
...
makes the alloc_params selections fit on a single line.
2017-12-09 19:32:14 +00:00
Sebastian Dröge
45d7796949
glmemorypbo: Comment out unused functions to fix compilation with clang
...
It's not clear if these are intentionally unused or the code should be
changed, but this fixes compilation for the time being at least.
See https://bugzilla.gnome.org/show_bug.cgi?id=759679
2017-12-09 19:32:13 +00:00
Matthew Waters
09c8c23842
gl*memory*: reverse the parameter order of user_data and destroy notify
...
The convention is to have the destroy notify last after any user data
2017-12-09 19:32:13 +00:00
Matthew Waters
1673a6192f
glmemorypbo: remove our own alloc()/wrapped()/etc functions
...
replaced by equivalent functionality within gst_gl_base_memory_alloc()
2017-12-09 19:32:13 +00:00
Matthew Waters
c870a9cdd5
glbuffer: remove unneeded gst_gl_buffer_alloc()
...
Replaced by gst_gl_base_memory_alloc()
2017-12-09 19:32:13 +00:00
Matthew Waters
228481da18
glmemorypbo: implement GstGLBaseMemory:alloc
...
Uses the GstGLVideoAllocationParams parameters
2017-12-09 19:32:12 +00:00
Matthew Waters
f83b834628
glmemorypbo: map/unmap pbo memory correctly for state tracking
...
Otherwise some downloads will fail to occur from the PBO.
2017-12-09 19:32:12 +00:00
Matthew Waters
76a38dd66a
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.
2017-12-09 19:32:12 +00:00