Commit graph

64 commits

Author SHA1 Message Date
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
Nirbheek Chauhan
1817025ba0 compositor: use accessor macros for consistency
https://bugzilla.gnome.org/show_bug.cgi?id=746147
2015-05-01 10:57:08 +01:00
Nirbheek Chauhan
8f1edb69f4 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
2015-05-01 10:56:32 +01:00
Nirbheek Chauhan
8e2ca1b6a7 compositor: Document the zorder pad property from gstvideoaggregator 2015-01-14 19:21:36 +01:00
Sebastian Dröge
e1f3214c6c compositor: Don't do any conversions if the pad is completely transparent anyway 2015-01-13 14:54:26 +01:00
Nirbheek Chauhan
a27431c680 compositor: Document the pad properties 2014-12-27 11:04:52 +00:00
Sebastian Dröge
a64445e543 compositor: Fix memory leak when no buffer is available for a pad currently
CID 1258718
2014-12-18 11:49:09 +01:00
Sebastian Dröge
26d1a22e90 aggregator: Add a timeout parameter to ::aggregate()
When this is TRUE, we really have to produce output. This happens
in live mixing mode when we have to output something for the current
time, no matter if we have enough input or not.
2014-12-17 18:41:41 +01:00
Sebastian Dröge
b212aca601 compositor: Failure to map a video frame is not just a warning
Also add some warning debug output if mapping a output buffer fails
2014-11-28 10:23:55 +01:00
Sebastian Dröge
3e9b001013 compositor: Implement rescaling of the input via pad properties
compositor has now the same interface as glvideomixer.
2014-11-27 21:23:04 +01:00
Sebastian Dröge
dbadc6c8a5 compositor: Remove unused zorder pad property
It's handled in videoaggregator already.
2014-11-26 12:42:24 +01:00
Sebastian Dröge
170def9d43 compositor: GstVideoMeta is supported just fine, tell upstream about that
Also provide a GstVideoBufferPool to upstream just in case.
2014-11-25 19:03:21 +01:00
Matthew Waters
8bf2acba1d videoaggregator: operate on caps rather than video info
Otherwise the CapsFeatures will be lost along with the possibility
of multiple output types and formats.

https://bugzilla.gnome.org/show_bug.cgi?id=738129
2014-10-21 01:14:36 +11:00
Mathieu Duponchelle
75c71741a2 compositor: Add a new compositor based on the new GstVideoAggregator base class
It is a replacement for videomixer with a similare API

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

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