Julien Isorce
17946cc0a9
gleffects: use gl_vtable
2017-12-09 19:31:40 +00:00
Matthew Waters
6c1a4e30c4
gl/upload: implement lazy init
...
Rename init_format to set_format
2017-12-09 19:31:39 +00:00
Matthew Waters
8fd450b941
gl: advertise GstGLMemory usage in the caps as capsfeatures
...
https://bugzilla.gnome.org/show_bug.cgi?id=729658
2017-12-09 19:31:39 +00:00
Matthew Waters
a865a931fc
gl/sink: make sure we always initialize the upload object
...
https://bugzilla.gnome.org/show_bug.cgi?id=729542
2017-12-09 19:31:39 +00:00
Matthew Waters
bf9c8544e3
gl: use the bufferpool's upload when available
...
Avoids duplicating GL resources
https://bugzilla.gnome.org/show_bug.cgi?id=728872
2017-12-09 19:31:39 +00:00
Matthew Waters
b1fc846f83
glcolorscale: fix operation with dual GL, GLES2 libgstgl
2017-12-09 19:31:38 +00:00
Julien Isorce
2a12e57a9f
glcolorscale: use a shader on GLESv2
...
Otherwise you only see black frames
Fix https://bugzilla.gnome.org/show_bug.cgi?id=728947
2017-12-09 19:31:38 +00:00
Julien Isorce
0455cb610a
glimagesink: use new helper function to avoid duplicating default shader text
2017-12-09 19:31:38 +00:00
Julien Isorce
2b8de2d1bc
gleffects: use new helper functions to avoid duplicating the same vertex shader text
...
And also use the default fragment shader text for the identity effect
2017-12-09 19:31:38 +00:00
Julien Isorce
391661b626
gl: use gst_gl_platform_from_string because we support gl shareList on all platforms
2017-12-09 19:31:38 +00:00
Julien Isorce
c52dd44e60
gl: fails glimagesink when shader compilation went wrong
...
Those shaders are fixed and very simple so it should not fail
but it's worth to handle a such case.
2017-12-09 19:31:37 +00:00
Julien Isorce
4844c53017
gl: call glClearColor before glClear
2017-12-09 19:31:37 +00:00
Sebastian Dröge
569f1363f4
glimagesink: Use the pixel-aspect-ratio adjusted width/height when centering the frame in the display area
...
Makes sure we actually keep the display aspect ratio
2017-12-09 19:31:37 +00:00
Sebastian Dröge
889e92e738
glimagesink: By default keep the display aspect ratio
...
Also the default for the pixel-aspect-ratio should be 1/1, not 0/1.
2017-12-09 19:31:37 +00:00
Sebastian Dröge
7f7ceea8de
gltestsrc: Unref context when creation failed and guard against that in fill()
2017-12-09 19:31:37 +00:00
Sebastian Dröge
fc607b3c53
glimagesink: Call gst_object_unref() on the GstGL GObjects again
...
While they're plain GObjects it does not hurt to call gst_object_unref()
on them and potentially allows to debug reference leaks a bit easier.
2017-12-09 19:31:37 +00:00
Sebastian Dröge
2b38f86b4e
glimagesink: If creating a context or upload failed, destroy it
...
Fixes deadlocks in error cases when later code assumes the broken
context is actually usable.
https://bugzilla.gnome.org/show_bug.cgi?id=728761
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
f230f758e7
gl: a couple spelling/grammar fixes
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
d6a87fb0c3
gl: guard against using a NULL window pointer
...
Coverity 1195145
2017-12-09 19:31:37 +00:00
Matthew Waters
9eb5001e02
glimagesink: remove unused texture
2017-12-09 19:31:36 +00:00
Matthew Waters
57b4bd6905
glimagesink: move upload into _prepare()
2017-12-09 19:31:36 +00:00
Sebastian Dröge
a05928ba62
gl: Set glimagesink rank to SECONDARY
...
This is a full-featured video sink now and especially should be
used instead of osxvideosink on OSX if available.
2017-12-09 19:31:36 +00:00
Sebastian Dröge
aab3ef1b5d
glimagesink: First handle GL window setup, then create the context and its thread
2017-12-09 19:31:36 +00:00
Matthew Waters
30c6efc432
gl/mem: allocate the memory per plane
...
This patch provides the basic infrastructure required for this.
Upload and Download has been ported to this.
Has the nice effect of allowing GstGLMemory to be our
refcounted texture object for any texture type (not just RGBA).
Should not lose any features/video formats.
2017-12-09 19:31:36 +00:00
Matthew Waters
fba49c3463
gl: add colorconvert object that converts between color spaces/formats
...
Currently used by both upload and download objects separately.
2017-12-09 19:31:36 +00:00
Vincent Penquerc'h
2767aae4e2
gl: pass large structure by const pointer, not value
...
Avoids large pointless memcpy.
Coverity 206236, 206237
2017-12-09 19:31:36 +00:00
Vincent Penquerc'h
07565d0ff7
gl: test for frame NULLness before dereferencing it
...
Coverity 1195172, 1195171
2017-12-09 19:31:36 +00:00
Sebastian Dröge
4ecffcf76b
glimagesink: Create GL context and set up window from the streaming thread
...
gst_gl_context_create() might need to dispatch some operations to the
application's main thread, and calling this in the change_state function
can cause deadlocks.
2017-12-09 19:31:36 +00:00
Matthew Waters
a20a5d36e2
gl: pass video info's by reference
2017-12-09 19:31:35 +00:00
Matthew Waters
173b234ed2
gl: fix array initialization
2017-12-09 19:31:35 +00:00
Matthew Waters
394128a4db
glbumper: remove redundant check
2017-12-09 19:31:35 +00:00
Matthew Waters
b70069bc61
gl: fix assignment of temporary variables
2017-12-09 19:31:35 +00:00
Matthew Waters
71548893bf
gl: avoid adding a NULL pool to propose allocation
2017-12-09 19:31:35 +00:00
Julien Isorce
0233939eaa
gl: only set CAPS_FEATURE_MEMORY_EGL_IMAGE on egl platform
2017-12-09 19:31:35 +00:00
Julien Isorce
6614df6478
gl: let the user includes itself our egl headers if needed
...
Forgot to address this change.
https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:35 +00:00
Julien Isorce
c2471aec81
gl: add EGLImage support
...
* picked from old libgstegl:
- GstEGLImageMemory
- GstEGLImageAllocator
- last_buffer management from removed GstEGLImageBufferPool
* add-ons:
- GstEGLImageMemory now old a reference on GstGLContext
so that it can delete the EGLImage and its gltexture source
while having the associated gl context being current.
- add EGLImage support for GstVideoGLTextureUploadMeta which
mainly call EGLImageTargetTexture2D
- GstGLBufferPool now supports GstEGLImageAllocator
- glimagesink / glfilters / etc.. now propose GstEGLImageAllocator
to upstream
https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:35 +00:00
Gwenole Beauchesne
14521a89cb
gl: fix out-of-source builds.
...
Always use the locally generated <gst/gl/gstglconfig.h> file.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2017-12-09 19:31:35 +00:00
Matthew Waters
a9070713a2
gl: silence a critical if upstream does not provide us with meta params
2017-12-09 19:31:35 +00:00
Julien Isorce
19d138601b
gl: silence warnings building for RPI related to 'vcos_*'
...
Similar than 1190a79b19
2017-12-09 19:31:34 +00:00
Julien Isorce
b30d15d4b8
gl: keep only one occurence of '#include <EGL/egl.h>'
...
To simply maintainance if we need to put specific includes around it.
2017-12-09 19:31:34 +00:00
Matthew Waters
e225af3e0d
gl: silence all the compiler warnings
2017-12-09 19:31:34 +00:00
Matthew Waters
a884d6feee
move gl elements to ext subdirectory
2017-12-09 19:31:34 +00:00