[meta-freescale] Video overlay on sabresd

Marco Trillo martri at arantia.com
Mon May 25 00:47:05 PDT 2015


Hi,

On 05/22/2015 03:40 AM, Nikolay Dimitrov wrote:
>>>> Thanks for sharing. This works, but I'm trying to achieve exactly the
>>>> opposite.
>>>>
>>>> I need to have my UI on the FG layer (which imho means X rendering to
>>>> /dev/fb1), and my video player must render on BG layer (/dev/video16,
>>>> which imho corresponds to /dev/fb0).
Actually you should be able to achieve what you want by using either one 
of the MXCFB_SET_GBL_ALPHA, MXCFB_SET_LOC_ALPHA or MXCFB_SET_OVERLAY_POS 
ioctls on /dev/fb0, so that this layer renders atop the /dev/video17 at 
/dev/fb1 (with a global alpha with the first one, or a pixel-based alpha 
with the second one which needs 32bpp).


> - Chroma keying is buggy: opening the V4L2 device file (/dev/video16)
> on the BG layer resets the chroma key. Here are steps to reproduce:
>
> 1. Start Xorg on /dev/fb1.
> 2. Start a X11 app, which draws a solid-colored rectangle containing
> the chroma key (0xFF00FF in my case).
> 3. Run a console app, which programs the chroma key to 0xFF00FF and
> global alpha to 0x80.
> 4. Observe that the chroma-key colored rectangle is now
> fully transparent, as expected.
> 5. Start gstreamer with imxv4l2sink, using /dev/video16
> 6. Observe that chroma-key colored rectangle is opaque. This is an
> issue.
>
> If #3 is executed while the video is playing, the colored rectangle
> becomes fully transparent, as expected.

I think this is more an issue with the `imxv4l2sink' plug-in, which 
resets the global alpha of the layer, than the /dev/video* node itself. 
Unfortunately, the `imxv4l2sink' plug-in seems to be written so that it 
manages the layers itself, containing incomplete code for setting the 
global alpha, the local alpha, and the color key, but not fully exposing 
these options via gstreamer properties. You may want to try the sink 
based on the IPU lib directly (`mfw_isink' IIRC) and see how it behaves.

Kind regards
Marco



More information about the meta-freescale mailing list