Commit graph

568 commits

Author SHA1 Message Date
Edward Hervey 1b23c388ad check: Remove old structures from ABI check
Just in case someone still tries to run it on 32bit osx
2018-04-02 08:33:58 +02:00
Tim-Philipp Müller 556bc04f1c tests: tags: add unit test for ID3 v2.4 extended headers
https://bugzilla.gnome.org/show_bug.cgi?id=792983
2018-03-01 12:43:25 +00:00
Tim-Philipp Müller 92048b81c0 tests: sdp: relicense code snippet from GPLv3 to LGPLv2.1+
Relicense with approval from Jose and Miguel. Code snippet
was supposed to be LGPL from the beginning.

https://bugzilla.gnome.org/show_bug.cgi?id=697808#c14
https://bugzilla.gnome.org/show_bug.cgi?id=697808#c15
2018-02-01 19:39:13 +00:00
Tim-Philipp Müller e7f77f3a01 tests: fix build on Windows with MSVC 2018-01-16 20:13:45 +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
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
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
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 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
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
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
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
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 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
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 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 e7217fad33 glupload: fix shader leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=766663
2017-12-09 19:32:20 +00:00
Matthew Waters ce72589510 tests/glcontext: update test for gen,del_texture removal 2017-12-09 19:32:20 +00:00
Matthew Waters eb1a9bb9b0 gldisplay: make readding the same context a no-op
With e38af23044 returning the correct contexts,
gst_gl_display_add_context() was susceptible to causing infinte loops when
adding the same GstGLContext more than once.  Fix and add a test for
gst_gl_display_add_context().

Fixes glvideomixer gst-validate tests.
2017-12-09 19:32:17 +00:00
Matthew Waters 65533b807c gl: add a gstglquery object for arbitrary GL queries
Currently only GL_TIME_ELAPSED and GL_TIMESTAMP are supported
2017-12-09 19:32:15 +00:00
Matthew Waters 472970324c glcontext: implement checking whether a context has been shared
Some operations are unnecessary when running with only a single GL
context.
e.g. glFlush when setting a fence object as the flush happens on wait.

API: gst_gl_context_is_shared
2017-12-09 19:32:14 +00:00
Matthew Waters 9328ec33f3 tests/glmemory: output data pointer values on failure
Allows quicker inspection of what failed.
2017-12-09 19:32:14 +00:00
Sebastian Dröge eeb4fe6f63 glcolorconvert: Fix name of testsuite 2017-12-09 19:32:13 +00:00
Matthew Waters 09c8c23842 gl*memory*: reverse the parameter order of user_data and destroy notify
The convention is to have the destroy notify last after any user data
2017-12-09 19:32:13 +00:00
Matthew Waters 1673a6192f glmemorypbo: remove our own alloc()/wrapped()/etc functions
replaced by equivalent functionality within gst_gl_base_memory_alloc()
2017-12-09 19:32:13 +00:00
Matthew Waters 56c3d97421 tests: update for glmemory api changes 2017-12-09 19:32:12 +00:00
Matthew Waters ba03bc2cba tests/glmemory: include the generic gl header
Including gstglmemory.h directly results in the compiler complaining
about incomplete types.
2017-12-09 19:32:12 +00:00
Matthew Waters 76a38dd66a glmemory: base classify and add the pbo memory on top
The base class is useful for having multiple backing memory types other
than the default.  e.g. IOSurface, EGLImage, dmabuf?

The PBO transfer logic is now inside GstGLMemoryPBO which uses GstGLBuffer
to manage the PBO memory.

This also moves the format utility functions into their own file.
2017-12-09 19:32:12 +00:00
Matthew Waters cd584d215c gluploadmeta; remove convenience helper API
It was not really useful as if one knows about libgstgl, one can just use
GLMemory objects directly.
2017-12-09 19:32:12 +00:00
Vineeth TM 0adc7e1bc4 tests:glsl: version_profile_s string leak
https://bugzilla.gnome.org/show_bug.cgi?id=758039
2017-12-09 19:32:11 +00:00
Vineeth TM 606e3dee98 tests:glupload: fix caps memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=758039
2017-12-09 19:32:11 +00:00
Vineeth TM 2c4a14f7c7 tests:glcolorconvert: Fix caps memory leak
Output caps being got from video info is not getting freed

https://bugzilla.gnome.org/show_bug.cgi?id=757929
2017-12-09 19:32:11 +00:00
Matthew Waters 25e3e1eb7b gl/tests: update for glmemory api changes 2017-12-09 19:32:10 +00:00
Matthew Waters 681cb5b16d glmemory: add support for rectangle textures
Add the various tokens/strings for the differnet texture types (2D, rect, oes)

Changes the GLmemory api to include the GstGLTextureTarget in all relevant
functions.

Update the relevant caps/templates for 2D only textures.
2017-12-09 19:32:10 +00:00
Matthew Waters 28d6a3edec gl/tests: port glcontext test to opengl
Now uses vao's and vbo's when possible like the rest of the gstgl library.
2017-12-09 19:32:09 +00:00
Matthew Waters f688a8f0b2 glshader: port to using GstGLSLStage objects for string management
A GstGLShader is now simply a collection of stages that are
compiled and linked together into a program.  The uniform/attribute
interface has remained the same.
2017-12-09 19:32:09 +00:00
Matthew Waters 332543f3cf gl: add some GLSL utility functions
Specifically parsing/setting GLSL versions and the shader related
function table.
2017-12-09 19:32:09 +00:00
Matthew Waters 73bad9e856 glupload: remove useless release_buffer
It's a leftover from when we weren't outputting GstBuffer's and
returning raw texture id's.
2017-12-09 19:32:09 +00:00
Matthew Waters 8cad1e5b49 tests/glcontext: fix INVALID_ENUM GL error in test 2017-12-09 19:32:07 +00:00
Nicolas Dufresne b817307165 glcolorconvert-test: Test notify function for setup_wrapped
gst_gl_memory_setup_wrapped() now takes a destroy notify function. This
destroy notify is called to track the memory life time, hence will
notify each time a memory get destroyed. This test check that the
callback count is correct.
2017-12-09 19:32:07 +00:00
Nicolas Dufresne f4a0c062dc glcolorconvert-test: Fix build 2017-12-09 19:32:07 +00:00