Commit graph

1632 commits

Author SHA1 Message Date
Matthew Waters
3d2785965d gl/docs: some documentation updates
Add some missing/incomplete docs
2017-07-28 11:00:12 +01:00
Matthew Waters
23da53306f gl/docs: correctly name our objects in the documentation GstGl -> GstGL 2017-07-27 12:40:30 +10:00
Matthew Waters
bb3478da5b gl/docs: document GstGLFormat enum 2017-07-27 12:40:30 +10:00
Tim-Philipp Müller
38726eb341 gl: fix g-i annotations for glframebuffer
gstglframebuffer.c:176: Error: GstGL: annotations not supported for tag "Since:".
2017-07-21 08:43:45 +01:00
Alessandro Decina
85e5c7b4d9 meson: specify fallback for libgmodule_dep
Fixes build with glib built as a subproject.
2017-07-20 17:51:41 +10:00
Edward Hervey
9da1328283 meson: Fix GLES2 check
On systems without pkg-config, we have the the library present but
not the headers

https://bugzilla.gnome.org/show_bug.cgi?id=785010
2017-07-17 08:52:57 +02:00
Philippe Normand
dcb35318e9 glwindow_cocoa: fix video overlay support
Make sure the window handle is configured after the NSWindow was created.

https://bugzilla.gnome.org/show_bug.cgi?id=767462
2017-07-16 10:21:29 +01:00
Matthew Waters
24e3cbf13b gl/cocoa: keep refs over async operations
Avoids dereferencing dead objects

What happens in the autovideosink case is that context 1 is created and
destroyed before all the async operations hae executed on the associated
window.  When the delayed operations execute, they then reference dead
objects and crash.

We fix this by keeping refs over all async operations so the object
cannot be deleted while async operations are in flight.

https://bugzilla.gnome.org/show_bug.cgi?id=782379
2017-07-16 12:50:31 +10:00
Matthew Waters
1656d8000d gl/window/x11: implement set_render_rectangle support
https://bugzilla.gnome.org/show_bug.cgi?id=782959
2017-07-16 12:50:31 +10:00
Jan Schmidt
6083ad6287 glfilter: Remove hard-coded pad templates
Add a function to install the default RGBA pad templates,
but don't make them required so that there can be
GstGLFilter sub-classes with different input/output
caps if they want. Remove the hard-coded RGBA restriction in
the set_caps_features call, as it will be taken care
of by intersecting with the pad templates.

Update all the sub-classes to match
2017-07-12 15:50:24 +10:00
Jan Schmidt
cb3a65a19a glupload: Don't throw assertions on invalid allocation query
basesrc can send an allocation query with no caps, in which
case we should just fail it without throwing assertions.
2017-07-12 15:48:23 +10:00
Julien Isorce
86ae9777ad glupload: add GST_CAPS_FEATURE_MEMORY_DMABUF
Insert before SystemMemory to advice upstream elements that it is
preferable for them to push dmabuf with the caps feature.

Examples:

/* Discard memory:DMABuf caps feature */
GST_GL_PLATFORM=egl GST_GL_API=gles2 GST_GL_WINDOW=x11 gst-launch-1.0 \
    filesrc location=test.mp4 ! qtdemux ! h264parse ! vaapih264dec ! \
    capsfilter caps="video/x-raw(memory:SystemMemory)" ! glimagesink

/* Force memory:DMABuf caps feature. */
GST_GL_PLATFORM=egl GST_GL_API=gles2 GST_GL_WINDOW=x11 gst-launch-1.0 \
    filesrc location=test.mp4 ! qtdemux ! h264parse ! vaapih264dec ! \
    capsfilter caps="video/x-raw(memory:DMABuf)" ! glimagesink

/* Auto select memory:DMABuf caps feature.  */
GST_GL_PLATFORM=egl GST_GL_API=gles2 GST_GL_WINDOW=x11 gst-launch-1.0 \
    filesrc location=test.mp4 ! qtdemux ! h264parse ! vaapih264dec ! \
    glimagesink

https://bugzilla.gnome.org/show_bug.cgi?id=774649
2017-06-30 08:31:20 +01:00
Matthew Waters
effda87a0b gl: reset gl->DrawBuffer to the necessary values
GL_COLOR_ATTACHMENT0 when a framebuffer is bound
GL_BACK if no framebuffer is bound

https://bugzilla.gnome.org/show_bug.cgi?id=784210
2017-06-29 14:59:12 +10:00
Hyunjun Ko
02ef39f48a glmemory: reset the draw buffer to GL_BACK
The draw buffer should be reset to GL_BACK since the framebuffer is already
unbound.

https://bugzilla.gnome.org/show_bug.cgi?id=784210
2017-06-29 14:59:12 +10:00
Nicolas Dufresne
55e701a373 meson: Re-add pkg-config support for bcm_host
Now we just fallback to find_library for Rasbian jessy and older.

https://bugzilla.gnome.org/show_bug.cgi?id=784026
2017-06-22 12:20:25 -04:00
Guillaume Desmottes
859daad65d gl: meson: use cc.find_library() to detect 'bcm_host'
On the raspberry pi no pkg-config file is provided for the bcm_host
library. We are using AC_CHECK_LIB to detect this lib with autotools,
cc.find_library() library is a closer meson equivalent.

https://bugzilla.gnome.org/show_bug.cgi?id=784026
2017-06-21 11:44:22 -04:00
Sebastian Dröge
450b1c92ab gl/cocoa: Put gstglwindow_cocoa.h into noinst_HEADERS again
And remove gstgldisplay_cocoa.h instead, which got moved to the
installed headers earlier.
2017-06-20 19:20:19 +03:00
Sebastian Dröge
f845208d79 glupload: Fix DirectVIV uploader for formats with a single plane
We have to pass the "height" as height = vmeta->offset[1] / width to the
API, which of course does not work well for formats with only a single
plane. Use the whole memory size instead of the offset in that case.
2017-06-12 22:29:01 +03:00
Jeremy Hiatt
3620268325 glutils: Fix GValue leak in gst_gl_value_set_texture_target_from_mask() 2017-06-01 14:39:49 +03:00
Sebastian Dröge
be08f0f9a8 gl: Fix indentation 2017-05-25 13:06:03 +03:00
Sebastian Dröge
2434305ec5 glframebuffer: #define GL_READ_FRAMEBUFFER / GL_DRAW_FRAMEBUFFER if not defined yet
Just like we do elsewhere already.
2017-05-25 13:05:23 +03:00
Haihua Hu
c2b2c68bea glformat: fix the usage of GST_GL_RGB565
GL_RGB565 is sized internal glformat, the corresponding glformat
should be GL_RGB and type is GL_UNSIGNED_SHORT_565. Otherwise will
return GL_INVALID_ENUM when creating texture.

https://bugzilla.gnome.org/show_bug.cgi?id=783066
2017-05-25 12:34:12 +03:00
Haihua Hu
405d059a22 glframebuffer: check frame buffer status need use specific fbo target
https://bugzilla.gnome.org/show_bug.cgi?id=783065
2017-05-25 12:34:04 +03:00
Carlos Rafael Giani
d6e46b905a gl/viv-fb: Fix user-choice string comparisons
https://bugzilla.gnome.org/show_bug.cgi?id=782921
2017-05-21 16:52:23 +02:00
Tim-Philipp Müller
06ae762211 gl: x11: fix compiler warning 2017-05-21 11:44:37 +01:00
Matthew Waters
15e13bd44e glcontext: add public swap_buffers function
That simply calls the implementation
2017-05-21 12:12:02 +02:00
fvanzile
eca91d6772 glcontext: keep a ref to the active thread
With the macOS/iOS implementations, the active thread can change
multiple times over the life of a pipeline which would expose a race in
the thread tracking.

Fix by taking a ref on the active thread while the context is active.

https://bugzilla.gnome.org/show_bug.cgi?id=779202
2017-05-20 16:19:38 +02:00
Josep Torra
f805608075 cocoa: fix a recently introduced typo
Fixes gstgldisplay_cocoa.m:175:26: error: use of undeclared identifier 'singletone'.
2017-05-20 12:19:08 +02:00
Josep Torra
ef5d42b0a7 cocoa: fix macOS 10.12 deprecation warnings
Add #defines to allow older versions of macOS to use the new constant names.
2017-05-20 12:16:50 +02:00
Haihua Hu
ff8898bbda glformat: Add missing GST_GL_RGB565 in some switch statement
https://bugzilla.gnome.org/show_bug.cgi?id=782736
2017-05-17 20:33:13 +02:00
Sebastian Dröge
4fdd715c4b cocoa: Install gstgldisplay_cocoa.h
It's needed by e.g. qmlglsink.
2017-05-17 17:38:01 +03:00
Sebastian Dröge
634cd87c76 gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:23 +03:00
Nicolas Dufresne
4261692187 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:05:52 -04:00
Sebastian Dröge
65545ecfa3 glshader: Make reference counting of attach() consistent
https://bugzilla.gnome.org/show_bug.cgi?id=747990
https://bugzilla.gnome.org/show_bug.cgi?id=702960
2017-05-15 12:07:13 +03:00
Matthew Waters
7b615e92b6 build/gl/meson: check for GLES3/gl3ext.h existence
791e7522eb for meson

https://bugzilla.gnome.org/show_bug.cgi?id=781885
2017-05-11 20:06:47 +10:00
Jens Georg
791e7522eb build: Check for GLES3/gl3ext.h existence
Some OpenGL drivers do not ship this but use GLES2/gl2ext.h instead.
This is also in line with Khronos's recommendations

https://bugzilla.gnome.org/show_bug.cgi?id=781885
2017-05-11 20:05:14 +10:00
Sebastian Dröge
0730a55af3 glmemory: Only use glDrawBuffer if available
Otherwise fall back to glDrawBuffers. Also check if glReadBuffer exists
before using it.

glDrawBuffer does not exist for GLES, only glDrawBuffers does.

https://bugzilla.gnome.org/show_bug.cgi?id=782376
2017-05-09 11:26:13 +02:00
Haihua Hu
beab384557 glupload: passthrough composition caps features in directviv upload
https://bugzilla.gnome.org/show_bug.cgi?id=782046
2017-05-02 14:18:43 +03:00
Thibault Saunier
78022a6e0c docs: Port all docstring to gtk-doc markdown 2017-04-12 12:57:57 -03:00
Thibault Saunier
a49c114d4e docs: Stop linking to inexistant symbols 2017-04-12 12:07:51 -03:00
Claudio Saavedra
61ba3f1986 meson: add missing gstglrenderbuffer.h header
https://bugzilla.gnome.org/show_bug.cgi?id=781179
2017-04-11 16:54:04 +03:00
Scott D Phillips
fc0c7d664d meson: gl: set default value of 0 for glconf vars
meson's configure_file emits only a comment like /* #undef ... */
for values which are unset in the configuration_data. For
gstglconfig.h, this differs from the autotools build where the
preprocessor definitions are always either 0 or 1. So loop over a
list of variables to set to zero as default.

Also sync up the gstglconfig.h.meson file with the additional
macros defined by the autotools build.

https://bugzilla.gnome.org/show_bug.cgi?id=781043
2017-04-09 11:20:43 +03:00
Vincent Penquerc'h
3fd5608e21 glcontext: fix display leak
https://bugzilla.gnome.org/show_bug.cgi?id=781019
2017-04-09 11:16:56 +03:00
Vincent Penquerc'h
884e4b7810 gldisplay: fix list leak
Windows aren't always removed in time, and it turns out to be
very, very hard to remove a window in a way that's not racy and
not deadlocky. Since the window itself doesn't leak, freeing
the list on object destruction is enough.

https://bugzilla.gnome.org/show_bug.cgi?id=781018
2017-04-09 11:16:48 +03:00
Jan Schmidt
b8f37d1074 gl: Remove duplicate typedef of GstGLFramebufferClass
The GstGLFramebufferClass struct is typedeffed in
gstgl_fwd.h, and having a duplicate elsewhere is
breaking the cerbero build on my OSX machine,
even though it seems to be working in CI.
2017-04-08 21:28:58 +10:00
Josep Torra
1456c65295 glwindow/cocoa: fix warnings reported by XCode 8.1.0
gstglwindow_cocoa.m:345:16: error: unused variable 'window' [-Werror,-Wunused-variable]
  GstGLWindow *window = GST_GL_WINDOW (window_cocoa);
               ^
gstglwindow_cocoa.m:445:11: error: unused variable 'external_view' [-Werror,-Wunused-variable]
  NSView *external_view = (__bridge NSView *)priv->external_view;
          ^
2017-04-01 16:49:15 +02:00
Nicolas Dufresne
0c4eb22a7d gldisplay: Fix assert caused by missing debug category 2017-03-29 23:45:21 -04:00
Scott D Phillips
1586357a2f gl/format: correct return enums in gst_gl_format_from_video_info
In commit

> 956c4d0 gl/format: use our own GL format enum's instead of gstvideo's

the name and return type of gst_gl_format_from_video_info changed,
but some returns of the old type were missed. Here they are
updated to the correct type.

https://bugzilla.gnome.org/show_bug.cgi?id=780064
2017-03-15 14:32:14 +11:00
George Kiagiadakis
20d4aca0d4 glupload: adjust memory offset calculation for dmabuf buffers
The data in the dmabuf fd may not start from byte 0, therefore
we need to inform EGL about this additional offset.

https://bugzilla.gnome.org/show_bug.cgi?id=779790
2017-03-14 17:07:40 +02:00
Matthew Waters
efc015f27d gl: GL_ARRAY_BUFFER is not a part of VAO state
As a result we need to bind it on every draw in order to have the
correct state in the GL state machine.
2017-03-14 14:15:00 +11:00