IMX6 VSALPHA Transparency

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

IMX6 VSALPHA Transparency

跳至解决方案
2,900 次查看
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

标签 (4)
标记 (2)
0 项奖励
回复
1 解答
1,242 次查看
daiane_angolini
NXP Employee
NXP Employee

VSALPHA is the enable/disable.

You can create an script that execute the ioctl.

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,242 次查看
baodongchen
Contributor II

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

0 项奖励
回复
1,242 次查看
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,242 次查看
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 项奖励
回复
1,243 次查看
daiane_angolini
NXP Employee
NXP Employee

VSALPHA is the enable/disable.

You can create an script that execute the ioctl.

0 项奖励
回复