Commit graph

1511 commits

Author SHA1 Message Date
Hyunjun Ko
2bb3baa8c9 glupload: Use bufferpool to allocate new buffer in GLTextureUploadMeta
To improve performace of upload with GLTextureUploadMeta,
use bufferpool instead of allocating new buffer every time.

https://bugzilla.gnome.org/show_bug.cgi?id=769293
2016-08-03 21:16:47 +10:00
Matthew Waters
a46d4f3b57 glwindow: move unsetting queue_resize to _resize() instead of _draw()
Makes infinitely more sense and implementation were expecting that behaviour
anyway and would enter a resize, draw, resize, draw, ... cycle instead of only
resizing once.
2016-08-03 21:15:01 +10:00
Matthew Waters
01157c4433 glframebuffer: add compatibility definition for GL_DEPTH_STENCIL_ATTACHMENT
GLES2 doesn't have it defined...
2016-07-26 15:57:54 +10:00
Matthew Waters
5da138d1ae glfilter: rewrite subclasses for filter_texture() occuring on GL thread
There's no need for the jump to an extra thread in most cases, especially
when relying solely on a shader to render.  We can use the provided
render_to_target() functions to simplify filter writing.
2016-07-26 14:07:24 +10:00
Matthew Waters
6edd89c883 glutils: remove unused GstGLDisplayProjection 2016-07-26 14:07:24 +10:00
Matthew Waters
06b4b52a20 glcontext: remove not thread-safe get/set_error()
Use GError's instead if necessary.
2016-07-26 14:07:24 +10:00
Matthew Waters
518e8a3fd2 glframebuffer: rewrite for a more consistent API
Facilities are given to create fbo's and attach GL memory (renderbuffers
or textures).  It also keeps track of the renderable size for use with
effective use with glViewport().
2016-07-26 14:07:24 +10:00
Matthew Waters
aa109016a3 gl: use GLMemory for accessing textures everywhere
This simplifies and consolidates a lot of duplicated code creating
and modifying textures.
2016-07-26 14:07:24 +10:00
Matthew Waters
f10a67ec44 glfilter: rename draw_texture to draw_fullscreen_quad
And remove unused arguments.
2016-07-26 14:07:24 +10:00
Matthew Waters
9e06a75018 gl: add memory type for renderbuffer's
Soon to be used for framebuffers for e.g. depth buffers or throwaway color
buffers.
2016-07-26 14:07:24 +10:00
Matthew Waters
0daa380245 glformat: define our own set of formats from the GL defines
also add some depth/stencil formats
2016-07-26 14:07:24 +10:00
Matthew Waters
6f4091bbd3 glbasememory: assert for a valid allocator instead of segfaulting 2016-07-26 14:07:24 +10:00
Tim-Philipp Müller
c593e0a17f gl: wayland: improve debug message when connecting to display
And another copy'n'paste-o.

https://bugzilla.gnome.org/show_bug.cgi?id=768929
2016-07-18 17:47:50 +01:00
Matthew Waters
087bb0ed6a glviewconvert: fix transformation matrix usage
Calling glUniformMatrix before the shader is bound is invalid and
would result in errors like:

GL_INVALID_OPERATION in glUniformMatrix(program not linked)

Move glUniformMatrix() to after the gst_gl_shader_use() call.
2016-06-30 21:54:03 +10:00
Matthew Waters
e0ecd774dd glupload: fix raw data uploader with addition of GstVideoGLTextureType
Fixes regression from 989200820d

https://bugzilla.gnome.org/show_bug.cgi?id=768217
2016-06-30 14:07:32 +10:00
Olivier Crête
461201c396 glvideoconvert: RG/LA is available in OpenGL ES 3, so let that through 2016-06-29 23:55:18 -04:00
Matthew Waters
5592a966c6 Revert "Revert "gl/eagl: try getting a gles3 context""
This reverts commit eb14273631.

vtdec now successfully outputs textures that can be converted by
glcolorconvert in GLES3 contexts.
2016-06-29 18:04:28 +10:00
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
Matthew Waters
6958b7a014 glcolorconvert: don't assume Red/RG textures will be used
Take the used texture type from the memory instead.

Fixes conversion from multi-planar YUV formats with two components per plane
(NV12, NV21, YUY2, UYVY, GRAY16_*, etc) with Luminance Alpha input textures.

This is also needed for zerocopy decoding on iOS with GLES 3.x.
2016-06-29 18:04:28 +10:00
Matthew Waters
b9cdc9d4b0 glcontext: correct precondition for get_gl_version
The intention was to assert if both maj and min were NULL (as there would be no
point calling the function).  Instead if either maj or min were NULL, the assert
would occur.

Fix that.
2016-06-29 18:04:28 +10:00
Sebastian Dröge
0e58e86c4c eglimage: Only register debug category if dmabuf support is enabled
It's not used otherwise currently and causes compiler warnings.
2016-06-23 16:00:00 +03:00
Wang Xin-yu (王昕宇)
6ed2ca373a glcontext/wgl: try wglCreateContextAttribsARB even not gl3 core profile
https://bugzilla.gnome.org/show_bug.cgi?id=764018
2016-06-21 22:57:13 +10:00
Matthew Waters
8a67cd90b3 glcontext: fix get_current_gl_api() on win32
Another case of incorrect calling conventions.

Using this function on win32 would corrupt the stack pointer and end in
massive hilarity.
2016-06-21 22:57:00 +10:00
Matthew Waters
d3f3787d64 glsl: fixup external-oes shaders by mangling the required extension
Newer devices require using a different GLSL extension for accessing
external-oes textures in a shader using the texture() functions.

While the GL_OES_EGL_image_external_essl3 should supposedly be supported
on a any GLES3 android device, the extension was defined after a lot of the
older drivers were built so they will not know about it.  Thus there are two
possible interpretations of which of texture[2D]() should be supported for
external-oes textures.  Strict adherence to the GL_OES_EGL_image_external
extension spec which uses texture2D() or following GLES3's pattern, also
allowing texture() as a function for accessing external-oes textures

This adds another mangling pass to convert
 #extension GL_OES_EGL_image_external : ...
into
 #extension GL_OES_EGL_image_external_essl3 : ...
on GLES3 and when the GL_OES_EGL_image_external_essl3 extension is supported.

Only uses texture() when the GLES3 and the GL_OES_EGL_image_external_essl3
extension is supported for external-oes textures.
Uses GLES2 + texture2D() + GL_OES_EGL_image_external in all other external-oes
cases.

https://bugzilla.gnome.org/show_bug.cgi?id=766993
2016-06-21 21:27:47 +10:00
Sergey Borovkov
180405714c qml: Enable qmlglsink for eglfs
https://bugzilla.gnome.org/show_bug.cgi?id=763044
2016-06-16 01:49:16 +10:00
Matthew Waters
861ce43cd8 glsl: add some debugging 2016-06-15 18:10:59 +10:00
Matthew Waters
27e4288de4 glutils: remove unused functions for texture creation/deletion
Everyone uses GstGLMemory now and any future code should as well.
2016-06-15 16:08:57 +10:00
Matthew Waters
216b8eea6c glfilter: remove unused class fields in/out_tex_id
The functionality is not used by any subclass nor are the values set anywhere.
2016-06-15 15:47:47 +10:00
Matthew Waters
6b7f94abb2 gl/upload/meta: remove unneeded texture deletion
The textures are managed by the GstGLMemory inside the output buffer.  Freeing
them prematurely may result in a use-after-free.
2016-06-15 14:40:40 +10:00
Guillaume Desmottes
991d9a6f5f gst-libs: gl, video: use MAY_BE_LEAKED flag
https://bugzilla.gnome.org/show_bug.cgi?id=767162
2016-06-03 00:59:12 +01:00
Havard Graff
63a05aff6a gl: glquery: cast to silence compiler warning
https://bugzilla.gnome.org/show_bug.cgi?id=766973
2016-05-28 22:28:06 +01:00
Matthew Waters
e597e45008 gldisplay: always unref the context on a collision
Otherwise we will leak GstGLContext's when adding the same context more than
once.

Fixes a regression caused by 5f9d10f603 in the
gstglcontext unit test that failed with:

Assertion 'tmp == NULL' failed
2016-05-26 20:19:13 +10:00
Xavier Claessens
b2cfc56e83 gl: win32: Add debug category in gstglcontext_wgl.c
https://bugzilla.gnome.org/show_bug.cgi?id=766867
2016-05-25 23:10:44 +10:00
Haihua Hu
a5cb746983 glimagesink: support video rotation using transform matrix
Add "rotate-method" to glimagesink and apply transform matrix
to vertex coordinate to control rotation.

https://bugzilla.gnome.org/show_bug.cgi?id=765795
2016-05-25 18:28:20 +10:00
Matthew Waters
5f9d10f603 gldisplay: add some debugging about retrieving GL contexts 2016-05-25 18:28:20 +10:00
Sebastian Dröge
6f9b9e153a eglimage: Re-add accidentially removed GST_DEFINE_MINI_OBJECT_TYPE() 2016-05-25 10:01:38 +03:00
Sebastian Dröge
b730f7e89d eglimage: Ensure that the debug category is always initalized
Before the initializer was only run if dmabuf support was used.

https://bugzilla.gnome.org/show_bug.cgi?id=766794
2016-05-25 09:46:37 +03:00
Tim-Philipp Müller
db90f4686f g-i: pass compiler env to g-ir-scanner
It's what introspection.mak does as well. Should
fix spurious build failures on gnome-continuous.
2016-05-24 00:55:11 +01:00
Xavier Claessens
098c5c16ad gl: win32: Unparent internal window before destroying it
For some reason DestroyWindow() deadlock if it's called from
parent window's KeyPress event.

https://bugzilla.gnome.org/show_bug.cgi?id=766533
2016-05-20 17:04:01 +02:00
Xavier Claessens
83bb89f4ec gl: win32: Don't steal parent focus when creating internal window
This fix regression introduced by 0acc18c60f.

https://bugzilla.gnome.org/show_bug.cgi?id=766520
2016-05-20 17:04:01 +02:00
Matthew Waters
b42ccb0556 gldisplay: demote no platform display debug to info
Avoids confusing everyone with a warning that's not always fatal.

https://bugzilla.gnome.org/show_bug.cgi?id=746933
2016-05-15 13:14:41 +03:00
Matthew Waters
799efcb133 gl: take the affine transformation in NDC
Provide a function to get the affine matrix in the meta in terms of NDC
coordinates and use as a standard opengl matrix.

Also advertise support for the affine transformation meta in the allocation
query.
2016-05-14 16:35:29 +03:00
Matthew Waters
5498e97a11 gl/egl: replace gsteglimagememory with an EGLImage wrapper
That can be passed to GstGLMemoryEGL.

This also ports the dmabuf uploader to GstEGLImage and GstGLMemoryEGL.
2016-05-04 13:31:48 +10:00
Gwang Yoon Hwang
c83fd26c80 gl: implement GstGLMemoryEGL
Because current GstEGLImageMemory does not inherit GstGLMemory, GLUpload
allocates additional GLMemory and upload the decoded contents from the decoder
which uses EGLImage (e.g. gst-omx in RPi).

This work adds GstGLMemoryEGL to avoid this overhead. Decoders allocate
GstGLMemoryEGL and decode its contents to the EGLImage of GstGLMemoryEGL.  And
GLUpload uses this memory without allocation of additional textures and blit
operations.

[Matthew Waters]: gst-indent the sources and fix a critical retreiving the egl
display from the memory.

https://bugzilla.gnome.org/show_bug.cgi?id=760916
2016-05-04 12:57:27 +10:00
Matthew Waters
8ccf3dc589 glmemory: add wrapped data pointers to setup_buffer
Allows creating wrapped memories with GstGLAllocationParams.

The wrapped pointers will be set in the parameters before being passed
to the memory allocation function.
2016-05-04 12:51:59 +10:00
Matthew Waters
c9d9077a5f glbasememory: take a pointer as the wrapped gpu handle
Allows passing arbitrary data to wrap the the specific memory implementation
which is required for some memory implementations.
2016-05-04 12:51:59 +10:00
Matthew Waters
344e7db975 gl: fix gles3 header usage for older platforms
Some platforms provide an old version of GLES2/gl2.h and GLES2/gl2ext.h that
will fail when including GLES3/gl3.h due to missing typedef's.

Seen on the RPi.
2016-05-03 20:02:34 +10:00
Sebastian Dröge
b9cfa34118 glviewconvert: Port more things to GLES/GL 3 compatibility
And move the shader mangling code into a single place instead of having a copy
in glcolorconvert and glviewconvert.

https://bugzilla.gnome.org/show_bug.cgi?id=765266
2016-04-27 11:47:20 +03:00
Sebastian Dröge
57a4494528 glcolorconvert: GLES3 deprecates texture2D() and it does not work at all in newer versions than 3.3
Use the newer texture() function instead. This fixes glimagesink and other
things on various Android devices.

https://bugzilla.gnome.org/show_bug.cgi?id=765266
2016-04-27 11:47:20 +03:00
Hyunjun Ko
6a0b35bf37 gl/cocoa: Fix incompatible type warning
https://bugzilla.gnome.org/show_bug.cgi?id=765292
2016-04-20 10:11:03 +03:00
Heinrich Fink
ef12e05a59 gl/caopengllayer: Apply layer.contentsScale to viewport dims
Fixes blurry content on HiDPI screens

https://bugzilla.gnome.org/show_bug.cgi?id=765194
2016-04-18 10:32:07 +03:00
Matthew Waters
b3b73d39a0 gl/cocoa/eagl: don't leak GThread's when dispatching messages
gst_gl_context_get_thread() returns a refed pointer, we need to unref it.
2016-04-13 01:03:20 +10:00
Matthew Waters
5115eadc46 glupload: keep the parent buffer around when converting EGLImage to 2D textures
e.g. receiving and releasing a buffer from OMX too early will potentially
cause textures to be overwritten while/before they are displayed.
2016-04-12 09:41:23 +10:00
Alessandro Decina
b73d2586ce libgstgl: cocoa, eagl: use libdispatch to schedule GL calls
Use libdispatch instead of GMainLoop to dispatch GL calls. libdispatch is more
optimized and cuts a lot of poll()/pthread_* overhead.
2016-04-11 08:40:03 +10:00
Alessandro Decina
38cb69279b glwindow: reduce the number of GMutexes and GConds in send_message()
Don't create many short lived locks/conds in gst_gl_window_send_message. This is
a micro optimization to save a bunch of pthread_* calls which are expensive on
OSX/iOS and possibly other platforms.
2016-04-11 08:40:03 +10:00
Matthew Waters
5e80a99faf eglimage: perform eglCreateImage in the gl thread
while calling eglCreateImage without a GL context current in the executing
thread works on the RPi, some other implementations will return errors.

Marshall the eglCreateImage to the GL thread to appease these implementations.
2016-04-01 16:08:18 +11:00
Matthew Waters
beeb3ff883 glviewconvert: support outputting to multiple draw buffers on GLES3
A similar change that was done to glcolorconvert adding the necessary shader
mangling.
2016-04-01 15:37:04 +11:00
Matthew Waters
822f09f6ae glcolorconvert: implement multiple render targets for GLES3
There are numerous slight differences required between Desktop GL and GLES3 for
multiple render targets.

1. gl_FragData doesn't exist at all and one is required to use
   'layout (location = ?) out ...' instead.
2. gl_FragColor doesn't exist, same as 1
3. texture2D() has been deprecated

Fortunately most of these have been taken care of with GL3 and the shader
mangling already exists so just expand the conditions they are used in.  The
gl_FragData issue requires a new mangle pass though.  We also use this new
pass on desktop GL for consistency.
2016-04-01 15:37:04 +11:00
Matthew Waters
1fe958d6d3 glcolorconvert: don't use the predefined variable name sample
Using 'sample' as a variable name is an error in GLES3
2016-03-31 20:53:18 +11:00
Matthew Waters
9e40dd7d40 gl: add support for building against GLES3 headers
with a fallback to GLES2 headers if available.
2016-03-31 20:53:18 +11:00
Matthew Waters
9ea15579ec glmemory: add checking the read implementation format/type on gles2 platforms
By default, reading GL_RED or GL_RG us unsupported by glReadPixels unless
exposed through GL_COLOR_READ_IMPLEMENTATION_FORMAT/TYPE.  This allows
downloading multiple-planar video frames where possible.
2016-03-31 20:52:42 +11:00
Matthew Waters
afd0ce7160 glbasememory: rollback map state when subclass map fails
Otherwise our state doesn't reflect reality.
2016-03-31 20:52:42 +11:00
Matthew Waters
7685b052b8 glmemorypbo: unmap pbo memory on pbo read error
Otherwise we are returning failure with a dangling map!

Also only unset the NEED_DOWNLOAD flag in download_transfer() if the read actually
succeeds.
2016-03-31 20:52:42 +11:00
Matthew Waters
d38587c142 glshader: add glBindFragDataLocation
There are some cases where it's needed for binding in/out variables in shaders.
e.g. glsl 150 (gl 3.2) doesn't support the 'layout (location = ?)' specifiers in
the shader source so we have to bind them ourselves.
2016-03-31 20:52:42 +11:00
Vineeth TM
8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Matthew Waters
c02f2718b2 gl/proto: sync operations are available on GLES 3.0
Without the GST_GL_API_GLES2 bit set, we will not even attempt to look
for the function pointers in the core library and will fallback to
glFlush/glFinish.
2016-03-22 23:30:10 +11:00
Matthew Waters
a9cf8476ea glmemory: unset GL_UNPACK_ROW_LENGTH in opengl3
If the user uploads their own texture without setting the unpack length, then
then the result will have the appearance of stride mismanagement due to
an incorrect row length.
2016-03-17 22:56:05 +11:00
Matthew Waters
74bbd4c1aa glutils: remove custom code for setting caps features
Just use gst_caps_set_features() instead.
2016-03-17 03:06:05 +11:00
Matthew Waters
200767ba0e glfilter: only allow the same src/sink caps when we are in passthrough mode
If we are given caps with extra features (like the overlay composition
features), we can only deal with that when we are in passthrough mode.

Previously we were bailing entirely and not allowing passthrough filter elements
with things like textoverlay.

Fixes the following pipeline (assuming glfilter supports passthrough):
gl ! textoverlay ! glfilter ! ... ! glimagesinkelement

https://bugzilla.gnome.org/show_bug.cgi?id=763756
2016-03-17 02:37:21 +11:00
Matthew Waters
993ec87ae6 glupload: deal with the ANY caps feature correctly
When transforming, xplode it out into the necessary caps features both
with and without the passthough features.

Fixes negotiation in the following class of pipelines:

gl ! textoverlay ! glupload ! glimagesinkelement

https://bugzilla.gnome.org/show_bug.cgi?id=763756
2016-03-17 02:37:15 +11:00
Matthew Waters
5061095e05 glshader: some compatibility changes for GL 1.4
GL 1.4 (with GL_ARB_shader_objects) doesn't have glIsProgram or glIsShader
equivalents.  As they are simply assertions, skip them when there isn't a
valid function pointer.
2016-03-10 22:53:02 +11:00
Matthew Waters
92b9b57d3e glfilter: retrieve the shader attributes from the GL thread
Otherwise we will receive bogus values

https://bugzilla.gnome.org/show_bug.cgi?id=763365
2016-03-10 22:53:01 +11:00
Matthew Waters
aa6062945c gldisplay: make readding the same context a no-op
With e38af23044 returning the correct contexts,
gst_gl_display_add_context() was susceptible to causing infinte loops when
adding the same GstGLContext more than once.  Fix and add a test for
gst_gl_display_add_context().

Fixes glvideomixer gst-validate tests.
2016-03-08 02:06:13 +11:00
Sebastian Dröge
5f925a1580 Revert "libgstgl: cocoa, eagl: don't marshal GL calls to the context thread"
This reverts commit 797d6415df.

We're frozen for 1.8.0 release and this change might have bigger impact.
2016-03-07 08:54:47 +02:00
Alessandro Decina
797d6415df libgstgl: cocoa, eagl: don't marshal GL calls to the context thread
Execute GL calls without marshalling them to the context thread. In the cocoa
and eagl backends calling gst_gl_context_activate is cheap and therefore calling
it on the current thread and serializing GL calls with a per-context lock is
more efficient (faster and has less overhead) than marshalling everything to the
context thread.

This optimization cuts a large overhead in g_poll (continuously waking up the
context thread) and in g_mutex_*/g_cond_* (waiting for results from the context
thread).
2016-03-07 16:20:17 +11:00
Mark Nauwelaerts
e38af23044 gldisplay: really retrieve glcontext for a specific thread
When requesting a glcontext (regardless of thread), the result was correct.
However, when requesting current glcontext on a specific thread, it could
come up with a glcontext active on another thread.

https://bugzilla.gnome.org/show_bug.cgi?id=763168
2016-03-06 12:10:51 +01:00
Matthew Waters
23806d4953 gl: misc docs fixes/additions 2016-03-06 19:36:17 +11:00
Matthew Waters
dff43480ee gl*memory: document new functionality and objects 2016-03-06 19:36:17 +11:00
Mark Nauwelaerts
8d8c65b6d4 glfilter: handle some more unfixed fields when fixating caps 2016-03-05 19:48:57 +01:00
Nicolas Dufresne
140815ff93 glbasememory: Don't change maxsize at run-time
Maxsize is initialized once and should never change. Allocating data
should have no impact on the selected max size for this memory. This
causing memory map failure as the maxsize would become smaller then
size. This happened when using direct rendering in avviddec on GL that
does not support PBO transfer.

https://bugzilla.gnome.org/show_bug.cgi?id=763045
2016-03-03 19:47:26 -05:00
Matthew Waters
37ff267ff5 eglimagememory: add compatibility definitions for EGL dmabuf
e.g. the RPi doesn't have them defined
2016-02-26 21:15:20 +11:00
Matthew Waters
abec124f69 glcontext: add a method to add a context to another share group
Intended for use with wrapped contexts that are created shared with gst's
gl contexts in order to manage the internal sharegroup state correctly.

e.g. with caopengllayer (which is used in glimagesink and caopengllayersink
on OS X), we create a CGL context from the gst context and the sharing state
was not being correctly set on either GL context and gst_gl_context_is_shared()
was always returning FALSE.

With 11fb4fff80 only flushing with multiple
shared contexts, the required flush was not occuring causing screen
corruption or stuttering.

Note: this didn't affect GST_GL_API=opengl pipelines

https://bugzilla.gnome.org/show_bug.cgi?id=762620
2016-02-26 10:59:04 +11:00
Matthew Waters
98752fde48 gl: fix the build
2d287812 was incomplete
2016-02-22 21:03:28 +11:00
Matthew Waters
2d2878125e gl: error out if the configured GL API is unsupported by our element
https://bugzilla.gnome.org/show_bug.cgi?id=759801
2016-02-22 20:52:54 +11:00
Julien Isorce
0da3390692 gldebug: make sure debug is initialized when calling gst_gl_insert_debug_marker
Usually gl debug is initialized in gst_gl_context_create_thread.
But this function is not used when using the GstGLContextGPUProcess
from ChromiumGStreamerBackend.

Received signal 11 SEGV_MAPERR 000000000000
gst_debug_category_get_threshold
gst_gl_insert_debug_marker
gst_gl_base_filter_gl_start
2016-02-18 16:38:31 +00:00
Sebastian Dröge
22e75a2112 gl: Fix compiler warning about unused const variable with gcc 6
CC       libgstgl_x11_la-gstglcontext_glx.lo
In file included from gstglcontext_glx.c:39:0:
../utils/opengl_versions.h:52:43: error: ‘gles2_versions’ defined but not used [-Werror=unused-const-variable]
 static const struct { int major, minor; } gles2_versions[] = {
                                           ^~~~~~~~~~~~~~
2016-02-18 10:33:20 +02:00
Sebastian Dröge
923dd696f2 gl: Move private headers from SOURCES to noinst_HEADERS 2016-02-18 10:29:21 +02:00
Matthew Waters
d99af79a2c glfilter: insert the debug marker from the GL thread
https://bugzilla.gnome.org/show_bug.cgi?id=761538
2016-02-17 13:01:35 +11:00
Sebastian Dröge
c107a4f60a gl: Remove leftover g_prints
One was commented out, but we also don't use // comments :)
2016-02-16 08:48:23 +02:00
Matthew Waters
b26301bc8d gldebug: use the correct spelling for behavior
The headers use the american spelling of behavior not the UK/AUS version with
the extra U.
2016-02-16 14:41:37 +11:00
Matthew Waters
02262a20e8 glcontext: don't enable GL debug for messages that won't be logged
This is an optimization to avoid pointless string processing.
2016-02-16 14:00:05 +11:00
Tim-Philipp Müller
21dd771b69 gl: syncmeta: define GL_TIMEOUT_IGNORED in more portable way 2016-02-10 10:31:19 +00:00
Alessandro Decina
7c79b33108 gstglshader: cache uniform locations
Avoid redundant calls to glGetUniformLocation. The results can be cached once
the shader has been linked.
2016-02-10 16:37:22 +11:00
Alessandro Decina
2c0aca52a8 gstglcontext: micro optimization to gst_gl_context_thread_add
Invoke the callback right away when called on the context thread. Removes
overhead when nesting libgstgl calls (for example when working with the sync
meta).
2016-02-10 13:11:35 +11:00
Matthew Waters
09c6df31e3 glsyncmeta: add compatibility definition for GL_TIMEOUT_IGNORED 2016-02-09 13:08:21 +11:00
Matthew Waters
cd4a93da3b glsyncmeta: separate out gpu/cpu waits.
CPU waits are more expensive and are only required if the CPU is ever going to
access the data. GPU waits perform inter-context synchronisation and are cheaper
as they don't require CPU intervention.
2016-02-09 12:30:25 +11:00
Matthew Waters
1b0198631c gl: add .def file for msvc builds
Also internalize some API from being exported.
2016-02-05 10:46:21 +11:00
Luis de Bethencourt
aeed18a2bf glquery: remove unnecessary pointer check
All uses of query->context in gstglquery.c assume it exists. We can assume
this as well before unrefing it. Furthermore, gst_object_unref() will just
silently return if it ever were to not exist.
2016-02-04 12:18:39 +00:00
Matthew Waters
4bbe16bb7f glbasefilter: enable qos by default
Improves the responsiveness of the pipeline when resources are close/above the
limitations of the hardware.

Any subclass that wishes not to enable qos can do so themselves.

https://bugzilla.gnome.org/show_bug.cgi?id=761519
2016-02-04 17:31:03 +11:00
Matthew Waters
eb14273631 Revert "gl/eagl: try getting a gles3 context"
This reverts commit 96b9666d59.
This reverts commit d11385d167.

This breaks the texture sharing with the applemedia elements as
CVOpenGLESTextureCache seems to have an arbitrary restriction on GLES2 only.
2016-02-02 18:37:44 +11:00