Commit graph

16 commits

Author SHA1 Message Date
Matthew Waters
989200820d glmemory: add the texture type to allocate to parameters
Rather than assuming something.  e.g. zerocopy on iOS with GLES3 requires
the use of Luminance/Luminance Alpha formats and does not work with
Red/RG textures.
2016-06-29 18:04:28 +10:00
Alessandro Decina
6961945110 glmemory: add gst_gl_memory_allocator_get_default
Add gst_gl_memory_allocator_get_default to get the default allocator based on
the opengl version. Allows us to stop hardcoding the PBO allocator which isn't
supported on gles2.

Fixes GL upload on iOS9 among other things.
2015-12-18 14:25:32 +11:00
Matthew Waters
5dcd500257 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
2015-12-17 15:44:22 +11:00
Matthew Waters
779dc3132c glmemorypbo: remove our own alloc()/wrapped()/etc functions
replaced by equivalent functionality within gst_gl_base_memory_alloc()
2015-12-17 13:49:56 +11:00
Matthew Waters
2b7495bbc1 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.
2015-12-14 16:35:32 +11:00
Matthew Waters
e61d504556 glmemory: add support for rectangle textures
Add the various tokens/strings for the differnet texture types (2D, rect, oes)

Changes the GLmemory api to include the GstGLTextureTarget in all relevant
functions.

Update the relevant caps/templates for 2D only textures.
2015-10-30 14:24:53 +11:00
Matthew Waters
b25807c382 glshader: port to using GstGLSLStage objects for string management
A GstGLShader is now simply a collection of stages that are
compiled and linked together into a program.  The uniform/attribute
interface has remained the same.
2015-10-15 21:27:57 +11:00
Nicolas Dufresne
e6bd7d2792 gloverlaycompositor: Also disable the blend when done 2015-08-15 15:55:08 +02:00
Nicolas Dufresne
d6baf8dcc7 gloverlaycompositor: Add shader to convert BGRA/ARGB -> RGBA
Depending on the bytes order we will get BGRA (little) and ARGB (big)
from the composition overlay buffer while our GL code expects RGBA. Add
a fragment shader that do this conversion.

https://bugzilla.gnome.org/show_bug.cgi?id=752842
2015-08-08 16:32:53 -04:00
Nicolas Dufresne
e310e6d540 gloverlaycompositor: Keep memory pointer alive
Keep the composition memory pointer alive while it's being
wrapped inside a GstGLMemory object.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-22 17:00:25 -04:00
Nicolas Dufresne
9c020443e6 gloverlaycompositor: Pass buffer stride
The overlay pixel buffer stride was not given back
to the GL image.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-22 17:00:25 -04:00
Nicolas Dufresne
d92375eaae gloverlaycompositor: Hide GstCompsitionOverlay object
This object is only used inside the compositor and does not
need to be expose in libgstgl API.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-22 14:06:34 -04:00
Nicolas Dufresne
17788157a1 composition-overlay: Positions are relative to texture
The coordinate are relative to the texture dimension and not
the window dimension now. There is no need to pass the window
dimension or to update the overlay if the dimension changes.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-22 13:17:18 -04:00
Lubosz Sarnecki
b155f5d73e gloverlaycompositor: Create own shader object
Make gloverlaycompositor independent of the shader used in the sink.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-22 13:16:39 -04:00
Luis de Bethencourt
c9820f20e2 gloverlaycompositor: for loop initial declarations are only allowed in C99 mode
Fixes compiler warnings
2015-07-21 13:11:21 +01:00
Lubosz Sarnecki
b2601a7b43 gloverlaycompositor: Add GstGLOverlayCompositor class
Manages the GstGLCompositionOverlay objects,
caches already uploaded overlays and draws them.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-20 14:41:11 -04:00