platform/upstream/gstreamer.git
9 years agovideoaggregator: simplifies and improves sink_get_caps.
Mathieu Duponchelle [Sat, 20 Jun 2015 11:36:27 +0000 (13:36 +0200)]
videoaggregator: simplifies and improves sink_get_caps.

The problem here was that after removing the formats and
all the things we could convert, we then intersected these
caps with the template caps.

Hence if a subclass offered permissive sink templates
(eg all the possible formats videoconvert handles), but only
one output format, then at negotiation time getcaps returned
caps with the format restricted to that format, even though
we do handle conversion.

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

9 years agogl: Add glviewconvert, glstereomix and glstereosplit elements
Jan Schmidt [Fri, 29 May 2015 16:29:04 +0000 (02:29 +1000)]
gl: Add glviewconvert, glstereomix and glstereosplit elements

Conversion elements for transforming multiview/stereoscopic video

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

9 years agovideoaggregator: Print some debug output if we change the timestamp offset
Sebastian Dröge [Mon, 15 Jun 2015 12:29:04 +0000 (14:29 +0200)]
videoaggregator: Print some debug output if we change the timestamp offset

9 years agovideoaggregator: Add some more debug output
Sebastian Dröge [Mon, 15 Jun 2015 12:25:43 +0000 (14:25 +0200)]
videoaggregator: Add some more debug output

9 years agovideoaggregator: Don't update the ts-offset before updating the actual configured...
Sebastian Dröge [Mon, 15 Jun 2015 12:19:05 +0000 (14:19 +0200)]
videoaggregator: Don't update the ts-offset before updating the actual configured caps

9 years agovideoaggregator: Remember if the last LATENCY query returned live or not and use...
Sebastian Dröge [Mon, 15 Jun 2015 12:18:39 +0000 (14:18 +0200)]
videoaggregator: Remember if the last LATENCY query returned live or not and use the in the QoS messages

9 years agocompositor: update zorder documentation.
Mathieu Duponchelle [Sun, 14 Jun 2015 21:20:38 +0000 (23:20 +0200)]
compositor: update zorder documentation.

It is not bound between 0 and 10000 anymore.

9 years agovideoaggregator: No need to artificially bound the zorder.
Mathieu Duponchelle [Sun, 14 Jun 2015 21:13:59 +0000 (23:13 +0200)]
videoaggregator: No need to artificially bound the zorder.

It is an unsigned integer so the upper bound is G_MAXUINT.

9 years agoglmixerbin: implement proper dynamic pad removal
Matthew Waters [Sat, 13 Jun 2015 08:43:04 +0000 (18:43 +1000)]
glmixerbin: implement proper dynamic pad removal

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

9 years agotests: Add test for the 'ignore-eos' compositor sink pad property
Nirbheek Chauhan [Sat, 6 Jun 2015 15:10:13 +0000 (20:40 +0530)]
tests: Add test for the 'ignore-eos' compositor sink pad property

When the 'ignore-eos' property is set on a pad, compositor will keep resending
the last buffer on the pad till the pad is unlinked. We count the buffers
received on appsink, and if it's more than the buffers sent by videotestsrc, the
test passes.

9 years agovideoaggregator: add "ignore-eos" property for input pads
Nirbheek Chauhan [Mon, 9 Feb 2015 19:19:35 +0000 (00:49 +0530)]
videoaggregator: add "ignore-eos" property for input pads

When set, it causes videoaggregator to repeatedly aggregate the last buffer on
an EOS pad instead of skipping it and outputting silence. This is useful, for
instance, while playing back files seamless one after the other, to avoid
videoaggregator ever outputting silence (the checkerboard pattern).

It is to be noted that if all the pads on videoaggregator have this property set
on them, the mixer will never forward EOS downstream for obvious reasons. Hence,
at least one pad with 'ignore-eos' set to FALSE must send EOS to the mixer
before it will be forwarded downstream.

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

9 years agogl: Use gst_object_ref_sink() for gl{filter,mixer,src}bin too
Sebastian Dröge [Thu, 11 Jun 2015 13:22:04 +0000 (15:22 +0200)]
gl: Use gst_object_ref_sink() for gl{filter,mixer,src}bin too

9 years agovideoaggregator: simplify aggregate returning
Thiago Santos [Wed, 6 May 2015 17:29:01 +0000 (14:29 -0300)]
videoaggregator: simplify aggregate returning

Rework special handling with goto/labels to only have one case
and otherwise just return normally.

9 years agovideoaggregator: refactor caps reconfigure to its own function
Thiago Santos [Wed, 6 May 2015 17:19:36 +0000 (14:19 -0300)]
videoaggregator: refactor caps reconfigure to its own function

Makes the aggregation code shorter and easier to read

9 years agovideoaggregator: fixing types in aggregate function
Thiago Santos [Wed, 6 May 2015 16:59:51 +0000 (13:59 -0300)]
videoaggregator: fixing types in aggregate function

Correctly use boolean and GstFlowReturn types in the function.

9 years agovideoaggregator: use macro to access aggregator src pad
Thiago Santos [Wed, 6 May 2015 16:08:11 +0000 (13:08 -0300)]
videoaggregator: use macro to access aggregator src pad

Makes code a bit more readable

9 years agoRelease 1.5.1
Sebastian Dröge [Sun, 7 Jun 2015 08:55:35 +0000 (10:55 +0200)]
Release 1.5.1

9 years agoFix a common typo: retreive -> retrieve
Thiago Santos [Fri, 5 Jun 2015 12:35:39 +0000 (09:35 -0300)]
Fix a common typo: retreive -> retrieve

Seems to have been copy pasted around a few places

9 years agovideoaggregator: Add class property to disable caps scaling
Jan Schmidt [Sun, 10 May 2015 08:55:16 +0000 (18:55 +1000)]
videoaggregator: Add class property to disable caps scaling

Add preserve_update_caps_result boolean on the class to allow
sub-classes to disable videoaggregator removing sizes and framerate
from the update_caps() return result.

9 years agovideoaggregator: Catch errors, and allow sub-class to return NULL from get_output_buf...
Jan Schmidt [Mon, 4 May 2015 08:17:21 +0000 (18:17 +1000)]
videoaggregator: Catch errors, and allow sub-class to return NULL from get_output_buffer()

A return value of GST_FLOW_OK with a NULL buffer from get_output_buffer()
means the sub-class doesn't want to produce an output buffer, so
skip it.

If gst_videoaggregator_do_aggregate() generates an error, make sure
to propagate it - don't just ignore and discard the error by
over-writing it with the gst_pad_push() result.

9 years agocompositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos
Sebastian Dröge [Thu, 21 May 2015 13:24:48 +0000 (16:24 +0300)]
compositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos

Otherwise we divide by zero.

9 years agocompositor: Fix double assignment
Sebastian Dröge [Thu, 21 May 2015 13:19:08 +0000 (16:19 +0300)]
compositor: Fix double assignment

9 years agocompositor/glvideomixer: fix up par handling
Matthew Waters [Wed, 20 May 2015 14:56:01 +0000 (00:56 +1000)]
compositor/glvideomixer: fix up par handling

We were using the wrong formula

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

9 years agoRevert "doc: Workaround gtkdoc issue"
Stefan Sauer [Mon, 18 May 2015 18:16:32 +0000 (20:16 +0200)]
Revert "doc: Workaround gtkdoc issue"

This reverts commit ff6c736fe08e01f4320c4b02e811a0b57cf97cc1.

This is fixed by the gtk-doc 1.23 release.

<para> cannot contain <refsect2>:
http://www.docbook.org/tdg/en/html/para.html
http://www.docbook.org/tdg/en/html/refsect2.html

9 years agodoc: Workaround gtkdoc issue
Nicolas Dufresne [Sun, 17 May 2015 03:38:14 +0000 (23:38 -0400)]
doc: Workaround gtkdoc issue

With gtkdoc 1.22, the XML generator fails when a itemizedlist is
followed by a refsect2. Workaround the issue by wrapping the
refsect2 into para.

9 years agogl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
Matthew Waters [Thu, 14 May 2015 06:42:09 +0000 (16:42 +1000)]
gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls

We are using shaders everywhere and so they are not needed

9 years agogl: element buffers are part of vao state
Matthew Waters [Fri, 1 May 2015 02:04:28 +0000 (12:04 +1000)]
gl: element buffers are part of vao state

Use them as such.  They are also required for GL3 core profile support
with glDrawElements on OS X.

9 years agocompositor: implement proper par handling
Matthew Waters [Thu, 14 May 2015 03:04:21 +0000 (13:04 +1000)]
compositor: implement proper par handling

We were previously failing on different input and output par

9 years agogl: don't deadlock on context creation failure
Matthew Waters [Wed, 13 May 2015 13:54:52 +0000 (23:54 +1000)]
gl: don't deadlock on context creation failure

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

9 years agoglmixerbin: Don't unref pad templates
Sebastian Dröge [Wed, 13 May 2015 12:42:15 +0000 (15:42 +0300)]
glmixerbin: Don't unref pad templates

Otherwise we unref the reference that is owned by the element class.

9 years agocompositor: fix rectangle obscure test to clamp against the output frame size
Matthew Waters [Wed, 13 May 2015 07:38:35 +0000 (17:38 +1000)]
compositor: fix rectangle obscure test to clamp against the output frame size

Rather than one of the input pad video info's.

The test checking this was not constraining the output frame size
to ensure that the out of frame stream was not being displayed.

9 years agoglvideomixer: implement par handling
Matthew Waters [Wed, 13 May 2015 07:11:55 +0000 (17:11 +1000)]
glvideomixer: implement par handling

We were previously ignoring it completely

9 years agoglvideomixer: don't upload the vertex data every frame
Matthew Waters [Wed, 13 May 2015 07:10:42 +0000 (17:10 +1000)]
glvideomixer: don't upload the vertex data every frame

Add the missing cache tracking statement.

9 years agoglmixer: Implement GstVideoAggregator::find_best_format()
Sebastian Dröge [Mon, 11 May 2015 12:54:52 +0000 (15:54 +0300)]
glmixer: Implement GstVideoAggregator::find_best_format()

Without this, we will fixate weird pixel-aspect-ratios like 1/2147483647. But
in the end, all the negotiation code in videoaggregator needs a big cleanup
and videoaggregator needs to get rid of the software-mixer specific things
everywhere.

9 years agoRevert "gl: readd glupload/download onto element pads"
Sebastian Dröge [Wed, 6 May 2015 13:46:49 +0000 (15:46 +0200)]
Revert "gl: readd glupload/download onto element pads"

This reverts commit 87d8270f302b03f63ce04f986d824892a2c131fd.

9 years agoRevert "Revert "glvideomixer: implement with glmixerbin""
Sebastian Dröge [Wed, 6 May 2015 13:43:32 +0000 (15:43 +0200)]
Revert "Revert "glvideomixer: implement with glmixerbin""

This reverts commit b4bd11f2f3a60224d188b27ab55b278077cb1217.

9 years agotests: Add a check for the new compositor pad-is-obscured optimization
Nirbheek Chauhan [Fri, 13 Mar 2015 00:40:52 +0000 (06:10 +0530)]
tests: Add a check for the new compositor pad-is-obscured optimization

We verify that all the buffers on an obscured sinkpad are skipped by overriding
the map() function in the GstVideoMeta of the buffers to set a variable when
called. We also test that the buffers do get mapped when they're not obscured.

Blame^WCredit for the GstVideoMeta map() idea goes to Tim.

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

9 years agocompositor: Only map the frame from a buffer if it will be used
Nirbheek Chauhan [Sat, 18 Apr 2015 09:40:00 +0000 (15:10 +0530)]
compositor: Only map the frame from a buffer if it will be used

It's a waste of resources to map it if it won't be converted
or used at all. Since we moved the frame mapping down, we need
to use the GST_VIDEO_INFO accessor macros now in the code above
that instead of the GST_VIDEO_FRAME accessor macros.

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

9 years agocompositor: use accessor macros for consistency
Nirbheek Chauhan [Sat, 18 Apr 2015 09:39:02 +0000 (15:09 +0530)]
compositor: use accessor macros for consistency

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

9 years agocompositor: Skip pads that are completely obscured by a higher zorder pad
Nirbheek Chauhan [Sat, 18 Apr 2015 09:39:02 +0000 (15:09 +0530)]
compositor: Skip pads that are completely obscured by a higher zorder pad

For each frame, compare the frame boundaries, check if the format contains an
alpha channel, check opacity, and skip the frame if it's going to be completely
overwritten by a higher zorder frame. The check is O(n^2), but that doesn't
matter here because the number of sinkpads is small.

More can be done to avoid needless drawing, but this covers the majority of
cases. See TODOs. Ideally, a reverse painter's algorithm should be used for
optimal drawing, but memcpy during compositing is small compared to the CPU used
for frame conversion on each pad.

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

9 years agogl: readd glupload/download onto element pads
Matthew Waters [Thu, 30 Apr 2015 01:15:40 +0000 (11:15 +1000)]
gl: readd glupload/download onto element pads

Allows insertion of gl elements into non-gl pipelines without converter
(upload/download) elements.

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

9 years agoRevert "glvideomixer: implement with glmixerbin"
Matthew Waters [Wed, 29 Apr 2015 12:55:00 +0000 (22:55 +1000)]
Revert "glvideomixer: implement with glmixerbin"

This reverts commit 0fb56738a14391f248aa0be8756adeaf978baa0c.

9 years agoglupload: provide the sink template caps that could be used
Matthew Waters [Tue, 28 Apr 2015 10:11:07 +0000 (20:11 +1000)]
glupload: provide the sink template caps that could be used

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

9 years agogl: unref display/other-context in the correct place
Matthew Waters [Mon, 27 Apr 2015 05:20:56 +0000 (15:20 +1000)]
gl: unref display/other-context in the correct place

Otherwise state changes from PLAYING->READY->PAUSED will cause there to
to be no display configured on the element.

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

9 years agoglmixer: Possible null pointer dereference
Vineeth T M [Wed, 22 Apr 2015 09:54:45 +0000 (18:54 +0900)]
glmixer: Possible null pointer dereference

While printing error message when context fails, error variable is not being used anymore
so it will lead to null pointer dereference

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

9 years agogldisplay: synchronize the searching and creation of GstGLContext's
Matthew Waters [Tue, 21 Apr 2015 02:19:46 +0000 (12:19 +1000)]
gldisplay: synchronize the searching and creation of GstGLContext's

Ootherwise we could end up with multiple elements in different chains
each creating a context.  Fixes context creation with glvideomixer.

9 years agoglmixer: fix caps leak in gst_gl_mixer_pad_sink_getcaps()
Guillaume Desmottes [Wed, 15 Apr 2015 13:22:37 +0000 (15:22 +0200)]
glmixer: fix caps leak in gst_gl_mixer_pad_sink_getcaps()

Caps refcounting was all wrong in this function. Rewrote it and add some
comments to make it clearer.

Fix caps leaks with the
validate.file.glvideomixer.simple.play_15s.synchronized scenario.

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

Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
9 years agovideoaggregator: fix caps leak when early returning
Guillaume Desmottes [Thu, 16 Apr 2015 12:17:04 +0000 (14:17 +0200)]
videoaggregator: fix caps leak when early returning

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

Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
9 years agoglmixer: unref owned caps when finalizing the mixer
Guillaume Desmottes [Thu, 16 Apr 2015 12:21:16 +0000 (14:21 +0200)]
glmixer: unref owned caps when finalizing the mixer

Fix a caps leak with the
validate.file.glvideomixer.simple.play_15s.synchronized scenario.

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

Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
9 years agoglmixer: pass the proper free function to frames and buffers array
Guillaume Desmottes [Wed, 15 Apr 2015 13:16:33 +0000 (15:16 +0200)]
glmixer: pass the proper free function to frames and buffers array

'array_buffers' contain borrowed GstBuffer and so shouldn't have a free
function. 'frames' is the one containing GstGLMixerFrameData and so should use
_free_glmixer_frame_data as free function.

Fix GstGLMixerFrameData leaks with the
validate.file.glvideomixer.simple.play_15s.synchronized scenario.

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

Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
9 years agogl: Remove some empty ::finalize() implementations
Sebastian Dröge [Fri, 17 Apr 2015 12:09:47 +0000 (14:09 +0200)]
gl: Remove some empty ::finalize() implementations

9 years agovideoaggregator: Remove broken timestamps-going-backwards check
Sebastian Dröge [Thu, 9 Apr 2015 02:29:40 +0000 (19:29 -0700)]
videoaggregator: Remove broken timestamps-going-backwards check

This would've also triggered if for some reason the segment was updated
in such a way that PTS went backwards, but the running time increased. Like
what happens when non-flushing seeks are done.

We're doing a proper buffer-from-the-past check a few lines below based on the
running time, which is the only time we should care about here.

9 years agoaggregator: Query latency on first incoming buffer.
Olivier Crête [Sat, 7 Mar 2015 02:12:52 +0000 (21:12 -0500)]
aggregator: Query latency on first incoming buffer.

And keep on querying upstream until we get a reply.

Also, the _get_latency_unlocked() method required being calld
with a private lock, so removed the _unlocked() variant from the API.
And it now returns GST_CLOCK_TIME_NONE when the element is not live as
we think that 0 upstream latency is possible.

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

9 years agoglvideomixer: Don't use context if not present
Edward Hervey [Tue, 31 Mar 2015 14:27:00 +0000 (16:27 +0200)]
glvideomixer: Don't use context if not present

Avoids assertions at runtime

9 years agovideoaggregator: Check if there's a previous buffer to 'keep'
Nirbheek Chauhan [Tue, 24 Mar 2015 13:34:26 +0000 (19:04 +0530)]
videoaggregator: Check if there's a previous buffer to 'keep'

If we want to keep a previous buffer but there's no previous buffer, we actually
need more data instead.

9 years agocompositor: Revert most of previous patch.
Jan Schmidt [Sun, 15 Mar 2015 16:53:33 +0000 (03:53 +1100)]
compositor: Revert most of previous patch.

The calculation doesn't produce the same results.
Keep just the change to divide alpha by 255 instead of 256,
for slightly better accuracy

9 years agocompositor: Fix blending functions
Jan Schmidt [Sun, 15 Mar 2015 13:22:14 +0000 (00:22 +1100)]
compositor: Fix blending functions

Correctly calculate alpha in a few places by dividing by 255,
not 256.

Fix the argb and bgra blending functions to avoid an off-by-one
error in the calculations, so painting with alpha = 0xff doesn't
ever bleed through from behind

9 years agoglsyncmeta: make context to wait and set sync explicit
Matthew Waters [Sat, 14 Mar 2015 16:25:29 +0000 (16:25 +0000)]
glsyncmeta: make context to wait and set sync explicit

otherwise we may wait on a sync object in same context by accident

9 years agogl: get the context from basemixer/basefilter
Matthew Waters [Fri, 13 Mar 2015 10:25:35 +0000 (10:25 +0000)]
gl: get the context from basemixer/basefilter

9 years agogl: retreive the gldisplay/app gl context as soon as possible
Matthew Waters [Fri, 13 Mar 2015 09:38:54 +0000 (09:38 +0000)]
gl: retreive the gldisplay/app gl context as soon as possible

fixes the usage of gst_gl_display_filter_gl_api

9 years agogl: store the list of contexts within gldisplay
Matthew Waters [Tue, 3 Mar 2015 06:26:47 +0000 (17:26 +1100)]
gl: store the list of contexts within gldisplay

Removes the reliance on the allocation query to propogate GL contexts.

Allows thread safely getting a context for the a specific thread.

9 years agoglvideomixer: implement with glmixerbin
Matthew Waters [Thu, 26 Feb 2015 02:45:56 +0000 (13:45 +1100)]
glvideomixer: implement with glmixerbin

The relevant properties are forwarded to/from the containing bin
and sink pads.

9 years agoglmixer: remove usage of upload/download objects
Matthew Waters [Wed, 25 Feb 2015 13:20:37 +0000 (00:20 +1100)]
glmixer: remove usage of upload/download objects

9 years agogl: new glmixerbin element
Matthew Waters [Wed, 25 Feb 2015 12:48:56 +0000 (23:48 +1100)]
gl: new glmixerbin element

9 years agogl: add a new glbasemixer class below glmixer
Matthew Waters [Wed, 11 Feb 2015 03:48:45 +0000 (14:48 +1100)]
gl: add a new glbasemixer class below glmixer

It deals with propagating the gl display/contexts throughout the
application/pipeline

9 years agovideoaggregator: While aggregating, sync values for all pads before converting frames
Nirbheek Chauhan [Tue, 20 Jan 2015 14:23:09 +0000 (19:53 +0530)]
videoaggregator: While aggregating, sync values for all pads before converting frames

9 years agoglmixer: Don't share our downstream pool with upstream
Nicolas Dufresne [Sat, 7 Mar 2015 01:11:00 +0000 (20:11 -0500)]
glmixer: Don't share our downstream pool with upstream

Pool cannot have multiple owner. This can lead to spurious
pool was flushing error.

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

9 years agogl: Remove format info in glcolorconvert's transform_caps function instead of on...
Sebastian Dröge [Fri, 6 Mar 2015 17:15:11 +0000 (18:15 +0100)]
gl: Remove format info in glcolorconvert's transform_caps function instead of on every caller

... and let glmixer actually transform the caps it is supposed to transform
instead of inventing new caps.

9 years agoRevert "videoaggregator: Create new caps from the video-info"
Sebastian Dröge [Fri, 6 Mar 2015 17:49:16 +0000 (18:49 +0100)]
Revert "videoaggregator: Create new caps from the video-info"

This reverts commit 78215be0dfbb4e8ed4f249e161a94c644328d28d.

because it broke glvideomixer with custom caps features.

9 years agovideoaggregator: Create new caps from the video-info
Sebastian Dröge [Fri, 6 Mar 2015 13:36:26 +0000 (14:36 +0100)]
videoaggregator: Create new caps from the video-info

In case the original caps were missing some optional fields like
interlace-mode. We assume default values for those everywhere,
but they can still cause negotiation to fail if a downstream element
expects the field to be there and at a specific value.

9 years agovideoaggregator: use new gst_aggregator_pad_drop_buffer()
Tim-Philipp Müller [Fri, 13 Feb 2015 16:03:53 +0000 (16:03 +0000)]
videoaggregator: use new gst_aggregator_pad_drop_buffer()

9 years agotests: remove GST_DISABLE_PARSE guards from two tests that don't require it
Tim-Philipp Müller [Thu, 12 Feb 2015 15:48:07 +0000 (15:48 +0000)]
tests: remove GST_DISABLE_PARSE guards from two tests that don't require it

9 years agoImprove and fix LATENCY query handling
Sebastian Dröge [Wed, 11 Feb 2015 13:16:21 +0000 (14:16 +0100)]
Improve and fix LATENCY query handling

This now follows the design docs everywhere, especially the maximum latency
handling.

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

9 years agovideoaggregator: When receiving timeout before caps, make sure to also advance our...
Sebastian Dröge [Tue, 10 Feb 2015 09:56:37 +0000 (10:56 +0100)]
videoaggregator: When receiving timeout before caps, make sure to also advance our frame counter

Otherwise we will directly go EOS on the next non-timeout.

9 years agovideoaggregator: fix buffer selection when duration=-1
Matthew Waters [Sun, 8 Feb 2015 13:59:30 +0000 (00:59 +1100)]
videoaggregator: fix buffer selection when duration=-1

If the src framerate and videoaggreator's output framerate were
different, then we were taking every single buffer that had duration=-1
as it came in regardless of the buffer's start time.  This caused the src
to possibly run at a different speed to the output frames.

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

9 years agovideoaggregator: don't set element factory details
Tim-Philipp Müller [Sun, 8 Feb 2015 14:32:22 +0000 (14:32 +0000)]
videoaggregator: don't set element factory details

This is an abstract base class, not an element.

9 years agotests: compositor: add unit test for proper segment.base handling
Tim-Philipp Müller [Thu, 5 Feb 2015 15:48:41 +0000 (15:48 +0000)]
tests: compositor: add unit test for proper segment.base handling

As adjusted by gst_pad_set_offset(), or when doing segment seeks
or looping for example.

9 years agogl: remove the egl caps from the src pads
Matthew Waters [Tue, 3 Feb 2015 04:30:08 +0000 (15:30 +1100)]
gl: remove the egl caps from the src pads

we don't actually support producing EGLImage buffers anywhere.

9 years agoglupload/download/convert: provide transform_caps functions
Matthew Waters [Mon, 2 Feb 2015 13:11:06 +0000 (00:11 +1100)]
glupload/download/convert: provide transform_caps functions

Allows finer grain decisions about formats and features at each
stage of the pipeline.
Also provide propose_allocation for glupload besed on the supported
methods.

9 years agogl: initial support for texture targets other than GL_TEXTURE_2D
Alessandro Decina [Tue, 27 Jan 2015 13:13:46 +0000 (00:13 +1100)]
gl: initial support for texture targets other than GL_TEXTURE_2D

Make GstGLMemory hold the texture target (tex_target) the texture it represents
(tex_id) is bound to. Modify gst_gl_memory_wrapped_texture and
gst_gl_download_perform_with_data to take the texture target as an argument.

This change is needed to support wrapping textures created outside libgstgl,
which might be bound to a target other than GL_TEXTURE_2D. For example on OSX
textures coming from VideoToolbox have target GL_TEXTURE_RECTANGLE.

With this change we still keep (and sometimes imply) GL_TEXTURE_2D as the
target of textures created with libgstgl.

API: modify GstGLMemory
API: modify gst_gl_memory_wrapped_texture
API: gst_gl_download_perform_with_data

9 years agoaggregator: More fixes around locking when accessing protected private fields
Thibault Saunier [Mon, 26 Jan 2015 10:32:47 +0000 (11:32 +0100)]
aggregator: More fixes around locking when accessing protected private fields

In some more places we were accessing GstAggregator->segment
and GstAggregator->seqnum without holding the GST_OBJECT_LOCK

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

9 years agoaggregator: Hide GstAggregatorPad buffer and EOS fileds
Thibault Saunier [Mon, 26 Jan 2015 10:25:54 +0000 (11:25 +0100)]
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

9 years agoaggregator: Document locking for gst_aggregator_get_latency_unlocked()
Olivier Crête [Thu, 22 Jan 2015 00:43:12 +0000 (19:43 -0500)]
aggregator: Document locking for gst_aggregator_get_latency_unlocked()

Renamed it to _unlocked() to make it clear.

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

9 years agovideoaggregator: Lock access to members of GstAggregatorPad
Olivier Crête [Wed, 14 Jan 2015 19:45:06 +0000 (14:45 -0500)]
videoaggregator: Lock access to members of GstAggregatorPad

Take the pad's object lock before accessing members of the
GstAggregatorPad structure.

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

9 years agovideoaggregator: If getting a timeout before having caps, just advance our position
Nirbheek Chauhan [Wed, 28 Jan 2015 20:58:38 +0000 (02:28 +0530)]
videoaggregator: If getting a timeout before having caps, just advance our position

This can happen if this is a live pipeline and no source produced any buffer
and sent no caps until an output buffer should've been produced according to the
latency.

This fix is similar in spirit to commit be7034d1 by Sebastian for audiomixer.

9 years agovideoaggregator: fix crash when receiving buffer without timestamps
Tim-Philipp Müller [Mon, 26 Jan 2015 09:22:23 +0000 (09:22 +0000)]
videoaggregator: fix crash when receiving buffer without timestamps

Unset out buffer in clip function when we unref the buffer to be
clipped, otherwise aggregator will continue to use the already-
freed buffer. Fixes crash when buffers without timestamps are
being fed to aggregator. Partly because aggregator ignores the
error flow return.

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

9 years agocompositor: fix illegal memory access in blend function with negative ypos
Vincent Penquerc'h [Mon, 19 Jan 2015 12:37:23 +0000 (12:37 +0000)]
compositor: fix illegal memory access in blend function with negative ypos

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

9 years agoglvideomixer: don't upload if alpha <= 0
Matthew Waters [Wed, 14 Jan 2015 22:47:45 +0000 (09:47 +1100)]
glvideomixer: don't upload if alpha <= 0

Implemented using a upload_buffer vfunc within GstGLMixer allowing
NULL uploaded buffers.

9 years agocompositor: Document the zorder pad property from gstvideoaggregator
Nirbheek Chauhan [Wed, 14 Jan 2015 18:18:16 +0000 (23:48 +0530)]
compositor: Document the zorder pad property from gstvideoaggregator

9 years agogl: split glcolorconvert usage from glupload
Matthew Waters [Wed, 14 Jan 2015 11:08:43 +0000 (22:08 +1100)]
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.

9 years agocompositor: Don't do any conversions if the pad is completely transparent anyway
Sebastian Dröge [Tue, 13 Jan 2015 13:54:26 +0000 (14:54 +0100)]
compositor: Don't do any conversions if the pad is completely transparent anyway

9 years agogitignore: ignore more files
Stefan Sauer [Mon, 12 Jan 2015 20:25:14 +0000 (21:25 +0100)]
gitignore: ignore more files

9 years agoglmixer, glvideomixer: update for GstAggregatorPadForeachFunc change
Tim-Philipp Müller [Tue, 30 Dec 2014 19:43:43 +0000 (19:43 +0000)]
glmixer, glvideomixer: update for GstAggregatorPadForeachFunc change

9 years agoglmixer: update for aggregator start/stop vfunc change
Tim-Philipp Müller [Tue, 30 Dec 2014 19:26:47 +0000 (19:26 +0000)]
glmixer: update for aggregator start/stop vfunc change

9 years agovideoaggregator: update for aggregator start/stop vfunc change
Tim-Philipp Müller [Tue, 30 Dec 2014 17:56:35 +0000 (17:56 +0000)]
videoaggregator: update for aggregator start/stop vfunc change

9 years agoaggregator: make padding larger
Tim-Philipp Müller [Sun, 28 Dec 2014 01:13:33 +0000 (01:13 +0000)]
aggregator: make padding larger

Esp. the class structures, can't have enough
spare space for virtual functions.

9 years agoglvideomixer: Point to compositor for the pad properties documentation
Nirbheek Chauhan [Sat, 27 Dec 2014 10:20:17 +0000 (15:50 +0530)]
glvideomixer: Point to compositor for the pad properties documentation

9 years agocompositor: Document the pad properties
Nirbheek Chauhan [Sat, 27 Dec 2014 10:19:47 +0000 (15:49 +0530)]
compositor: Document the pad properties

9 years agovideoaggregator: Use the src query implementation of aggregator as the default case
Sebastian Dröge [Mon, 22 Dec 2014 21:11:30 +0000 (22:11 +0100)]
videoaggregator: Use the src query implementation of aggregator as the default case

9 years agovideoaggregator: Don't try to map NULL buffers
Sebastian Dröge [Thu, 18 Dec 2014 21:04:38 +0000 (22:04 +0100)]
videoaggregator: Don't try to map NULL buffers