Julien Isorce
b10fe76cbf
glfilter: use GL_ELEMENT_ARRAY_BUFFER for vbo indices
...
Fixes this error with chromium gpu process:
GL_INVALID_OPERATION, glBindBuffer: buffer bound to more than 1 target
https://bugzilla.gnome.org/show_bug.cgi?id=755618
2015-09-25 20:42:39 +10:00
Julien Isorce
04856e6c8a
glmemory: fix texture leak in _gl_mem_copy
...
https://bugzilla.gnome.org/show_bug.cgi?id=755456
2015-09-25 20:41:33 +10:00
Matthew Waters
46e83f5d50
gl/dispmanx: fix rendering with recent resize state tracking
...
557ca6fda5
didn't change to the
necessary gst_gl_window_resize() call for the dispmanx backend.
2015-09-21 18:11:21 +10:00
Matthew Waters
f82840ce88
gl/caopengllayer: fix non-existent selector warning
...
557ca6fda5
introduced the queueResize
call without implementing the selector
2015-09-17 22:44:41 +10:00
Jan Schmidt
0f0bf863fa
glwindow: Fix g_return_val_if_fail in a void function
2015-09-17 21:52:38 +10:00
Matthew Waters
3addb6bbf4
glwindow: add API to request a resize event on the next draw
...
- glimagesink needs to be able to resize the viewport on aspect ratio
changes resulting from either caps changes or 3d output mode changes.
- Performing a glViewport outside the GstGLWindow::resize callback
will not have the winsys' stack of viewports required to correctly
place the output frame.
Provide a function to request a resize on the next draw event from the
winsys.
Also track size changes inside the base GstGLWindow class rather
than in each subclass.
https://bugzilla.gnome.org/show_bug.cgi?id=755111
2015-09-17 20:26:23 +10:00
Matthew Waters
1625f74632
gl/x11: store the correct dimension from the resize events
...
small typo s/width/height/
2015-09-17 20:21:43 +10:00
Vineeth T M
00438fdff0
gl: Fix GError leaks during failures
...
https://bugzilla.gnome.org/show_bug.cgi?id=755140
2015-09-17 11:52:55 +02:00
Tim-Philipp Müller
fe8de1857a
gl: bufferpool take into account video stride alignment requirements
...
when allocating memory. Fixes crashes with avdec_h265 in the AVX2
code path which requires 32-byte stride alignment, but the
GstAllocationParams only specified a 16-byte alignment.
https://bugzilla.gnome.org/show_bug.cgi?id=754120
2015-09-15 16:11:23 +01:00
Matthew Waters
591494ff54
gl/api: use public rather than private define
...
HAVE_IOS is only defined for the build of this module so
attempting to use gstgl in iOS would result in incorrect GL
includes.
Use GST_GL_HAVE_PLATFORM_EAGL instead for choosing the iOS GL
header.
2015-09-10 00:33:19 +10:00
Sebastian Dröge
bab55828ae
gl/eagl: Also unbind renderbuffer after setting up framebuffer
...
https://bugzilla.gnome.org/show_bug.cgi?id=754757
2015-09-09 10:10:47 +03:00
Sebastian Dröge
c97144b23b
gl/eagl: Don't make context uncurrent just to make it current again in the next line
...
Also binding the framebuffer again is unnecessary then as it was just bound a
few lines before while the context was current.
https://bugzilla.gnome.org/show_bug.cgi?id=754757
2015-09-09 10:10:46 +03:00
Tim-Philipp Müller
1cb3e8c591
gtk, qt, gl: fix typo in debug and error messages
2015-08-31 18:06:31 +01:00
Sebastian Dröge
5c106c0c2a
gl/eagl: Unref context after setting a window handle
...
gst_gl_window_get_context() returns a new reference.
Hopefully fixes https://bugzilla.gnome.org/show_bug.cgi?id=753758
2015-08-25 10:09:14 +03:00
Nicolas Dufresne
206638c439
gl: Let base transform relay the meta api for us
...
During allocation query, when this element is not passthrough, it must
relay the overlay compostion meta and it's parameters. Fortunatly, base
transform can do this for us.
https://bugzilla.gnome.org/show_bug.cgi?id=753850
2015-08-22 22:15:36 -07:00
Justin Kim
85834d6bbc
glcontext: add specific error message when missing GL_SHADING_LANGUAGE_VERSION
...
GL_SHADING_LANGUAGE_VERSION was introduced since ES 2.0, but in some
android emulator doesn't support this feature. To prevent confusion for
developer, the error message need to be more clear.
https://bugzilla.gnome.org/show_bug.cgi?id=753905
2015-08-21 18:14:15 +10:00
Matthew Waters
40d2693d07
glbasefilter: only call gl_{stop,start} if the context changed
...
Removes the redundant GL object creation/deletion on every
decide_allocation call which is being called for every caps change.
Thus reduces the required GL state changes on reconfigure events
which are being sent by glimagesink/xvimagesink
2015-08-20 23:25:35 +10:00
Nicolas Dufresne
a31a753bfd
glupload: Recalculate offset and size in raw upload
...
As we only expose the mapped portion of the frame into the GL
memory object (and not the original padding) we need to
re-calculate the size and offset.
2015-08-16 18:13:27 +02:00
Nicolas Dufresne
e6bd7d2792
gloverlaycompositor: Also disable the blend when done
2015-08-15 15:55:08 +02:00
Nicolas Dufresne
f935b2c547
glsink: Enable sync meta on pools we offer
...
As the upload is asynchronous, we need to enable the sync meta to
gain correct rendering. The buffer pool receiver don't know about
that.
2015-08-15 15:55:08 +02:00
Sebastian Dröge
f4a76139db
opengl: Change GLclampd to double
...
GLclampd does not exist on GLES, only desktop GL.
2015-08-15 10:03:07 +02:00
Martin Kelly
591b2e2c68
opengl: add missing ClearDepth prototype
...
The ClearDepth call is missing.
https://bugzilla.gnome.org/show_bug.cgi?id=753639
2015-08-15 09:28:12 +02:00
Nicolas Dufresne
9720c07f23
gl: Add opengl_version.h to the list of sources
...
Adding this private header to the list of sources. We don't want to make
this header public, but we need it in the list of sources otherwise it
won't be included in the tarball. This fixes make distcheck.
This regression was introduced by commit 1a6fe3db
2015-08-10 14:51:02 -04:00
Matthew Waters
b7777b9181
gl: use gles2 shaders everywhere
...
This effectively limits a glfilter subclass to be > GL(ES) 2.0.
rather than a possible GL 1.4.
2015-08-10 16:38:32 +02:00
Matthew Waters
1a6fe3db40
glcontext/wgl: implement gl3 core profile context selection
2015-08-10 15:46:13 +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
Matthew Waters
69a90b5bfe
gl/syncmeta: implement synchronisation without glFenceSync
...
Uses glFinish as that's the best we have for lesser OpenGL versions.
2015-08-08 17:30:42 +02:00
Matthew Waters
83995c0935
context/glx: only use glXCreateContextAttribs for OpenGL 3 contexts
...
mesa for example when creating a GL 3.1 compatibility context
overrides our context profile selection to create a core context.
2015-08-08 15:32:17 +02:00
Sebastian Dröge
b21f01276c
glupload: Remove debug output from gst_gl_upload_transform_caps()
...
We can't know if the GstGLUpload type is initialized at this point already,
and thus our debug category might not be initialized yet... and cause an
assertion here.
As we don't print debug output for any of the other transform functions, let's
defer this problem for now.
2015-07-29 19:11:58 +01:00
Nicolas Dufresne
f79cad55e2
glupload: Add fixme about using bufferpool for raw
...
http://bugzilla.gnome.org/show_bug.cgi?id=752937
2015-07-28 08:59:48 -04:00
Nicolas Dufresne
adbd9d3c05
glupload: Keep input frame mapped as long as needed
...
When performing a raw upload, we need to keep the raw data mapped as
long as needed.
https://bugzilla.gnome.org/show_bug.cgi?id=752937
2015-07-28 08:54:29 -04:00
Nicolas Dufresne
eb4d3c352a
Revert "glupload: memcpy on raw data upload"
...
This reverts commit 82c0189b28
.
https://bugzilla.gnome.org/show_bug.cgi?id=752937
2015-07-28 08:54:29 -04:00
Matthew Waters
ee94aa003a
glcontext/wgl: fix defenition of gst_gl_context_wgl_new
...
gstglcontext_wgl.c: In function 'gst_gl_context_wgl_new':
gstglcontext_wgl.c:83:40: error: 'display' undeclared (first use in this function)
2015-07-27 21:54:27 +10:00
Matthew Waters
1137ed3e45
gl/cocoa: fix definition of gst_gl_context_new
...
gstglcontext_cocoa.m:75:1: error: conflicting types for 'gst_gl_context_cocoa_new'
2015-07-27 20:03:05 +10:00
Matthew Waters
2beaabea12
gl/win32: fix definition of gst_gl_window_win32_new
2015-07-27 20:00:47 +10:00
Matthew Waters
4d9ae8ebba
wayland: fail window open if the display is the correct type
...
Errors out cleanly if a wayland compositor is not running
2015-07-27 18:23:33 +10:00
Matthew Waters
3b89d8a23c
glwindow: pass display to implementation's _new()
...
So they have to opportunity to fail if they cannot handle the
display connection.
https://bugzilla.gnome.org/show_bug.cgi?id=752743
2015-07-27 18:23:29 +10:00
Matthew Waters
dbcae77e02
glcontext: pass display to implentation's _new()
...
This allows the context to fail creation based on incompatible
display type's. e.g. glx context with an wayland display handle.
https://bugzilla.gnome.org/show_bug.cgi?id=752743
2015-07-27 18:23:17 +10:00
Julien Isorce
5e4b94c1bb
gl: support cgl, egl and glx within a same build
...
On osx, with the same build,
gst-launch-1.0 videotestsrc ! glimagesink works with:
GST_GL_PLATFORM=egl GST_GL_WINDOW=x11 GST_GL_API=gles2
GST_GL_PLATFORM=egl GST_GL_WINDOW=x11 GST_GL_API=opengl
GST_GL_PLATFORM=glx GST_GL_WINDOW=x11 GST_GL_API=opengl
GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa GST_GL_API=opengl
GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa GST_GL_API=opengl3
https://bugzilla.gnome.org/show_bug.cgi?id=752743
2015-07-27 09:03:58 +01:00
Jan Schmidt
45f8a27211
glupload: Check that caps contain desired caps features
...
Use 'contains' checks instead of equality checks on caps features
to allow for uploading when caps also contain GstVideoOverlayComposition
meta.
https://bugzilla.gnome.org/show_bug.cgi?id=752912
2015-07-27 17:21:33 +10:00
Julien Isorce
90a1ff1383
gl: move GL_NUM_EXTENSIONS definition after gl.h
...
https://bugzilla.gnome.org/show_bug.cgi?id=752743
2015-07-24 00:03:26 +01:00
Luis de Bethencourt
7ecf6b0d6c
glupload: fix memory leak
...
GstCapsFeatures need to be freed with gst_caps_features_free() after use.
CID #1312136 , CID #1312136
2015-07-23 10:58:21 +01: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
4a1e63817f
libgstgl: Makefile style fix
2015-07-22 13:33:12 -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
Julien Isorce
57f389d9ce
gl: use gst_gl_display_create_context in more elements.
...
glbasefilter, glbasemixer and gltestsrc.
https://bugzilla.gnome.org/show_bug.cgi?id=750310
2015-07-21 11:37:21 +01:00