Gstreamer i.MX8MMini pipeline

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

Gstreamer i.MX8MMini pipeline

1,298 Views
KATA_KAN
Contributor II

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.

Image1Image1Image2Image2

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.

Labels (1)
0 Kudos
9 Replies

1,118 Views
KATA_KAN
Contributor II

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?

0 Kudos

1,085 Views
joanxie
NXP TechSupport
NXP TechSupport

pls create a new case for this issue, thanks

0 Kudos

1,283 Views
joanxie
NXP TechSupport
NXP TechSupport

what shift do you mean? do you mean that your picture position isn't (640,0), like (640,20)?

0 Kudos

1,281 Views
KATA_KAN
Contributor II

Hi, joanxie.

That's right.
I want it to display at (640,0), but it actually displays as (640,20).

0 Kudos

1,254 Views
joanxie
NXP TechSupport
NXP TechSupport

it seems that waylandsink coudn't support this, you would get random postion

https://community.nxp.com/t5/i-MX-Processors/imxcompositor-g2d-window-positioning-with-waylandsink/m...

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.

 

0 Kudos

1,201 Views
KATA_KAN
Contributor II

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.

https://gitlab.freedesktop.org/wayland/weston/blob/db905f467169f9f131c5ddc6038296f866d5daeb/ivi-shel...

There seems to be some problem with the hardware and kernel you are using, so I will proceed with the investigation once. thank you.

 

0 Kudos

1,191 Views
KATA_KAN
Contributor II

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?

0 Kudos

1,185 Views
joanxie
NXP TechSupport
NXP TechSupport

maybe you can refer to the enclosed file

0 Kudos

1,148 Views
KATA_KAN
Contributor II

I checked the attached patch file, but it was already applied to our development environment.
Do you know how to set color_key from here?

0 Kudos