platform/upstream/gst-plugins-base.git
6 years agovideoaggregator: add CAST macros
Tim-Philipp Müller [Thu, 2 Nov 2017 12:56:57 +0000 (12:56 +0000)]
videoaggregator: add CAST macros

6 years agogl: use new gst_element_foreach_sink_pad()
Tim-Philipp Müller [Thu, 2 Nov 2017 12:17:38 +0000 (12:17 +0000)]
gl: use new gst_element_foreach_sink_pad()

Instead of gst_aggregator_iterate_sinkpads() which will
soon be removed.

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

6 years agovideoaggregator: drop ABI compat in padding for new struct member
Tim-Philipp Müller [Thu, 2 Nov 2017 11:57:24 +0000 (11:57 +0000)]
videoaggregator: drop ABI compat in padding for new struct member

Don't really have to do that while it's in -bad and most users
are in-tree anyway.

6 years agovideoaggregator: use GstFlowReturn for flow returns
Tim-Philipp Müller [Fri, 13 Oct 2017 10:46:09 +0000 (11:46 +0100)]
videoaggregator: use GstFlowReturn for flow returns

6 years agoglmixer: Unmap video frame in error case
Ponnam Srinivas [Mon, 25 Sep 2017 11:50:58 +0000 (17:20 +0530)]
glmixer: Unmap video frame in error case

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

6 years agoglvidemixer: need reconfigure output gemotry after caps renegotiated
Haihua Hu [Wed, 20 Sep 2017 12:00:03 +0000 (20:00 +0800)]
glvidemixer: need reconfigure output gemotry after caps renegotiated

6 years agoRevert "glvideomixer: need update output geometry after src caps reconfigure"
Matthew Waters [Thu, 21 Sep 2017 01:59:22 +0000 (11:59 +1000)]
Revert "glvideomixer: need update output geometry after src caps reconfigure"

This reverts commit d6e538dc5651fb03c85d7c7614bcf6c689f2db2f.

6 years agoglvideomixer: need update output geometry after src caps reconfigure
Haihua Hu [Mon, 18 Sep 2017 07:42:00 +0000 (15:42 +0800)]
glvideomixer: need update output geometry after src caps reconfigure

Need update output geometry when sink caps changed and use
gst_structure_set to update caps if structure is fixed

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

6 years agoRequest minimum buffer even if need_pool is FALSE
Nicolas Dufresne [Tue, 5 Sep 2017 20:20:44 +0000 (16:20 -0400)]
Request minimum buffer even if need_pool is FALSE

When tee is used, it will not request a pool, but still it wants to
know how many buffers are required.

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

6 years agogl: do not include GL headers in public gstgl headers
Julien Isorce [Fri, 7 Jul 2017 15:15:12 +0000 (16:15 +0100)]
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

6 years agovideoaggregator: use colorimetry from find_best_format.
Mathieu Duponchelle [Wed, 9 Aug 2017 23:48:18 +0000 (01:48 +0200)]
videoaggregator: use colorimetry from find_best_format.

This increases the chances that we won't need to do any conversion
for a given pad.

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

6 years agovideoaggregator: improve find_best_format heuristic.
Mathieu Duponchelle [Wed, 9 Aug 2017 23:45:53 +0000 (01:45 +0200)]
videoaggregator: improve find_best_format heuristic.

The goal here is to minimize the work needed to bring all images
to a common format. A better criteria than the number of pads
with a given format is the number of pixels with a given format.

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

6 years agocompositor: improve conversion debugging
Mathieu Duponchelle [Wed, 9 Aug 2017 23:43:15 +0000 (01:43 +0200)]
compositor: improve conversion debugging

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

6 years agovideoaggregator: Don't mix up width and height
Sebastian Dröge [Fri, 4 Aug 2017 08:08:18 +0000 (11:08 +0300)]
videoaggregator: Don't mix up width and height

CID 1416129

6 years agoexamples: fix compiler warning in compositor crossfade example
Tim-Philipp Müller [Thu, 3 Aug 2017 19:21:17 +0000 (20:21 +0100)]
examples: fix compiler warning in compositor crossfade example

warning: control reaches end of non-void function

6 years agocompositor: update disted orc fallback files
Tim-Philipp Müller [Thu, 3 Aug 2017 19:14:20 +0000 (20:14 +0100)]
compositor: update disted orc fallback files

6 years agotests: examples: Add a simple crossfade example
Thibault Saunier [Wed, 12 Jul 2017 02:04:55 +0000 (22:04 -0400)]
tests: examples: Add a simple crossfade example

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

6 years agocompositor: Add support for crossfade blending
Thibault Saunier [Thu, 6 Jul 2017 18:26:21 +0000 (14:26 -0400)]
compositor: Add support for crossfade blending

Crossfading is a bit more complex than just having two pads with the
right keyframes as the blending is not exactly the same.

The difference is in the way we compute the alpha channel, in the case
of crossfading, we have to compute an additive operation between
the destination and the source (factored by the alpha property of both
the input pad alpha property and the crossfading ratio) basically so
that the crossfade result of 2 opaque frames is also fully opaque at any
time in the crossfading process, avoid bleeding through the layer
blending.

Some rationnal can be found in https://phabricator.freedesktop.org/T7773.

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

7 years agovideo: mark symbols explicitly for export with GST_EXPORT
Tim-Philipp Müller [Tue, 18 Jul 2017 11:46:09 +0000 (12:46 +0100)]
video: mark symbols explicitly for export with GST_EXPORT

7 years agovideoaggregator: fix gaps at end of streams.
Mathieu Duponchelle [Mon, 10 Apr 2017 23:18:51 +0000 (01:18 +0200)]
videoaggregator: fix gaps at end of streams.

When the pad has received EOS, its buffer may still be mixed
any number of times, when the pad's framerate is inferior
to the output framerate.

This was introduced by my patch in
https://bugzilla.gnome.org/show_bug.cgi?id=782962, this patch
also correctly addresses the initial issue.

7 years agoglbasemixer: Remove unused negotiated member
Olivier Crête [Sun, 21 May 2017 16:31:59 +0000 (18:31 +0200)]
glbasemixer: Remove unused negotiated member

This is now all handled in GstAggregator, so this code is not
called anymore.

7 years agovideoaggregator: Declare that it supports the video meta on input
Olivier Crête [Sun, 21 May 2017 13:44:02 +0000 (15:44 +0200)]
videoaggregator: Declare that it supports the video meta on input

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

7 years agogl*mixer: Use propose_allocation from the GstAggregator base class
Olivier Crête [Sun, 21 May 2017 13:30:10 +0000 (15:30 +0200)]
gl*mixer: Use propose_allocation from the GstAggregator base class

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

7 years agovideoaggregator: Create normal video pool as a fallback
Olivier Crête [Sat, 20 May 2017 16:10:29 +0000 (18:10 +0200)]
videoaggregator: Create normal video pool as a fallback

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

7 years agoglbasemixer: Remove own decide_allocation, use GstAggregator's
Olivier Crête [Sat, 20 May 2017 15:35:43 +0000 (17:35 +0200)]
glbasemixer: Remove own decide_allocation, use GstAggregator's

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

7 years agoglbasemixer: Use aggregator for allocation handling
Olivier Crête [Sat, 20 May 2017 15:30:06 +0000 (17:30 +0200)]
glbasemixer: Use aggregator for allocation handling

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

7 years agovideoaggregator: Get the buffer from the pool if available
Olivier Crête [Sat, 20 May 2017 15:25:16 +0000 (17:25 +0200)]
videoaggregator: Get the buffer from the pool if available

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

7 years agovideoaggregator: Return to parent on reconfigure
Olivier Crête [Sun, 21 May 2017 10:41:53 +0000 (12:41 +0200)]
videoaggregator: Return to parent on reconfigure

The caps negotiation is now in the parent, so need to return there
if a reconfiguration is needed, otherwise it will loops forever.

7 years agoaggregator: add simple support for caps handling
Matthew Waters [Sat, 20 May 2017 12:24:57 +0000 (14:24 +0200)]
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

7 years agovideoaggregator: delay using new caps from a sink pad until the next buffer in the...
George Kiagiadakis [Tue, 4 Apr 2017 08:25:43 +0000 (11:25 +0300)]
videoaggregator: delay using new caps from a sink pad until the next buffer in the queue is taken

When caps changes while streaming, the new caps was getting processed
immediately in videoaggregator, but the next buffer in the queue that
corresponds to this new caps was not necessarily being used immediately,
which resulted sometimes in using an old buffer with new caps. Of course
there used to be a separate buffer_vinfo for mapping the buffer with its
own caps, but in compositor the GstVideoConverter was still using wrong
info and resulted in invalid reads and corrupt output.

This approach here is more safe. We delay using the new caps
until we actually select the next buffer in the queue for use.
This way we also eliminate the need for buffer_vinfo, since the
pad->info is always in sync with the format of the selected buffer.

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

7 years agotests: Test caps using query
Olivier Crête [Wed, 6 Jul 2016 21:28:11 +0000 (17:28 -0400)]
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

7 years agoRemove plugin specific static build option
Nicolas Dufresne [Tue, 16 May 2017 18:05:52 +0000 (14:05 -0400)]
Remove plugin specific static build option

Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.

7 years agoglvideomixer: fix whole example launch line actually
Tim-Philipp Müller [Sun, 7 May 2017 10:47:40 +0000 (11:47 +0100)]
glvideomixer: fix whole example launch line actually

7 years agoglvideomixer: remove extraneous \ from example launch line in docs
Tim-Philipp Müller [Sun, 7 May 2017 10:41:06 +0000 (11:41 +0100)]
glvideomixer: remove extraneous \ from example launch line in docs

7 years agodocs: Port all docstring to gtk-doc markdown
Thibault Saunier [Wed, 8 Mar 2017 18:01:13 +0000 (15:01 -0300)]
docs: Port all docstring to gtk-doc markdown

7 years agovideoaggregator: Do not mix the same buffer twice when EOS.
Mathieu Duponchelle [Fri, 7 Apr 2017 16:49:52 +0000 (18:49 +0200)]
videoaggregator: Do not mix the same buffer twice when EOS.

When entering this code path, we know that:

We received EOS on this pad.
We consumed all its buffers.

In any case, we want to replace vaggpad->buffer with NULL,
otherwise we will end up mixing the same buffer twice.

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

7 years agovideoaggregator: redo src caps negotiation if a sink pad's caps have changed in the...
George Kiagiadakis [Fri, 3 Mar 2017 14:20:15 +0000 (16:20 +0200)]
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

7 years agoglvideomixer/compositor: Correctly error out if calculating DAR fails
Sebastian Dröge [Tue, 28 Feb 2017 11:06:41 +0000 (13:06 +0200)]
glvideomixer/compositor: Correctly error out if calculating DAR fails

CID 1320700

7 years agogl: Rename gst_gl_get_affine_transformation_meta_as_ndc_ext() to prevent symbol conflict
Sebastian Dröge [Tue, 28 Feb 2017 08:53:04 +0000 (10:53 +0200)]
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.

7 years agoglmixer: ensure caps are writable after intersection
Matthew Waters [Wed, 18 Jan 2017 04:03:48 +0000 (15:03 +1100)]
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

7 years agogl/utils: also take care of the local GL context in query functions
Matthew Waters [Thu, 12 Jan 2017 10:35:25 +0000 (21:35 +1100)]
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.

7 years agoglutils: remove trivial helper function
Matthew Waters [Wed, 11 Jan 2017 14:57:29 +0000 (01:57 +1100)]
glutils: remove trivial helper function

gst_gl_caps_replace_all_caps_features() is only used in two places and can
be trivially reproduced.

7 years agogl: remove custom control binding proxy
Matthew Waters [Tue, 10 Jan 2017 01:51:51 +0000 (12:51 +1100)]
gl: remove custom control binding proxy

Use the existing GstProxyControlBinding instead.

7 years agoglvideomixer: Reject multiview video
Sebastian Dröge [Wed, 14 Dec 2016 13:53:41 +0000 (15:53 +0200)]
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.

7 years agocompositor: Reject multiview video
Sebastian Dröge [Wed, 14 Dec 2016 13:36:14 +0000 (15:36 +0200)]
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.

7 years agovideoaggregator: Remove unlock() if set_info() fails
Sebastian Dröge [Wed, 14 Dec 2016 13:35:42 +0000 (15:35 +0200)]
videoaggregator: Remove unlock() if set_info() fails

There is not mutex locked here that needs to be unlocked.

7 years agogst: Don't declare variables inside the for loop header
Sebastian Dröge [Tue, 13 Dec 2016 20:39:01 +0000 (22:39 +0200)]
gst: Don't declare variables inside the for loop header

This is a C99 feature.

7 years agovideoaggregator: Mark pad as needing reconfiguration again if it failed
Sebastian Dröge [Thu, 17 Nov 2016 18:20:15 +0000 (20:20 +0200)]
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

7 years agogl/utils: move gen_shader() to the plugin and remove del_shader()
Matthew Waters [Thu, 10 Nov 2016 08:14:24 +0000 (19:14 +1100)]
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.

7 years agogst: Fix more mentions of interlaced-mode to say interlace-mode
Sebastian Dröge [Fri, 4 Nov 2016 14:26:50 +0000 (16:26 +0200)]
gst: Fix more mentions of interlaced-mode to say interlace-mode

7 years agogl: GST_GL_TYPE -> GST_TYPE_GL
Matthew Waters [Wed, 5 Oct 2016 01:19:12 +0000 (12:19 +1100)]
gl: GST_GL_TYPE -> GST_TYPE_GL

Some deprecated symbols are kept for backwards compatibility

7 years agovideoaggregator: Handle if update_caps() returns EMPTY
Jan Schmidt [Thu, 25 Aug 2016 16:20:11 +0000 (02:20 +1000)]
videoaggregator: Handle if update_caps() returns EMPTY

Don't assume the returned caps from update_caps() is
non-empty.

7 years agogl: Update glvideomixer doc
Jan Schmidt [Thu, 25 Aug 2016 16:07:27 +0000 (02:07 +1000)]
gl: Update glvideomixer doc

7 years agogl: Add/update docs for glviewconvert, glstereomix
Jan Schmidt [Thu, 25 Aug 2016 16:06:00 +0000 (02:06 +1000)]
gl: Add/update docs for glviewconvert, glstereomix

Add some example pipelines for glstereomix, and fix up
the example pipelines for glviewconvert

7 years agoglstereomix: Fix caps negotiation
Jan Schmidt [Thu, 25 Aug 2016 14:29:34 +0000 (00:29 +1000)]
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.

7 years agoAdd support for Meson as alternative/parallel build system
Nirbheek Chauhan [Fri, 12 Aug 2016 15:51:45 +0000 (21:21 +0530)]
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.

7 years agoglframebuffer: rewrite for a more consistent API
Matthew Waters [Tue, 12 Jul 2016 02:59:57 +0000 (12:59 +1000)]
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().

7 years agogl: use GLMemory for accessing textures everywhere
Matthew Waters [Mon, 11 Jul 2016 14:30:22 +0000 (00:30 +1000)]
gl: use GLMemory for accessing textures everywhere

This simplifies and consolidates a lot of duplicated code creating
and modifying textures.

8 years agoFix various gboolean vs GstFlowReturn problems
Nirbheek Chauhan [Mon, 11 Jul 2016 13:51:11 +0000 (19:21 +0530)]
Fix various gboolean vs GstFlowReturn problems

Caught by building with MSVC which gave warnings for these

8 years agofix event leaks in tests
Guillaume Desmottes [Thu, 19 May 2016 08:19:20 +0000 (11:19 +0300)]
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

8 years agogst-libs: gl, video: use MAY_BE_LEAKED flag
Guillaume Desmottes [Tue, 17 May 2016 14:14:49 +0000 (17:14 +0300)]
gst-libs: gl, video: use MAY_BE_LEAKED flag

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

8 years agoglvideomixer: fix race retrieving the GL context from the display
Matthew Waters [Tue, 24 May 2016 13:39:27 +0000 (23:39 +1000)]
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

8 years agoglmosaic: fix shader leak
Guillaume Desmottes [Thu, 19 May 2016 13:55:31 +0000 (16:55 +0300)]
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

8 years agovideoaggregator: Don't wait if input buffer is after output
Olivier Crête [Sat, 14 May 2016 09:56:59 +0000 (11:56 +0200)]
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

8 years agovideoaggregator: canonicalise function names
Tim-Philipp Müller [Mon, 16 May 2016 11:27:50 +0000 (12:27 +0100)]
videoaggregator: canonicalise function names

Had to be done at some point:
gst_videoaggregator_* -> gst_video_aggregator_*
Also fix up some function names with typos.

8 years agocompositor: Check if we get a valid display ratio
Edward Hervey [Sun, 15 May 2016 12:34:33 +0000 (14:34 +0200)]
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

8 years agogl: take the affine transformation in NDC
Matthew Waters [Sat, 14 May 2016 13:27:26 +0000 (16:27 +0300)]
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.

8 years agoglbasemixer: actually attempt to propose an allocation upstream
Matthew Waters [Sat, 14 May 2016 12:50:57 +0000 (15:50 +0300)]
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.

8 years agogl/egl: replace gsteglimagememory with an EGLImage wrapper
Matthew Waters [Wed, 4 May 2016 02:17:59 +0000 (12:17 +1000)]
gl/egl: replace gsteglimagememory with an EGLImage wrapper

That can be passed to GstGLMemoryEGL.

This also ports the dmabuf uploader to GstEGLImage and GstGLMemoryEGL.

8 years agocompositor: Set blend functions in ::negotiated_caps() instead of ::fixate_caps()
Sebastian Dröge [Tue, 3 May 2016 08:11:24 +0000 (11:11 +0300)]
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

8 years agovideoaggregator: plug caps leak
Thiago Santos [Mon, 18 Apr 2016 16:46:55 +0000 (13:46 -0300)]
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.

8 years agovideoaggregator: properly handle interlace-mode restrictions
Thiago Santos [Mon, 28 Mar 2016 18:44:27 +0000 (15:44 -0300)]
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

8 years agoDrop usage of 'overlayed' to mean 'overlaid'
Reynaldo H. Verdejo Pinochet [Fri, 15 Apr 2016 20:22:51 +0000 (13:22 -0700)]
Drop usage of 'overlayed' to mean 'overlaid'

8 years agoglbasemixer: chain up to the parent implementation
Matthew Waters [Mon, 11 Apr 2016 16:43:45 +0000 (16:43 +0000)]
glbasemixer: chain up to the parent implementation

8 years agovideoaggregator: repect the result of find_best_format in the default update_caps
Matthew Waters [Mon, 4 Apr 2016 10:55:51 +0000 (20:55 +1000)]
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

8 years agoglvideomixer: add support for the affine transformation meta
Matthew Waters [Wed, 23 Mar 2016 03:16:11 +0000 (03:16 +0000)]
glvideomixer: add support for the affine transformation meta

8 years agoglmixer: set the current texture to 0 before mapping
Matthew Waters [Tue, 5 Apr 2016 06:22:49 +0000 (16:22 +1000)]
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.

8 years agoglmixerbin: proxy the start-time-* properties from aggregator
Matthew Waters [Mon, 4 Apr 2016 03:43:30 +0000 (13:43 +1000)]
glmixerbin: proxy the start-time-* properties from aggregator

8 years agotests/compositor: Add test for aggregator pad numbering
Nirbheek Chauhan [Mon, 28 Mar 2016 03:15:45 +0000 (08:45 +0530)]
tests/compositor: Add test for aggregator pad numbering

Tests that the behaviour in 7a5cb5a473 is being conformed to.

8 years agobad: use new gst_element_class_add_static_pad_template()
Vineeth TM [Fri, 4 Mar 2016 06:50:26 +0000 (15:50 +0900)]
bad: use new gst_element_class_add_static_pad_template()

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

8 years agoglstereo{mix,split}: allow running on GLES 2/3
Matthew Waters [Wed, 16 Mar 2016 11:16:34 +0000 (22:16 +1100)]
glstereo{mix,split}: allow running on GLES 2/3

It's mostly supported for GLES 2.x, fully supported on GLES 3.x

8 years agoglvideomixer: signal continuation in reset
Matthew Waters [Mon, 7 Mar 2016 15:06:46 +0000 (02:06 +1100)]
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.

8 years agotests: compositor: drop special case for valgrind timeout
Thiago Santos [Tue, 23 Feb 2016 15:42:19 +0000 (12:42 -0300)]
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.

8 years agotests: compositor: add tests for caps queries
Thiago Santos [Tue, 23 Feb 2016 15:17:59 +0000 (12:17 -0300)]
tests: compositor: add tests for caps queries

Verifies that proper caps are returned based on what downstream
restricts.

8 years agovideoaggregator: fix caps queries to allow proper renegotiation
Thiago Santos [Thu, 18 Feb 2016 13:57:51 +0000 (10:57 -0300)]
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

8 years agoglmixer: iterator didn't advance in continue statement
Wang Xin-yu (王昕宇) [Wed, 24 Feb 2016 02:45:17 +0000 (10:45 +0800)]
glmixer: iterator didn't advance in continue statement

Leading to a deadlock.

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

8 years agogl: error out if the configured GL API is unsupported by our element
Matthew Waters [Mon, 22 Feb 2016 09:49:52 +0000 (20:49 +1100)]
gl: error out if the configured GL API is unsupported by our element

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

8 years agoglvideomixer: don't leak pad's vertex buffer on release_pad
Wang Xin-yu (王昕宇) [Thu, 21 Jan 2016 02:40:36 +0000 (10:40 +0800)]
glvideomixer: don't leak pad's vertex buffer on release_pad

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

8 years agoglmixer: Remove usage of GstGLMixerFrameData
Matthew Waters [Tue, 16 Feb 2016 14:08:18 +0000 (01:08 +1100)]
glmixer: Remove usage of GstGLMixerFrameData

Subclasses can just iterate over the list of pads themselves

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

8 years agoglmixer: don't hold the object lock while calling into GL
Matthew Waters [Wed, 13 Jan 2016 03:41:22 +0000 (14:41 +1100)]
glmixer: don't hold the object lock while calling into GL

Doing so can deadlock between the GL thread and the object lock e.g.
when performing reconfigure events in glimagesink on a resize event.

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

8 years agoglvideomixer: fix checker vbo leak
Wang Xin-yu (王昕宇) [Thu, 21 Jan 2016 08:10:48 +0000 (16:10 +0800)]
glvideomixer: fix checker vbo leak

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

8 years agoglvideomixer: par may not exist in the caps
Matthew Waters [Fri, 29 Jan 2016 03:03:26 +0000 (14:03 +1100)]
glvideomixer: par may not exist in the caps

Fixes a critical in the gst-validate tests:

gst_structure_fixate_field_nearest_fraction: assertion 'gst_structure_has_field
(structure, field_name)

8 years agovideoaggregator: don't do caps processing that is not overridable
Matthew Waters [Wed, 14 Oct 2015 10:13:57 +0000 (21:13 +1100)]
videoaggregator: don't do caps processing that is not overridable

Allows the subclass to completely override the chosen src caps.

This is needed as videoaggregator generally has no idea exactly
what operation is being performed.

- Adds a fixate_caps vfunc for fixation
- Merges gst_video_aggregator_update_converters() into
  gst_videoaggregator_update_src_caps() as we need some of its info
  for proper caps handling.
- Pass the downstream caps to the update_caps vfunc

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

8 years agogl: move control binding proxy implementation from glvideomixer
Matthew Waters [Wed, 27 Jan 2016 08:56:36 +0000 (19:56 +1100)]
gl: move control binding proxy implementation from glvideomixer

Other elements may need to use it's functionality

8 years agoglvideomixer: implement glBlendFunc and glBlendEquation
Matthew Waters [Tue, 12 Jan 2016 07:21:50 +0000 (18:21 +1100)]
glvideomixer: implement glBlendFunc and glBlendEquation

Allows more blending options than just A over B

e.g. frame comparisons are now possible.
  glvideomixer name=m
    sink_0::zorder=0
    sink_1::zorder=1
    sink_1::blend-equation-rgb={subtract,reverse-subtract}
    sink_1::blend-function-src-rgb=src-color
    sink_1::blend-function-dst-rgb=dst-color
  ! glimagesinkelement
  videotestsrc pattern=checkers-4 ! m.sink_0
  videotestsrc pattern=checkers-8 ! m.sink_1

8 years agogldownload: remove helper api from the library
Matthew Waters [Fri, 11 Dec 2015 04:39:57 +0000 (15:39 +1100)]
gldownload: remove helper api from the library

It was never used by anyone and is not needed anymore with the element
and GstGLMemory's transparent support for downloading textures.

8 years agoglviewconvert: remove set_format
Matthew Waters [Tue, 10 Nov 2015 02:52:30 +0000 (13:52 +1100)]
glviewconvert: remove set_format

We need the caps to be able to
1. check the caps features
2. get the requested texture-target on input/output

8 years agoglmixerbin: fix minor leak
Tim-Philipp Müller [Fri, 6 Nov 2015 12:30:12 +0000 (12:30 +0000)]
glmixerbin: fix minor leak

Don't leak removed list node.

8 years agovideoaggregator: use GST_STIME_ARGS for GstClockTimeDiff
Luis de Bethencourt [Mon, 2 Nov 2015 16:58:57 +0000 (16:58 +0000)]
videoaggregator: use GST_STIME_ARGS for GstClockTimeDiff

No need to manually handle negative values of diff, GST_STIME_ARGS does
exactly this.

8 years agoglmemory: add support for rectangle textures
Matthew Waters [Wed, 28 Oct 2015 13:44:26 +0000 (00:44 +1100)]
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.