After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 639994 - videomixer2: added 'transparent' background option
videomixer2: added 'transparent' background option
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: 0.10.29
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-19 21:27 UTC by Lane Brooks
Modified: 2011-04-01 09:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for videomixer2 (17.63 KB, patch)
2011-01-19 21:27 UTC, Lane Brooks
committed Details | Review
patch for videomixer (9.03 KB, patch)
2011-01-20 01:08 UTC, Lane Brooks
committed Details | Review

Description Lane Brooks 2011-01-19 21:27:35 UTC
Created attachment 178783 [details] [review]
patch for videomixer2

This patch adds a 'transparent' background option to videomixer2. This 
allows the videomixer2 element to output a valid alpha
channel when the inputs contain a valid alpha channel, so that
mixing to occur in multiple stages serially if desired.
    
The following pipeline shows an example of such a pipeline:

gst-launch videotestsrc background-color=0x000000 pattern=ball ! video/x-raw-yuv,format=\(fourcc\)AYUV ! videomixer2 background=transparent name=mix1 ! videomixer2 name=mix2 ! ffmpegcolorspace ! autovideosink  videotestsrc ! ideo/x-raw-yuv,format=\(fourcc\)AYUV ! mix2.
    
The first videotestsrc in this pipeline creates a moving ball on a
transparent background. It is then passed to the first videomixer2.
Previously, this videomixer2 would have forced the alpha channel to
1.0 and given a background of checker, black, or white to the
stream. With this patch, however, you can now specify the background
as transparent, and the alpha channel of the input will be
preserved. This allows for further mixing downstream, as is shown in
the above pipeline where the a second videomixer2 is used to mix in a
background of an smpte videotestsrc. So the result is a ball hovering
over the smpte test source. This could, of course, have been
accomplished with a single mixer element, but staged mixing is useful
when it is not convenient to mix all video at once (e.g. a pipeline
where a foreground and background bin exist and are mixed at the final
output, but the foreground bin needs an internal mixer to create
transitions between clips).
Comment 1 Lane Brooks 2011-01-20 01:08:41 UTC
Created attachment 178803 [details] [review]
patch for videomixer

And here is a patch to add the same effect videomixer.
Comment 2 Lane Brooks 2011-02-07 16:56:40 UTC
ping? Anyone there?
Comment 3 Sebastian Dröge (slomo) 2011-04-01 09:36:01 UTC
commit ef5ac986f1b17a76fc283337a4a27b797e78e3e6
Author: Lane Brooks <dirjud@gmail.com>
Date:   Wed Jan 19 18:06:45 2011 -0700

    videomixer: Add transparent background option for alpha channel formats

commit 69b5aedc5878fb399e4ac10c743a64c142b238f6
Author: Lane Brooks <dirjud@gmail.com>
Date:   Wed Jan 19 12:07:17 2011 -0700

    videomixer2: Add transparent background option for alpha channel formats
    
    This option allows the videomixer2 element to output a valid alpha
    channel when the inputs contain a valid alpha channel. This allows
    mixing to occur in multiple stages serially.
    
    The following pipeline shows an example of such a pipeline:
    
    gst-launch videotestsrc background-color=0x000000 pattern=ball ! video/x-raw
    
    The first videotestsrc in this pipeline creates a moving ball on a
    transparent background. It is then passed to the first videomixer2.
    Previously, this videomixer2 would have forced the alpha channel to
    1.0 and given a background of checker, black, or white to the

    stream. With this patch, however, you can now specify the background
    as transparent, and the alpha channel of the input will be
    preserved. This allows for further mixing downstream, as is shown in
    the above pipeline where the a second videomixer2 is used to mix in a
    background of an smpte videotestsrc. So the result is a ball hovering
    over the smpte test source. This could, of course, have been
    accomplished with a single mixer element, but staged mixing is useful
    when it is not convenient to mix all video at once (e.g. a pipeline
    where a foreground and background bin exist and are mixed at the final
    output, but the foreground bin needs an internal mixer to create
    transitions between clips).
    
    Fixes bug #639994.