dear ones
Nice to meet you, my name is KATA_KAN.
I'm trying to test Gstreamer on my imx8m mini board, but it's not working.
I would like to display a 1280x952 test screen on the upper right of a 1920x1080 monitor as shown in attached image 1, but the test screen is slightly shifted downward as shown in attached image 2.
The pipeline used is as follows.
gst-launch-1.0 imxcompositor_g2d name=comp sink_0::width=1280 sink_0::height=952 sink_0::xpos=640 sink_0::ypos=0 ! waylandsink videotestsrc ! comp.sink_0
I would like some advice on how to improve this situation.
I didn't know how to set the color_key, so I'm considering changing the policy to see if it can be handled on the pipeline side.
It looked like it could be done using a pipeline called alpha, so I tried it, but it didn't go as expected.
A transparent image (R,G,B=0,0,0) called invisible.png is displayed at 1920x1080, and videotestsrc at 1280x952 is displayed from (x,y)=(640,0) on it, and (R, G,B=0,0,0) is set as a transparent color.
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
As shown in the attached image, I was hoping that the default image displayed by weston would be transparent and displayed, but it is not transparent and a black screen is displayed.
Is there anything we can do from here?
it seems that waylandsink coudn't support this, you would get random postion
maybe you can try the ivi-shell, refer to the user guide:
IVI-shell
In-vehicle infotainment shell is a special purpose shell that exposes a GENIVI Layer Manager compatible API to controller modules, and a very simple shell protocol towards clients. IVI-shell starts with loading ivi-shell.so, and then a controller module which may launch helper clients. This shell provides option of setting windowing position, which need to be programmed from the client application.
Thank you for the information.
I tried using the following weston.ini to start weston with IVI-shell based on the information I received, but the screen blacked out and I could not start it.
There seems to be some problem with the hardware and kernel you are using, so I will proceed with the investigation once. thank you.
Since then, we have been working, and weston's IVI-shell could not be enabled, but with the Desktop-shell state, we were able to achieve the expected behavior with 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=gray.jpg ! decodebin ! 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
(gray.jpg is a 1920x1080 solid gray image.)
If you can make gray.jpg transparent from here, you can achieve the behavior I expected.
In i.mx6, I think that the transparent color of the monitor could be set by setting color_key in a setting file such as imx_6q_display_config, but how should I do the same setting in i.mx8? Huh?