imxcompositor_g2d window positioning with waylandsink

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

imxcompositor_g2d window positioning with waylandsink

3,332 Views
rradman_zenitel
Contributor II

Dear all,

We are developing a display application using GStreamer and i.MX8MP.

Currently we are trying to understand how positioning parameters work using imxcompositor_g2d in combination with waylandsink.

Here is the pipeline example we've tried using GStreamer's CLI:

gst-launch-1.0 imxcompositor_g2d name=comp sink_0::width=100 sink_0::height=100 sink_0::xpos=50 sink_0::ypos=50 ! waylandsink window-height=1024 window-width=600 videotestsrc ! comp.sink_0

 

The command runs, but the behavior is not as one would expect.

Here I will post a picture of some examples with different combinations of xpos and ypos parameters, and their results:

Note: screen size is 1024x600

rradman_zenitel_0-1645544265949.png

As you can see, the stream is ignoring the sink_0::width=100 sink_0::height=100 parameters, but more importantly the positioning doesn't seem to make sense.

Does anyone have any advice on why this might be happening or how to fix it?

Thank you.

Best regards,

Robert.

 

 

0 Kudos
3 Replies

1,640 Views
r_trivedi123
Contributor IV

Hi @dianapredescu & @NXPuser237 , Hope our created plugin can help for your needs.

sisigwaylandsink - A custom gstreamer plugin to control geometry 
Features and demo is provided in the video link.

2,820 Views
NXPuser237
Contributor I

Any updates on this? Seems weird for a plugin to be unable to set position.

Example provided with GstVideoOverlay  uses x11 not wayland so answer is not very relevant.

0 Kudos

3,317 Views
dianapredescu
NXP Employee
NXP Employee

Hi Robert,

I think we can't control or set the window position manually, there's nothing wrong with the imxcompositor_g2d plugin. It might be an issue related to wayland. If my understanding is correct, when the waylandsink is fullscreen at the end you will have a scaled output.

If not using full screen and you just want to display a 100x100 video stream at position (x=50,y=50), it's impossible to do that using current gstreamer pipeline due to the wayland protocol limitation, and the window position will be random. See below:

gst-launch-1.0 imxcompositor_g2d name=comp sink_0::width=100 sink_0::height=100 sink_0::xpos=50 sink_0::ypos=50 ! waylandsink window-height=100 window-width=100 videotestsrc ! comp.sink_0

Some time ago there was a suggestion for this use case: If you want to overlay 100x100 at position (x=50,y=0) on the backgroud UI, you may try to use GstVideoOverlay to meet your requirement. This should be the official example.

https://gstreamer.freedesktop.org/documentation/video/gstvideooverlay.html?gi-language=c 

Maybe you can take a look and evaluate this. That's all the information I could find at the moment.

Best regards,

Diana