Commit graph

13 commits

Author SHA1 Message Date
Thibault Saunier
806ff70590 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
2017-08-03 12:59:43 -04:00
Tim-Philipp Müller
93c379a3fc video: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
George Kiagiadakis
39d2526c34 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
2017-05-20 16:21:16 +02:00
Tim-Philipp Müller
441072834e 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
Nirbheek Chauhan
b395c055eb 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
Nirbheek Chauhan
dceb8aefd1 videoaggregator: Document why buffer_vinfo is needed 2015-03-24 14:54:33 +01:00
Tim-Philipp Müller
83de85a2f3 aggregator: make padding larger
Esp. the class structures, can't have enough
spare space for virtual functions.
2014-12-28 01:13:33 +00:00
Thibault Saunier
aa25d0ab4c videoaggregator: Hide some more fields from the API
+ Add some documentation
2014-12-12 11:49:42 +01:00
Thibault Saunier
a61d2e4e07 videoconvert: Hide all conversion related fields
And do not delay the setting of the conversion_info

https://bugzilla.gnome.org/show_bug.cgi?id=740768
2014-11-27 19:10:58 +01:00
Thibault Saunier
9d8055186d videoaggregator: Expose vmethods to set converters and prepare/clean frames
This gives more flexibility to the subclasses and permits to remove the
GstVideoAggregatorClass->disable_frame_conversion ugly API.

WARNING: This breaks the API as it removes the disable_frame_conversion
field

API:
  + GstVideoAggregatorClass->find_best_format
  + GstVideoAggregatorPadClass->set_format
  + GstVideoAggregatorPadClass->prepare_frame
  + GstVideoAggregatorPadClass->clean_frame

  - GstVideoAggregatorClass->disable_frame_conversion

https://bugzilla.gnome.org/show_bug.cgi?id=740768
2014-11-27 19:10:58 +01:00
Matthew Waters
c23cd9c3be videoaggregator: remove the use of the queued buffer on sink pads
That data is now held by the aggregator class
2014-10-09 23:52:11 +11:00
Thibault Saunier
1bfee113c4 libs: videoaggregato: Do not import videoconvert.h in gstvideoaggregatorpad.h
+ Add a Private structure to the GstVideoAggregatorPad
+ Add some padding
2014-06-20 22:14:25 +02:00
Mathieu Duponchelle
7cf66e7c07 videoaggregator: Create a new GstVideoAggregator baseclass
This base class has been added to a newly created libgstbadvideo library

Co-Authored by: Thibault Saunier <tsaunier@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=731918
2014-06-20 19:53:33 +02:00