Commit graph

2048 commits

Author SHA1 Message Date
Tim-Philipp Müller e7f77f3a01 tests: fix build on Windows with MSVC 2018-01-16 20:13:45 +00:00
Tim-Philipp Müller d09c38faf7 meson: tests: fix build of tcp test on unix
Need to add gio-unix-2.0 dep to pipelines/tcp test otherwise it
won't find the gio/gunixfdmessage.h header which is not in the
same dir as the other gio headers. This issue was masked before
because we didn't include config.h so HAVE_GIO_UNIX_2_0
wasn't defined.
2018-01-16 19:22:16 +00:00
Tim-Philipp Müller 9297da71ce meson: tests: skip allocators dmabuf test on non-Linux 2018-01-16 19:21:53 +00:00
Tim-Philipp Müller 3f184c3abc tests: include config.h and don't include unix headers
In many cases the unistd.h includes weren't actually needed.

Don't build tests that need it on windows with MSVC
(multifdsink, multisocketsink, pipelines/tcp).

Preparation for making tests work on Windows with MSVC.
2018-01-16 18:14:59 +00:00
Tim-Philipp Müller c4be7eca5d examples: playback: don't use deprecated font button API
playback-test.c:2587:3: error: "gtk_font_button_get_font_name" is deprecated
2018-01-08 14:21:29 +00:00
Matthew Waters 7cc1431a56 libs/glheaders: move object creation to the gl thread where necessary
Some GL platforms (EGL, WGL) require deactivating the OpenGL context in
one thread before it can be used in another thread which this test
currently violates and would e.g. result in EGL_BAD_ACCESS errors from
gst_gl_context_activate().

Fix by moving the object creation into the GL thread instead and not
requiring additional gst_gl_context_activate() calls.

https://bugzilla.gnome.org/show_bug.cgi?id=792158
2018-01-03 23:11:54 +11:00
Matthew Waters 9e563a20c2 tests/glheaders: use #if for platform selection
GST_GL_HAVE_* are always defined to 0 or 1 so an #ifdef will always
succeed which is not the intention here.
2018-01-03 23:09:20 +11:00
Tim-Philipp Müller 2ee4ab1ebb meson: gl: define HAVE_PNG etc. in config.h instead of c_args
So that the tests have access to them as well (gl-launch-lines.c)
2017-12-22 22:28:20 +01:00
Miguel Paris bae3636197 rtp: fix gst_rtp_buffer_ext_timestamp taking into account backwards
If timestamp goes forwards more than allowed, we consider that the
timestamp belongs to the previous counting, so the extended timestamp
is unwrapped.

https://bugzilla.gnome.org/show_bug.cgi?id=783443
2017-12-21 17:27:42 -05:00
Mathieu Duponchelle c56323e821 tests: add missing comma 2017-12-21 19:32:03 +01:00
Mathieu Duponchelle 1382f69861 tests: conditionally define the glimagesink test as well
Forgotten in previous commit
2017-12-21 19:28:00 +01:00
Mathieu Duponchelle b0d795263f tests: fix build when not building gstgl
gstgl_dep is only defined when build_gstgl is true
2017-12-21 19:25:48 +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
Tim-Philipp Müller d85a7a9b2e gl: hook up tests
Also move over simple gl launch line test.
2017-12-19 12:01:51 +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 0eefcb23b4 gl: examples: fix c++ code for -Wreturn-aggregate
.. and use #ifdef instead of #if
2017-12-19 12:01:44 +00:00
Tim-Philipp Müller 59fe9c9122 gl: remove GST_USE_UNSTABLE_API bits 2017-12-19 12:01:37 +00:00
Tim-Philipp Müller cdbb261d9c Move OpenGL library and plugin from -bad
Merge branch 'opengl-move'

https://bugzilla.gnome.org/show_bug.cgi?id=754094
2017-12-19 12:00:43 +00:00
Nicolas Dufresne ecab99a7a9 sdlshare: Destroy GL backend buffer before the GL Context
This was otherwise leading to a deadlock in the GL library.
2017-12-09 19:32:31 +00:00
Nicolas Dufresne 9e208ba0b6 sdlshare2: Fix race conditions
The client-draw callback is running on the GL Thread, which will
be required to map the buffer. Map early, and pass the mapped
frame instead. On top of that, make sure to signal any pending
draw before trying to push EOS, as some pad locks might be taken.
This is the cost of using the same thread to control GStreamer and
to render GL.
2017-12-09 19:32:31 +00:00
Nicolas Dufresne dea918a835 meson: Build gl/sdl examples 2017-12-09 19:32:31 +00:00
Jan Schmidt bbe084de9d 3dvideo example: Correct video overlay for HiDPI
Use the GTK scaling factor to scale the video allocation
so video displays correctly on hi-dpi screens
2017-12-09 19:32:31 +00:00
Matthew Waters d7f43bb06b gl/tests: add some simple shader testing
Making sure that the default shaders compile and are usable
2017-12-09 19:32:31 +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
Philippe Normand b9a2c64d8d examples/gl/gtk: build fix for the 3dvideo example on macOS 2017-12-09 19:32:30 +00:00
Philippe Normand 0559b42d6c examples/gl/gtk: fix overlay handling for macOS
The GTK+ window requires a NSView sub-view, not an NSWindow.
2017-12-09 19:32:30 +00:00
Matthew Waters 9620edc49e gl/checks: fix build 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
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 996b8c746f examples: gl: remove ancient bitrotten .vcproj files 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
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
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
Matthew Waters fc8217ae8d gl/tests: fix glimagesink element test on OSX
It was suffering a race starting up the thread that could cause the main
loop to quit before the main loop had started.
2017-12-09 19:32:25 +00:00
Matthew Waters 8b9a29a97c gl/tests: don't use the default framebuffer
Create our own instead as the default framebuffer may require special
fiddling (like having a visible window) to correctly display/be renderable.

Fixes the remaining GL library tests on OS X
2017-12-09 19:32:24 +00:00
Matthew Waters 263255137e examples/gl/qt: fix the examples for the use of newer API
gstgl doesn't undo/overwrite what GL state the examples are changing
anymore.  As such, the examples need to reset the GL state themselves
to be able to play nice with libgstgl
2017-12-09 19:32:24 +00:00
Matthew Waters 18ac98c58b gl: GST_GL_TYPE -> GST_TYPE_GL
Some deprecated symbols are kept for backwards compatibility
2017-12-09 19:32:23 +00:00
Matthew Waters 8faebcf915 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.
2017-12-09 19:32:23 +00:00
Matthew Waters 7ab50a8e8f tests/gl: make sure all GL commands are executed on the GL thread
e.g. the final glGetError() must also be completed on the GL thread
2017-12-09 19:32:22 +00:00
Alistair Buxton 6d8456e018 gl/examples: Really remove references to $(GST_PLUGINS_GL_*).
These seem to have been missed in the previous commit to this file.

https://bugzilla.gnome.org/show_bug.cgi?id=771023
2017-12-09 19:32:22 +00:00
Matthew Waters 00aa5748d3 tests/glupload: support opengl3 properly instead of spewing GL errors 2017-12-09 19:32:22 +00:00
Alessandro Decina 29d6825f11 glupload: fix tests and check for the new RECONFIGURE behaviour
The tests were broken since 91fea30, which changed glupload to return
GST_GL_UPLOAD_RECONFIGURE if the texture target in the input buffers doesn't
match the texture-target configured in the output caps.

This commit fixes that and adds more checks for the new behaviour.
2017-12-09 19:32:22 +00:00
Matthew Waters 061049dd73 gl/examples/fxtest: fix up for wayland support
- Pass the wayland display to gst
- Redrawing on resize is no longer needed.
2017-12-09 19:32:22 +00:00
Matthew Waters 3c1c5e9d83 glcontext: remove not thread-safe get/set_error()
Use GError's instead if necessary.
2017-12-09 19:32:21 +00:00
Matthew Waters 4bbda2b626 glframebuffer: rewrite for a more consistent API
Facilities are given to create fbo's and attach GL memory (renderbuffers
or textures).  It also keeps track of the renderable size for use with
effective use with glViewport().
2017-12-09 19:32:21 +00:00
Matthew Waters 1153684a94 glmemory: add the texture type to allocate to parameters
Rather than assuming something.  e.g. zerocopy on iOS with GLES3 requires
the use of Luminance/Luminance Alpha formats and does not work with
Red/RG textures.
2017-12-09 19:32:21 +00:00
Guillaume Desmottes f077d937ad glimagesink: fix query leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=766663
2017-12-09 19:32:20 +00:00
Guillaume Desmottes a7f21fedc5 glimagesink: properly setup/teardown tests
tcase_add_checked_fixture() is suppose to call the setup and teardown
functions so the tests don't have to do it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2017-12-09 19:32:20 +00:00