Commit graph

2159 commits

Author SHA1 Message Date
Tim-Philipp Müller
4be04f8315 gl: don't export symbols that are not supposed to be public
Make a bunch of symbols private that are currently leaked
accidentally because they have a gst_* prefix and are used
internally. We mark those we can't make static with
G_GNUC_INTERNAL so that they get hidden with the autotools
build as well (although we could just pass -fvisibility=hidden
there too).
2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
150511d931 gl: sprinkle more GST_EXPORT 2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
fbb62097e7 gl, wayland: mark more declared functions with GST_EXPORT 2017-12-09 19:32:29 +00:00
Julien Isorce
a50c09ac26 gl: return NULL mem if eglCreateImage failed
Found on rpi when gpu_mem is too low so there is not enough memory to
create the eglimage. But still gst_buffer_pool_acquire_buffer succeeded.
And it leads to a CRITICAL assert:
  gst_egl_image_get_image: assertion 'GST_IS_EGL_IMAGE (image)' failed

https://bugzilla.gnome.org/show_bug.cgi?id=785518
2017-12-09 19:32:29 +00:00
Matthew Waters
5c4b47e615 gl: document missing GstGLShader functions 2017-12-09 19:32:29 +00:00
Matthew Waters
82cf1b9c71 gl/docs: some documentation updates
Add some missing/incomplete docs
2017-12-09 19:32:29 +00:00
Matthew Waters
3200e2f00d gl/docs: correctly name our objects in the documentation GstGl -> GstGL 2017-12-09 19:32:29 +00:00
Matthew Waters
99f9bb5612 gl/docs: document GstGLFormat enum 2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
d6766ec881 gl: fix g-i annotations for glframebuffer
gstglframebuffer.c:176: Error: GstGL: annotations not supported for tag "Since:".
2017-12-09 19:32:29 +00:00
Alessandro Decina
b299f70dcf meson: specify fallback for libgmodule_dep
Fixes build with glib built as a subproject.
2017-12-09 19:32:29 +00:00
Edward Hervey
79d5b5151b 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-12-09 19:32:29 +00:00
Philippe Normand
28a2734184 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-12-09 19:32:29 +00:00
Matthew Waters
d75eb628d6 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-12-09 19:32:29 +00:00
Matthew Waters
b7698b1613 gl/window/x11: implement set_render_rectangle support
https://bugzilla.gnome.org/show_bug.cgi?id=782959
2017-12-09 19:32:29 +00:00
Julien Isorce
2aa61c73de pkgconfig: missing GL_CFLAGS in gstreamer-gl-uninstalled.pc.in
Already present in gstreamer-gl.pc.in

https://bugzilla.gnome.org/show_bug.cgi?id=784779
2017-12-09 19:32:29 +00:00
Jan Schmidt
76bf415a96 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-12-09 19:32:29 +00:00
Jan Schmidt
79f52a4943 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-12-09 19:32:29 +00:00
Julien Isorce
575c7bca40 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-12-09 19:32:29 +00:00
Matthew Waters
715639f78c 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-12-09 19:32:29 +00:00
Hyunjun Ko
402d805c90 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-12-09 19:32:29 +00:00
Nicolas Dufresne
92537b1364 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-12-09 19:32:29 +00:00
Guillaume Desmottes
581161ecd7 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-12-09 19:32:28 +00:00
Sebastian Dröge
70715b5181 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-12-09 19:32:28 +00:00
Sebastian Dröge
59db0ee4e1 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-12-09 19:32:28 +00:00
Nicolas Dufresne
e0d351c798 gl: Add dependency to gstallocators 2017-12-09 19:32:28 +00:00
Jeremy Hiatt
4511b34e00 glutils: Fix GValue leak in gst_gl_value_set_texture_target_from_mask() 2017-12-09 19:32:28 +00:00
Sebastian Dröge
0572c41c28 gl: Fix indentation 2017-12-09 19:32:28 +00:00
Sebastian Dröge
4cac59d222 glframebuffer: #define GL_READ_FRAMEBUFFER / GL_DRAW_FRAMEBUFFER if not defined yet
Just like we do elsewhere already.
2017-12-09 19:32:28 +00:00
Haihua Hu
ea6bed111b 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-12-09 19:32:28 +00:00
Haihua Hu
2fc05e90d8 glframebuffer: check frame buffer status need use specific fbo target
https://bugzilla.gnome.org/show_bug.cgi?id=783065
2017-12-09 19:32:28 +00:00
Anders Jonsson
4179109ba2 gltestsrc: Fix typo (occured->occurred)
https://bugzilla.gnome.org/show_bug.cgi?id=782947
2017-12-09 19:32:28 +00:00
Olivier Crête
28b7954ea1 glbasemixer: Remove unused negotiated member
This is now all handled in GstAggregator, so this code is not
called anymore.
2017-12-09 19:32:28 +00:00
Olivier Crête
00760618df gl*mixer: Use propose_allocation from the GstAggregator base class
https://bugzilla.gnome.org/show_bug.cgi?id=782918
2017-12-09 19:32:28 +00:00
Carlos Rafael Giani
cdd4f4532c gl/viv-fb: Fix user-choice string comparisons
https://bugzilla.gnome.org/show_bug.cgi?id=782921
2017-12-09 19:32:28 +00:00
Olivier Crête
5bb22d8f12 glbasemixer: Remove own decide_allocation, use GstAggregator's
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-12-09 19:32:28 +00:00
Olivier Crête
7eaafa62a8 glbasemixer: Use aggregator for allocation handling
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-12-09 19:32:28 +00:00
Olivier Crête
74db4fa64e videoaggregator: Get the buffer from the pool if available
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-12-09 19:32:28 +00:00
Tim-Philipp Müller
70e2b4b416 gl: x11: fix compiler warning 2017-12-09 19:32:28 +00:00
Matthew Waters
4c75bab70d glcontext: add public swap_buffers function
That simply calls the implementation
2017-12-09 19:32:28 +00:00
Tim-Philipp Müller
996b8c746f examples: gl: remove ancient bitrotten .vcproj files 2017-12-09 19:32:28 +00:00
Matthew Waters
ffe51f38fc aggregator: add simple support for caps handling
Modelled off the videoaggregator caps handling as that seems the most
mature aggregtor-using implementation that has caps handling there is.

https://bugzilla.gnome.org/show_bug.cgi?id=776931
2017-12-09 19:32:28 +00:00
fvanzile
178bbc253d 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-12-09 19:32:28 +00:00
Josep Torra
c020f421e1 examples: fix macOS 9.12 deprecation warnings
Add #defines to allow older versions of macOS to use the new constant names.
2017-12-09 19:32:28 +00:00
Josep Torra
ffb9559849 cocoa: fix a recently introduced typo
Fixes gstgldisplay_cocoa.m:175:26: error: use of undeclared identifier 'singletone'.
2017-12-09 19:32:28 +00:00
Josep Torra
88a4d06735 cocoa: fix macOS 10.12 deprecation warnings
Add #defines to allow older versions of macOS to use the new constant names.
2017-12-09 19:32:28 +00:00
Haihua Hu
479b95205f glformat: Add missing GST_GL_RGB565 in some switch statement
https://bugzilla.gnome.org/show_bug.cgi?id=782736
2017-12-09 19:32:28 +00:00
Sebastian Dröge
f32e8bc4b2 cocoa: Install gstgldisplay_cocoa.h
It's needed by e.g. qmlglsink.
2017-12-09 19:32:28 +00:00
Sebastian Dröge
a9a05c01a9 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-12-09 19:32:28 +00:00
Nicolas Dufresne
e004cfd6fe 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-12-09 19:32:27 +00:00
Sebastian Dröge
6b1fa09077 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-12-09 19:32:27 +00:00