Commit graph

212 commits

Author SHA1 Message Date
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
Matthew Waters
df7370bc2a 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.
2015-05-13 17:44:30 +10:00
Matthew Waters
7b48ab14e1 glvideomixer: implement par handling
We were previously ignoring it completely
2015-05-13 17:44:08 +10:00
Matthew Waters
2362ee8bee glvideomixer: don't upload the vertex data every frame
Add the missing cache tracking statement.
2015-05-13 17:44:04 +10:00
Sebastian Dröge
fa6dbaeb6c 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.
2015-05-11 16:34:26 +03:00
Sebastian Dröge
ee275a167d Revert "gl: readd glupload/download onto element pads"
This reverts commit 87d8270f30.
2015-05-06 15:46:49 +02:00
Sebastian Dröge
824bb6acf8 Revert "Revert "glvideomixer: implement with glmixerbin""
This reverts commit b4bd11f2f3.
2015-05-06 15:43:32 +02:00
Nirbheek Chauhan
dbbfba76ea 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
2015-05-01 11:57:00 +01:00
Nirbheek Chauhan
070777498f 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
2015-05-01 11:27:55 +01:00