Arun Raghavan
b7065f5f8e
gl: Missed one backwards compat define in GST_GL_TYPE_CONTEXT
...
Continued from 296b4251e3
2017-03-06 17:52:31 +05:30
Sebastian Dröge
be1eeba67d
gl: Fixup for last commit
2017-03-04 11:47:04 +02:00
Sebastian Dröge
296b4251e3
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-03-04 11:17:35 +02:00
Sebastian Dröge
a0199d17a1
gl/viv-fb: Don't use deprecated symbols and make macros more consistent
...
https://bugzilla.gnome.org/show_bug.cgi?id=778825
2017-03-04 11:17:35 +02:00
Sebastian Dröge
fef775d703
glcolorconvert: Check return value of gst_gl_context_check_framebuffer_status()
...
CID 1401588
2017-02-28 12:34:30 +02:00
Sebastian Dröge
9bd30e0277
gl: Add viv-fb to DIST_SUBDIRS to fix "make distcheck"
2017-02-28 12:31:54 +02:00
Sebastian Dröge
c9b5bee53d
glutils: Mark private functions as G_GNUC_INTERNAL
2017-02-28 10:55:10 +02:00
Sebastian Dröge
ed1e4c16fb
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-02-27 10:42:05 +02:00
Sebastian Dröge
e9327d4928
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-02-27 10:42:05 +02:00
Sebastian Dröge
bfdbdb7eb6
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-02-23 21:57:33 +02:00
Sebastian Dröge
0c902ff249
configure: Remove unused Mali EGL/fbdev_window support
...
This existed a long time ago but there's no actual code for this
anymore.
2017-02-16 20:09:40 +02:00
Thibault Saunier
cea4346d84
meson: Build GIR files
2017-01-23 12:48:53 -03:00
Matthew Waters
03b539bdfc
gl: update sys dependants for function removals
...
4315a4b54d
forgot to change the androidmedia/videotoolbox/caopengllayer
sources as required.
2017-01-13 13:01:28 +11:00
Juan Pablo Ugarte
fb5339a387
glslstage: define GL constants if needed instead of using #ifdef
...
https://bugzilla.gnome.org/show_bug.cgi?id=777144
2017-01-13 11:20:51 +11:00
Matthew Waters
6919b4ca66
glutils: document functions
2017-01-13 11:20:51 +11:00
Matthew Waters
4de388278a
glutils: privatise matrix multiplication/videoaffinetransformation retrieval
2017-01-13 11:20:51 +11:00
Matthew Waters
4315a4b54d
gl/utils: also take care of the local GL context in query functions
...
Simplifies a deduplicates a lot of code in elements retrieving/setting
the local OpenGL context.
2017-01-13 11:20:51 +11:00
Matthew Waters
3fba290979
glutils: remove trivial helper function
...
gst_gl_caps_replace_all_caps_features() is only used in two places and can
be trivially reproduced.
2017-01-13 11:20:51 +11:00
Matthew Waters
6f4657c464
gl/docs: add symbols from -unused.txt
2017-01-13 11:20:50 +11:00
Matthew Waters
f032334eac
gl/docs: some type fixes of type names
2017-01-13 11:20:50 +11:00
Matthew Waters
1c12c21653
glwindow: use the same parameter names between vfuncs and functions of the same name
...
Silences GI warnings about symbol's not being used from source code
comment block
2017-01-10 20:07:09 +11:00
Matthew Waters
91ed9fe362
glbasememory: type fix for GstGLBaseMemoryAllocatorAllocFunction
2017-01-10 20:06:39 +11:00
Matthew Waters
b76f14f004
gldisplay: add missing transfer annotations
2017-01-10 20:05:42 +11:00
Matthew Waters
b65ecbaa2b
gl: add skip annotations to non-GI possible struct constructors
2017-01-10 20:04:30 +11:00
Matthew Waters
f8a2721388
glbasememory: remove unused and #if 0'ed function definitions
2017-01-10 20:03:09 +11:00
Matthew Waters
a1f2da88bf
gl: add necessary get_type() functions for allocation params structures
...
All using the existing GstGLAllocationParams infrastructure
2017-01-10 19:58:48 +11:00
Matthew Waters
a20d064304
gldisplay: some annotation updates/typo fixes
2017-01-10 15:35:52 +11:00
Matthew Waters
01cf3547dd
gl: remove reference to non-existant header
...
../../../../gst-libs/gst/gl/gl.h:57:45: fatal error: gst/gl/gstglcontrolbindingproxy.h: No such file or directory
#include <gst/gl/gstglcontrolbindingproxy.h>
^
2017-01-10 14:29:46 +11:00
Matthew Waters
a4024b61cf
gl: remove custom control binding proxy
...
Use the existing GstProxyControlBinding instead.
2017-01-10 13:57:37 +11:00
Matthew Waters
f3d2be1e4f
gl: remove unneeded gst_gl_buffer_alloc from header file
...
There's no implementation anymore!
2017-01-10 13:57:37 +11:00
Matthew Waters
66d616f5ed
gl/egl: remove use of texture orientation
2017-01-10 13:57:37 +11:00
Matthew Waters
d9f553bff5
glcontext/egl: don't overwrite set GError
...
Doing so is an error and will cause a glib warning to be printed.
https://bugzilla.gnome.org/show_bug.cgi?id=776722
2017-01-10 01:00:12 +11:00
Matthew Waters
d8d28e4426
gl/format: use the unsized format for RGB on GLES2
...
In GLES2 GL_RGB8 doesn't exist so we cannot use it, use GL_RGB
instead.
https://bugzilla.gnome.org/show_bug.cgi?id=776141
2016-12-17 01:13:44 +11:00
Matthew Waters
e6e403a6c9
gl/window: remove unused priv variable
...
https://ci.gstreamer.net/job/GStreamer-master/7989/console
2016-12-16 00:22:41 +11:00
Matthew Waters
f58eb98440
gl/window: remove use of main_context_push/pop_thread_default()
...
No-one's using/depending on it (it would have criticalled and not worked)
and it's causing more problems than it's solving. Store the GMainContext
in the public struct instead for subclasses to optionally use instead of
relying on the push/pop state to be correct.
https://bugzilla.gnome.org/show_bug.cgi?id=775970
2016-12-16 00:02:47 +11:00
Sebastian Dröge
5c99f9cf37
gst: Don't declare variables inside the for loop header
...
This is a C99 feature.
2016-12-13 22:39:01 +02:00
Julien Isorce
f7b039e7df
gstglupload: relax EGL context check
...
Check for GST_GL_PLATFORM_EGL enum instead of type GstGLContextEGL.
https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-12-01 10:50:10 +00:00
Julien Isorce
119955bea4
gstglcontext: is_shared should return FALSE if no group
...
If a sub class of GstGLContext does not create a group
then it currently crashes:
0 g_atomic_int_get (&share->refcount)
1 _context_share_group_is_shared (context->priv->sharegroup)
2 gst_gl_context_is_shared
3 _default_set_sync_gl
https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-12-01 10:50:05 +00:00
Matthew Waters
1db88cbee7
glmemoryegl: remove spurious #if GST_GL_HAVE_DMABUF conditions
...
8c2118823b
had some incorrect preprocessor
conditions that aren't actually needed. Remove them.
https://bugzilla.gnome.org/show_bug.cgi?id=775248
2016-11-30 19:29:27 +11:00
Matthew Waters
024e92afe7
glwindow: move g_main_context_push/pop_thread_default() to run()
...
Calling g_main_context_push_thread and then g_main_context_invoke()
(used by gst_gl_window_send_message_async()) in the same thread will
cause the invoked function to run immediately instead of being delayed.
This had implications for the creation of the OpenGL context not waiting
until the main loop had completely started up and as a result would
sometimes deadlock in short create/destroy scenarios.
https://bugzilla.gnome.org/show_bug.cgi?id=775171
2016-11-28 14:27:03 +11:00
Matthew Waters
25fbc6d877
glcontext: fix race between creation/shutdown
...
626bcccff9
removed some locks that
allowed the main loop quit to occur before the context was fully
created.
2776cef25d
attempted to readd them but
missed the scop of the quit() call.
Also remove the use of g_thread_join() as that's not safe to use when
it's possible to lose the last reference from the GL thread.
https://bugzilla.gnome.org/show_bug.cgi?id=775171
2016-11-28 14:27:03 +11:00
Sebastian Dröge
939528e542
gl/x11: Remove unused static function
2016-11-25 23:44:25 +02:00
Matthew Waters
4a0214335f
gl/contextglx: error out on more invalid display/window combinations
...
https://bugzilla.gnome.org/show_bug.cgi?id=774851
2016-11-23 17:04:34 +11:00
Matthew Waters
7ab4abb3ab
gl: add necessary context_egl.h #includes to the source files
2016-11-23 15:57:05 +11:00
Matthew Waters
75d36b990d
gl/memoryegl: remove access to private header gstglcontext_egl.h
...
It's been removed and thus compiling anything against GstGLMemoryEGL
would error with:
In file included from gstomxvideodec.c:41:0:
usr/include/gstreamer-1.0/gst/gl/egl/gstglmemoryegl.h:32:41: fatal error: gst/gl/egl/gstglcontext_egl.h: No such file or directory
#include <gst/gl/egl/gstglcontext_egl.h>
^
https://bugzilla.gnome.org/show_bug.cgi?id=774886
2016-11-23 13:36:45 +11:00
David Evans
5591f55db5
gl: add gstreamer-video to pkg-config path
...
https://bugzilla.gnome.org/show_bug.cgi?id=774624
2016-11-21 09:34:44 +02:00
Matthew Waters
39b59beace
meson: gl/egl: add missing source file
...
d42145e8c1
didn't add the necessary
meson build changes.
2016-11-17 14:32:10 +11:00
Matthew Waters
8c2118823b
gl/egl: remove EGLImage functions from egl context
...
By adding the necessary GstEGLImage entry points to create a GstEGLImage
from a GstGLMemory.
https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-11-17 14:06:21 +11:00
Matthew Waters
f2e9190229
glcontext: add vfunc to retrieve the OpenGL platform version
...
i.e. the version of EGL, GLX, etc implemented.
https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-11-17 14:06:21 +11:00
Matthew Waters
d42145e8c1
gl/egl: move get_error_string() into gstegl
...
So others can use it without #include-ing a private header
https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-11-17 14:06:21 +11:00
Matthew Waters
cdaada4300
display/egl: implement getting the EGLDisplay of a specific platform
...
https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-11-17 14:06:21 +11:00
Víctor Manuel Jáquez Leal
9ca4c8ec35
gl/egl: check the feature in the extensions list
...
https://bugzilla.gnome.org/show_bug.cgi?id=774518
2016-11-16 19:52:54 +01:00
Matthew Waters
bb84f7357b
glcontext/cocoa: implement empty swap_buffers
...
Fixes some GL tests on OS X.
2016-11-16 17:34:29 +11:00
Matthew Waters
9f690fa241
glwindow/cocoa: remove unneeded window code in NSWindow
...
This is all taken care of by GstGLWindowCocoa/GstGLNSView now.
2016-11-16 00:01:00 +11:00
Matthew Waters
23ec5aeb83
glwindow/cocoa: remove our view from the parent when closing
...
Otherwise, when the application reuses the same UIView, we were getting
draw notifications on the previous view/layer's which weren't valid anymore
and were referencing pointers that had been freed.
https://bugzilla.gnome.org/show_bug.cgi?id=753003
2016-11-16 00:00:17 +11:00
Matthew Waters
5602cab04d
gl/caopengllayer: add a debug category
2016-11-15 23:55:00 +11:00
Matthew Waters
f2d09b8cd4
glbufferpool: introduce check for GLMemory allocators
...
The last missing piece of EGLImage support has been pushed.
2016-11-15 23:55:00 +11:00
Tim-Philipp Müller
ba6b8c33e0
gl: x11-xcb is not a required dependency
...
Don't fail if it's not found..
2016-11-11 01:06:23 +00:00
Matthew Waters
3f7b549881
gl/utils: move gen_shader() to the plugin and remove del_shader()
...
gst_gl_context_del_shader() can be replaced by a g_object_unref().
gst_gl_context_gen_shader() should be replaced by using GstGLSLStage.
2016-11-10 20:11:03 +11:00
Matthew Waters
59350d078b
glwindow: remove unused field in public struct
2016-11-10 20:05:45 +11:00
Matthew Waters
01fa90c1e7
glwindow: remove is_running() function
...
It isn't necessary in correctly written programs.
2016-11-10 20:05:45 +11:00
Nirbheek Chauhan
de4552d279
meson/gl: XCB changes also need x11-xcb as a dependency
...
https://ci.gstreamer.net/job/GStreamer-master-meson/380/console
[...]
gst-libs/gst/gl/x11/xcb_event_source.c:98: undefined reference to `xcb_get_file_descriptor'
2016-11-08 17:52:02 +05:30
Philippe Normand
a424f04a22
gl/x11: fix meson build
...
The x11_event_source.[ch] files were renamed in
4f6c226bd2
.
2016-11-08 09:54:15 +01:00
Matthew Waters
f9d463d80e
glwindow: remove the navigation thread
...
This functionality can now effectively be implemented with the display event
thread.
2016-11-08 15:14:27 +11:00
Matthew Waters
4f6c226bd2
gl/x11: use xcb instead of libX11
...
- xcb is supposedly thread-safe!
videotestsrc ! glimagesink now doesn't spuriously result in a
'call XInitThreads()' error however if anybody else is using X11,
then XInitThreads() still needs to be called and multiple glimagesink's
still need XInitThreads().
Everything still takes libX11 handles as they are compatible with the xcb
variants. Unfortunately we cannot move fully over to xcb due to GLX being
entirely based on Xlib. It's also impossible to transform a xcb_connection
to a Display which means we require X11 handles.
2016-11-08 15:14:26 +11:00
Matthew Waters
e4916fb1ef
gldisplay: add a list of glwindow's
...
With the event thread on the display, for a particular winsys event
we need to be able to retreive the window that the event matches.
2016-11-08 15:14:26 +11:00
Matthew Waters
1a6c4be242
gldisplay: add a dedicated event thread
...
Will take the place of the navigation event thread for dealing with
winsys events.
2016-11-08 12:50:45 +11:00
Matthew Waters
92ba1d0df6
gl: don't expose OpenGL prototypes
...
We roll our own to avoid depending a certain OpenGL header version
2016-11-08 12:46:09 +11:00
Matthew Waters
2a440f60e4
gl/cocoa: don't install the gstglcontext_cocoa.h header
...
It's not needed to be exposed
2016-11-08 12:46:09 +11:00
Matthew Waters
7dc7ec94e7
gl/android: don't install the android window header
...
It's not needed
2016-11-08 12:46:09 +11:00
Matthew Waters
86930b6d11
gl: add padding to all exposed winsys/platform-specific structs
2016-11-08 12:46:09 +11:00
Matthew Waters
2209c5d97f
gl/wayland: install the gstgldisplay_wayland.h header
...
As it is used by other OpenGL sinks (gtkglsink, qmlglsink)
2016-11-08 12:45:55 +11:00
Matthew Waters
c6326530cc
gl/egl: don't install the gstglcontext_egl.h header
...
It's not needed to be exposed and there are no users of the API.
2016-11-08 02:44:30 +11:00
Matthew Waters
cafcde5586
glfilter: remove display_init/reset
...
They are mirrors of GstGLBaseFilter's gl_start() and gl_stop() virtual methods
so use them instead.
2016-11-08 02:21:20 +11:00
Matthew Waters
fe64686c8c
gldisplay: Fix inverted precondition
...
A GError argument must either be null or point to a NULL GError.
https://developer.gnome.org/glib/stable/glib-Error-Reporting.html
2016-11-03 18:21:55 +11:00
Matthew Waters
23e147f619
gl/gi: some annotation updates for called functions
...
With scope, closure, destroy annotations
2016-11-03 16:16:12 +11:00
Matthew Waters
61a3c55d55
gl/gi: also include GstVideo
...
Removes all the unknown type GstVideo* warnings while building the GIR
file.
2016-11-03 16:16:12 +11:00
Matthew Waters
19752be030
glfeature: move internal functions into a private header
...
Don't expose them to the outside world
2016-11-03 16:16:12 +11:00
Matthew Waters
41a6448918
gl: GST_GL_TYPE -> GST_TYPE_GL
...
Some deprecated symbols are kept for backwards compatibility
2016-11-03 16:16:12 +11:00
Matthew Waters
0dc003bf30
gl/docs: massive update
...
- add Since: markers where necessary.
- document structs
- add documentation headers for each module (short_description,
see_also, etc)
- reduce the number of warnings gtk-doc outputs
- fix spelling mistakes
2016-11-03 16:16:11 +11:00
Matthew Waters
1296741d3d
gl/docs: document new API added in 1.10
...
GstGLRenderbuffer
GstGLFramebuffer
GstGLQuery
GstEGLImage
GstGLMemoryEGL
2016-11-03 12:08:44 +11:00
Matthew Waters
4b43862cdb
glsl: fix #version 150 not working with profiles
...
The spec allows the core/compatibility profiles to be used
with #version 150.
Also tighten up the tests to check for default profiles being chosen
correctly.
2016-11-03 12:08:44 +11:00
Nirbheek Chauhan
f1c9fa28d2
build: Also need to define GST_EXPORTS for Autotools
...
The change to use GST_EXPORT for symbols under Windows requires
GST_EXPORTS for internal use, and that is also needed under Autotools.
The same thing is done for gstreamer-1.0.dll in -core.
2016-10-28 10:01:36 +05:30
Nirbheek Chauhan
7e6764e304
gstgl: Re-enable WINAPI on _MSC_VER
...
The calling convention may be deprecated, but we still need it for
OpenGL. The build issue was caused by an incorrect syntax being used for
the WINAPI (__stdcall) prototype in function pointers which was accepted
by GCC but is rejected by MSVC.
2016-10-28 10:00:59 +05:30
Nirbheek Chauhan
f790863755
Explicitly define float constants as float
...
With MSVC, this gives the following warning:
warning C4305: 'function': truncation from 'double' to 'gfloat'
Apparently, MSVC does not figure out what type to use for constants
based on the assignment. This warning is very spammy, so let's try to
fix it.
2016-10-27 23:06:26 +05:30
Nirbheek Chauhan
e3c1a545ba
gstgl: Add GST_EXPORT to all symbols used on Windows
...
This is a requirement for those symbols to be exported in gstgl-1.0.dll
when building with the MSVC compiler
2016-10-27 23:06:25 +05:30
Nirbheek Chauhan
6f707381c3
meson: Add support for building WGL on Windows
...
Currently only tested with MSVC.
2016-10-27 23:06:25 +05:30
Nirbheek Chauhan
d5dba89fc0
gstgl: Porting fixes for MSVC with Meson
...
GL/gl.h needs windows.h on MSVC
WINAPI should not be used with MSVC. It also causes a build error.
2016-10-27 23:06:25 +05:30
Matthew Waters
cbaee81f9c
glsyncmeta: don't glFinish() everytime a sync point is set
...
At minimum, we only need to glFlush() if we are in a shared GL context
environment. Move the glFinish() to when the actual wait is requested
which may be never. Improves the throughput on older GL systems without
GL3/GLES3 and/or fence sync objects.
2016-10-21 15:54:37 +11:00
Matthew Waters
c36ea6f56f
meson: gl: add support for building with dispmanx on the rpi
2016-10-19 17:10:48 +11:00
Matthew Waters
0abeebc4e8
gl/eglimage: Fix passing the destroy function to gst_egl_image_new_wrapped
...
The function pointer and the user data arguments were swapped in both
uses.
https://bugzilla.gnome.org/show_bug.cgi?id=769382
2016-10-18 22:43:03 +11:00
Munez
cb8204f6c0
Implemented gst_video_overlay_set_window_handle()
...
https://bugzilla.gnome.org/show_bug.cgi?id=772608
2016-10-18 15:53:10 +11:00
Matthew Waters
5e2f9a9690
meson: gl: fix detection of glx without gl
...
We need to check for libGL if we may use desktop OpenGL *or* GLX.
2016-10-18 14:15:40 +11:00
Matthew Waters
b85fa6f2dd
meson: gl: fix incorrect error string
...
Use the winsys variable for an incorrect winsys provided
2016-10-18 14:10:32 +11:00
Munez
429135face
gl/dispmanx: egl_show should resize the window only if there is no render rectangle set
...
https://bugzilla.gnome.org/show_bug.cgi?id=772699
2016-10-18 11:23:42 +11:00
Munez
1cf3d0a590
gl/dispmanx: Fix set_render_rectangle typo
...
https://bugzilla.gnome.org/show_bug.cgi?id=772698
2016-10-18 11:23:42 +11:00
Matthew Waters
9ad4c67578
glwindow: don't use g_thread_join() to join the navigation thread
...
Using g_thread_join() in _finalize() handlers may result in a deadlock
joining the current thread when the last reference is held by a signal
handler.
e.g.:
error 'Resource deadlock avoided' during 'pthread_join (pt->system_thread, NULL)'
The backtrace looks like this:
[...]
g_thread_join ()
gst_gl_window_finalize ()
gst_gl_window_x11_finalize ()
g_object_unref ()
g_value_unset ()
g_signal_emit_valist ()
g_signal_emit ()
gst_gl_window_send_mouse_event ()
gst_gl_window_mouse_event_cb ()
g_main_dispatch ()
[..]
g_main_loop_run ()
gst_gl_window_navigation_thread ()
g_thread_proxy ()
start_thread ()
clone ()
2016-10-05 18:32:09 +11:00
Matthew Waters
e20dab09ea
gl/win32: remove egl implementation
...
It hasn't been used in ages and is dead code.
2016-10-05 12:20:52 +11:00
Gwang Yoon Hwang
b75ec0c433
gl/dispmanx: Implements set_render_rectangle to adjust the position of window
...
We cannot set the x, y coordinate of the video frame at the dispmanx at
this point. We need to teach dispmanx backend to understand about
set_render_rectangle API to draw a video with other UI.
This patch keeps the current behavior which places video frame at the
center of the display if there is no set_render_rectangle call to the
dispmanx window.
https://bugzilla.gnome.org/show_bug.cgi?id=766018
2016-09-28 17:08:52 +10:00
Matthew Waters
c200e47ef8
gl: add necessary padding bytes to all public structs
2016-09-28 17:08:52 +10:00