Commit graph

338 commits

Author SHA1 Message Date
George Kiagiadakis
7ac883cebf videoaggregator: redo src caps negotiation if a sink pad's caps have changed in the meantime
https://bugzilla.gnome.org/show_bug.cgi?id=755782
2017-03-06 17:20:56 +02:00
Sebastian Dröge
aee020c26f glvideomixer/compositor: Correctly error out if calculating DAR fails
CID 1320700
2017-02-28 13:06:41 +02:00
Sebastian Dröge
12540146ea gl: Rename gst_gl_get_affine_transformation_meta_as_ndc_ext() to prevent symbol conflict
The same symbol also exists in libgstgl, although marked as private and
internal. This has no effect when doing static linking and there's a
symbol conflict.
2017-02-28 10:55:10 +02:00
Matthew Waters
c6bf4b36e6 glmixer: ensure caps are writable after intersection
gst_caps_intersect () may return an increased reference of one of the
input caps.

Fixes critical in the simple-launch-lines test:

Unexpected critical/warning: gst_caps_set_features: assertion 'IS_WRITABLE (caps)' failed
2017-01-18 15:07:48 +11:00
Matthew Waters
7fcbfe1234 gl/utils: also take care of the local GL context in query functions
Simplifies a deduplicates a lot of code in elements retrieving/setting
the local OpenGL context.
2017-01-13 11:20:51 +11:00
Matthew Waters
b4301e2235 glutils: remove trivial helper function
gst_gl_caps_replace_all_caps_features() is only used in two places and can
be trivially reproduced.
2017-01-13 11:20:51 +11:00
Matthew Waters
e8ec52b8ef gl: remove custom control binding proxy
Use the existing GstProxyControlBinding instead.
2017-01-10 13:57:37 +11:00
Sebastian Dröge
0f4ed7e2d6 glvideomixer: Reject multiview video
glvideomixer does not support it currently and it needs special support
for handling this correctly, and is rather non-trivial to implement for
all formats.
2016-12-14 15:53:41 +02:00
Sebastian Dröge
52fe0dbeaa compositor: Reject multiview video
Compositor does not support it currently and it needs special support
for handling this correctly, and is rather non-trivial to implement for
all formats.
2016-12-14 15:36:14 +02:00
Sebastian Dröge
dd18a6eb45 videoaggregator: Remove unlock() if set_info() fails
There is not mutex locked here that needs to be unlocked.
2016-12-14 15:35:42 +02: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
8644352155 videoaggregator: Mark pad as needing reconfiguration again if it failed
And return FLUSHING instead of NOT_NEGOTIATED on flushing pads.

https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:22:44 +02:00
Matthew Waters
0064e338a2 gl/utils: move gen_shader() to the plugin and remove del_shader()
gst_gl_context_del_shader() can be replaced by a g_object_unref().
gst_gl_context_gen_shader() should be replaced by using GstGLSLStage.
2016-11-10 20:11:03 +11:00
Sebastian Dröge
af4de9cb42 gst: Fix more mentions of interlaced-mode to say interlace-mode 2016-11-04 16:26:50 +02:00
Matthew Waters
d0a9cc0abc gl: GST_GL_TYPE -> GST_TYPE_GL
Some deprecated symbols are kept for backwards compatibility
2016-11-03 16:16:12 +11:00
Jan Schmidt
4f537c636a videoaggregator: Handle if update_caps() returns EMPTY
Don't assume the returned caps from update_caps() is
non-empty.
2016-08-26 03:25:49 +10:00
Jan Schmidt
e8a98ca5b3 gl: Update glvideomixer doc 2016-08-26 03:25:49 +10:00
Jan Schmidt
4e925aa854 gl: Add/update docs for glviewconvert, glstereomix
Add some example pipelines for glstereomix, and fix up
the example pipelines for glviewconvert
2016-08-26 03:25:49 +10:00
Jan Schmidt
3010a28f07 glstereomix: Fix caps negotiation
The videoaggregator negotiation sequence changed some time
back and broke glstereomix. Instead of doing nego incorrectly
in the find_best_format() vfunc, do it directly in the
update_caps() method.
2016-08-26 03:25:49 +10:00
Nirbheek Chauhan
d865d9126b Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Matej Knopp <matej.knopp@gmail.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:35:54 +01:00
Matthew Waters
5a74878988 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
Matthew Waters
c8c016ed17 gl: use GLMemory for accessing textures everywhere
This simplifies and consolidates a lot of duplicated code creating
and modifying textures.
2016-07-26 14:07:24 +10:00
Nirbheek Chauhan
9b7d248982 Fix various gboolean vs GstFlowReturn problems
Caught by building with MSVC which gave warnings for these
2016-07-11 15:02:06 +01: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
f2c0e89021 gst-libs: gl, video: use MAY_BE_LEAKED flag
https://bugzilla.gnome.org/show_bug.cgi?id=767162
2016-06-03 00:59:12 +01:00
Matthew Waters
11bb4454a8 glvideomixer: fix race retrieving the GL context from the display
_get_gl_context() can be called concurrently from either propose_allocation() or
decide_allocation().  If it so happens that this happens at the same time,
the check for whether we already had a GL context was outside the lock.  Inside
the lock and loop, the first thing that happens is that we unref the current GL
context (if valid) as if there was a conflict adding it to the display.  If the
timing was unlucky, subsequent use of the GL context would be referencing an
already unreffed GL context object resulting in a critical:

g_object_ref: assertion 'object->ref_count > 0' failed

https://bugzilla.gnome.org/show_bug.cgi?id=766703
2016-05-25 18:28:20 +10:00
Guillaume Desmottes
396932f412 glmosaic: fix shader leak
gst_gl_mosaic_init_shader() is called twice with test_glmosaic so the
first shader was leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=766661
2016-05-20 17:09:25 +02:00
Olivier Crête
0934af6cce videoaggregator: Don't wait if input buffer is after output
If the input buffer is after the end of the output buffer, then waiting
for more data won't help. We will never get an input buffer for this point.

This fixes compositing of streams from rtspsrc.

https://bugzilla.gnome.org/show_bug.cgi?id=766422
2016-05-20 10:58:46 -04:00
Tim-Philipp Müller
b89a47ed66 videoaggregator: canonicalise function names
Had to be done at some point:
gst_videoaggregator_* -> gst_video_aggregator_*
Also fix up some function names with typos.
2016-05-16 12:27:50 +01:00
Edward Hervey
d44a77a5e8 compositor: Check if we get a valid display ratio
As is done everywhere else, and avoids setting bogus values
And remove useless *<val> checks (we always provide valid values and
it's an internal function).

CID #1320700
2016-05-15 14:35:38 +02:00
Matthew Waters
06986222c9 gl: take the affine transformation in NDC
Provide a function to get the affine matrix in the meta in terms of NDC
coordinates and use as a standard opengl matrix.

Also advertise support for the affine transformation meta in the allocation
query.
2016-05-14 16:35:29 +03:00
Matthew Waters
96682c41d4 glbasemixer: actually attempt to propose an allocation upstream
We were always failing the allocation query as a flag was never being set to
signal a successful negotiation.  Fix by setting the required flag on a
successful caps event from upstream.
2016-05-14 16:35:29 +03:00
Matthew Waters
0283c3d8aa gl/egl: replace gsteglimagememory with an EGLImage wrapper
That can be passed to GstGLMemoryEGL.

This also ports the dmabuf uploader to GstEGLImage and GstGLMemoryEGL.
2016-05-04 13:31:48 +10:00
Sebastian Dröge
905c1600b1 compositor: Set blend functions in ::negotiated_caps() instead of ::fixate_caps()
The latter should not change any state but just fixate the caps, while the
former is always called when srcpads caps are decided.

https://bugzilla.gnome.org/show_bug.cgi?id=765324
2016-05-03 16:53:25 +03:00
Thiago Santos
14c9e37fdd videoaggregator: plug caps leak
It was losing ref of the original 'ret' caps that would be returned
or returning it with 2 references to it.
2016-04-18 13:46:55 -03:00
Thiago Santos
cf6a36721b videoaggregator: properly handle interlace-mode restrictions
videoaggregator can't handle interlace-mode changes so it must
always restrict itself to the first interlacing mode it receives.

Tests included

https://bugzilla.gnome.org/show_bug.cgi?id=754495
2016-04-18 13:46:48 -03:00
Reynaldo H. Verdejo Pinochet
cd4e3e0f0a Drop usage of 'overlayed' to mean 'overlaid' 2016-04-15 13:39:32 -07:00
Matthew Waters
5e11ec7164 glbasemixer: chain up to the parent implementation 2016-04-12 09:39:32 +10:00
Matthew Waters
92245ec05f videoaggregator: repect the result of find_best_format in the default update_caps
We weren't using the result of find_best_format at all.

Also, move the find_best_format usage to the default update_caps() to make
sure that it is also overridable.

https://bugzilla.gnome.org/show_bug.cgi?id=764363
2016-04-07 20:30:25 +10:00
Matthew Waters
f2c2717ac7 glvideomixer: add support for the affine transformation meta 2016-04-05 20:50:24 +10:00
Matthew Waters
71877db25f glmixer: set the current texture to 0 before mapping
If we fail mapping, we don't want to use undefined video data in the subclass.
2016-04-05 16:24:53 +10:00
Matthew Waters
efc1299426 glmixerbin: proxy the start-time-* properties from aggregator 2016-04-04 20:54:23 +10:00
Nirbheek Chauhan
3c7906c13b tests/compositor: Add test for aggregator pad numbering
Tests that the behaviour in 7a5cb5a473 is being conformed to.
2016-03-28 13:46:00 +03:00
Vineeth TM
8741806671 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
81d724a325 glstereo{mix,split}: allow running on GLES 2/3
It's mostly supported for GLES 2.x, fully supported on GLES 3.x
2016-03-17 02:28:32 +11:00
Matthew Waters
ca15a26c11 glvideomixer: signal continuation in reset
We want to iterate over all the pads, not just the first one.  Fix by returning
TRUE in the GstAggregatorPadForeachFunc.

Removes a GST_IS_GL_CONTEXT() assertion on shutdown with >2 inputs
using gst-launch.
2016-03-08 02:06:46 +11:00
Thiago Santos
3d0f8cfc21 tests: compositor: drop special case for valgrind timeout
The default one is 6 minutes, the test was using 5 minutes so just
resort to using the default.

For the non-valgrind test also use the default 20 secs instead of
reducing it to 6s. No real reason to set a custom value here.
2016-02-25 11:43:43 -03:00
Thiago Santos
ea7e099307 tests: compositor: add tests for caps queries
Verifies that proper caps are returned based on what downstream
restricts.
2016-02-25 11:43:43 -03:00
Thiago Santos
86d21e9455 videoaggregator: fix caps queries to allow proper renegotiation
When caps are already negotiated it should be possible to
select formats other than the one that was negotiated. If downstream
allows alpha video caps and it has already negotiated to a non-alpha
format, caps queries should still return the alpha caps as a possible
format as caps renegotiation can happen.

Includes tests (for compositor) to check that caps queries done after
a caps has been negotiated returns complete results

https://bugzilla.gnome.org/show_bug.cgi?id=757610
2016-02-25 11:43:43 -03:00
Wang Xin-yu (王昕宇)
a8862ac440 glmixer: iterator didn't advance in continue statement
Leading to a deadlock.

https://bugzilla.gnome.org/show_bug.cgi?id=760873
2016-02-24 18:27:44 +11:00