Commit graph

1490 commits

Author SHA1 Message Date
George Kiagiadakis
48fa908e15 tests: audiotestsrc: add unit test for non-interleaved audio output
https://bugzilla.gnome.org/show_bug.cgi?id=796739
2018-07-11 12:23:32 +03:00
Matthew Waters
16cba63d43 gl/utils: fixup matrix math again for column major
e4bf9ed8f0 was not quite right and changed
the wrong thing. Intead we needed to change the multiplication order
and should have kept the previous to/from matrices as is done in this
patch.
2018-07-10 20:13:22 +10:00
George Kiagiadakis
e9b4f2b317 tests: audio: add unit test for GstAudioBuffer & GstAudioMeta
https://bugzilla.gnome.org/show_bug.cgi?id=751605
2018-07-03 14:06:43 +03:00
Matthew Waters
8e641a9277 gl/tests: matrix use the affine matrix setter to convert matrices
Removes some duplicated matrices that didn't really need to be
hardcoded.
2018-06-21 17:47:09 +10:00
Matthew Waters
af3f307277 gl/tests: add extension/version parsing checks 2018-06-15 13:17:14 +10:00
Matthew Waters
e4bf9ed8f0 gl/utils: Fix NDC conversion matrices for column-majorness
The matrices were converting the wrong values with non-diagonal-only matrices.
e.g. a typical yflip matrix in [-1,1]^3 such as
 1  0  0  0
 0 -1  0  0
 0  0  1  0
 0  0  0  1

Would have actually required a matrix like this in [0,1]^3
 1  0  0  0
 0 -1  0  0
 0  0  1  0
 0 -2  0  1

Which is
1. not consistent with our multiplication convention and would require
   transposing matrices or changing our multiplication order (from what is
   generally used on opengl matrix guides/tutorials).
2. Produces incorrect values when input with actual vertices accounting for
   the difference in multiplication order.  e.g. some vertices multiplied by
   the yflip matrix using vertex * yflip(== transpose(yflip) * vertex):

     vertex:       -> result:           expected:
     vec4(1,0,1,1) -> vec4(1,-2,1,1)    vec4(1,1,1,1)
     vec4(1,1,1,1) -> vec4(1,-3,1,1)    vec4(1,0,1,1)

With the updated values, we now get the expected values.

Includes a test for this behaviour and the example above
2018-06-06 23:36:08 +10:00
Philippe Normand
8cfd85ec61 subparse: support for more than 32 unclosed markup tags
https://bugzilla.gnome.org/show_bug.cgi?id=796043
2018-05-12 17:05:06 +01:00
Nirbheek Chauhan
1e1a5d658e meson: Update option names to omit disable_ and with- prefixes
Also yield common options to the outer project (gst-build in our case)
so that they don't have to be set manually and use array types for some
options.
2018-05-05 20:30:52 +05:30
Matthew Waters
b8b87694a1 glformat: add test for formats 2018-05-05 21:29:40 +10:00
Matthew Waters
131f9b4e2b gl/memory/tests: split test into separate subtests
Allows for more fine-grained notification of failures
2018-05-05 21:24:25 +10:00
Sebastian Dröge
51c359dda6 videoaggregator: Rename ignore-eos pad property to repeat-after-eos
What it does is to repeat the last frame forever after EOS, it does not
literally ignore EOS.
2018-05-04 16:46:00 +02:00
Michael Olbrich
1b36477d9e videodecoder: add test for event order
When frames are dropped or reordered then the serialized events are
collected and pushed with the next frame. This test verifies that the
order is preserved.

https://bugzilla.gnome.org/show_bug.cgi?id=794192
2018-04-26 17:05:04 -04:00
Zeeshan Ali
cc3942e673 tests: videodecoder: Fix a minor c&p mistake
This completes what commit 0de0f3b2c should have already done. :)

https://bugzilla.gnome.org/show_bug.cgi?id=795483
2018-04-23 15:31:27 +01:00
Zeeshan Ali
0de0f3b2c4 tests: videodecoder: Fix a minor c&p mistake
https://bugzilla.gnome.org/show_bug.cgi?id=795483
2018-04-23 11:29:47 +01:00
Mathieu Duponchelle
8467939538 rtpbasedepayload: condition the sending of gap events
The default implementation for packet loss handling previously
always sent a gap event.

While this is correct as long as we know the packet that was
lost was actually a media packet, with ULPFEC this becomes
a bit more complicated, as we do not know whether the packet
that was lost was a FEC packet, in which case it is better
to not actually send any gap events in the default implementation.

Some payloaders can be more clever about, for example VP8 can
use the picture-id, and the M and S bits to determine whether
the missing packet was inside an encoded frame or outside,
and thus whether if it was a media packet or a FEC packet,
which is why ulpfecdec still lets these lost events go through,
though stripping them of their seqnum, and appending a new
"might-have-been-fec" field to them.

This is all a bit terrible, but necessary to have ULPFEC
integrate properly with the rest of our RTP stack.

https://bugzilla.gnome.org/show_bug.cgi?id=794909
2018-04-19 16:39:06 +02:00
Mathieu Duponchelle
d00e0b612d appsink: Reuse sample object in pull_sample if possible
Simple optimization to reduce memory allocations.

https://bugzilla.gnome.org/show_bug.cgi?id=795145
2018-04-19 16:14:12 +02:00
Tim-Philipp Müller
3a669b7413 tests: make getaddrinfo suppression more generic
So it works for me on debian sid.
2018-04-13 01:23:38 +01:00
Mathieu Duponchelle
89222216f0 valgrind supps: ignore leaks where pango is the first frame 2018-04-13 01:07:21 +02:00
Mathieu Duponchelle
bc3d1fbfb6 valgrind supps: ignore intentional leak in GL test 2018-04-13 01:07:21 +02:00
Mathieu Duponchelle
ab1cc64a62 valgrind supps: conditional moves in nvidia-glcore
Not much we can do here
2018-04-13 01:07:21 +02:00
Mathieu Duponchelle
04ea088891 valgrind supps: getaddrinfo leaks when resolving addresses
https://lists.debian.org/debian-glibc/2016/03/msg00243.html
2018-04-13 01:07:21 +02:00
Mathieu Duponchelle
225651e6c5 tests/audiomixer: fix caps leak 2018-04-13 01:07:21 +02:00
Mathieu Duponchelle
b003cb8cdf valgrind supps: ignore bash leaks
gst_install_plugins_* can instantiate bash
2018-04-13 01:07:21 +02:00
Mathieu Duponchelle
ae7a213628 valgrind suppressions: ignore XInitThreads leaks
As we load that symbol dynamically, valgrind gets confused
when it leaks and reports the leak against an unrelated library
and an unknown (??) symbol.

To address that, put the loading and calling of that symbol
in a separate function, and ignore any malloc leak happening
in that function.
2018-04-12 19:08:41 +02:00
Mathieu Duponchelle
fe5b775060 valgrind supps: ignore leak in XextCreateExtension
Searching for that specific function in other suppression files
on the Internet shows a few projects ignoring it

eg: https://github.com/XCSoar/XCSoar/blob/master/valgrind.suppressions
2018-04-12 19:08:41 +02:00
Zeeshan Ali
45dba0ac67 tests: Enable tests for videodecoder
The tests pass fine here so don't see any reason to keep them disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=795005
2018-04-05 14:23:33 -03:00
Edward Hervey
cb28f49625 tools: Fix discoverer deprecation
The only information provided by "misc" was the missing plugins which
is already handled with another API
2018-04-02 08:53:28 +02:00
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
57516c5153 tests: audiomixer: remove unistd.h include
Not needed and breaks the build with MVSC.
2018-03-16 09:29:41 +00: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
Mathieu Duponchelle
10835e9919 audioaggregator: refactor conversion API
For the rationale, see:

https://bugzilla.gnome.org/show_bug.cgi?id=793917

Also test audiomixer conversion of current output buffer
2018-03-01 00:40:24 +01:00
Tim-Philipp Müller
fb77e4db30 tests: videoscale: simplify test and make it more robust
test_negotiation would occasionally time out, for unknown reasons.
Simplify the test setup and get rid of the main loop, busses, and
notify signals. With this I can no longer easily reproduce the
timeout. Fingers crossed.
2018-02-19 17:50:51 +00:00
Tim-Philipp Müller
8c5725c4ea audiomixer, audiointerleave: add to build
https://bugzilla.gnome.org/show_bug.cgi?id=791218
2018-02-13 16:38:32 +00:00
Tim-Philipp Müller
ab758a9a39 audioaggregator, audiomixer, audiointerleave: move from -bad to -base
https://bugzilla.gnome.org/show_bug.cgi?id=791218
2018-02-13 15:56:49 +00:00
Matthew Waters
fbef9220d3 gl*bin: fix transfer semantics for the create-element signal
We can either receive an element that is floating or not and need to
accomodate that in the signal return values.  Do so by removing the
floating flag.

https://bugzilla.gnome.org/show_bug.cgi?id=792597
2018-02-09 17:15:30 +11:00
Nicolas Dufresne
8b6706b683 meson: Enable libs_video unit test
It does not timeout anymore, even though it's a very slow test. For the
context, this test runs routines for a fixes amount of time and prints
the throughput. Which means the test takes more time everytime a pixel
format is added. If that becomes a problem again, we should disable the
benchmarks by default.
2018-02-06 16:29:11 -05: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
Vincent Penquerc'h
63a8376825 gst-plugins-base.supp: add gl suppressions for one off init allocations
Add to valgrind suppressions file.

https://bugzilla.gnome.org/show_bug.cgi?id=781021
2018-01-24 00:47:20 +00:00
Tim-Philipp Müller
ab87478bdc tests: audioconvert: fix up check for lost channel positions
The caps field is channel-mask these days, so that code path
was never active.
2018-01-19 18:50:07 +00:00
Jimmy Ohn
4876fe04f5 tests: audioconvert: Fix memory leak in failure path
Don't set a bad example by leaking things, even if calling
g_error() will make the process abort.

https://bugzilla.gnome.org/show_bug.cgi?id=783418
2018-01-19 18:47:06 +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
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
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
Mathieu Duponchelle
164b5a7f94 audioaggregator: implement input conversion
https://bugzilla.gnome.org/show_bug.cgi?id=786344
2017-12-19 23:39:37 +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
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
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
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
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
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
Edward Hervey
7e62a38569 checks: Ensure thread-safe libX11/GL when running tests 2017-12-09 19:32:07 +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