Commit graph

270 commits

Author SHA1 Message Date
Jan Schmidt
d5f2742ad0 Don't throw compiler warnings with G_DISABLE_ASSERT
Disable code that warns about unused variables when G_DISABLE_ASSERT
is defined, as it is in tarballs and pre-releases.
2015-09-18 00:29:51 +10:00
Vineeth T M
78e07d02eb gl: Fix GError leaks during failures
https://bugzilla.gnome.org/show_bug.cgi?id=755140
2015-09-17 11:52:55 +02:00
Sebastian Dröge
895e71e810 videoaggregator: Fix mixup of running times and segment positions
We have to queue buffers based on their running time, not based on
the segment position.

Also return running time from GstAggregator::get_next_time() instead of
a segment position, as required by the API.

Also only update the segment position after we pushed a buffer, otherwise
we're going to push down a segment event with the next position already.

https://bugzilla.gnome.org/show_bug.cgi?id=753196
2015-09-14 19:56:43 +02:00
Thiago Santos
ac503aee7d videoaggregator: fix caps query to properly handle alpha formats
Only accept alpha if downstream has alpha as well. It could
theoretically accept alpha unconditionally if blending is
properly implemented for handle it but at the moment this
is a missing feature.

Improves the caps query by also comparing with the template
caps to filter by what the subclass supports.

https://bugzilla.gnome.org/show_bug.cgi?id=754465
2015-09-11 18:03:26 -03:00
Nirbheek Chauhan
f1f8e465f2 compositor: Ensure all arguments to CLAMP are signed int
If any of the arguments to CLAMP are unsigned integers, the comparison causes
an automatic conversion of the signed int to unsigned, which causes -1 to become
UINT_MAX and get clamped to the high value of the CLAMP instead of 0.

See 716 at http://c0x.coding-guidelines.com/6.3.1.8.html

Also add a test for this.

https://bugzilla.gnome.org/show_bug.cgi?id=754576
2015-09-04 23:32:36 +02:00
Thiago Santos
4eea087f68 videoaggregator: lift restriction of changing pixel-aspect-ratio
The videoaggregator can convert PAR, there is no reason for
restricting it.

https://bugzilla.gnome.org/show_bug.cgi?id=754291
2015-09-03 11:18:22 -03:00
Nirbheek Chauhan
8c06c85d83 compositor: variables in clamp_rectangle() should be signed
x/y/w/h are signed integers. As can be seen in GstCompositorPad.
The prototype for clamp_rectangle was wrong. This commit reverts the change
and fixes the prototype.

This reverts commit bca444ea4a.
2015-08-29 17:27:45 +01:00
Luis de Bethencourt
e4b584b3e5 compositor: remove check for below zero for unsigned value
CLAMP checks both if value is '< 0' and '> max'. Value will never be a negative
number since it is an unsigned integer. Removing that check and only checking if
it is bigger than max by using MIN().

CID 1320707
2015-08-28 15:21:13 +01:00
Nirbheek Chauhan
f12ef34410 compositor: Actually use the output resolution for clamping
The obscured check in compositor was using the dimensions of the pad to clamp
the h/w of the pad instead of the output resolution, and was doing an incorrect
calculation to do so. Fix that by simplifying the whole calculation by using
corner coordinates. Also add a test for this bug which fell through the cracks,
and just skip all the obscured tests if the pad's alpha is 0.0.

https://bugzilla.gnome.org/show_bug.cgi?id=754107
2015-08-26 15:03:05 +03:00
Ben Browitt
708936de49 videoaggregator: Always set the pad's buffer_vinfo when storing a buffer
Otherwise it might be unset, and then the buffer is used and
gst_video_frame_map() will crash because of invalid video-info.

https://bugzilla.gnome.org/show_bug.cgi?id=753805
2015-08-20 14:22:49 +03:00
Matthew Waters
81a78449d5 glvideomixer: swap control binding proxy
The ref_object and object parameters were the wrong way around.

For the typical use case where an application is setting a
GstControlBinding on the returned ghost pad:
1. our control binding would be removed when the new one was set
2. sync_values calls were not being forwarded from the internal
   pad to the ghost pad.

If an application attempts to perform other control binding
operations (get_* family of functions) on the internal pad, they
will also be forwarded to the ghost pad where a possible
GstControlBinding will provide the necessary values.
2015-08-03 20:08:52 +10:00
Olivier Crête
db0a5ece02 videoaggregator: Remove broken _clip vfunc
It never does anything.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Luis de Bethencourt
7e67bcba2f glstereomix: remove redundant initialization
v is initialized in the for loop init, no need to do it twice. Removing
first initialization.
2015-07-29 17:49:01 +01:00
Sebastian Dröge
dc4c420217 compositor: Add unit tests for the new aggregator start-time-selection property
https://bugzilla.gnome.org/show_bug.cgi?id=749966
2015-07-29 14:35:50 +01:00
Sebastian Dröge
bd66c6b665 aggregator: Add property to select how to decide on a start time
Before aggregator based elements always started at running time 0,
now it's possible to select the first input buffer running time or
explicitly set a start-time value.

https://bugzilla.gnome.org/show_bug.cgi?id=749966
2015-07-29 14:35:50 +01:00
Olivier Crête
b05002776b glvideomixer: Add GstControlBinding proxy
This is used to proxy GstControlBinding to the pad on the
parent object. This avoid having to sync the values in the proxy pad,
this is too early if you have a queue between the pad and the actual
aggregation operation.

https://bugzilla.gnome.org/show_bug.cgi?id=734060
2015-07-22 20:59:50 -04:00
Julien Isorce
884e68c713 gl: use gst_gl_display_create_context in more elements.
glbasefilter, glbasemixer and gltestsrc.

https://bugzilla.gnome.org/show_bug.cgi?id=750310
2015-07-21 11:37:21 +01:00
Thibault Saunier
df274deb0b videoaggregator: Remove pixel-aspect-ratio field from the caps returned by getcaps
Avoiding not negotiated error while negotiating as we anyway force 1/1
as output
2015-07-06 18:53:38 +02:00
Olivier Crête
50d5d0a161 glvideomixer, glmixer: Add description and klass 2015-07-03 12:28:47 -04:00
Nicolas Dufresne
1c66a33c56 gl: Don't leak pool if set_config failed 2015-07-02 09:40:05 -04:00
Mathieu Duponchelle
fc49a1b508 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
2015-06-23 00:57:59 +02:00
Jan Schmidt
92aacf5760 gl: Add glviewconvert, glstereomix and glstereosplit elements
Conversion elements for transforming multiview/stereoscopic video

https://bugzilla.gnome.org/show_bug.cgi?id=611157
2015-06-19 01:49:33 +10:00
Sebastian Dröge
723eba3760 videoaggregator: Print some debug output if we change the timestamp offset 2015-06-15 14:29:04 +02:00
Sebastian Dröge
8352e069ff videoaggregator: Add some more debug output 2015-06-15 14:25:43 +02:00
Sebastian Dröge
2f3735f3ec videoaggregator: Don't update the ts-offset before updating the actual configured caps 2015-06-15 14:19:05 +02:00
Sebastian Dröge
4f3adad607 videoaggregator: Remember if the last LATENCY query returned live or not and use the in the QoS messages 2015-06-15 14:18:39 +02:00
Mathieu Duponchelle
98c6860097 compositor: update zorder documentation.
It is not bound between 0 and 10000 anymore.
2015-06-14 23:20:38 +02:00
Mathieu Duponchelle
27ebae85f3 videoaggregator: No need to artificially bound the zorder.
It is an unsigned integer so the upper bound is G_MAXUINT.
2015-06-14 23:15:25 +02:00
Matthew Waters
acd6b876db glmixerbin: implement proper dynamic pad removal
https://bugzilla.gnome.org/show_bug.cgi?id=750881
2015-06-13 18:47:13 +10:00
Nirbheek Chauhan
498c92aac4 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.
2015-06-12 19:45:41 +01:00
Nirbheek Chauhan
86705fbbca 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
2015-06-12 19:44:50 +01:00
Sebastian Dröge
2014cb4aa7 gl: Use gst_object_ref_sink() for gl{filter,mixer,src}bin too 2015-06-11 15:22:04 +02:00
Thiago Santos
71328df56f videoaggregator: simplify aggregate returning
Rework special handling with goto/labels to only have one case
and otherwise just return normally.
2015-06-08 12:35:25 -03:00
Thiago Santos
dd14495332 videoaggregator: refactor caps reconfigure to its own function
Makes the aggregation code shorter and easier to read
2015-06-08 12:34:23 -03:00
Thiago Santos
958c59f35f videoaggregator: fixing types in aggregate function
Correctly use boolean and GstFlowReturn types in the function.
2015-06-08 12:33:40 -03:00
Thiago Santos
34ffdbeee0 videoaggregator: use macro to access aggregator src pad
Makes code a bit more readable
2015-06-08 12:09:51 -03:00
Sebastian Dröge
5a494a9389 Release 1.5.1 2015-06-07 10:55:35 +02:00
Thiago Santos
e9f055f95b Fix a common typo: retreive -> retrieve
Seems to have been copy pasted around a few places
2015-06-05 09:43:35 -03:00
Jan Schmidt
03aec73bd4 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.
2015-05-30 01:33:49 +10:00
Jan Schmidt
70bae08cdd 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.
2015-05-30 01:33:49 +10:00
Sebastian Dröge
a3b806de4e compositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos
Otherwise we divide by zero.
2015-05-21 16:24:48 +03:00
Sebastian Dröge
b27379051a compositor: Fix double assignment 2015-05-21 16:19:08 +03:00
Matthew Waters
012e636e4e compositor/glvideomixer: fix up par handling
We were using the wrong formula

https://bugzilla.gnome.org/show_bug.cgi?id=749634
2015-05-21 01:04:38 +10:00
Stefan Sauer
1bd590ab3b Revert "doc: Workaround gtkdoc issue"
This reverts commit ff6c736fe0.

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
2015-05-18 20:16:32 +02:00
Nicolas Dufresne
c90bc869e5 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.
2015-05-16 23:38:14 -04:00
Matthew Waters
7e5123cd90 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
Matthew Waters
930742dd5a 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.
2015-05-14 14:58:07 +10:00
Matthew Waters
b2eea8873c compositor: implement proper par handling
We were previously failing on different input and output par
2015-05-14 14:58:07 +10:00
Matthew Waters
d3d7498878 gl: don't deadlock on context creation failure
https://bugzilla.gnome.org/show_bug.cgi?id=749284
2015-05-13 23:56:48 +10:00
Sebastian Dröge
e6859acff2 glmixerbin: Don't unref pad templates
Otherwise we unref the reference that is owned by the element class.
2015-05-13 15:42:50 +03:00