IMX6 VSALPHA Transparency

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX6 VSALPHA Transparency

Jump to solution
2,663 Views
ryanerb
Contributor III

Hello,

I'm not an expert, so thank you for being patient with me.

I am working on using gstreamer on an IMX6 quad core processor to output some video with an image overlay. (3.0.35 Kernel, Yocto OpenEmbedded)

It is working great, except that I would like to change how much transparency exists.

I keep seeing a variable in other posts, VSALPHA=1 .  Can anyone shed some light, or point me to some documentation, as to how this is used with Gstreamer?

Here are my gstreamer lines:

gst-launch tvsrc device=/dev/video0 ! mfw_v4lsink disp-width=1279 disp-height=720 device=/dev/video17 &

gst-launch filesrc location=/home/root/tlogo.png ! pngdec ! imagefreeze ! ffmpegcolorspace ! fbdevsink device=/dev/fb0 &

Thank you,

Ryan

Labels (4)
Tags (2)
0 Kudos
1 Solution
1,005 Views
daiane_angolini
NXP Employee
NXP Employee

VSALPHA is the enable/disable.

You can create an script that execute the ioctl.

View solution in original post

0 Kudos
4 Replies
1,005 Views
baodongchen
Contributor II

I also want to know about VSALPHA'waiting for answers!

0 Kudos
1,005 Views
daiane_angolini
NXP Employee
NXP Employee

     struct mxcfb_gbl_alpha g_alpha;

     g_alpha.alpha = 127;  //alpha value

     g_alpha.enable = 1;

     if ((fd_fb_0 = open("/dev/fb0", O_RDWR )) < 0) {

printf("Unable to open frame buffer 0\n");

return TFAIL;

     }

     if (ioctl(fd_fb_0, MXCFB_SET_GBL_ALPHA, &g_alpha) < 0) {

printf("Set global alpha failed\n");

close(fd_fb_0);

return TFAIL;

    }

The source code above set a global value for alpha. Global means the whole screem.

Please, let me know if this is enough.

1,005 Views
ryanerb
Contributor III

Hello Daiane,

Thank you for that information.  I have been able to gather that information through other several discussion topics.

I was hoping to find something that was already integrated into Gstreamer and not be required to compiled the custom source code.

Given that the text 'VSALPHA=1' seems to be placed before some gstreamer pipelines on this site, I was curious if there was more integration and what this variable was achieving through which method.

Thanks,

Ryan

0 Kudos
1,006 Views
daiane_angolini
NXP Employee
NXP Employee

VSALPHA is the enable/disable.

You can create an script that execute the ioctl.

0 Kudos