Commit graph

196 commits

Author SHA1 Message Date
Seungha Yang
3db9152ec6 isoff: Add parsing moov and tfdt
To extract isobmff level timestamp, moov and tfdt parsing is required.

https://bugzilla.gnome.org/show_bug.cgi?id=777825
2017-08-25 17:21:11 -07:00
Seungha Yang
7d06ecb3a4 isoff: Move isoff to gst-libs
Also rename unit test dash_isoff to isoff

https://bugzilla.gnome.org/show_bug.cgi?id=777825
2017-08-25 17:21:04 -07:00
Philippe Normand
8b7aa50bc9 tests/player: check for media-info-updated before duration-changed
The media-info-updated signal is now emitted before duration-changed since
commit 8a29da8023.

https://bugzilla.gnome.org/show_bug.cgi?id=786201
2017-08-25 19:09:00 +01:00
Matthew Waters
63dd27a785 gl/checks: fix build 2017-08-24 01:18:40 +10:00
Matthew Waters
d8bc42fb30 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-08-23 15:32:10 +10:00
Julien Isorce
2fd84a6c86 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-08-22 10:00:19 +01:00
Matthew Waters
efc015f27d 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-03-14 14:15:00 +11:00
Matthew Waters
956c4d0bde 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-03-13 21:10:58 +11:00
Edward Hervey
d98e82d667 check: Use gst_check_run_suite
Ensures that xunit reports get generated when requested
2017-01-02 15:05:19 +01:00
Edward Hervey
cf9a341e9d check: Use non-deprecated API 2016-12-21 12:06:00 +01:00
Matthew Waters
1ddbd773f8 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
2016-11-16 18:06:45 +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
Matthew Waters
d37a2f13ee 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
2016-10-05 12:20:52 +11:00
Sebastian Dröge
68cbf7802d player: Fix unit test for minor API change 2016-09-15 14:58:35 +02:00
Matthew Waters
d2ff585de1 tests/glupload: support opengl3 properly instead of spewing GL errors 2016-08-29 16:58:24 +10:00
Alessandro Decina
a7dccec0ff 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.
2016-08-29 16:06:06 +10:00
Matthew Waters
06b4b52a20 glcontext: remove not thread-safe get/set_error()
Use GError's instead if necessary.
2016-07-26 14:07:24 +10:00
Matthew Waters
518e8a3fd2 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().
2016-07-26 14:07:24 +10:00
Guillaume Desmottes
0f692e202e player: move 'position-update-interval' setting to the config struct
https://bugzilla.gnome.org/show_bug.cgi?id=769144
2016-07-25 13:03:20 +03:00
Guillaume Desmottes
6e39cef802 player: add API to change http user agent
Introducing a new 'config' API similar to GstBufferPoolConfig.

https://bugzilla.gnome.org/show_bug.cgi?id=765314
2016-07-25 13:02:35 +03:00
Matthew Waters
989200820d 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.
2016-06-29 18:04:28 +10:00
Guillaume Desmottes
6a02c8a109 glupload: fix shader leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Matthew Waters
8c9b231db1 tests/glcontext: update test for gen,del_texture removal 2016-06-16 00:47:42 +10:00
Guillaume Desmottes
0467923415 player: inhibit signals after gst_player_stop() has been called
Also wait for the state change to STOP to have been announced before
destroying the player so it won't appear as leaked by leak detector
tools.

https://bugzilla.gnome.org/show_bug.cgi?id=766607
2016-05-30 12:43:22 +03:00
Guillaume Desmottes
b00f0d0180 player: handle uri-loaded in test
Had to adapt the existing tests because of this new callback.

https://bugzilla.gnome.org/show_bug.cgi?id=766607
2016-05-30 12:43:22 +03:00
Guillaume Desmottes
0f19a48c98 player: use gst_check_init() in test
Calling GST_DEBUG() in test rely on the default category to be defined,
which is done in gst_check_init().

https://bugzilla.gnome.org/show_bug.cgi?id=766607
2016-05-21 09:57:54 +03:00
Sebastian Dröge
86e57adda2 aggregator: Fix leak in unit test
GST_PAD_PROBE_HANDLED means that we should've unreffed the probe data,
it was handled by us in one way or another.
2016-03-28 13:52:07 +03:00
Vineeth TM
8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Matthew Waters
aa6062945c 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.
2016-03-08 02:06:13 +11:00
Matthew Waters
5437874596 gl: add a gstglquery object for arbitrary GL queries
Currently only GL_TIME_ELAPSED and GL_TIMESTAMP are supported
2016-01-15 13:21:56 +11:00
Matthew Waters
2aadd7eaf9 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
2016-01-07 14:11:13 +11:00
Sebastian Dröge
b53972a5cb player: Remove gst_player_new() and make gst_player_new_full() the normal constructor
In very few cases the simple version was actually needed and having the
parameters hidden by a _full() version caused application that actually needed
it to not use it.
2016-01-04 09:55:28 +02:00
Matthew Waters
05c5c27f1c tests/glmemory: output data pointer values on failure
Allows quicker inspection of what failed.
2015-12-30 12:16:29 +11:00
Sebastian Dröge
2f86923cbd player: Add unit test that is disabled by default
The unit test is downloading a few small media files from the Internet,
which are then used during the test. "make clean" removes the files again.
2015-12-23 12:19:33 +01:00
Sebastian Dröge
4a626d92d2 glcolorconvert: Fix name of testsuite 2015-12-21 12:19:11 +01:00
Matthew Waters
5dcd500257 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
2015-12-17 15:44:22 +11:00
Matthew Waters
779dc3132c glmemorypbo: remove our own alloc()/wrapped()/etc functions
replaced by equivalent functionality within gst_gl_base_memory_alloc()
2015-12-17 13:49:56 +11:00
Matthew Waters
6519622eb0 tests: update for glmemory api changes 2015-12-14 18:41:30 +11:00
Matthew Waters
a07a350183 tests/glmemory: include the generic gl header
Including gstglmemory.h directly results in the compiler complaining
about incomplete types.
2015-12-14 18:15:42 +11:00
Matthew Waters
2b7495bbc1 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.
2015-12-14 16:35:32 +11:00
Matthew Waters
3591c6bfa0 gluploadmeta; remove convenience helper API
It was not really useful as if one knows about libgstgl, one can just use
GLMemory objects directly.
2015-12-14 13:55:16 +11:00
Hyunjun Ko
0fd6b5d331 tests:aggregator: fix tc failure and correct check value
Failure by this commit 2dfa548f36, which is
to append hooks instead of prepend.
Because of this change, aggretated_cb is not called and leads to failure.

And correct to check flush stop value instead of flush start value

https://bugzilla.gnome.org/show_bug.cgi?id=757801
2015-12-01 10:28:39 +02:00
Vineeth TM
e940d8875d tests:glsl: version_profile_s string leak
https://bugzilla.gnome.org/show_bug.cgi?id=758039
2015-11-13 17:00:46 +11:00
Vineeth TM
a22f085eac tests:glupload: fix caps memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=758039
2015-11-13 17:00:46 +11:00
Vineeth TM
5f8825e7d9 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
2015-11-11 21:41:52 +11:00
Matthew Waters
8779144826 gl/tests: update for glmemory api changes 2015-10-30 15:00:23 +11:00
Matthew Waters
e61d504556 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.
2015-10-30 14:24:53 +11:00
Matthew Waters
924f2ca986 gl/tests: port glcontext test to opengl
Now uses vao's and vbo's when possible like the rest of the gstgl library.
2015-10-15 22:42:26 +11:00
Matthew Waters
b25807c382 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.
2015-10-15 21:27:57 +11:00
Matthew Waters
2e8642cc4c gl: add some GLSL utility functions
Specifically parsing/setting GLSL versions and the shader related
function table.
2015-10-15 21:27:57 +11:00
Matthew Waters
49e6516550 glupload: remove useless release_buffer
It's a leftover from when we weren't outputting GstBuffer's and
returning raw texture id's.
2015-09-30 13:36:09 +10:00
Matthew Waters
4fd7b2408e tests/glcontext: fix INVALID_ENUM GL error in test 2015-08-08 15:32:17 +02:00
Olivier Crête
035e51b010 tests: Add test for seeking live pipelines
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête
1cb49c429b tests: Make source live to re-enable aggregator timeout tests
The live mode is only enabled if one of the sources if live.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Nicolas Dufresne
47e436916d 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.
2015-07-28 11:20:40 -04:00
Nicolas Dufresne
3d9d4869f4 glcolorconvert-test: Fix build 2015-07-28 11:06:43 -04:00
Matthew Waters
d5996de5d7 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.
2015-07-18 18:18:22 +10:00
Matthew Waters
be9ad5eeb2 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.
2015-07-18 15:34:55 +10:00
Matthew Waters
c3a47c910d 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.
2015-06-12 16:59:20 +10:00
Matthew Waters
7d8d1f8206 glmemory: implement on top of glbasebuffer
Provides convenient access to PBO usage.

Currently texture updates are coupled tightly to data transfers.
2015-06-12 16:59:20 +10:00
Edward Hervey
e899abea14 check: Use GST_CHECK_MAIN () macro everywhere
Makes source code smaller, and ensures we go through common initialization
path (like the one that sets up XML unit test output ...)
2015-06-02 16:04:40 +02:00
Matthew Waters
904cdf3f58 tests/gl: fix typo 2015-05-14 18:35:35 +10:00
Matthew Waters
0870e8785e gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
We are using shaders everywhere and so they are not needed
2015-05-14 16:42:09 +10:00
Reynaldo H. Verdejo Pinochet
b31f3a88e4 aggregator: fix typo in test suite 2015-04-03 18:17:35 -03:00
Reynaldo H. Verdejo Pinochet
b24971f2dd aggregator: add gap event handling unit test
https://bugzilla.gnome.org/show_bug.cgi?id=746249
2015-04-03 18:17:35 -03:00
Matthew Waters
e5debcaff4 gl/tests: fix deadlock on glcontext wrapped context test 2015-03-13 12:30:20 +00:00
hoonhee.lee
3beb48162f tests: glcontext: remove unnecessary semicolon
https://bugzilla.gnome.org/show_bug.cgi?id=745875
2015-03-09 08:41:25 +01:00
Nicolas Dufresne
56d4ff8773 gl-test: Port unit tests to new API 2015-03-01 00:08:42 -05:00
Tim-Philipp Müller
3c2ee8ece5 aggregator: use new gst_aggregator_pad_drop_buffer() 2015-02-13 16:25:45 +00:00
Matthew Waters
438b83c9fc gl: update unit test for glmemory api change 2015-01-30 18:51:17 +11:00
Thibault Saunier
d8eef43123 aggregator: Hide GstAggregatorPad buffer and EOS fileds
And add a getter for the EOS.

The user should always use the various getters to access
those fields

https://bugzilla.gnome.org/show_bug.cgi?id=742684
2015-01-29 10:24:18 +01:00
Matthew Waters
75b808d072 gl/tests: update glwindow api change 2015-01-23 17:27:42 +11:00
Matthew Waters
d5c3693791 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.
2015-01-14 22:22:13 +11:00
Matthew Waters
4c73e20553 glcontext: allow wrapped contexts to be utilised like non-wrapped contexts
Fill in the missing pieces like get_proc_address, the gl function vtable
2015-01-13 15:18:41 +11:00
Nicolas Dufresne
046639ddaa gltest: Port to new API
https://bugzilla.gnome.org/show_bug.cgi?id=740900
2014-12-19 13:19:34 -05:00
Sebastian Dröge
d4c4af699e aggregator: Add a timeout parameter to ::aggregate()
When this is TRUE, we really have to produce output. This happens
in live mixing mode when we have to output something for the current
time, no matter if we have enough input or not.
2014-12-17 18:41:41 +01:00
Tim-Philipp Müller
9d79b65a55 tests: fix aggregator unit test after property renaming 2014-12-16 19:49:56 +00:00
Sebastian Rasmussen
01dc7edd8b tests/aggregator: Use correct type when setting property
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741495
2014-12-14 11:29:19 +01:00
Matthew Waters
810d38c29f glupload: rearchitecture for non GLMemory inputs/outputs
Allows other memory types to be implemented/returned/used by the caller.
2014-11-23 17:13:36 +11:00
Matthew Waters
81ceca1aea glcontext: add api for retreiving the current context and api
that is current in the calling thread.
2014-10-28 17:33:20 +11:00
Aurélien Zanelli
81c5fd3c1e vc1parser: fix expected level in sequence-layer parsing unit test
Sequence-layer used for unit test have a level set to 2 which should
match the medium level, not the high.

https://bugzilla.gnome.org/show_bug.cgi?id=738230
2014-10-20 12:40:54 +02:00
Matthew Waters
fa90c07ff2 tests/aggregator: add timeout handling test for the timeout parameter 2014-10-09 23:52:11 +11:00
Matthew Waters
66e65b3333 tests/glcolorconvert: do reorder checking for rgba formats 2014-09-30 18:26:34 +10:00
Matthew Waters
ce7226da06 tests/glmemory: add simple transfer test
tests transferring to/from the GL with a 1x1 RGBA pixel.
2014-09-30 01:49:42 +10:00
Matthew Waters
229e9911cb gl/tests: update for upload API changes 2014-09-22 20:02:44 +10:00
Aurélien Zanelli
bd050201ba vc1parser: add unit test for sequence-layer parsing
Check that a sequence-layer header is successfully parsed.

https://bugzilla.gnome.org/show_bug.cgi?id=736871
2014-09-18 13:36:35 +03:00
Matthew Waters
81e71aa01b gl/tests: update for API changes 2014-08-01 10:02:34 +10:00
Thiago Santos
03ef435c45 tests: gitignore: update with new tests 2014-07-28 19:11:41 -03:00
Gwenole Beauchesne
1a455c25cd tests: h264parser: add test to identify EOSEQ / EOS NALs.
Check that end_of_seq() [EOSEQ] and end_of_stream [EOS] NAL units
are correctly parsed and the reported NAL unit size yields 1 byte,
i.e. the only NalHeaderBytes in there.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-01 16:54:44 +02:00
Edward Hervey
8c53dfcfb6 mpegts: Expose GstMpegtsDescriptor free function
Nothing earth shattering, but avoids people having to use g_boxed_free()
2014-07-01 10:03:49 +02:00
Thibault Saunier
71c81a5176 aggregator: Avoid destroying sources we do not own
+ Unref the maincontext in a new dispose function
+ Make sure to remove all sources on dispose

https://bugzilla.gnome.org/show_bug.cgi?id=732445
2014-06-30 14:24:49 +02:00
Sebastian Dröge
5cd10a10ab glupload: Fix memory leak in unit test 2014-06-29 21:57:32 +02:00
Sebastian Dröge
d4a8d67982 glcontext: Fix memory leaks in unit test 2014-06-29 21:53:21 +02:00
Sebastian Dröge
426f9e6097 mpegts: Fix memory leaks in the test and the library
Currently uses g_boxed_free() in the unit test, this needs to
be fixed properly when cleaning up the API.

https://bugzilla.gnome.org/show_bug.cgi?id=730914
2014-06-29 21:34:50 +02:00
Thiago Santos
133c67a6a6 tests: aggregator: fix various leaks in the tests 2014-06-28 11:20:43 -03:00
Edward Hervey
22dfd9aef3 mpegts: Unify API : GstMpegts / gst_mpegts_ / GST_*_MPEGTS_
It was previously a mix and match of both variants, introducing just too much
confusion.

The prefix are from now on:
* GstMpegts for structures and type names (and not GstMpegTs)
* gst_mpegts_ for functions (and not gst_mpeg_ts_)
* GST_MPEGTS_ for enums/flags (and not GST_MPEG_TS_)
* GST_TYPE_MPEGTS_ for types (and not GST_TYPE_MPEG_TS_)

The rationale for chosing that is:
* the namespace is shorter/direct (it's mpegts, not mpeg_ts nor mpeg-ts)
* the namespace is one word under Gst
* it's shorter (yah)
2014-06-25 14:50:05 +02:00
Edward Hervey
123f642d5e mpegts: Fix descriptor_from_dvb_service
Various leaks/overwrites issues
2014-06-24 14:51:32 +02:00
Thibault Saunier
55c65d079f aggregator: Add new GstAggregator base class
This base class has been added to a newly created libgstbadbase library

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>

https://bugzilla.gnome.org/show_bug.cgi?id=731917
2014-06-20 19:53:33 +02:00
Thiago Santos
89fadbcfe4 tests: mpegts: add test for STT parsing
Specially for the time to UTC datetime conversion

Example taken from the A65 spec

https://bugzilla.gnome.org/show_bug.cgi?id=730435
2014-05-29 10:38:00 +02:00
Matthew Waters
5867eb42f3 tests: update for glupload changes 2014-05-29 18:32:48 +10:00