Display gstreamer video on weston with some transparency

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

Display gstreamer video on weston with some transparency

3,187 次查看
KATA_KAN
Contributor II

Hi,all.

Since it was recommended to make another question from the following questions, I made another question.

https://community.nxp.com/t5/i-MX-Processors/Gstreamer-i-MX8MMini-pipeline/m-p/1650686#M205902

I am developing an application that controls the screen display on a board that uses the i.MX8MMini.

What I'm trying to do now is display a video with coordinates and dimensions on top of weston's default screen. I expect weston's default screen to be transparent, except for the video playback area.

Display a transparent image (R, G, B = 0, 0, 0) called invisible.png at 1920x1080, display (x, y) = (640, 0) to 1280x952 videotestsrc on it, and display (R, G,B=0,0,0) can be set as a transparent color, so I built the following pipeline.

gst-launch-1.0 imxcompositor_g2d name=comp \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=1920 sink_0::height=1080 \
sink_1::xpos=640 sink_1::ypos=0 sink_1::width=1280 sink_1::height=952 ! \
video/x-raw,format=RGB16 ! waylandsink window-width=1920 window-height=1080 \
filesrc location=invisible.png ! pngdec ! alpha method=custom target-r=0 target-b=0 target-g=0 ! imagefreeze ! video/x-raw,width=1920,height=1080,framerate=10/1 ! comp.sink_0 \
videotestsrc ! video/x-raw,width=1280,height=952 ! comp.sink_1

However, I was expecting the default image displayed by weston to be transparent, like the attached image, but it is not transparent and shows a black screen.

Is there anything we can do from here?

0 项奖励
回复
3 回复数

3,164 次查看
joanxie
NXP TechSupport
NXP TechSupport

could you explain these pics stand for?

0 项奖励
回复

3,155 次查看
KATA_KAN
Contributor II

Sorry, my explanation was lacking.

"gstreamer_test.png" is an image diagram of what you want to display.
"RIMG7765.JPG" is weston's default screen actually shown on the display.
"invisible.png" is the 1980x1080 transparent image you are displaying in the pipeline.

0 项奖励
回复

3,088 次查看
joanxie
NXP TechSupport
NXP TechSupport
0 项奖励
回复