Commit graph

1511 commits

Author SHA1 Message Date
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
Matthew Waters
66407b9877 glcontext: fix get_current_gl_api on x11/nvidia drivers
They require to get_proc_address some functions through the
platform specific {glX,egl}GetProcAddress rather than the default
GL library symbol lookup.
2017-12-09 19:32:05 +00:00
Matthew Waters
78957c45c2 glcontext: track sharedness with a cookie
The previous approach of traversing the other_context weak ref tree was
1. Less performant
2. Incorrect for context destruction removing a link in the tree

Example of 2:
c1 = context_create (NULL)
c2 = context_create (c1)
c3 = context_create (c2)
context_can_share (c1, c3) == TRUE
context_destroy (c2)
unref (c2)
context_can_share (c1, c3) returns FALSE when it should be TRUE!

This does not remove the restriction that context sharedness can only
be tracked between GstGLContext's.
2017-12-09 19:32:05 +00:00
Matthew Waters
2210ba5d46 glmemory: separate pbo transfer from texture transfers
When supported, the potentially longer pbo upload/download can be
initiated before the texture upload/download, potentially increasing
throughput.
2017-12-09 19:32:04 +00:00
Matthew Waters
900bcea9de glmemory: implement on top of glbasebuffer
Provides convenient access to PBO usage.

Currently texture updates are coupled tightly to data transfers.
2017-12-09 19:32:04 +00:00
Thiago Santos
33b5cd5426 Fix a common typo: retreive -> retrieve
Seems to have been copy pasted around a few places
2017-12-09 19:32:03 +00:00
Matthew Waters
2cbf2abea0 tests/gl: fix typo 2017-12-09 19:32:01 +00:00
Matthew Waters
72993f54fa gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
We are using shaders everywhere and so they are not needed
2017-12-09 19:32:01 +00:00
Matthew Waters
ae08ada8f0 gl/tests: fix deadlock on glcontext wrapped context test 2017-12-09 19:31:57 +00:00
hoonhee.lee
a4af602d0c tests: glcontext: remove unnecessary semicolon
https://bugzilla.gnome.org/show_bug.cgi?id=745875
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
7c32611c87 gl-test: Port unit tests to new API 2017-12-09 19:31:55 +00:00
Matthew Waters
149cbb2e31 gl: update unit test for glmemory api change 2017-12-09 19:31:54 +00:00
Matthew Waters
8f59549ec5 gl/tests: update glwindow api change 2017-12-09 19:31:53 +00:00
Matthew Waters
1dfeae2c42 gl: split glcolorconvert usage from glupload
the separation allows the transfer operation to occur in a separate
thread/time which may increase performance in specific circumstances.
2017-12-09 19:31:52 +00:00
Matthew Waters
bef3f020a6 glcontext: allow wrapped contexts to be utilised like non-wrapped contexts
Fill in the missing pieces like get_proc_address, the gl function vtable
2017-12-09 19:31:52 +00:00
Nicolas Dufresne
7c7af39c4a gltest: Port to new API
https://bugzilla.gnome.org/show_bug.cgi?id=740900
2017-12-09 19:31:52 +00:00
Matthew Waters
00506bf183 glupload: rearchitecture for non GLMemory inputs/outputs
Allows other memory types to be implemented/returned/used by the caller.
2017-12-09 19:31:50 +00:00
Julien Isorce
56c9d7f111 gl: add unit test that checks for glimagesink drain query handling
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732694
2017-12-09 19:31:49 +00:00
Matthew Waters
be5d0d81e4 glcontext: add api for retreiving the current context and api
that is current in the calling thread.
2017-12-09 19:31:48 +00:00
Matthew Waters
d4592ec132 tests/glcolorconvert: do reorder checking for rgba formats 2017-12-09 19:31:47 +00:00
Matthew Waters
652753de18 tests/glmemory: add simple transfer test
tests transferring to/from the GL with a 1x1 RGBA pixel.
2017-12-09 19:31:47 +00:00
Matthew Waters
d946559238 gl/tests: update for upload API changes 2017-12-09 19:31:46 +00:00
Matthew Waters
5e2f15403c gl/tests: update for API changes 2017-12-09 19:31:45 +00:00
Sebastian Dröge
7ba2288f3e glupload: Fix memory leak in unit test 2017-12-09 19:31:44 +00:00
Sebastian Dröge
fcb15bd609 glcontext: Fix memory leaks in unit test 2017-12-09 19:31:44 +00:00
Matthew Waters
f01472f5a2 tests: update for glupload changes 2017-12-09 19:31:42 +00:00
Matthew Waters
1f48a074be tests: update for recent glupload changes
GstGLUploadMeta object is now the GstVideoGLTextureUploadMeta
provider.
2017-12-09 19:31:41 +00:00
Matthew Waters
6c1a4e30c4 gl/upload: implement lazy init
Rename init_format to set_format
2017-12-09 19:31:39 +00:00
Luis de Bethencourt
8c46b24d51 gl: check the correct GstGLMemory in basic_test 2017-12-09 19:31:37 +00:00
Matthew Waters
30c6efc432 gl/mem: allocate the memory per plane
This patch provides the basic infrastructure required for this.
Upload and Download has been ported to this.

Has the nice effect of allowing GstGLMemory to be our
refcounted texture object for any texture type (not just RGBA).

Should not lose any features/video formats.
2017-12-09 19:31:36 +00:00
Tim-Philipp Müller
efeaf7467b tests: fix gl unit tests for recent API changes 2017-12-09 19:31:35 +00:00
Matthew Waters
e225af3e0d gl: silence all the compiler warnings 2017-12-09 19:31:34 +00:00
Matthew Waters
da5b9d3e0f [900/906] tests/gstglcontext: reduce the number of frames displayed
Was causing timeouts on intel hardware due to vsync handling.
2017-12-09 19:31:34 +00:00
Matthew Waters
97f6bc0bfc [891/906] context: add support for wrapping external contexts 2017-12-09 19:31:33 +00:00
Matthew Waters
54d70702cc [878/906] tests: update for glmem api change 2017-12-09 19:31:33 +00:00
Matthew Waters
970fbacf96 [869/906] tests: add some upload tests 2017-12-09 19:31:33 +00:00
Matthew Waters
84425ad43d [853/906] display: remove _{set,get}_context
A GstGLDisplay doesn't need a GstGLContext and its use
was cause a reference cycle
2017-12-09 19:31:32 +00:00
Matthew Waters
efa22442a9 [838/906] gl: Use GL_TEXTURE_2D instead of GL_TEXTURE_RECTANGLE
We create our textures (in Desktop GL) with GL_TEXTURE_RECTANGLE,
vaapi attempts to bind our texture to GL_TEXTURE_2D which throws a
GL_INVALID_OPERATION error and as thus, no video.

Also, by moving exclusively to GL_TEXTURE_2D and the npot extension
we also remove a difference between the Desktop GL and GLES2 code.

https://bugzilla.gnome.org/show_bug.cgi?id=712287
2017-12-09 19:31:32 +00:00
Julien Isorce
6e732b0408 [821/906] tests: fix test_share on GLESv2 2017-12-09 19:31:31 +00:00
Matthew Waters
711ad485b2 [812/906] move the GL vtable from GstGLDisplay to GstGLContext
Conflicts:
	tests/check/libs/gstglcontext.c
2017-12-09 19:31:31 +00:00
Matthew Waters
adb7eddc84 [811/906] tests: update for GstGLContext addition 2017-12-09 19:31:31 +00:00
Julien Isorce
ba7c562a9e [809/906] tests: port test_share to GLES2
Also add a deinit function to release fbo, tex and shader.
2017-12-09 19:31:31 +00:00
Matthew Waters
0537f8ea26 [802/906] add GstGLContext test that tests context sharing 2017-12-09 19:31:31 +00:00
Matthew Waters
761bc0156a [704/906] Use gst_object_[un]ref so we can get refcounts in the log 2017-12-09 19:31:28 +00:00
Matthew Waters
4c35d682c9 [603/906] update FSF address 2017-12-09 19:31:25 +00:00
Matthew Waters
c7ddead74b [554/906] GstGLMemory: update for GstAllocator API changes 2017-12-09 19:31:24 +00:00
Matthew Waters
ffdc6d496e [514/906] add GstGLMemory and allocator
implement custom GstMemory for GL textures
currently map/unmap returns NULL although it might be favourable to upload/download/cache the image data
2017-12-09 19:31:24 +00:00
Tim-Philipp Müller
b60cc0274c appsrc: add support for pushing buffer lists
And samples that carry buffer lists.

https://bugzilla.gnome.org/show_bug.cgi?id=752363
2017-12-09 11:09:16 +00:00
Justin Kim
91179622eb sdpmessage: add_attribute accepts NULL value
The attribute can be defined without value regardless session-level
or media-level.
Although `gst_sdp_message_insert_attribute` can be used to set NULL,
it would be easier if `gst_sdp_message_add_attribute` accepts NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=789841
2017-11-03 17:56:39 +11:00
Justin Kim
d100180ce3 sdpmessage: do not append NULL value for session-level attr
If an attribute is defined without value, the generated text
should be 'a=key' rather than 'a=key:'. For media-level, it
has already been done.

https://bugzilla.gnome.org/show_bug.cgi?id=789742
2017-11-01 17:09:47 +11:00
Edward Hervey
35129b3159 check: Fix minor leak 2017-10-26 15:55:32 +02:00
Guillaume Desmottes
7950a4614c videoencoder: add qos property
This new property control if the encoder base class should gather QoS
stats and if subclasses should use them by dropping late frames.

https://bugzilla.gnome.org/show_bug.cgi?id=789467
2017-10-25 14:22:15 +02:00
Stefan Sauer
73381c8475 tests: comment and logging cleanups for audiomixer and aggregator
Remove some references to 'collectpads'. Logs pads through the object variants.
Add some more comments. Remove a left over comment.
2017-10-23 11:54:53 +02:00
Guillaume Desmottes
bcca3b926c videoencoder: implement QoS
It allows encoders to detect and drop input frames which are already
late to increase the chance of the pipeline to catch up.

The QoS logic and code is directly copied from gstvideodecoder.c.

https://bugzilla.gnome.org/show_bug.cgi?id=582166
2017-10-19 16:26:22 +02:00
Guillaume Desmottes
9264a298bf videoencoder test: properly name the encoder variable
The element is an encoder so calling it 'dec' makes things confusing.

https://bugzilla.gnome.org/show_bug.cgi?id=582166
2017-10-19 16:26:22 +02:00
Tim-Philipp Müller
cb6dd3eb8d tests: appsink: fix compiler warning and typo in struct name
elements/appsink.c:624:3: warning: missing braces around initializer
with gcc 4.8.4
2017-10-07 14:20:54 +01:00
Sebastian Dröge
992d026ebf audio: Fix unit test after changed GstAudioStreamAlign constructor signature 2017-09-28 14:29:03 +03:00
Sebastian Dröge
d2fd740388 audio: Add reverse playback support to GstAudioStreamAlign
https://bugzilla.gnome.org/show_bug.cgi?id=787560
2017-09-28 14:06:07 +03:00
Sebastian Dröge
ec1e20ffe5 audio: Add helper object for audio discontinuity detection and sample alignment
This is the same code that is in decklinkaudiosrc, audioringbuffer,
audiomixer and various other places. Have it once instead of copying it
everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=787560
2017-09-28 14:06:05 +03:00
Julien Isorce
fc86194595 appsink: on drain wait for buffers to be consumed
So that an upstream element can claim all buffers to return to its buffer pool.

Added unit test 'test_query_drain'
  make elements/appsink.check

https://bugzilla.gnome.org/show_bug.cgi?id=786739
2017-09-19 14:33:36 +01:00
Julien Isorce
7b1056b946 appsink: also clear preroll buffer in _pull_sample
If someone calls gst_app_sink_try_pull_sample they are
probably no longer interested in any preroll samples.

Useful if the user has not registered a preroll appsink callback.

Also added unit test 'test_do_not_care_preroll'
  make elements/appsink.check
that fails without this patch.

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-19 09:06:44 +01:00
Stefan Sauer
9c0a2a9ad4 tests: simplify audiomixer test
Use _link_many() and reuse a helper to reduce the test code.
2017-09-17 10:20:09 -07:00
Julien Isorce
68518acb53 appsink: unref preroll buffer upon pull
There is no reason for appsink to hang onto the preroll buffer.
If needed, the application can just keep a ref on this buffer
after calling gst_app_sink_try_pull_preroll.

Also added unit test 'test_pull_preroll'
  make elements/appsink.check

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-13 14:11:27 +01:00
Tim-Philipp Müller
925a4fe6a4 tests: playbin-complex: skip test that needs oggdemux if it's not available
https://bugzilla.gnome.org/show_bug.cgi?id=773145
2017-09-10 16:32:31 +01:00
Tim-Philipp Müller
afa2cbf39b tests: appsrc: fix leaks in new unit test 2017-07-19 09:08:12 +01:00
Stefan Sauer
d176e8bd01 tests: audiomixer: set all properties at once 2017-07-15 21:28:38 +02:00
Stefan Sauer
1811f8f1d5 tests: adder: set all properties at once 2017-07-15 21:27:29 +02:00
Stefan Sauer
e309e88bd6 tests: adder: add helper to create buffers
Keeps repeated code out of the test and syncs it with the audiomixer test.
2017-07-15 19:45:02 +02:00
Stefan Sauer
db8482baaf tests: audiomixer: use the buffer helper for other tests too 2017-07-15 19:34:15 +02:00
Stefan Sauer
2ae763cc34 audiomixer: add a helper for buffer creation
This makes the test setup easier to read.
2017-07-14 08:09:25 +02:00
Stefan Sauer
14a9ba2fa4 audiomixer: use test helper once more 2017-07-13 22:02:17 +02:00
Stefan Sauer
6d53284450 audiomixer: more test cleanups
Port over the test helpers from the adder tests.
2017-07-10 21:08:09 +02:00
Stefan Sauer
8133f478a9 adder: sync some fixes from the audiomixer test 2017-07-10 21:07:45 +02:00
Stefan Sauer
ecf38a3ade audiomixer: refactor test
Apply cleanups from the adder tests. Use a fixture for common code.
2017-07-10 20:16:56 +02:00
Nicolas Dufresne
b39f5067e3 test-appsrc: Test state when blocked in caps Event
In GStreamer 1.12 and older, the GstBaseSrc live lock used to be held while
create() virtual function was called. As appsrc pushes serialized event in
that virtual function, we ended up with some deadlock while setting the
state to NULL. This test simulates this situation.

https://bugzilla.gnome.org/show_bug.cgi?id=783301
2017-07-03 21:12:03 -04:00
Mark Nauwelaerts
20705f01fc textoverlay: ensure text buffer has writable metadata when modifying 2017-07-01 17:45:36 +02:00
Thibault Saunier
8bbdad7c31 meson: Do not use path separator in test names
Avoiding warnings like:

  "WARNING: Target "elements/audioamplify" has a path separator in its name."
2017-06-07 12:07:15 -04:00
Olivier Crête
7108cd2fc8 tests: Make audiomixer test_clip verify the resulting timestamps too 2017-05-23 12:35:58 +02:00
Olivier Crête
e537f3576a tests: audiointerleave: Remove drain with manual clock
Now that the queries go onto the queue, you may need to pull the crank
in order for them to be processed, making this test difficult.
2017-05-23 12:35:58 +02:00
Tim-Philipp Müller
df160d1989 meson: only check for c++ compiler once 2017-05-21 10:49:20 +01:00
Tim-Philipp Müller
74d974817f meson: make C++ compiler optional
It's only used to check our headers are C++ clean and
for the Qt example.
2017-05-21 09:37:14 +01:00
Matthew Waters
57673e608e aggregator: add simple support for caps handling
Modelled off the videoaggregator caps handling as that seems the most
mature aggregtor-using implementation that has caps handling there is.

https://bugzilla.gnome.org/show_bug.cgi?id=776931
2017-05-20 16:21:17 +02:00
Olivier Crête
cbafb022aa tests: Test caps using query
Sending an event can accepted event if the caps were rejected
because the event could be queued and processed later.

Also send a drain query in the caps test to make sure that the
event has been processed.

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Jan Schmidt
3b3bc34e9a Fix unit test for videodecoder now outputting mono multiview by default 2017-05-19 18:38:45 +02:00
Tim-Philipp Müller
4246198fb3 No need for newlines in debug log statements 2017-04-12 09:58:49 +01:00
Matthew Waters
0dcab96d88 sdp/media: caps_from_media() don't modify the input media
Performing a gst_sdp_media_get_caps_from_media() would result in
changing fields in the GstSDPMedia violating the const tag in the
function declaration.

Before there would be a line with a=rtpmap:96 VP8/90000
after, that attribute would only contain a=rtpmap:96

Fix by performing modifications on duplicated strings instead of on
the internal values.

Also add a simple test for checking that the representation doesn't
change by a gst_sdp_media_get_caps_from_media()
2017-04-03 16:49:12 +10:00
Thibault Saunier
69a10f67a5 meson: Use get_pkgconfig_variable instead of calling pkg-config ourself
It is avalaible in meson 0.36 which is now are requirement
2017-03-28 14:33:04 -03:00
Thibault Saunier
20dd51b92c meson: Fix build failure from previous commit
Mistake while rebasing
2017-03-24 18:55:10 -03:00
Thibault Saunier
21d3a820e2 meson: Specify pluginsdir setting the environment
And do not specify the separator as this is OS
dependent and will be handled properly by default
2017-03-24 18:48:07 -03:00
Nicolas Dufresne
73c70847ad meson: Reuse plugins_install_dir for building env 2017-03-24 17:00:23 -04:00
Nicolas Dufresne
3d9b04c8cc meson: Fix plugin path when running test
The path was only adding the build root. We need to also add the
prefix for the case we work with installed setup. As the search is
recursive, I had to remove any subdirectory to the already present build
root.
2017-03-24 16:16:26 -04:00
Nicolas Dufresne
d81a6da702 rawvideoparse: Rename frame-stride in to frame-size
The term stride is confusing here, since the stride is always use
to signal the pixel row size of an image (including padding). Also
a frame may have a single stride, which adds to the confusion. This
patch uses frame-size, which simply indicate the frame size in the
case the images have some padding in between.

https://bugzilla.gnome.org/show_bug.cgi?id=780053
2017-03-24 13:50:06 -04:00
Nicolas Dufresne
2b4a173e89 rawvideoparse: Use GstValueArray for strides and offsets
This allow using those property through gst-launch-1.0. This type
gained a deserilizer recently. The syntax is: <val1, val2, ...>.
Note that we also use the type int instead of uint to avoid having
to cast when specifying the values. The deserilizers assume
int by default.

https://bugzilla.gnome.org/show_bug.cgi?id=780053
2017-03-24 13:50:06 -04:00
Stefan Sauer
d759eb46dc adder: cleanup the tests
Take a first stab at cleaning up the tests. Extract common code. Make sure
we actually verify things.
2017-03-17 21:40:56 +01:00
Sebastian Dröge
38ec8f396f rawparse: Move to gst-plugins-base
https://bugzilla.gnome.org/show_bug.cgi?id=774544
2017-02-25 14:48:40 +02:00
Sebastian Dröge
498ee680fe Merge branch 'rawparse-moved-plugin' 2017-02-25 14:32:33 +02:00
Georg Lippitsch
d15ad75caf videotimecode: Validate for drop-frame correctness
In gst_video_time_code_is_valid, also check for invalid
ranges when using drop-frame TC. Refactor some code which
broke after the check was added.

https://bugzilla.gnome.org/show_bug.cgi?id=779010
2017-02-23 19:56:26 +02:00
Georg Lippitsch
b3df5786a9 videotimecode: Init from GDateTime
Add a function to init the time code from a GDateTime

https://bugzilla.gnome.org/show_bug.cgi?id=778702
2017-02-23 19:50:39 +02:00
Sebastian Dröge
4cde35553f rawbaseparse: Drop incomplete frames at EOS
See https://bugzilla.gnome.org/show_bug.cgi?id=773666

This would ideally be solved in baseparse but that requires further
thought at this point, and in the meantime it would be good to have
rawbaseparse not assert on this but handle it gracefully instead.
2017-02-18 20:18:50 +02:00
Sebastian Dröge
5e2e111627 multifdsink: Make sure to use a 64 bit integer for the units-max property 2017-02-02 14:56:39 +02:00
Guillaume Desmottes
b8c78c87d2 encodebin: fix caps leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=776797
2017-01-30 14:17:42 +02:00
Thibault Saunier
091717d6ca meson: Properly use ':' for defining keywords 2017-01-24 19:25:58 -03:00
Tim-Philipp Müller
d6c0e9072b videorate: fix duration and position query handling
Duration query would return TRUE and duration=-1. This
worked in the unit test because the unit test implementation
was a bit broken.

Both queries need to access rate with a lock.

Fix broken duration query test as well. It relied on broken
behaviour by the videorate query handler, and also it was
implemented as a downstream query rather than an upstream
query. And we must return HANDLED from the probe so that the
query we intercept actually returns TRUE.

https://bugzilla.gnome.org/show_bug.cgi?id=699077
2017-01-24 01:04:39 +00:00
Vivia Nikolaidou
eefa0d8cf5 videotimecode: Added unit test for GstVideoTimeCodeInterval
https://bugzilla.gnome.org/show_bug.cgi?id=776447
2017-01-11 11:05:21 +11:00
Tim-Philipp Müller
927e657640 tests: audiodecoder: fix another c99-ism
Missed one.
2017-01-09 19:10:10 +00:00
Tim-Philipp Müller
bbed5a5ffc Fix indentation 2017-01-09 19:02:57 +00:00
Tim-Philipp Müller
57e1e5921e tests: audiodecoder: fix compiler warnings due to c99-ism
audiodecoder.c:160:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
2017-01-09 18:58:42 +00:00
Vivia Nikolaidou
5cbb52285c videotimecode: Add GstValue functions unit test
https://bugzilla.gnome.org/show_bug.cgi?id=772764
2017-01-09 18:56:16 +02:00
Jan Schmidt
68565ec0fc testsuite: Add some test checks for gst_video_guess_framerate() 2017-01-09 21:31:37 +11:00
Tim-Philipp Müller
4a8640b4c9 tests: tag: add unit test for ID3v2 UTF-16 string list parsing
https://bugzilla.gnome.org/show_bug.cgi?id=770355
2016-12-25 10:52:45 +00:00
Tim-Philipp Müller
fae81e57c7 tests: tag: add test for ID3v2 extended header parsing
https://bugzilla.gnome.org/show_bug.cgi?id=770355
2016-12-25 10:52:45 +00:00
Thibault Saunier
03e263b92f tests: Fix build 2016-12-19 15:20:35 -03:00
Thibault Saunier
c8ea302e57 encodebin: Fallback to other profile if we fail with one
In some case we might have EncodingProfile that will be defined
in a way that, for example if a Preset is not present, another
profile for that stream should be used.

A test is added showing the feature.

https://bugzilla.gnome.org/show_bug.cgi?id=776188
2016-12-19 10:13:23 -03:00
Tim-Philipp Müller
e0742b8759 rtsp: add boxed types for new authentication credential API
To make the structs usable in bindings, and fix

gstrtspmessage.c:1188: Warning: GstRtsp:
gst_rtsp_message_parse_auth_credentials: return value: Invalid
non-constant return of bare structure or union; register as
boxed type or (skip)

https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-12-13 22:45:02 +00:00
Sebastian Dröge
a9269d37c5 gst: Don't declare variables inside the for loop header
This is a C99 feature.
2016-12-13 22:39:01 +02:00
Sebastian Dröge
9795115564 gst: Don't declare variables inside the for loop header
This is a C99 feature.
2016-12-13 22:26:08 +02:00
Jan Alexander Steffens (heftig)
9bdf7ff6d0 multifdsink: Add a test involving a slow client
https://bugzilla.gnome.org/show_bug.cgi?id=774908
2016-11-29 19:13:00 +02:00
Edward Hervey
647b183adb check/videorate: Avoid leaking extra buffers 2016-11-28 16:54:55 +01:00
Sebastian Dröge
47fdb15074 video-info: Add unit test for overflow checks
And also prevent overflows caused by allowing uint width/height in
gst_video_info_set_format() but storing them as (signed!) ints.
2016-11-24 15:40:22 +02:00
Sebastian Dröge
90b24d34b3 rtsp: Add gst_rtsp_message_parse_auth_credentials() to parse authentication credentials
https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-11-21 09:39:21 +02:00
Sebastian Dröge
2c87618bf3 videotimecode: Add test for the calculations of distance from the daily jam
https://bugzilla.gnome.org/show_bug.cgi?id=774585
2016-11-17 10:17:01 +02:00
Patricia Muscalu
f1562053fe appsink: add support for buffer lists
https://bugzilla.gnome.org/show_bug.cgi?id=752363
2016-11-16 02:06:40 +11:00
Joris Valette
658ee6f0db videorate: Add fixed rate property
https://bugzilla.gnome.org/show_bug.cgi?id=699077
2016-11-04 14:01:54 -03:00
Sebastian Dröge
af4de9cb42 gst: Fix more mentions of interlaced-mode to say interlace-mode 2016-11-04 16:26:50 +02:00
Edward Hervey
3cc9b2c490 check: Fix corrupted xml check files
By making sure each different videoscale check instance gets logged
into different output file
2016-11-03 17:18:05 +01:00
Sebastian Dröge
33f4b9cc8e Revert "tests: rawvideoparse: add test for flow error handling"
This reverts commit 280b4ac2ff.

https://bugzilla.gnome.org/show_bug.cgi?id=773666
2016-11-02 09:36:04 +02:00
Tim-Philipp Müller
f324c88d92 tests: rawvideoparse: add test for flow error handling
Also needs fixes in baseparse:
https://bugzilla.gnome.org/show_bug.cgi?id=773666
2016-11-01 20:34:37 +02:00
Stian Selnes
22ccb687fa videotestsrc: Make snow deterministic
Deterministic generation of snow and smpte is important for tests so
that it's not affected by other videotestsrc elements in current or
possibly previous tests.

https://bugzilla.gnome.org/show_bug.cgi?id=773102
2016-11-01 20:05:18 +02:00
Tomasz Zajac
028b16bb67 sdp: Add tests for rtcp-fb parsing
https://bugzilla.gnome.org/show_bug.cgi?id=769698
2016-11-01 19:57:10 +02:00
Nicolas Dufresne
7a40442ad5 video: Add VYUY pixel format
This format is sometimes the output of JPEG decoders. It is the same as
YUY2 and UYVY but with a different component order.

https://bugzilla.gnome.org/show_bug.cgi?id=767450
2016-11-01 19:55:20 +02:00
Nirbheek Chauhan
2d3af07c3d Revert "meson: move gstreamer-check-1.0 dependency to tests/check"
This reverts commit e3c7c17b9b.

Does not actually work. See:
https://bugzilla.gnome.org/show_bug.cgi?id=773114#c31
2016-10-25 11:46:38 +05:30
Tim-Philipp Müller
9ccd144421 meson: fix build outside of gst-all
Unknown variable "apiversion".
2016-10-24 00:28:27 +01:00
Scott D Phillips
e3c7c17b9b meson: move gstreamer-check-1.0 dependency to tests/check 2016-10-21 05:36:12 -03:00
Stian Selnes
92392a4733 videodecoder: Default caps sets format I420
Also the format must be fixed on the default raw caps. If not
gst_video_info_from_caps() will fail and
gst_video_decoder_negotiate_default_caps() return FALSE.

The test simulates the use case where a gap event is received before
the first buffer causing the decoder to fall back to the default caps.

https://bugzilla.gnome.org/show_bug.cgi?id=773103
2016-10-20 14:11:48 +03:00
Stefan Sauer
45ae36817b tests: add another check for buffer clipping and improve tests
Add a test that check that we handle time ranges (a range of time that maps to
the same sample).
Also update the other tests to use our check api to compare int64 values to get
better output on failure.
2016-10-15 22:52:32 +02:00
Stefan Sauer
dc92affdf3 tests: clipping in TIME does not use the offset
Simplify the test and test only what need to be tested.
2016-10-15 22:52:32 +02:00
Stefan Sauer
f625444b28 tests: cleanup libs/audio test
Split large tests into small tests and name them specifically. Use helpers to
avoid repetition. Make sure the order in the file is the same as we add the to
the suite.
2016-10-15 21:32:33 +02:00
Thibault Saunier
558172d418 meson: Make use of new environment object and set plugin path to builddir
Workaround source_root being the root directory of all projects
in the subproject case.
Remove now unneeded getpluginsdir and define c++ tests in the same loop.

Bump meson requirement to 0.35
2016-10-14 17:37:16 +02:00
Jimmy Ohn
6335a074e2 opusdec: Fix memory leak in test code
gst_caps_to_string function returned allocated memory.
So, It should be free using g_free function.

https://bugzilla.gnome.org/show_bug.cgi?id=772500
2016-10-06 13:29:22 +03:00
Jimmy Ohn
fdefa9c1ad videorate: Fix memory leakage in test code
gst_caps_to_string function returned allocated memory.
So, It should be free using g_free function.

https://bugzilla.gnome.org/show_bug.cgi?id=772501
2016-10-06 13:27:42 +03:00
Thibault Saunier
d00aa0c1ad meson: Setup pre commit hook and fix getpluginsdir for standalone case 2016-09-30 12:46:34 -03:00
Tim-Philipp Müller
fb22d542d6 tests: playbin-complex test needs oggdemux 2016-09-25 22:20:32 +01:00
Tim-Philipp Müller
d9da603db6 tests: videotimecode: fix floating point comparisons
Comparing floats for equality is not necessarily going to
work reliably, so use fail_unless_equals_float() for this.
Test would fail on x86 (Intel Atom x5-Z8300).
2016-09-25 22:20:27 +01:00
Tim-Philipp Müller
7c0ec13942 tests: adder: disable racy flush_start_flush_stop test
It's been broken for years, and it's unlikely it will ever
be fixed for collectpads/adder now that there's audiomixer
which works fine. So let's disable it, since all it does
is that it creates noise that distracts from other failures.

https://bugzilla.gnome.org/show_bug.cgi?id=708891
2016-09-25 16:22:47 +01:00
Tim-Philipp Müller
3baa1d655c tests: videoscale: split test into multiple ones
The videoscale test takes eternities to run, that's not
great. Split the test into multiple ones. That way they
can be run in parallel. Reduces time to run all tests in
-base from 29 secs to 12 secs when using meson/ninja.
2016-09-10 10:10:05 +01:00
Thibault Saunier
81ccca7538 meson: Raise test timeout to 3 minutes
The videoscale testsuite (with 50 tests) last almost 2 minutes here
2016-09-09 08:57:11 -03:00
Nicolas Dufresne
afaa3f1380 video/test: Coding style fix 2016-09-07 14:24:54 -04:00
Thibault Saunier
acd047db15 meson: Properly find where GStreamer plugins are when using subprojects
And fix building with meson 0.34
2016-09-05 18:20:35 -03:00
Josep Torra
f70aa5b033 build: silence error about pthread for 'make check' in osx
Fixes "clang: error: argument unused during compilation: '-pthread'"
2016-08-26 21:01:40 +02:00
Xabier Rodriguez Calvar
0341f04ce1 videodirection: interface for rotation and flip
A GstVideoOrientationMethod enumeration is also provided for the
admitted property values.

https://bugzilla.gnome.org/show_bug.cgi?id=768687
2016-08-25 10:19:13 +03:00
Nirbheek Chauhan
5c4f4ac1bd Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:09:51 +01:00
Tim-Philipp Müller
9cbdaa8c27 tests: ignore new videotimecode test binary 2016-08-20 11:01:04 +01:00
Carlos Rafael Giani
232902369c rawparse: Fix and extend unit tests
* Add caps change test to unit tests
* Cleanup leftover buffers after each unit test
* Add missing rawvideoparse entry in .gitignore

https://bugzilla.gnome.org/show_bug.cgi?id=769637
2016-08-18 10:53:58 +03:00
Carlos Rafael Giani
e5b70d384c rawvideoparse: Compute plane offsets & strides if no custom ones are set
This is useful to ensure that the offsets and strides are computed if
only width, height, format etc. in the property config are set.

https://bugzilla.gnome.org/show_bug.cgi?id=769797
2016-08-18 09:21:16 +03:00
Vivia Nikolaidou
ab35d7394e videotimecode: Added support for SMPTE time code metadata
Can be attached as GstMeta into a video frame.

https://bugzilla.gnome.org/show_bug.cgi?id=766419
2016-08-04 18:59:40 +03:00
Carlos Rafael Giani
d508525119 rawparse: Add new raw audio and video parser elements
The new rawaudioparse and rawvideoparse elements are based on GstBaseParse
and completely replace audioparse and videoparse

https://bugzilla.gnome.org/show_bug.cgi?id=767011
2016-07-26 13:44:39 +03:00
Tim-Philipp Müller
5044bf79ae Add more files to .gitignore 2016-07-23 14:42:30 +01:00
Tim-Philipp Müller
ffa9f04bb2 tests: appsink: add minimal test for new pull with timeout functions
https://bugzilla.gnome.org/show_bug.cgi?id=768852
2016-07-18 17:26:26 +01:00
Guillaume Desmottes
8d6d6bd2aa tests: fix bus leak
gst_bus_remove_signal_watch() has to be called to release the ref
taken by gst_bus_add_signal_watch().

https://bugzilla.gnome.org/show_bug.cgi?id=768843
2016-07-18 12:41:12 +01:00
Guillaume Desmottes
54e4551cd8 videoscale: fix bus leak in test
gst_bus_add_signal_watch() takes a ref on the bus which should be
released using gst_bus_remove_signal_watch().

https://bugzilla.gnome.org/show_bug.cgi?id=768718
2016-07-12 13:12:19 +03:00
Seungha Yang
50f74daa2f appsrc: Remove trailing whitespace
https://bugzilla.gnome.org/show_bug.cgi?id=768510
2016-07-11 09:54:11 +03:00
Tim-Philipp Müller
d3d2e8b94a tests: discoverer: handle missing ogg/codec plugins gracefully
https://bugzilla.gnome.org/show_bug.cgi?id=767859
2016-06-21 18:04:23 +01:00
Guillaume Desmottes
f1f13de8d7 fix event leaks in tests
The events are supposed to be unreffed when finishing the test, not
reffed.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
8b0c9e9918 fix event leaks in tests
The events are supposed to be unreffed when finishing the test, not
reffed.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Guillaume Desmottes
ce53b64800 audiointerleave: fix message leaks by flushing the bus
https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Sebastian Dröge
26f63db498 discoverer: Only allow serializing OK discoverer infos to GVariants
They will be incomplete otherwise and we can't generate the full serialized
information, and instead will crash somewhere on the way.

https://bugzilla.gnome.org/show_bug.cgi?id=767859
2016-06-21 10:24:15 +03:00
Mikhail Fludkov
27e7ca3389 opusdec: test for PLC timestamp when FEC is enabled. 2016-06-16 11:01:06 +01:00
Mikhail Fludkov
8d4f79b640 audiodecoder: fix invalid timestamps when PLC and delay
Elements inherited from GstAudioDecoder, supporting PLC and introducing
delay produce invalid timestamps. Good example is opusdec with in-band FEC
enabled. After receiving GAP event it delays the audio concealment until
the next buffer arrives. The next buffer will have DISCONT flag set which
will make GstAudioDecoder to reset it's internal state, thus forgetting
the timestamp of GAP event. As a result the concealed audio will have the
timestamp of the next buffer (with DISCONT flag) but not the timestamp
from the event.
2016-06-16 11:01:04 +01:00
Paulo Neves
5dd720e064 exiftag: Increase serialized geo precision
The serialization of double typed geographical
coordinates to DMS system supported by the exif
standards was previously truncated without need.

The previous code truncated the seconds part of
the coordinate to a fraction with denominator
equal to 1 causing a bug on the deserialization
when the test for the coordinate to be serialized
was more precise.

This patch applies a 10E6 multiplier to the numerator
equal to the denominator of the rational number.

Eg. Latitude = 89.5688643 Serialization

DMS Old code = 89/1 deg, 34/1 min, 7/1 sec
DMS New code = 89/1 deg, 34/1 min, 79114800UL/10000000UL

Deserialization

DMS Old code = 89.5686111111
DMS New code = 89.5688643

The new test tries to serialize a higher precision
coordinate.

The types of the coordinates are also guint32 instead
of gint like previously. guint32 is the type of the
fraction components in the exif.

https://bugzilla.gnome.org/show_bug.cgi?id=767537
2016-06-13 09:29:52 +03:00
Stian Selnes
1335ccd228 video-color: Fix colorimetry IS_UNKNOWN
Fix issue with colorimetry default indicies not being in sync with the
actual table causing IS_UNKNOWN() to sometimes fail.

https://bugzilla.gnome.org/show_bug.cgi?id=767163
2016-06-02 17:14:50 +01:00
Joan Pau Beltran
abb88801e7 video: add IYU2 format
This existed in 0.10 and is needed by dc1394src.

IYU2 format is a YUV fully-sampled packed format similar to v308
but with different component order (U-Y-V instead of Y-U-V).

http://www.fourcc.org/yuv.php#IYU2

https://bugzilla.gnome.org/show_bug.cgi?id=763026#c5
2016-06-01 12:07:05 +01:00
Tim-Philipp Müller
ece702920f tests: playbin: add test for new "element-setup" signal
https://bugzilla.gnome.org/show_bug.cgi?id=578933
2016-05-16 09:52:35 +01:00
Tim-Philipp Müller
9ed483e33b tests: playsink: add minimal test for playsink element
Attempt to reproduce leak.

https://bugzilla.gnome.org/show_bug.cgi?id=755867
2016-05-14 16:02:16 +01:00
Guillaume Desmottes
1b2f9f2c3f vorbistag: fix buffer leaks in tests
It internally uses gst_check_chain_func() so we
should call gst_check_drop_buffers() when tearing down tests to free
the buffers which have been exchanged through the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=766226
2016-05-14 10:47:33 +03:00
Guillaume Desmottes
c6eb9df930 appsrc: fix buffer leaks in tests
It internally uses gst_check_chain_func() so we
should call gst_check_drop_buffers() when tearing down tests to free
the buffers which have been exchanged through the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=766226
2016-05-14 10:47:33 +03:00
Guillaume Desmottes
e17299290a audiorate: fix buffer leaks in tests
It internally uses gst_check_chain_func() so we
should call gst_check_drop_buffers() when tearing down tests to free
the buffers which have been exchanged through the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=766226
2016-05-14 10:47:33 +03:00
Thiago Santos
60c765174f opusdec: intersect with the filter before returning on getcaps
So upstream gets a smaller set to decide upon as it is what it requested
with the filter

https://bugzilla.gnome.org/show_bug.cgi?id=765684
2016-05-02 14:29:25 -03:00
Thiago Santos
7a5797d3a6 opusdec: improve getcaps to return all possible rates
The library is capable of converting to different rates.

Includes tests.

https://bugzilla.gnome.org/show_bug.cgi?id=765684
2016-05-02 14:29:25 -03:00
Thiago Santos
8375ed7763 tests: opus: remove apparently useless macro in tests 2016-05-02 14:23:54 -03:00
Aurélien Zanelli
928bb3b6f4 exiftag: handle GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM tag
This tag match the EXIF_TAG_FOCAL_LENGTH_IN_35_MM_FILM exif tag and is
stored on a short. Hence there is a precision loss compared to the
GstTag which is a double value.

https://bugzilla.gnome.org/show_bug.cgi?id=753930
2016-04-28 12:13:15 -03:00