Haihua Hu
e7700f20fd
viv-fb: export viv-fb display api
...
qmlgl plugin will use this api
https://bugzilla.gnome.org/show_bug.cgi?id=795562
2018-04-26 09:29:41 +03:00
Haihua Hu
3c8368129a
viv-fb: install gstgldisplay_viv_fb.h into build result
...
gstgldisplay_viv_fb.h is need by qmlgl plugin in gst-good package
https://bugzilla.gnome.org/show_bug.cgi?id=795499
2018-04-26 09:29:21 +03:00
Sebastian Dröge
e99affac71
gl/cocoa: Let ARC clean up our dispatch queue if ARC is used, and otherwise do it manually
...
Also don't use __bridge casts if ARC is not used, as is the case on 32
bit systems.
2018-04-25 01:33:43 +03:00
Sebastian Dröge
b747ae9657
gl/cocoa: Use NSRect instead of CGRect
...
On 64 bit systems they're typedefs of each other but on 32 bit systems
not, and we pass the rect to an API that expects a NSRect
2018-04-25 01:09:40 +03:00
Mark Nauwelaerts
710990d5cf
gl: fix some GIR annotations
...
Mostly related to out and array parameters
2018-04-23 19:33:19 +02:00
Tim-Philipp Müller
762733c3d8
meson: gl: fix 'invalid keyword argument' meson warnings
...
Required is not a valid kwarg for cc.has_header()
2018-04-20 11:44:55 +01:00
Omar Akkila
2f3ff84f40
egl: fix build when using RPi EGL
...
https://bugzilla.gnome.org/show_bug.cgi?id=795336
2018-04-18 14:37:16 -04:00
Víctor Manuel Jáquez Leal
57ede858f0
gl: Define default value for GST_GL_HAVE_WINDOW_GBM
...
Thus, silent compiler's warning:
"GST_GL_HAVE_WINDOW_GBM" is not defined, evaluates to 0 [-Wundef]
2018-04-16 11:15:52 +02:00
Edward Hervey
22c9e5f7c1
libs: Documentation cleanup
...
* Fix wrong naming, wrong types and typos
* Add missing sections
* Add missing documentation for entries
* Explicitely mark private structure entries
* Remove items that never existed
2018-04-02 08:53:28 +02:00
Tim-Philipp Müller
df66d00876
gl: pick up GstVideo-1.0.gir from local build dir
...
https://bugzilla.gnome.org/show_bug.cgi?id=794708
2018-03-27 11:18:35 +01:00
Carlos Rafael Giani
9324ada729
gl/gbm: Initialize window handle (= gbm surface) like other window systems
...
https://bugzilla.gnome.org/show_bug.cgi?id=793997
2018-03-22 10:15:10 +02:00
Carlos Rafael Giani
9ce1e4e712
viv-fb: Include gstglfuncs.h to fix cross compilation errors
...
https://bugzilla.gnome.org/show_bug.cgi?id=794589
2018-03-22 09:51:58 +02:00
Tim-Philipp Müller
c5b5ef16d3
gl: GST_EXPORT -> GST_GL_API
...
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 12:10:29 +00:00
Jan Schmidt
c920d994ab
glcolorconvert: Fix a typo in a debug message
2018-03-01 02:14:07 +11:00
Jan Schmidt
f15f60a062
glfilter: Support non-2D texture targets
...
Allow for sub-classes to change pad templates to
support other texture targets, and bind input textures
accordingly.
When setting the caps, also store the texture target.
By default, glfilter only reports 2D texture targets
in the default caps, but sub-classes can change that
and it would be nice if they could easily find out
which texture targets were negotiated.
This adds 2 fields to the public struct, but since
it's unreleased -base API, it's not an ABI break.
2018-03-01 02:14:07 +11:00
Nicolas Dufresne
d796188cf1
meson: Don't install GL GBM headers
2018-02-27 13:16:01 -05:00
Nicolas Dufresne
fbc2375d57
gl: Move DRM_CFLAGS into gst-gl.m4
2018-02-27 13:12:59 -05:00
Nicolas Dufresne
b8bc2b87d0
gl: Add missing gbm directory to dist dir
...
This fixes make distcheck
2018-02-26 07:46:26 -05:00
Carlos Rafael Giani
ee59537657
gl: Add DRM cflags
...
This prevents cross compilation errors like:
usr/include/xf86drm.h:40:10: fatal error: drm.h: No such file or directory
These are caused because gstgldisplay_gbm.h includes xf86drm.h .
https://bugzilla.gnome.org/show_bug.cgi?id=793837
2018-02-26 07:27:20 -05:00
Nicolas Dufresne
1a97338dc7
gl: Add meson support for GBM backend
...
https://bugzilla.gnome.org/show_bug.cgi?id=782923
2018-02-23 21:09:45 -05:00
Carlos Rafael Giani
4df219f336
gl: Add Mesa3D GBM backend
...
This makes it possible to use the GStreamer OpenGL elements without a
windowing system if a libdrm- and Mesa3D-supported GPU is present
https://bugzilla.gnome.org/show_bug.cgi?id=782923
2018-02-23 21:09:45 -05:00
Tim-Philipp Müller
41d7356fa1
meson: fix multi-line string
...
https://bugzilla.gnome.org/show_bug.cgi?id=793629
2018-02-20 11:52:43 +00:00
Víctor Manuel Jáquez Leal
1784f62895
gl/wayland: Memory leak when display couldn't connect
...
When trying to create a wayland display, it may fail because there
is not actually display to connect. It this case NULL is returned
but the created instance is not freed.
This patch unrefs the failed display.
https://bugzilla.gnome.org/show_bug.cgi?id=793483
2018-02-16 13:56:50 +01:00
Tim-Philipp Müller
992fb96843
gl: g-i: expose platform-specific display API in bindings
...
https://bugzilla.gnome.org/show_bug.cgi?id=786391
2018-02-08 17:00:31 +00:00
Matthew Waters
bc604f3597
gl: remove more deprecated type aliases
...
Additions on top of
https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=32a17f313494cbadaf8ec4e337d742e8d7e1b67b
https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=c8b99139b1ef3f8891548b0f2607a135917c338e
2018-02-08 21:14:56 +11:00
Matthew Waters
54701ceb40
gl/display/egl: Fix precondition in display_egl_get_from_native
...
We don't really want type=NONE as input and it was already impossible
for that to occur with the other condtions.
CID #1427144
2018-02-08 16:16:59 +11:00
Philippe Normand
c8b99139b1
glcontext: remove deprecated type alias
...
Now for real without un-needed comments...
2018-02-06 16:13:07 +00:00
Philippe Normand
32a17f3134
glcontext: remove deprecated type alias
2018-02-06 16:08:47 +00:00
Matthew Waters
90198daed1
gl: some annotation fixes
2018-02-05 14:58:06 +11:00
Matthew Waters
576f4e0c64
gl/build/meson: fix gl_api variable names
2018-02-05 14:56:07 +11:00
Matthew Waters
e620cf32cf
glmemory: fixup GL_RGB565 usage when performing texsubimage
...
An additional change for the texsubimage use case on top of
https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c2b2c68beaddbea0ec4fe7b099507cc492f6dd7c
https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=ea6bed111bab9b394d787f7760c6a3b953630d3a
https://bugzilla.gnome.org/show_bug.cgi?id=783066
https://bugzilla.gnome.org/show_bug.cgi?id=792584
2018-02-01 23:30:51 +11:00
Nicolas Dufresne
17b118c120
glimagesink: Allow resetting render rectangle
...
As documented, passing -1 to x and/or y should reset the render
rectangle to the window/display size.
https://bugzilla.gnome.org/show_bug.cgi?id=792798
2018-01-30 09:58:14 +00:00
Roland Peffer
0ffc2015aa
meson: gl: fix build on windows
...
https://bugzilla.gnome.org/show_bug.cgi?id=791772
2018-01-16 13:59:08 +00:00
Tim-Philipp Müller
df0831ce57
meson: fix check whether both gles2 and opengl headers can be included
...
cc.compiles() doesn't support the prefix: kwarg currently, so it
never had any effect.
https://github.com/mesonbuild/meson/issues/2364
https://bugzilla.gnome.org/show_bug.cgi?id=787964
2018-01-16 11:27:18 +00:00
Matthew Waters
b25413fb1c
gl/wayland: move roundtrip on show to window thread
...
This makes it thread safe and fixes a possible deadlock.
Keeping the roundtrip off the window thread will result in two different
threads call wl_display_dispatch_queue() for the same queue which
violates the assumption for _dispatch_queue()'s thread-safety
guarantees.
https://bugzilla.gnome.org/show_bug.cgi?id=788754
https://bugzilla.gnome.org/show_bug.cgi?id=792156
https://bugzilla.gnome.org/show_bug.cgi?id=758984
2018-01-04 15:39:36 +11:00
Tim-Philipp Müller
c117460420
glcolorconvert: re-enable -Wformat-nonliteral warning
...
We can pass string constants here to g_strdup_printf(),
so do so and re-enable the -Wformat-nonliteral warning
we had to disable when merging the opengl libs.
2018-01-03 09:21:49 +00:00
Tim-Philipp Müller
ae4f9aebcc
glcolorconvert: fix missing printf arg for apple rectangular texture case
...
Found by -Wformat-nonliteral (to be re-enabled in a separate commit).
2018-01-03 09:21:38 +00:00
Philippe Normand
81f8257354
gl: cocoa: fix formatting for function definition
...
This is a follow-up of 5d35e1fa15
2017-12-30 12:29:13 +00:00
Philippe Normand
5d35e1fa15
gl: cocoa: Implement set_render_rectangle
...
Resize the internal NSView according to the provided render rectangle.
https://bugzilla.gnome.org/show_bug.cgi?id=791445
2017-12-30 12:24:12 +00:00
Tim-Philipp Müller
d679f752f1
gl: don't link to system gstallocators
...
We already link to the in-tree gstallocators, no need
to link to it again here, which also ends up being the
system gstallocators lib.
https://bugzilla.gnome.org/show_bug.cgi?id=791956
2017-12-26 15:36:44 +01:00
Tim-Philipp Müller
0dd66648c3
gl: fix up a few more #if HAVE_FOO
...
error: "HAVE_PNG" is not defined, evaluates to 0 [-Werror=undef]
2017-12-19 16:51:24 +00:00
Josep Torra
70f93db181
gl: cocoa: fix a warning when building in MacOS 10.12
...
gstglwindow_cocoa.m:186:60: error: incompatible pointer types sending 'GstGLContextCocoa *'
(aka 'struct _GstGLContextCocoa *') to parameter of type 'GstGLContext *' (aka 'struct _GstGLContext *')
2017-12-19 12:42:29 +00:00
Víctor Manuel Jáquez Leal
7b8108a4ca
gl: display: demote error level at display creation error
...
https://bugzilla.gnome.org/show_bug.cgi?id=791391
2017-12-19 12:41:00 +00:00
Tim-Philipp Müller
8227135f3b
gl: hook up to build system
...
Tests and documentation will follow separately.
The mixer elements in the opengl plugin need to stay
in -bad for now since they use GstVideoAggregator.
https://bugzilla.gnome.org/show_bug.cgi?id=754094
2017-12-19 12:01:48 +00:00
Tim-Philipp Müller
59fe9c9122
gl: remove GST_USE_UNSTABLE_API bits
2017-12-19 12:01:37 +00:00
Nicolas Dufresne
b769f02261
gldisplay: Prefer wayland over X11
...
As most Wayland compositors supports XWayland, X11 backend get
selected. This also realign better GStreamer decision to what
happens with GTK and other stack out there.
2017-12-09 19:32:31 +00:00
Nicolas Dufresne
4cb1a1ca97
gldisplay: Add missing GL API to the doc
2017-12-09 19:32:31 +00:00
Matt Fischer
c98f92ee03
gldownload: Add dmabuf exporting
...
This patch adds code to gldownload to export the image as a
dmabuf if requested. The element now exposes memory:DMABuf as
a cap feature, and if it is selected, the element exports the
texture to an EGL image and then a dmabuf. It also implements a
fallback to system memory download in case the exportation failed.
https://bugzilla.gnome.org/show_bug.cgi?id=776927
2017-12-09 19:32:31 +00:00
Matthew Waters
1abd0804f4
gl/caopengllayer: use public GstGLContext instead of Cocoa-specific one
...
Allows keeping the GstGLCAOpenGLLayer public but not the winsys-specific
context/display/window.
2017-12-09 19:32:31 +00:00
Matthew Waters
6533e25e9c
Revert "gl: cocoa: sprinkle some GST_EXPORT"
...
This reverts commit 94d798c333
.
cocoac headers don't need to be public as all the functionality can be
provided by the base class
2017-12-09 19:32:31 +00:00
Tim-Philipp Müller
84249c6f55
gl: cocoa: sprinkle some GST_EXPORT
...
Undefined symbols for architecture x86_64:
"_gst_gl_context_cocoa_get_type", referenced from:
__create_layer in libgstopengl_la-caopengllayersink.o
Might need some more in other headers, but first need to
clarify what exactly should be exported, there are some
inconsistencies (installed header files vs. funcs in docs).
2017-12-09 19:32:31 +00:00
Jan Schmidt
a4834c4352
viv-fb: Don't destroy the native FB display
...
It causes crashes in applications because the result of
fbGetDisplay() might be in use elsewhere in the application
and Vivante doesn't seem to do any refcounting
2017-12-09 19:32:31 +00:00
Jan Schmidt
7d1f3db884
Revert "gl: Use GstGLDisplayEGL directly instead of creating a GstGLDisplayVIVFb subclass"
...
This reverts commit 47fd4d391e
.
This patch is incorrect. It doesn't actually compile, and causes a crash
because the viv-fb window implementation needs a native EGL handle
to pass to fbCreateWindow, but the GstGLDisplayEGL handleis actually
an EGLDisplay now (and gets cast to the wrong type)
2017-12-09 19:32:31 +00:00
Tim-Philipp Müller
4e2ede5e6d
meson: remove outdated comment in build file
2017-12-09 19:32:31 +00:00
Edward Hervey
5915f45e27
all: Fix left-shift undefined behaviour
...
Cast to the target type before shifting (or use macro if available)
2017-12-09 19:32:31 +00:00
Matthew Waters
5345acac54
glbasefilter: actually indicate start internally
...
Otherwise when we stop, the necessary stop functions will not be called
and things may be leaked.
https://bugzilla.gnome.org/show_bug.cgi?id=788280
2017-12-09 19:32:30 +00:00
Matthew Waters
a534d8d74c
gl/shader: allow setting non-square matrices as uniforms on gles platforms
...
It is possible with GLES3
2017-12-09 19:32:30 +00:00
Matthew Waters
fab729c61f
gl/query: split tests and fix some corresponding issues in usage
2017-12-09 19:32:30 +00:00
Jérôme Laheurte
247e232ec4
Use value instead of version macro when testing for mac OS version
...
https://bugzilla.gnome.org/show_bug.cgi?id=788404
2017-12-09 19:32:30 +00:00
Cassandra Rommel
2ed379c732
gl: Use GstGLDisplayEGL directly instead of creating a GstGLDisplayVIVFb subclass
...
This simplifies the code a lot without any functional changes apart from
not closing the display connection. Closing the display connection is
not safe to do as it is shared between all other code in the same
process and no reference counting or anything happens at the platform
layer.
2017-12-09 19:32:30 +00:00
Justin Kim
5b35e2339a
glcontext_egl: Add gstglwindow header
...
Otherwise, compiler complains implicit function declaration warning.
https://bugzilla.gnome.org/show_bug.cgi?id=788413
2017-12-09 19:32:30 +00:00
Ponnam Srinivas
e686f1b628
glfilter: Unmap video frame in error case
...
https://bugzilla.gnome.org/show_bug.cgi?id=788194
2017-12-09 19:32:30 +00:00
Haihua Hu
c33fc416b2
gl/viv-fb: transform screen coordinate to viewport coordinate
...
In y direction, screen coordinate are opposite to viewport coordinate.
https://bugzilla.gnome.org/show_bug.cgi?id=787394
2017-12-09 19:32:30 +00:00
Haihua Hu
8ef4a7ddaf
gl/viv-fb: fix wrong pos (x,y) calculate in queue_resize
...
queue_resize viewport coordinate calculate is wrong and
force queue_resize when do _set_render_rectangle in case
user input pos changed
https://bugzilla.gnome.org/show_bug.cgi?id=787394
2017-12-09 19:32:30 +00:00
Nicolas Dufresne
707385690d
Request minimum buffer even if need_pool is FALSE
...
When tee is used, it will not request a pool, but still it wants to
know how many buffers are required.
https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-12-09 19:32:30 +00:00
Matthew Waters
a5aff145a2
gl/wayland: call eglTerminate() before wl_display_disconnect()
...
Calling these two functions in the wrong order will result in
use-after-free inside wayland.
https://bugzilla.gnome.org/show_bug.cgi?id=787293
2017-12-09 19:32:30 +00:00
Matthew Waters
143f9abf49
gtkglsink: expose the created display and context correctly
...
1. Propagate the GstGLDisplay we create
2. Add the created GstGLContext to the propagated GstGLDisplay
Otherwise with multi-branch GL pipelines involving gtkglsink, things
will fall apart and errors will be genarated somewhere.
2017-12-09 19:32:30 +00:00
Matthew Waters
ed7d0c48f6
gl: fix build for ios/win32/android after 2fd84a6c
...
Some missing GL includes.
2017-12-09 19:32:30 +00:00
Tim-Philipp Müller
ccb27e7317
gl: install new glfuncs.h header
2017-12-09 19:32:30 +00:00
Matthew Waters
66bdef894a
gl/meson: add build for the vivante fb backend
2017-12-09 19:32:30 +00:00
Matthew Waters
e15f116de2
gl/meson: detect valid configuration from enabled apis/platform/winsys
2017-12-09 19:32:30 +00:00
Matthew Waters
00498d2b30
gl/build: also check for the GL/gl.h header
...
In order to successfully build against a detected libGL library we also need headers
2017-12-09 19:32:30 +00:00
Matthew Waters
21252d450c
glutils: fix matrix operations everywhere
...
- correct the matrix multiplication
- Use column-major matrices
- reverse order of matrix multiplications
https://bugzilla.gnome.org/show_bug.cgi?id=785980
2017-12-09 19:32:30 +00:00
Philippe Normand
0214f4fb55
gl/cocoa: fix build after commit 2fd84a6c
2017-12-09 19:32:30 +00:00
Julien Isorce
4952fdd956
gl: do not include GL headers in public gstgl headers
...
Except for gst/gl/gstglfuncs.h
It is up to the client app to include these headers.
It is coherent with the fact that gstreamer-gl.pc does not
require any egl.pc/gles.pc. I.e. it is the responsability
of the app to search these headers within its build setup.
For example gstreamer-vaapi includes explicitly EGL/egl.h
and search for it in its configure.ac.
For example with this patch, if an app includes the headers
gst/gl/egl/gstglcontext_egl.h
gst/gl/egl/gstgldisplay_egl.h
gst/gl/egl/gstglmemoryegl.h
it will *no longer* automatically include EGL/egl.h and GLES2/gl2.h.
Which is good because the app might want to use the gstgl api only
without the need to bother about gl headers.
Also added a test: cd tests/check && make libs/gstglheaders.check
https://bugzilla.gnome.org/show_bug.cgi?id=784779
2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
b6e65172fe
gl: fix build
...
Include private headers for parent class debug categories.
2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
62069a9dc6
gl: add missing new header files
...
https://bugzilla.gnome.org/show_bug.cgi?id=786170
2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
1ddde50048
gl: make some debug categories private
...
They weren't supposed to be public.
https://bugzilla.gnome.org/show_bug.cgi?id=786170
2017-12-09 19:32:29 +00:00
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
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
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
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
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
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
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
Matthew Waters
d47a515315
build/gl/meson: check for GLES3/gl3ext.h existence
...
791e7522eb
for meson
https://bugzilla.gnome.org/show_bug.cgi?id=781885
2017-12-09 19:32:27 +00:00
Jens Georg
73af514e1a
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-12-09 19:32:27 +00:00
Sebastian Dröge
aef461d4a0
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-12-09 19:32:27 +00:00
Haihua Hu
e2ff120d97
glupload: passthrough composition caps features in directviv upload
...
https://bugzilla.gnome.org/show_bug.cgi?id=782046
2017-12-09 19:32:27 +00:00
Thibault Saunier
95ac4d5175
docs: Port all docstring to gtk-doc markdown
2017-12-09 19:32:27 +00:00
Thibault Saunier
b11df33ee2
docs: Stop linking to inexistant symbols
2017-12-09 19:32:27 +00:00
Claudio Saavedra
7566c43130
meson: add missing gstglrenderbuffer.h header
...
https://bugzilla.gnome.org/show_bug.cgi?id=781179
2017-12-09 19:32:27 +00:00
Scott D Phillips
995d110fe6
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-12-09 19:32:27 +00:00
Vincent Penquerc'h
326b8763de
glcontext: fix display leak
...
https://bugzilla.gnome.org/show_bug.cgi?id=781019
2017-12-09 19:32:27 +00:00
Vincent Penquerc'h
697cd40ee4
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-12-09 19:32:27 +00:00
Jan Schmidt
920d295c97
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-12-09 19:32:27 +00:00
Josep Torra
2cdce1d75f
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-12-09 19:32:27 +00:00
Nicolas Dufresne
ae30818f7b
gldisplay: Fix assert caused by missing debug category
2017-12-09 19:32:27 +00:00
Scott D Phillips
8d3d6d3595
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-12-09 19:32:27 +00:00
George Kiagiadakis
6b6a8a46b5
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-12-09 19:32:27 +00:00
Matthew Waters
61ee2685c0
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-12-09 19:32:27 +00:00
Matthew Waters
66468b4245
gl/format: use our own GL format enum's instead of gstvideo's
...
They can describe in more detail (such as component sizes) the requested format.
2017-12-09 19:32:27 +00:00
Vincent Penquerc'h
b71e104d00
glupload: fix GValue leak
...
https://bugzilla.gnome.org/show_bug.cgi?id=779869
2017-12-09 19:32:27 +00:00
Sebastian Dröge
e976c200b0
gl/eagl: It's -fobjc-arc not -fobj-arc
2017-12-09 19:32:27 +00:00
Nick Kallen
7b42f26b80
applemedia/gl: Update code to use ARC
...
All code interacting with Objective-C objects should now use Automated
Reference Counting rather than manual memory management or Garbage
Collection. Because ARC prohibits C-structs from containing
references to Objective-C objects, all such fields are now typed
'gpointer'. Setting and gettings Objective-C fields on such a
struct now uses explicit __bridge_* calls to tell ARC about
object lifetimes.
https://bugzilla.gnome.org/show_bug.cgi?id=777847
2017-12-09 19:32:27 +00:00
Arun Raghavan
ee49afed97
gl: Missed one backwards compat define in GST_GL_TYPE_CONTEXT
...
Continued from 296b4251e3
2017-12-09 19:32:27 +00:00
Sebastian Dröge
a4a8ef5507
gl: Fixup for last commit
2017-12-09 19:32:27 +00:00
Sebastian Dröge
de16dc2555
gl: Fix backwards compat GST_GL_TYPE_* functions/macros
...
These have to be macros instead of inline function as they must behave
more or less like an integer literal, i.e. include the function call.
2017-12-09 19:32:26 +00:00
Sebastian Dröge
dde95e8270
gl/viv-fb: Don't use deprecated symbols and make macros more consistent
...
https://bugzilla.gnome.org/show_bug.cgi?id=778825
2017-12-09 19:32:26 +00:00
Sebastian Dröge
f5ea12a471
glcolorconvert: Check return value of gst_gl_context_check_framebuffer_status()
...
CID 1401588
2017-12-09 19:32:26 +00:00
Sebastian Dröge
6a32795949
gl: Add viv-fb to DIST_SUBDIRS to fix "make distcheck"
2017-12-09 19:32:26 +00:00
Sebastian Dröge
108eef7ac7
glutils: Mark private functions as G_GNUC_INTERNAL
2017-12-09 19:32:26 +00:00
Sebastian Dröge
1c1094e4e7
glupload: Add support for Vivante DirectTexture uploads
...
Together with the upcoming gstreamer-imx patch, this allows zerocopy
between imxvpudec and other elements and glimagesink.
This is losely based on a patch by Haihua Hu <b55597@freescale.com>
from https://github.com/Freescale/meta-freescale/blob/master/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/
https://bugzilla.gnome.org/show_bug.cgi?id=779067
2017-12-09 19:32:26 +00:00
Sebastian Dröge
ed7c9f70d9
gl: Add support for Vivante EGL FB windowing system
...
This is very similar to how dispmanx on the Raspberry Pi works.
Based on a patch by Haihua Hu <b55597@freescale.com> from
https://github.com/Freescale/meta-freescale/tree/master/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad
https://bugzilla.gnome.org/show_bug.cgi?id=778825
2017-12-09 19:32:26 +00:00
Sebastian Dröge
a6cbe2a2cb
glmemory: Use glBlitFramebuffer() instead of glCopyTexImage2D() if available
...
glBlitFramebuffer() is new GLES3/GL3 API. They are probably often
implemented in terms of each other, and glBlitFramebuffer() can
potentially be implemented more flexible. Let's use it if available.
Also it actually works on imx6 with DirectVIV textures.
Based on a patch by Haihua Hu <jared.hu@nxp.com> from
https://github.com/Freescale/meta-freescale/blob/master/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/
https://bugzilla.gnome.org/show_bug.cgi?id=779070
2017-12-09 19:32:26 +00:00
Sebastian Dröge
48f79e9f60
configure: Remove unused Mali EGL/fbdev_window support
...
This existed a long time ago but there's no actual code for this
anymore.
2017-12-09 19:32:26 +00:00
Thibault Saunier
cdec2d0181
meson: Build GIR files
2017-12-09 19:32:26 +00:00
Matthew Waters
ad20a945de
gl: update sys dependants for function removals
...
4315a4b54d
forgot to change the androidmedia/videotoolbox/caopengllayer
sources as required.
2017-12-09 19:32:26 +00:00