JV
Jovic, Vladimir
Tue, May 21, 2019 2:48 PM
Hi,
I am using OpenGL to render camera image into a wayland surface, and I use IVI functions to set the position and size of the surface.
So, I do as described in IVI quick guide:
LayerManagerControl create layer 1 1024 600
LayerManagerControl set screen 0 render order 1
LayerManagerControl set layer 1 render order 5242880
LayerManagerControl set layer 1 visibility 1
LayerManagerControl set surface 5242880 source region 0 0 300 200
LayerManagerControl set surface 5242880 destination region 20 20 600 400
LayerManagerControl set surface 5242880 visibility 1
And the surface is shown fine.
If I do exactly the same from my C++ program, it works only if I put sleeps between ILM functions. Something like this:
ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
ilm_commitChanges();
std::this_thread::sleep( 100ms );
and if the sleep is not long enough, it will not work.
The "LayerManagerControl get scene" will return output as if all functions were called properly, but what is shown is not what "LayerManagerControl get scene" returns. For example, somethimes the source region what is rendered is different from what should be.
Even with sleeps, sometimes it happens that the scene get wrong numbers.
Also, I see next lines in weston.log:
[07:29:02.248] ivi-shell: source rectangle is not yet set by ivi_layout_surface_set_source_rectangle
[07:29:02.885] ivi-shell: source rectangle is not yet set by ivi_layout_surface_set_source_rectangle
[07:29:03.525] ivi-shell: source rectangle is not yet set by ivi_layout_surface_set_source_rectangle
[07:29:03.178] ivi-shell: source rectangle is not yet set by ivi_layout_surface_set_source_rectangle
Versions that I use are:
weston: 6.0
IVI: revision 9acdaa1
Wayland: 1.17
The question is, is there a way to somehow bump the ivi shell? I thought that " ilm_commitChanges();" is supposed to do that, but somehow it doesn't.
Also, what I noticed is that order of functions somehow matters. For example, if I set the visibility at end, then the image is not shown.
By the way, I set some things from one program (add a surface to a layer) and other things in another program (set source region).
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
Hi,
I am using OpenGL to render camera image into a wayland surface, and I use IVI functions to set the position and size of the surface.
So, I do as described in IVI quick guide:
LayerManagerControl create layer 1 1024 600
LayerManagerControl set screen 0 render order 1
LayerManagerControl set layer 1 render order 5242880
LayerManagerControl set layer 1 visibility 1
LayerManagerControl set surface 5242880 source region 0 0 300 200
LayerManagerControl set surface 5242880 destination region 20 20 600 400
LayerManagerControl set surface 5242880 visibility 1
And the surface is shown fine.
If I do exactly the same from my C++ program, it works only if I put sleeps between ILM functions. Something like this:
ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
ilm_commitChanges();
std::this_thread::sleep( 100ms );
and if the sleep is not long enough, it will not work.
The "LayerManagerControl get scene" will return output as if all functions were called properly, but what is shown is not what "LayerManagerControl get scene" returns. For example, somethimes the source region what is rendered is different from what should be.
Even with sleeps, sometimes it happens that the scene get wrong numbers.
Also, I see next lines in weston.log:
[07:29:02.248] ivi-shell: source rectangle is not yet set by ivi_layout_surface_set_source_rectangle
[07:29:02.885] ivi-shell: source rectangle is not yet set by ivi_layout_surface_set_source_rectangle
[07:29:03.525] ivi-shell: source rectangle is not yet set by ivi_layout_surface_set_source_rectangle
[07:29:03.178] ivi-shell: source rectangle is not yet set by ivi_layout_surface_set_source_rectangle
Versions that I use are:
weston: 6.0
IVI: revision 9acdaa1
Wayland: 1.17
The question is, is there a way to somehow bump the ivi shell? I thought that " ilm_commitChanges();" is supposed to do that, but somehow it doesn't.
Also, what I noticed is that order of functions somehow matters. For example, if I set the visibility at end, then the image is not shown.
By the way, I set some things from one program (add a surface to a layer) and other things in another program (set source region).
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
FE
Friedrich, Eugen (ADITG/ESM1)
Wed, May 22, 2019 7:05 AM
Hi Vladimir,
I would guess that the issue is coming because the calls between different process are not synchronized.
You see the error because visibility is set before surface got source region assigned to it, so compositor doesn't know how to render it.
The implementation of the ivi-controller doesn't forbid you to use the ivi-wm protocol (ilm api's are wrapper around it) from different processes, there are a few use-cases but in general the should be only one, it should be application controller which will know where and how to render the surface.
The minimalistic example of it is here:
https://github.com/GENIVI/wayland-ivi-extension/tree/master/ivi-layermanagement-examples/layer-add-surfaces
you will see that there are callback available to get to know when the rendering client provides a buffer to a ivi-surface and after this source/destination regions and afterwards visibility can be set.
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: genivi-ivi-layer-management <genivi-ivi-layer-management-
bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
Sent: Dienstag, 21. Mai 2019 16:50
To: genivi-ivi-layer-management@lists.genivi.org
Subject: ivi functions not executed immediately?
Hi,
I am using OpenGL to render camera image into a wayland surface, and I use
IVI functions to set the position and size of the surface.
So, I do as described in IVI quick guide:
LayerManagerControl create layer 1 1024 600
LayerManagerControl set screen 0 render order 1
LayerManagerControl set layer 1 render order 5242880
LayerManagerControl set layer 1 visibility 1
LayerManagerControl set surface 5242880 source region 0 0 300 200
LayerManagerControl set surface 5242880 destination region 20 20 600 400
LayerManagerControl set surface 5242880 visibility 1
And the surface is shown fine.
If I do exactly the same from my C++ program, it works only if I put sleeps
between ILM functions. Something like this:
ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
ilm_commitChanges();
std::this_thread::sleep( 100ms );
and if the sleep is not long enough, it will not work.
The "LayerManagerControl get scene" will return output as if all functions
were called properly, but what is shown is not what "LayerManagerControl
get scene" returns. For example, somethimes the source region what is
rendered is different from what should be.
Even with sleeps, sometimes it happens that the scene get wrong numbers.
Also, I see next lines in weston.log:
[07:29:02.248] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:02.885] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.525] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.178] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
Versions that I use are:
weston: 6.0
IVI: revision 9acdaa1
Wayland: 1.17
The question is, is there a way to somehow bump the ivi shell? I thought that
" ilm_commitChanges();" is supposed to do that, but somehow it doesn't.
Also, what I noticed is that order of functions somehow matters. For
example, if I set the visibility at end, then the image is not shown.
By the way, I set some things from one program (add a surface to a layer)
and other things in another program (set source region).
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
genivi-ivi-layer-management mailing list
genivi-ivi-layer-management@lists.genivi.org
http://lists.genivi.org/mailman/listinfo/genivi-ivi-layer-
management_lists.genivi.org
Hi Vladimir,
I would guess that the issue is coming because the calls between different process are not synchronized.
You see the error because visibility is set before surface got source region assigned to it, so compositor doesn't know how to render it.
The implementation of the ivi-controller doesn't forbid you to use the ivi-wm protocol (ilm api's are wrapper around it) from different processes, there are a few use-cases but in general the should be only one, it should be application controller which will know where and how to render the surface.
The minimalistic example of it is here:
https://github.com/GENIVI/wayland-ivi-extension/tree/master/ivi-layermanagement-examples/layer-add-surfaces
you will see that there are callback available to get to know when the rendering client provides a buffer to a ivi-surface and after this source/destination regions and afterwards visibility can be set.
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
> -----Original Message-----
> From: genivi-ivi-layer-management <genivi-ivi-layer-management-
> bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
> Sent: Dienstag, 21. Mai 2019 16:50
> To: genivi-ivi-layer-management@lists.genivi.org
> Subject: ivi functions not executed immediately?
>
> Hi,
>
> I am using OpenGL to render camera image into a wayland surface, and I use
> IVI functions to set the position and size of the surface.
> So, I do as described in IVI quick guide:
> LayerManagerControl create layer 1 1024 600
> LayerManagerControl set screen 0 render order 1
> LayerManagerControl set layer 1 render order 5242880
> LayerManagerControl set layer 1 visibility 1
> LayerManagerControl set surface 5242880 source region 0 0 300 200
> LayerManagerControl set surface 5242880 destination region 20 20 600 400
> LayerManagerControl set surface 5242880 visibility 1
>
> And the surface is shown fine.
> If I do exactly the same from my C++ program, it works only if I put sleeps
> between ILM functions. Something like this:
> ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
> ilm_commitChanges();
> std::this_thread::sleep( 100ms );
> and if the sleep is not long enough, it will not work.
> The "LayerManagerControl get scene" will return output as if all functions
> were called properly, but what is shown is not what "LayerManagerControl
> get scene" returns. For example, somethimes the source region what is
> rendered is different from what should be.
> Even with sleeps, sometimes it happens that the scene get wrong numbers.
>
> Also, I see next lines in weston.log:
> [07:29:02.248] ivi-shell: source rectangle is not yet set by
> ivi_layout_surface_set_source_rectangle
> [07:29:02.885] ivi-shell: source rectangle is not yet set by
> ivi_layout_surface_set_source_rectangle
> [07:29:03.525] ivi-shell: source rectangle is not yet set by
> ivi_layout_surface_set_source_rectangle
> [07:29:03.178] ivi-shell: source rectangle is not yet set by
> ivi_layout_surface_set_source_rectangle
>
> Versions that I use are:
> weston: 6.0
> IVI: revision 9acdaa1
> Wayland: 1.17
>
> The question is, is there a way to somehow bump the ivi shell? I thought that
> " ilm_commitChanges();" is supposed to do that, but somehow it doesn't.
>
> Also, what I noticed is that order of functions somehow matters. For
> example, if I set the visibility at end, then the image is not shown.
>
> By the way, I set some things from one program (add a surface to a layer)
> and other things in another program (set source region).
>
> Mit freundlichen Grüßen
>
> i. A. Vladimir Jovic
>
> ifm ecomatic gmbh
>
>
>
> _______________________________________________
> genivi-ivi-layer-management mailing list
> genivi-ivi-layer-management@lists.genivi.org
> http://lists.genivi.org/mailman/listinfo/genivi-ivi-layer-
> management_lists.genivi.org
JV
Jovic, Vladimir
Thu, May 23, 2019 10:19 AM
Hi,
Thanks for the info, and example.
I tried to do all IVI function calls in one program, so called "windows manager", in following order:
- when it starts, create a layer, and add all existing surfaces to it
- from another program, create a surface, and when it becomes visible, start opengl rendering
- set visibility in window manager
- set source region in window manager
- set destination region in window manager
When I do "LayerManagerControl get scene", I get exactly numbers I used:
root@pdm3:/home# LayerManagerControl get scene
screen 0 (0x0)
-
connector name: Unknown-1
-
resolution: x=1280, y=480
-
layer render order: 1(0x1),
layer 1 (0x1)
-
destination region: x=0, y=0, w=1280, h=480
-
source region: x=0, y=0, w=1280, h=480
-
opacity: 1
-
visibility: 1
-
surface render order: 5242880(0x500000),
-
on screen: 0(0x0)
surface 5242880 (0x500000)
- created by pid: 2757
- original size: x=720, y=576
- destination region: x=20, y=20, w=300, h=200
- source region: x=0, y=0, w=719, h=575
- opacity: 1
- visibility: 1
- frame counter: 7731
- on layer: 1(0x1)
however, the image is shown as if the source and destination are 100x100. That is the initial surface size, but later I resize it using
If I modify destination or source region, then the image is shown normally:
LayerManagerControl set surface 5242880 destination region 20 20 300 201
Sometimes, it works normally, and I do not have to do anything.
The only difference from your example, is that I do "ilm_commitChanges()" one after another command. Can I do that when setting destination, before setting source region and visibility?
I tried to use ivi-wm, but it doesn't seem to work properly. But you said that ILM is just a wrapper.
I generated the source and header with
wayland-scanner public-code < wm-ivi.xml > wm-ivi.c
wayland-scanner client-header < wm-ivi.xml > wm-ivi.h
I compiled it into a shared library, and linked to my program. Then in the callback for "wl_registry_add_listener", when it tries to use "ivi_wm_add_listener()" it just seg fault somewhere.
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
-----Ursprüngliche Nachricht-----
Von: Friedrich, Eugen (ADITG/ESM1) efriedrich@de.adit-jv.com
Gesendet: Mittwoch, 22. Mai 2019 09:05
An: Jovic, Vladimir vladimir.jovic@ifm.com; genivi-ivi-layer-
management@lists.genivi.org
Betreff: RE: ivi functions not executed immediately?
Hi Vladimir,
I would guess that the issue is coming because the calls between different process
are not synchronized.
You see the error because visibility is set before surface got source region
assigned to it, so compositor doesn't know how to render it.
The implementation of the ivi-controller doesn't forbid you to use the ivi-wm
protocol (ilm api's are wrapper around it) from different processes, there are a few
use-cases but in general the should be only one, it should be application controller
which will know where and how to render the surface.
The minimalistic example of it is here:
https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_GENIVI_wayland-2Divi-2Dextension_tree_master_ivi-
2Dlayermanagement-2Dexamples_layer-2Dadd-
2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2EM0&r
=8wfdsMUxnRudpdLb_Cg4rnnnKI-
gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s
=nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
you will see that there are callback available to get to know when the rendering
client provides a buffer to a ivi-surface and after this source/destination regions
and afterwards visibility can be set.
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: genivi-ivi-layer-management <genivi-ivi-layer-management-
bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
Sent: Dienstag, 21. Mai 2019 16:50
To: genivi-ivi-layer-management@lists.genivi.org
Subject: ivi functions not executed immediately?
Hi,
I am using OpenGL to render camera image into a wayland surface, and I
use IVI functions to set the position and size of the surface.
So, I do as described in IVI quick guide:
LayerManagerControl create layer 1 1024 600
LayerManagerControl set screen 0 render order 1
LayerManagerControl set layer 1 render order 5242880
LayerManagerControl set layer 1 visibility 1
LayerManagerControl set surface 5242880 source region 0 0 300 200
LayerManagerControl set surface 5242880 destination region 20 20 600 400
LayerManagerControl set surface 5242880 visibility 1
And the surface is shown fine.
If I do exactly the same from my C++ program, it works only if I put
sleeps between ILM functions. Something like this:
ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
ilm_commitChanges();
std::this_thread::sleep( 100ms );
and if the sleep is not long enough, it will not work.
The "LayerManagerControl get scene" will return output as if all
functions were called properly, but what is shown is not what
"LayerManagerControl get scene" returns. For example, somethimes the
source region what is rendered is different from what should be.
Even with sleeps, sometimes it happens that the scene get wrong numbers.
Also, I see next lines in weston.log:
[07:29:02.248] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:02.885] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.525] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.178] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
Versions that I use are:
weston: 6.0
IVI: revision 9acdaa1
Wayland: 1.17
The question is, is there a way to somehow bump the ivi shell? I
thought that " ilm_commitChanges();" is supposed to do that, but somehow it
Also, what I noticed is that order of functions somehow matters. For
example, if I set the visibility at end, then the image is not shown.
By the way, I set some things from one program (add a surface to a
layer) and other things in another program (set source region).
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
genivi-ivi-layer-management mailing list
genivi-ivi-layer-management@lists.genivi.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.genivi.org_m
ailman_listinfo_genivi-2Divi-2Dlayer-2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmMEVz
wrB_isOPX7
FQxE8kMpAytfQhoigO7PY8&e=
management_lists.genivi.org
Hi,
Thanks for the info, and example.
I tried to do all IVI function calls in one program, so called "windows manager", in following order:
1. when it starts, create a layer, and add all existing surfaces to it
2. from another program, create a surface, and when it becomes visible, start opengl rendering
3. set visibility in window manager
4. set source region in window manager
5. set destination region in window manager
When I do "LayerManagerControl get scene", I get exactly numbers I used:
root@pdm3:/home# LayerManagerControl get scene
screen 0 (0x0)
---------------------------------------
- connector name: Unknown-1
- resolution: x=1280, y=480
- layer render order: 1(0x1),
layer 1 (0x1)
---------------------------------------
- destination region: x=0, y=0, w=1280, h=480
- source region: x=0, y=0, w=1280, h=480
- opacity: 1
- visibility: 1
- surface render order: 5242880(0x500000),
- on screen: 0(0x0)
surface 5242880 (0x500000)
---------------------------------------
- created by pid: 2757
- original size: x=720, y=576
- destination region: x=20, y=20, w=300, h=200
- source region: x=0, y=0, w=719, h=575
- opacity: 1
- visibility: 1
- frame counter: 7731
- on layer: 1(0x1)
however, the image is shown as if the source and destination are 100x100. That is the initial surface size, but later I resize it using
If I modify destination or source region, then the image is shown normally:
LayerManagerControl set surface 5242880 destination region 20 20 300 201
Sometimes, it works normally, and I do not have to do anything.
The only difference from your example, is that I do "ilm_commitChanges()" one after another command. Can I do that when setting destination, before setting source region and visibility?
************************
I tried to use ivi-wm, but it doesn't seem to work properly. But you said that ILM is just a wrapper.
I generated the source and header with
wayland-scanner public-code < wm-ivi.xml > wm-ivi.c
wayland-scanner client-header < wm-ivi.xml > wm-ivi.h
I compiled it into a shared library, and linked to my program. Then in the callback for "wl_registry_add_listener", when it tries to use "ivi_wm_add_listener()" it just seg fault somewhere.
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
> -----Ursprüngliche Nachricht-----
> Von: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>
> Gesendet: Mittwoch, 22. Mai 2019 09:05
> An: Jovic, Vladimir <vladimir.jovic@ifm.com>; genivi-ivi-layer-
> management@lists.genivi.org
> Betreff: RE: ivi functions not executed immediately?
>
> Hi Vladimir,
>
> I would guess that the issue is coming because the calls between different process
> are not synchronized.
> You see the error because visibility is set before surface got source region
> assigned to it, so compositor doesn't know how to render it.
>
> The implementation of the ivi-controller doesn't forbid you to use the ivi-wm
> protocol (ilm api's are wrapper around it) from different processes, there are a few
> use-cases but in general the should be only one, it should be application controller
> which will know where and how to render the surface.
>
> The minimalistic example of it is here:
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_GENIVI_wayland-2Divi-2Dextension_tree_master_ivi-
> 2Dlayermanagement-2Dexamples_layer-2Dadd-
> 2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2EM0&r
> =8wfdsMUxnRudpdLb_Cg4rnnnKI-
> gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s
> =nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
>
> you will see that there are callback available to get to know when the rendering
> client provides a buffer to a ivi-surface and after this source/destination regions
> and afterwards visibility can be set.
>
> Best regards
>
> Eugen Friedrich
> Engineering Software Multimedia 1 (ADITG/ESM1)
>
> Tel. +49 5121 49 6921
>
> > -----Original Message-----
> > From: genivi-ivi-layer-management <genivi-ivi-layer-management-
> > bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
> > Sent: Dienstag, 21. Mai 2019 16:50
> > To: genivi-ivi-layer-management@lists.genivi.org
> > Subject: ivi functions not executed immediately?
> >
> > Hi,
> >
> > I am using OpenGL to render camera image into a wayland surface, and I
> > use IVI functions to set the position and size of the surface.
> > So, I do as described in IVI quick guide:
> > LayerManagerControl create layer 1 1024 600
> > LayerManagerControl set screen 0 render order 1
> > LayerManagerControl set layer 1 render order 5242880
> > LayerManagerControl set layer 1 visibility 1
> > LayerManagerControl set surface 5242880 source region 0 0 300 200
> > LayerManagerControl set surface 5242880 destination region 20 20 600 400
> > LayerManagerControl set surface 5242880 visibility 1
> >
> > And the surface is shown fine.
> > If I do exactly the same from my C++ program, it works only if I put
> > sleeps between ILM functions. Something like this:
> > ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
> > ilm_commitChanges();
> > std::this_thread::sleep( 100ms );
> > and if the sleep is not long enough, it will not work.
> > The "LayerManagerControl get scene" will return output as if all
> > functions were called properly, but what is shown is not what
> > "LayerManagerControl get scene" returns. For example, somethimes the
> > source region what is rendered is different from what should be.
> > Even with sleeps, sometimes it happens that the scene get wrong numbers.
> >
> > Also, I see next lines in weston.log:
> > [07:29:02.248] ivi-shell: source rectangle is not yet set by
> > ivi_layout_surface_set_source_rectangle
> > [07:29:02.885] ivi-shell: source rectangle is not yet set by
> > ivi_layout_surface_set_source_rectangle
> > [07:29:03.525] ivi-shell: source rectangle is not yet set by
> > ivi_layout_surface_set_source_rectangle
> > [07:29:03.178] ivi-shell: source rectangle is not yet set by
> > ivi_layout_surface_set_source_rectangle
> >
> > Versions that I use are:
> > weston: 6.0
> > IVI: revision 9acdaa1
> > Wayland: 1.17
> >
> > The question is, is there a way to somehow bump the ivi shell? I
> > thought that " ilm_commitChanges();" is supposed to do that, but somehow it
> doesn't.
> >
> > Also, what I noticed is that order of functions somehow matters. For
> > example, if I set the visibility at end, then the image is not shown.
> >
> > By the way, I set some things from one program (add a surface to a
> > layer) and other things in another program (set source region).
> >
> > Mit freundlichen Grüßen
> >
> > i. A. Vladimir Jovic
> >
> > ifm ecomatic gmbh
> >
> >
> >
> > _______________________________________________
> > genivi-ivi-layer-management mailing list
> > genivi-ivi-layer-management@lists.genivi.org
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.genivi.org_m
> > ailman_listinfo_genivi-2Divi-2Dlayer-2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
> > lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
> gQZ4ykr3tjUrejXg
> >
> &m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmMEVz
> wrB_isOPX7
> > FQxE8kMpAytfQhoigO7PY8&e=
> > management_lists.genivi.org
JV
Jovic, Vladimir
Thu, May 23, 2019 1:54 PM
Hi,
In my "windows manager", I do this:
void SurfaceCreatedNotificationFunc( ilmObjectType object,
t_ilm_uint id,
t_ilm_bool created,
void* user_data )
{
if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
{
if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
{
std::cout << PRETTY_FUNCTION << " ilm_layerAddSurface() failed after trying to add a surface to layer\n";
}
ilm_commitChanges();
}
}
void AutoAddSurfaces()
{
ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 );
}
and that is going to add every created surface to the layer with id 1.
Now, I created a script with this content:
EGLWLMockNavigation &
#sleep 0.005
LayerManagerControl set surface 10 source region 0 0 600 400
LayerManagerControl set surface 10 destination region 50 40 300 250
LayerManagerControl set surface 10 visibility 1
Without the sleep, sometimes the shown surface will be at random position with random size, and the " LayerManagerControl get scene" returns this:
root@pdm3:/home# LayerManagerControl get scene
screen 0 (0x0)
-
connector name: Unknown-1
-
resolution: x=1280, y=480
-
layer render order: 1(0x1),
layer 1 (0x1)
-
destination region: x=0, y=0, w=1280, h=480
-
source region: x=0, y=0, w=1280, h=480
-
opacity: 1
-
visibility: 1
-
surface render order: 10(0xa),
-
on screen: 0(0x0)
surface 10 (0xa)
- created by pid: 5820
- original size: x=800, y=480
- destination region: x=50, y=40, w=300, h=250
- source region: x=0, y=0, w=0, h=0
- opacity: 1
- visibility: 1
- frame counter: 169
- on layer: 1(0x1)
When my "windows manager" is not running, and I do " LayerManagerControl add surface 10 to layer 1" from the script, instead of sleep, then it works every time.
So, it looks like there is some time after creating a surface, that it needs to somehow "settle down" and for the Weston to catch up.
BTW how do you find some consulting services, when it is so new?
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
-----Ursprüngliche Nachricht-----
Von: Friedrich, Eugen (ADITG/ESM1) efriedrich@de.adit-jv.com
Gesendet: Mittwoch, 22. Mai 2019 09:05
An: Jovic, Vladimir vladimir.jovic@ifm.com; genivi-ivi-layer-
management@lists.genivi.org
Betreff: RE: ivi functions not executed immediately?
Hi Vladimir,
I would guess that the issue is coming because the calls between different process
are not synchronized.
You see the error because visibility is set before surface got source region
assigned to it, so compositor doesn't know how to render it.
The implementation of the ivi-controller doesn't forbid you to use the ivi-wm
protocol (ilm api's are wrapper around it) from different processes, there are a few
use-cases but in general the should be only one, it should be application controller
which will know where and how to render the surface.
The minimalistic example of it is here:
https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_GENIVI_wayland-2Divi-2Dextension_tree_master_ivi-
2Dlayermanagement-2Dexamples_layer-2Dadd-
2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2EM0&r
=8wfdsMUxnRudpdLb_Cg4rnnnKI-
gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s
=nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
you will see that there are callback available to get to know when the rendering
client provides a buffer to a ivi-surface and after this source/destination regions
and afterwards visibility can be set.
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: genivi-ivi-layer-management <genivi-ivi-layer-management-
bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
Sent: Dienstag, 21. Mai 2019 16:50
To: genivi-ivi-layer-management@lists.genivi.org
Subject: ivi functions not executed immediately?
Hi,
I am using OpenGL to render camera image into a wayland surface, and I
use IVI functions to set the position and size of the surface.
So, I do as described in IVI quick guide:
LayerManagerControl create layer 1 1024 600
LayerManagerControl set screen 0 render order 1
LayerManagerControl set layer 1 render order 5242880
LayerManagerControl set layer 1 visibility 1
LayerManagerControl set surface 5242880 source region 0 0 300 200
LayerManagerControl set surface 5242880 destination region 20 20 600 400
LayerManagerControl set surface 5242880 visibility 1
And the surface is shown fine.
If I do exactly the same from my C++ program, it works only if I put
sleeps between ILM functions. Something like this:
ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
ilm_commitChanges();
std::this_thread::sleep( 100ms );
and if the sleep is not long enough, it will not work.
The "LayerManagerControl get scene" will return output as if all
functions were called properly, but what is shown is not what
"LayerManagerControl get scene" returns. For example, somethimes the
source region what is rendered is different from what should be.
Even with sleeps, sometimes it happens that the scene get wrong numbers.
Also, I see next lines in weston.log:
[07:29:02.248] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:02.885] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.525] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.178] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
Versions that I use are:
weston: 6.0
IVI: revision 9acdaa1
Wayland: 1.17
The question is, is there a way to somehow bump the ivi shell? I
thought that " ilm_commitChanges();" is supposed to do that, but somehow it
Also, what I noticed is that order of functions somehow matters. For
example, if I set the visibility at end, then the image is not shown.
By the way, I set some things from one program (add a surface to a
layer) and other things in another program (set source region).
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
genivi-ivi-layer-management mailing list
genivi-ivi-layer-management@lists.genivi.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.genivi.org_m
ailman_listinfo_genivi-2Divi-2Dlayer-2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmMEVz
wrB_isOPX7
FQxE8kMpAytfQhoigO7PY8&e=
management_lists.genivi.org
Hi,
In my "windows manager", I do this:
void SurfaceCreatedNotificationFunc( ilmObjectType object,
t_ilm_uint id,
t_ilm_bool created,
void* user_data )
{
if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
{
if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
{
std::cout << __PRETTY_FUNCTION__ << " ilm_layerAddSurface() failed after trying to add a surface to layer\n";
}
ilm_commitChanges();
}
}
void AutoAddSurfaces()
{
ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 );
}
and that is going to add every created surface to the layer with id 1.
Now, I created a script with this content:
EGLWLMockNavigation &
#sleep 0.005
LayerManagerControl set surface 10 source region 0 0 600 400
LayerManagerControl set surface 10 destination region 50 40 300 250
LayerManagerControl set surface 10 visibility 1
Without the sleep, sometimes the shown surface will be at random position with random size, and the " LayerManagerControl get scene" returns this:
root@pdm3:/home# LayerManagerControl get scene
screen 0 (0x0)
---------------------------------------
- connector name: Unknown-1
- resolution: x=1280, y=480
- layer render order: 1(0x1),
layer 1 (0x1)
---------------------------------------
- destination region: x=0, y=0, w=1280, h=480
- source region: x=0, y=0, w=1280, h=480
- opacity: 1
- visibility: 1
- surface render order: 10(0xa),
- on screen: 0(0x0)
surface 10 (0xa)
---------------------------------------
- created by pid: 5820
- original size: x=800, y=480
- destination region: x=50, y=40, w=300, h=250
- source region: x=0, y=0, w=0, h=0
- opacity: 1
- visibility: 1
- frame counter: 169
- on layer: 1(0x1)
When my "windows manager" is not running, and I do " LayerManagerControl add surface 10 to layer 1" from the script, instead of sleep, then it works every time.
So, it looks like there is some time after creating a surface, that it needs to somehow "settle down" and for the Weston to catch up.
BTW how do you find some consulting services, when it is so new?
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
> -----Ursprüngliche Nachricht-----
> Von: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>
> Gesendet: Mittwoch, 22. Mai 2019 09:05
> An: Jovic, Vladimir <vladimir.jovic@ifm.com>; genivi-ivi-layer-
> management@lists.genivi.org
> Betreff: RE: ivi functions not executed immediately?
>
> Hi Vladimir,
>
> I would guess that the issue is coming because the calls between different process
> are not synchronized.
> You see the error because visibility is set before surface got source region
> assigned to it, so compositor doesn't know how to render it.
>
> The implementation of the ivi-controller doesn't forbid you to use the ivi-wm
> protocol (ilm api's are wrapper around it) from different processes, there are a few
> use-cases but in general the should be only one, it should be application controller
> which will know where and how to render the surface.
>
> The minimalistic example of it is here:
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_GENIVI_wayland-2Divi-2Dextension_tree_master_ivi-
> 2Dlayermanagement-2Dexamples_layer-2Dadd-
> 2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2EM0&r
> =8wfdsMUxnRudpdLb_Cg4rnnnKI-
> gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s
> =nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
>
> you will see that there are callback available to get to know when the rendering
> client provides a buffer to a ivi-surface and after this source/destination regions
> and afterwards visibility can be set.
>
> Best regards
>
> Eugen Friedrich
> Engineering Software Multimedia 1 (ADITG/ESM1)
>
> Tel. +49 5121 49 6921
>
> > -----Original Message-----
> > From: genivi-ivi-layer-management <genivi-ivi-layer-management-
> > bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
> > Sent: Dienstag, 21. Mai 2019 16:50
> > To: genivi-ivi-layer-management@lists.genivi.org
> > Subject: ivi functions not executed immediately?
> >
> > Hi,
> >
> > I am using OpenGL to render camera image into a wayland surface, and I
> > use IVI functions to set the position and size of the surface.
> > So, I do as described in IVI quick guide:
> > LayerManagerControl create layer 1 1024 600
> > LayerManagerControl set screen 0 render order 1
> > LayerManagerControl set layer 1 render order 5242880
> > LayerManagerControl set layer 1 visibility 1
> > LayerManagerControl set surface 5242880 source region 0 0 300 200
> > LayerManagerControl set surface 5242880 destination region 20 20 600 400
> > LayerManagerControl set surface 5242880 visibility 1
> >
> > And the surface is shown fine.
> > If I do exactly the same from my C++ program, it works only if I put
> > sleeps between ILM functions. Something like this:
> > ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
> > ilm_commitChanges();
> > std::this_thread::sleep( 100ms );
> > and if the sleep is not long enough, it will not work.
> > The "LayerManagerControl get scene" will return output as if all
> > functions were called properly, but what is shown is not what
> > "LayerManagerControl get scene" returns. For example, somethimes the
> > source region what is rendered is different from what should be.
> > Even with sleeps, sometimes it happens that the scene get wrong numbers.
> >
> > Also, I see next lines in weston.log:
> > [07:29:02.248] ivi-shell: source rectangle is not yet set by
> > ivi_layout_surface_set_source_rectangle
> > [07:29:02.885] ivi-shell: source rectangle is not yet set by
> > ivi_layout_surface_set_source_rectangle
> > [07:29:03.525] ivi-shell: source rectangle is not yet set by
> > ivi_layout_surface_set_source_rectangle
> > [07:29:03.178] ivi-shell: source rectangle is not yet set by
> > ivi_layout_surface_set_source_rectangle
> >
> > Versions that I use are:
> > weston: 6.0
> > IVI: revision 9acdaa1
> > Wayland: 1.17
> >
> > The question is, is there a way to somehow bump the ivi shell? I
> > thought that " ilm_commitChanges();" is supposed to do that, but somehow it
> doesn't.
> >
> > Also, what I noticed is that order of functions somehow matters. For
> > example, if I set the visibility at end, then the image is not shown.
> >
> > By the way, I set some things from one program (add a surface to a
> > layer) and other things in another program (set source region).
> >
> > Mit freundlichen Grüßen
> >
> > i. A. Vladimir Jovic
> >
> > ifm ecomatic gmbh
> >
> >
> >
> > _______________________________________________
> > genivi-ivi-layer-management mailing list
> > genivi-ivi-layer-management@lists.genivi.org
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.genivi.org_m
> > ailman_listinfo_genivi-2Divi-2Dlayer-2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
> > lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
> gQZ4ykr3tjUrejXg
> >
> &m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmMEVz
> wrB_isOPX7
> > FQxE8kMpAytfQhoigO7PY8&e=
> > management_lists.genivi.org
FE
Friedrich, Eugen (ADITG/ESM1)
Thu, May 23, 2019 4:47 PM
Hi Vladimir,
If you would follow the example application you will see that there is additional callback installed to find out the original dimensions of the surface.
After creation is doesn't have any, only after application will really attach a buffer and send this buffer to the compositor (wl_surface_attach , wl-surface_damage, wl_surface_comit, wl_display_flush sequence, should be called from you EGL driver initiated by eglSwapBuffer call).
This would be the synchronization point which you miss sometimes: setting the source region for the surface which doesn't have any size.
I'm surprised that the position and size are random. Looks like a issue in the ivi-shell or ivi-conroller: actually you should never set source or destination without having the original size not sure if we documented this somewhere properly, will take a look...
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: Jovic, Vladimir vladimir.jovic@ifm.com
Sent: Donnerstag, 23. Mai 2019 15:55
To: Friedrich, Eugen (ADITG/ESM1) efriedrich@de.adit-jv.com; genivi-ivi-
layer-management@lists.genivi.org
Subject: AW: ivi functions not executed immediately?
Hi,
In my "windows manager", I do this:
void SurfaceCreatedNotificationFunc( ilmObjectType object,
t_ilm_uint id,
t_ilm_bool created,
void* user_data )
{
if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
{
if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
{
std::cout << PRETTY_FUNCTION << " ilm_layerAddSurface()
failed after trying to add a surface to layer\n";
}
ilm_commitChanges();
}
}
void AutoAddSurfaces()
{
ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 );
}
and that is going to add every created surface to the layer with id 1.
Now, I created a script with this content:
EGLWLMockNavigation &
#sleep 0.005
LayerManagerControl set surface 10 source region 0 0 600 400
LayerManagerControl set surface 10 destination region 50 40 300 250
LayerManagerControl set surface 10 visibility 1
Without the sleep, sometimes the shown surface will be at random position
with random size, and the " LayerManagerControl get scene" returns this:
root@pdm3:/home# LayerManagerControl get scene
screen 0 (0x0)
-
connector name: Unknown-1
-
resolution: x=1280, y=480
-
layer render order: 1(0x1),
layer 1 (0x1)
-
destination region: x=0, y=0, w=1280, h=480
-
source region: x=0, y=0, w=1280, h=480
-
opacity: 1
-
visibility: 1
-
surface render order: 10(0xa),
-
on screen: 0(0x0)
surface 10 (0xa)
- created by pid: 5820
- original size: x=800, y=480
- destination region: x=50, y=40, w=300, h=250
- source region: x=0, y=0, w=0, h=0
- opacity: 1
- visibility: 1
- frame counter: 169
- on layer: 1(0x1)
When my "windows manager" is not running, and I do "
LayerManagerControl add surface 10 to layer 1" from the script, instead of
sleep, then it works every time.
So, it looks like there is some time after creating a surface, that it needs to
somehow "settle down" and for the Weston to catch up.
BTW how do you find some consulting services, when it is so new?
Just ask this mailing list :-)
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
are not synchronized.
You see the error because visibility is set before surface got source region
assigned to it, so compositor doesn't know how to render it.
The implementation of the ivi-controller doesn't forbid you to use the ivi-
protocol (ilm api's are wrapper around it) from different processes, there
use-cases but in general the should be only one, it should be application
which will know where and how to render the surface.
The minimalistic example of it is here:
https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_GENIVI_wayland-2Divi-2Dextension_tree_master_ivi-
2Dlayermanagement-2Dexamples_layer-2Dadd-
2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2E
M0&r
=8wfdsMUxnRudpdLb_Cg4rnnnKI-
gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs
&s
=nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
you will see that there are callback available to get to know when the
client provides a buffer to a ivi-surface and after this source/destination
and afterwards visibility can be set.
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: genivi-ivi-layer-management <genivi-ivi-layer-management-
bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
Sent: Dienstag, 21. Mai 2019 16:50
To: genivi-ivi-layer-management@lists.genivi.org
Subject: ivi functions not executed immediately?
Hi,
I am using OpenGL to render camera image into a wayland surface, and I
use IVI functions to set the position and size of the surface.
So, I do as described in IVI quick guide:
LayerManagerControl create layer 1 1024 600
LayerManagerControl set screen 0 render order 1
LayerManagerControl set layer 1 render order 5242880
LayerManagerControl set layer 1 visibility 1
LayerManagerControl set surface 5242880 source region 0 0 300 200
LayerManagerControl set surface 5242880 destination region 20 20 600
LayerManagerControl set surface 5242880 visibility 1
And the surface is shown fine.
If I do exactly the same from my C++ program, it works only if I put
sleeps between ILM functions. Something like this:
ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
ilm_commitChanges();
std::this_thread::sleep( 100ms );
and if the sleep is not long enough, it will not work.
The "LayerManagerControl get scene" will return output as if all
functions were called properly, but what is shown is not what
"LayerManagerControl get scene" returns. For example, somethimes the
source region what is rendered is different from what should be.
Even with sleeps, sometimes it happens that the scene get wrong
Also, I see next lines in weston.log:
[07:29:02.248] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:02.885] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.525] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.178] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
Versions that I use are:
weston: 6.0
IVI: revision 9acdaa1
Wayland: 1.17
The question is, is there a way to somehow bump the ivi shell? I
thought that " ilm_commitChanges();" is supposed to do that, but
Also, what I noticed is that order of functions somehow matters. For
example, if I set the visibility at end, then the image is not shown.
By the way, I set some things from one program (add a surface to a
layer) and other things in another program (set source region).
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
genivi-ivi-layer-management mailing list
genivi-ivi-layer-management@lists.genivi.org
https://urldefense.proofpoint.com/v2/url?u=http-
ailman_listinfo_genivi-2Divi-2Dlayer-
2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmME
Vz
FQxE8kMpAytfQhoigO7PY8&e=
management_lists.genivi.org
Hi Vladimir,
If you would follow the example application you will see that there is additional callback installed to find out the original dimensions of the surface.
After creation is doesn't have any, only after application will really attach a buffer and send this buffer to the compositor (wl_surface_attach , wl-surface_damage, wl_surface_comit, wl_display_flush sequence, should be called from you EGL driver initiated by eglSwapBuffer call).
This would be the synchronization point which you miss sometimes: setting the source region for the surface which doesn't have any size.
I'm surprised that the position and size are random. Looks like a issue in the ivi-shell or ivi-conroller: actually you should never set source or destination without having the original size not sure if we documented this somewhere properly, will take a look...
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
> -----Original Message-----
> From: Jovic, Vladimir <vladimir.jovic@ifm.com>
> Sent: Donnerstag, 23. Mai 2019 15:55
> To: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>; genivi-ivi-
> layer-management@lists.genivi.org
> Subject: AW: ivi functions not executed immediately?
>
> Hi,
>
> In my "windows manager", I do this:
> void SurfaceCreatedNotificationFunc( ilmObjectType object,
> t_ilm_uint id,
> t_ilm_bool created,
> void* user_data )
> {
> if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
> {
> if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
> {
> std::cout << __PRETTY_FUNCTION__ << " ilm_layerAddSurface()
> failed after trying to add a surface to layer\n";
> }
> ilm_commitChanges();
> }
> }
> void AutoAddSurfaces()
> {
> ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 );
> }
>
> and that is going to add every created surface to the layer with id 1.
>
> Now, I created a script with this content:
>
> EGLWLMockNavigation &
> #sleep 0.005
> LayerManagerControl set surface 10 source region 0 0 600 400
> LayerManagerControl set surface 10 destination region 50 40 300 250
> LayerManagerControl set surface 10 visibility 1
>
> Without the sleep, sometimes the shown surface will be at random position
> with random size, and the " LayerManagerControl get scene" returns this:
> root@pdm3:/home# LayerManagerControl get scene
> screen 0 (0x0)
> ---------------------------------------
> - connector name: Unknown-1
> - resolution: x=1280, y=480
> - layer render order: 1(0x1),
>
> layer 1 (0x1)
> ---------------------------------------
> - destination region: x=0, y=0, w=1280, h=480
> - source region: x=0, y=0, w=1280, h=480
> - opacity: 1
> - visibility: 1
> - surface render order: 10(0xa),
> - on screen: 0(0x0)
>
> surface 10 (0xa)
> ---------------------------------------
> - created by pid: 5820
> - original size: x=800, y=480
> - destination region: x=50, y=40, w=300, h=250
> - source region: x=0, y=0, w=0, h=0
> - opacity: 1
> - visibility: 1
> - frame counter: 169
> - on layer: 1(0x1)
>
>
> When my "windows manager" is not running, and I do "
> LayerManagerControl add surface 10 to layer 1" from the script, instead of
> sleep, then it works every time.
> So, it looks like there is some time after creating a surface, that it needs to
> somehow "settle down" and for the Weston to catch up.
>
> BTW how do you find some consulting services, when it is so new?
Just ask this mailing list :-)
>
> Mit freundlichen Grüßen
>
> i. A. Vladimir Jovic
> ifm ecomatic gmbh
>
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>
> > Gesendet: Mittwoch, 22. Mai 2019 09:05
> > An: Jovic, Vladimir <vladimir.jovic@ifm.com>; genivi-ivi-layer-
> > management@lists.genivi.org
> > Betreff: RE: ivi functions not executed immediately?
> >
> > Hi Vladimir,
> >
> > I would guess that the issue is coming because the calls between different
> process
> > are not synchronized.
> > You see the error because visibility is set before surface got source region
> > assigned to it, so compositor doesn't know how to render it.
> >
> > The implementation of the ivi-controller doesn't forbid you to use the ivi-
> wm
> > protocol (ilm api's are wrapper around it) from different processes, there
> are a few
> > use-cases but in general the should be only one, it should be application
> controller
> > which will know where and how to render the surface.
> >
> > The minimalistic example of it is here:
> > https://urldefense.proofpoint.com/v2/url?u=https-
> > 3A__github.com_GENIVI_wayland-2Divi-2Dextension_tree_master_ivi-
> > 2Dlayermanagement-2Dexamples_layer-2Dadd-
> >
> 2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2E
> M0&r
> > =8wfdsMUxnRudpdLb_Cg4rnnnKI-
> >
> gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs
> &s
> > =nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
> >
> > you will see that there are callback available to get to know when the
> rendering
> > client provides a buffer to a ivi-surface and after this source/destination
> regions
> > and afterwards visibility can be set.
> >
> > Best regards
> >
> > Eugen Friedrich
> > Engineering Software Multimedia 1 (ADITG/ESM1)
> >
> > Tel. +49 5121 49 6921
> >
> > > -----Original Message-----
> > > From: genivi-ivi-layer-management <genivi-ivi-layer-management-
> > > bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
> > > Sent: Dienstag, 21. Mai 2019 16:50
> > > To: genivi-ivi-layer-management@lists.genivi.org
> > > Subject: ivi functions not executed immediately?
> > >
> > > Hi,
> > >
> > > I am using OpenGL to render camera image into a wayland surface, and I
> > > use IVI functions to set the position and size of the surface.
> > > So, I do as described in IVI quick guide:
> > > LayerManagerControl create layer 1 1024 600
> > > LayerManagerControl set screen 0 render order 1
> > > LayerManagerControl set layer 1 render order 5242880
> > > LayerManagerControl set layer 1 visibility 1
> > > LayerManagerControl set surface 5242880 source region 0 0 300 200
> > > LayerManagerControl set surface 5242880 destination region 20 20 600
> 400
> > > LayerManagerControl set surface 5242880 visibility 1
> > >
> > > And the surface is shown fine.
> > > If I do exactly the same from my C++ program, it works only if I put
> > > sleeps between ILM functions. Something like this:
> > > ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
> > > ilm_commitChanges();
> > > std::this_thread::sleep( 100ms );
> > > and if the sleep is not long enough, it will not work.
> > > The "LayerManagerControl get scene" will return output as if all
> > > functions were called properly, but what is shown is not what
> > > "LayerManagerControl get scene" returns. For example, somethimes the
> > > source region what is rendered is different from what should be.
> > > Even with sleeps, sometimes it happens that the scene get wrong
> numbers.
> > >
> > > Also, I see next lines in weston.log:
> > > [07:29:02.248] ivi-shell: source rectangle is not yet set by
> > > ivi_layout_surface_set_source_rectangle
> > > [07:29:02.885] ivi-shell: source rectangle is not yet set by
> > > ivi_layout_surface_set_source_rectangle
> > > [07:29:03.525] ivi-shell: source rectangle is not yet set by
> > > ivi_layout_surface_set_source_rectangle
> > > [07:29:03.178] ivi-shell: source rectangle is not yet set by
> > > ivi_layout_surface_set_source_rectangle
> > >
> > > Versions that I use are:
> > > weston: 6.0
> > > IVI: revision 9acdaa1
> > > Wayland: 1.17
> > >
> > > The question is, is there a way to somehow bump the ivi shell? I
> > > thought that " ilm_commitChanges();" is supposed to do that, but
> somehow it
> > doesn't.
> > >
> > > Also, what I noticed is that order of functions somehow matters. For
> > > example, if I set the visibility at end, then the image is not shown.
> > >
> > > By the way, I set some things from one program (add a surface to a
> > > layer) and other things in another program (set source region).
> > >
> > > Mit freundlichen Grüßen
> > >
> > > i. A. Vladimir Jovic
> > >
> > > ifm ecomatic gmbh
> > >
> > >
> > >
> > > _______________________________________________
> > > genivi-ivi-layer-management mailing list
> > > genivi-ivi-layer-management@lists.genivi.org
> > > https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__lists.genivi.org_m
> > > ailman_listinfo_genivi-2Divi-2Dlayer-
> 2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
> > > lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
> > gQZ4ykr3tjUrejXg
> > >
> >
> &m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmME
> Vz
> > wrB_isOPX7
> > > FQxE8kMpAytfQhoigO7PY8&e=
> > > management_lists.genivi.org
>
JV
Jovic, Vladimir
Fri, May 24, 2019 7:04 AM
Hi
Actually, I was wondering what that "origin size" really is, since I couldn't find any info on that. I do register to that callback, to get the visibility flag. Because if the visibility is 0, then opengl functions are blocking the process.
I do set the window size with "wl_egl_window_resize()", and I see these numbers with "LayerManagerControl get scene". But I am not sure if I have to call "wl_display_dispatch" or " wl_display_flush" or "sl_surface_commit" or anything else after calling "wl_egl_window_resize()". Because, the "original size" is 0x0 - I need to set visibility first, then source and then destination - and only then the origin is set. Do I need to start rendering to set the origin? Or is calling the "eglSwapBuffer " enough?
Do you have a document explaining all this (link or something)? Is there a book describing how exactly to program in ivi and wayland? I couldn't find anything describing IVI in details.
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
-----Ursprüngliche Nachricht-----
Von: Friedrich, Eugen (ADITG/ESM1) efriedrich@de.adit-jv.com
Gesendet: Donnerstag, 23. Mai 2019 18:48
An: Jovic, Vladimir vladimir.jovic@ifm.com; genivi-ivi-layer-
management@lists.genivi.org
Betreff: RE: ivi functions not executed immediately?
Hi Vladimir,
If you would follow the example application you will see that there is additional
callback installed to find out the original dimensions of the surface.
After creation is doesn't have any, only after application will really attach a buffer
and send this buffer to the compositor (wl_surface_attach , wl-surface_damage,
wl_surface_comit, wl_display_flush sequence, should be called from you EGL
driver initiated by eglSwapBuffer call).
This would be the synchronization point which you miss sometimes: setting the
source region for the surface which doesn't have any size.
I'm surprised that the position and size are random. Looks like a issue in the ivi-
shell or ivi-conroller: actually you should never set source or destination without
having the original size not sure if we documented this somewhere properly, will
take a look...
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: Jovic, Vladimir vladimir.jovic@ifm.com
Sent: Donnerstag, 23. Mai 2019 15:55
To: Friedrich, Eugen (ADITG/ESM1) efriedrich@de.adit-jv.com;
genivi-ivi- layer-management@lists.genivi.org
Subject: AW: ivi functions not executed immediately?
Hi,
In my "windows manager", I do this:
void SurfaceCreatedNotificationFunc( ilmObjectType object,
t_ilm_uint id,
t_ilm_bool created,
void* user_data ) {
if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
{
if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
{
std::cout << PRETTY_FUNCTION << " ilm_layerAddSurface()
failed after trying to add a surface to layer\n";
}
ilm_commitChanges();
}
}
void AutoAddSurfaces()
{
ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 ); }
and that is going to add every created surface to the layer with id 1.
Now, I created a script with this content:
EGLWLMockNavigation &
#sleep 0.005
LayerManagerControl set surface 10 source region 0 0 600 400
LayerManagerControl set surface 10 destination region 50 40 300 250
LayerManagerControl set surface 10 visibility 1
Without the sleep, sometimes the shown surface will be at random
position with random size, and the " LayerManagerControl get scene" returns
root@pdm3:/home# LayerManagerControl get scene screen 0 (0x0)
-
connector name: Unknown-1
-
resolution: x=1280, y=480
-
layer render order: 1(0x1),
layer 1 (0x1)
-
destination region: x=0, y=0, w=1280, h=480
-
source region: x=0, y=0, w=1280, h=480
-
opacity: 1
-
visibility: 1
-
surface render order: 10(0xa),
-
on screen: 0(0x0)
surface 10 (0xa)
- created by pid: 5820
- original size: x=800, y=480
- destination region: x=50, y=40, w=300, h=250
- source region: x=0, y=0, w=0, h=0
- opacity: 1
- visibility: 1
- frame counter: 169
- on layer: 1(0x1)
When my "windows manager" is not running, and I do "
LayerManagerControl add surface 10 to layer 1" from the script,
instead of sleep, then it works every time.
So, it looks like there is some time after creating a surface, that it
needs to somehow "settle down" and for the Weston to catch up.
BTW how do you find some consulting services, when it is so new?
Just ask this mailing list :-)
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
are not synchronized.
You see the error because visibility is set before surface got
source region assigned to it, so compositor doesn't know how to render it.
The implementation of the ivi-controller doesn't forbid you to use
the ivi-
protocol (ilm api's are wrapper around it) from different processes,
there
use-cases but in general the should be only one, it should be
application
which will know where and how to render the surface.
The minimalistic example of it is here:
https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_GENIVI_wayland-2Divi-2Dextension_tree_master_ivi-
2Dlayermanagement-2Dexamples_layer-2Dadd-
2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2E
M0&r
=8wfdsMUxnRudpdLb_Cg4rnnnKI-
gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs
&s
=nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
you will see that there are callback available to get to know when
the
client provides a buffer to a ivi-surface and after this
source/destination
and afterwards visibility can be set.
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: genivi-ivi-layer-management <genivi-ivi-layer-management-
bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
Sent: Dienstag, 21. Mai 2019 16:50
To: genivi-ivi-layer-management@lists.genivi.org
Subject: ivi functions not executed immediately?
Hi,
I am using OpenGL to render camera image into a wayland surface,
and I use IVI functions to set the position and size of the surface.
So, I do as described in IVI quick guide:
LayerManagerControl create layer 1 1024 600
LayerManagerControl set screen 0 render order 1
LayerManagerControl set layer 1 render order 5242880
LayerManagerControl set layer 1 visibility 1
LayerManagerControl set surface 5242880 source region 0 0 300 200
LayerManagerControl set surface 5242880 destination region 20
20 600
LayerManagerControl set surface 5242880 visibility 1
And the surface is shown fine.
If I do exactly the same from my C++ program, it works only if I
put sleeps between ILM functions. Something like this:
ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
ilm_commitChanges();
std::this_thread::sleep( 100ms ); and if the sleep is not long
enough, it will not work.
The "LayerManagerControl get scene" will return output as if all
functions were called properly, but what is shown is not what
"LayerManagerControl get scene" returns. For example, somethimes
the source region what is rendered is different from what should be.
Even with sleeps, sometimes it happens that the scene get wrong
Also, I see next lines in weston.log:
[07:29:02.248] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:02.885] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.525] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.178] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
Versions that I use are:
weston: 6.0
IVI: revision 9acdaa1
Wayland: 1.17
The question is, is there a way to somehow bump the ivi shell? I
thought that " ilm_commitChanges();" is supposed to do that, but
Also, what I noticed is that order of functions somehow matters.
For example, if I set the visibility at end, then the image is not shown.
By the way, I set some things from one program (add a surface to a
layer) and other things in another program (set source region).
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
genivi-ivi-layer-management mailing list
genivi-ivi-layer-management@lists.genivi.org
https://urldefense.proofpoint.com/v2/url?u=http-
ailman_listinfo_genivi-2Divi-2Dlayer-
2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmME
Vz
FQxE8kMpAytfQhoigO7PY8&e=
management_lists.genivi.org
Hi
Actually, I was wondering what that "origin size" really is, since I couldn't find any info on that. I do register to that callback, to get the visibility flag. Because if the visibility is 0, then opengl functions are blocking the process.
I do set the window size with "wl_egl_window_resize()", and I see these numbers with "LayerManagerControl get scene". But I am not sure if I have to call "wl_display_dispatch" or " wl_display_flush" or "sl_surface_commit" or anything else after calling "wl_egl_window_resize()". Because, the "original size" is 0x0 - I need to set visibility first, then source and then destination - and only then the origin is set. Do I need to start rendering to set the origin? Or is calling the "eglSwapBuffer " enough?
Do you have a document explaining all this (link or something)? Is there a book describing how exactly to program in ivi and wayland? I couldn't find anything describing IVI in details.
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
> -----Ursprüngliche Nachricht-----
> Von: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>
> Gesendet: Donnerstag, 23. Mai 2019 18:48
> An: Jovic, Vladimir <vladimir.jovic@ifm.com>; genivi-ivi-layer-
> management@lists.genivi.org
> Betreff: RE: ivi functions not executed immediately?
>
> Hi Vladimir,
>
> If you would follow the example application you will see that there is additional
> callback installed to find out the original dimensions of the surface.
> After creation is doesn't have any, only after application will really attach a buffer
> and send this buffer to the compositor (wl_surface_attach , wl-surface_damage,
> wl_surface_comit, wl_display_flush sequence, should be called from you EGL
> driver initiated by eglSwapBuffer call).
>
> This would be the synchronization point which you miss sometimes: setting the
> source region for the surface which doesn't have any size.
> I'm surprised that the position and size are random. Looks like a issue in the ivi-
> shell or ivi-conroller: actually you should never set source or destination without
> having the original size not sure if we documented this somewhere properly, will
> take a look...
>
> Best regards
>
> Eugen Friedrich
> Engineering Software Multimedia 1 (ADITG/ESM1)
>
> Tel. +49 5121 49 6921
> > -----Original Message-----
> > From: Jovic, Vladimir <vladimir.jovic@ifm.com>
> > Sent: Donnerstag, 23. Mai 2019 15:55
> > To: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>;
> > genivi-ivi- layer-management@lists.genivi.org
> > Subject: AW: ivi functions not executed immediately?
> >
> > Hi,
> >
> > In my "windows manager", I do this:
> > void SurfaceCreatedNotificationFunc( ilmObjectType object,
> > t_ilm_uint id,
> > t_ilm_bool created,
> > void* user_data ) {
> > if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
> > {
> > if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
> > {
> > std::cout << __PRETTY_FUNCTION__ << " ilm_layerAddSurface()
> > failed after trying to add a surface to layer\n";
> > }
> > ilm_commitChanges();
> > }
> > }
> > void AutoAddSurfaces()
> > {
> > ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 ); }
> >
> > and that is going to add every created surface to the layer with id 1.
> >
> > Now, I created a script with this content:
> >
> > EGLWLMockNavigation &
> > #sleep 0.005
> > LayerManagerControl set surface 10 source region 0 0 600 400
> > LayerManagerControl set surface 10 destination region 50 40 300 250
> > LayerManagerControl set surface 10 visibility 1
> >
> > Without the sleep, sometimes the shown surface will be at random
> > position with random size, and the " LayerManagerControl get scene" returns
> this:
> > root@pdm3:/home# LayerManagerControl get scene screen 0 (0x0)
> > ---------------------------------------
> > - connector name: Unknown-1
> > - resolution: x=1280, y=480
> > - layer render order: 1(0x1),
> >
> > layer 1 (0x1)
> > ---------------------------------------
> > - destination region: x=0, y=0, w=1280, h=480
> > - source region: x=0, y=0, w=1280, h=480
> > - opacity: 1
> > - visibility: 1
> > - surface render order: 10(0xa),
> > - on screen: 0(0x0)
> >
> > surface 10 (0xa)
> > ---------------------------------------
> > - created by pid: 5820
> > - original size: x=800, y=480
> > - destination region: x=50, y=40, w=300, h=250
> > - source region: x=0, y=0, w=0, h=0
> > - opacity: 1
> > - visibility: 1
> > - frame counter: 169
> > - on layer: 1(0x1)
> >
> >
> > When my "windows manager" is not running, and I do "
> > LayerManagerControl add surface 10 to layer 1" from the script,
> > instead of sleep, then it works every time.
> > So, it looks like there is some time after creating a surface, that it
> > needs to somehow "settle down" and for the Weston to catch up.
> >
> > BTW how do you find some consulting services, when it is so new?
> Just ask this mailing list :-)
>
> >
> > Mit freundlichen Grüßen
> >
> > i. A. Vladimir Jovic
> > ifm ecomatic gmbh
> >
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>
> > > Gesendet: Mittwoch, 22. Mai 2019 09:05
> > > An: Jovic, Vladimir <vladimir.jovic@ifm.com>; genivi-ivi-layer-
> > > management@lists.genivi.org
> > > Betreff: RE: ivi functions not executed immediately?
> > >
> > > Hi Vladimir,
> > >
> > > I would guess that the issue is coming because the calls between
> > > different
> > process
> > > are not synchronized.
> > > You see the error because visibility is set before surface got
> > > source region assigned to it, so compositor doesn't know how to render it.
> > >
> > > The implementation of the ivi-controller doesn't forbid you to use
> > > the ivi-
> > wm
> > > protocol (ilm api's are wrapper around it) from different processes,
> > > there
> > are a few
> > > use-cases but in general the should be only one, it should be
> > > application
> > controller
> > > which will know where and how to render the surface.
> > >
> > > The minimalistic example of it is here:
> > > https://urldefense.proofpoint.com/v2/url?u=https-
> > > 3A__github.com_GENIVI_wayland-2Divi-2Dextension_tree_master_ivi-
> > > 2Dlayermanagement-2Dexamples_layer-2Dadd-
> > >
> > 2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2E
> > M0&r
> > > =8wfdsMUxnRudpdLb_Cg4rnnnKI-
> > >
> > gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs
> > &s
> > > =nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
> > >
> > > you will see that there are callback available to get to know when
> > > the
> > rendering
> > > client provides a buffer to a ivi-surface and after this
> > > source/destination
> > regions
> > > and afterwards visibility can be set.
> > >
> > > Best regards
> > >
> > > Eugen Friedrich
> > > Engineering Software Multimedia 1 (ADITG/ESM1)
> > >
> > > Tel. +49 5121 49 6921
> > >
> > > > -----Original Message-----
> > > > From: genivi-ivi-layer-management <genivi-ivi-layer-management-
> > > > bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
> > > > Sent: Dienstag, 21. Mai 2019 16:50
> > > > To: genivi-ivi-layer-management@lists.genivi.org
> > > > Subject: ivi functions not executed immediately?
> > > >
> > > > Hi,
> > > >
> > > > I am using OpenGL to render camera image into a wayland surface,
> > > > and I use IVI functions to set the position and size of the surface.
> > > > So, I do as described in IVI quick guide:
> > > > LayerManagerControl create layer 1 1024 600
> > > > LayerManagerControl set screen 0 render order 1
> > > > LayerManagerControl set layer 1 render order 5242880
> > > > LayerManagerControl set layer 1 visibility 1
> > > > LayerManagerControl set surface 5242880 source region 0 0 300 200
> > > > LayerManagerControl set surface 5242880 destination region 20
> > > > 20 600
> > 400
> > > > LayerManagerControl set surface 5242880 visibility 1
> > > >
> > > > And the surface is shown fine.
> > > > If I do exactly the same from my C++ program, it works only if I
> > > > put sleeps between ILM functions. Something like this:
> > > > ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
> > > > ilm_commitChanges();
> > > > std::this_thread::sleep( 100ms ); and if the sleep is not long
> > > > enough, it will not work.
> > > > The "LayerManagerControl get scene" will return output as if all
> > > > functions were called properly, but what is shown is not what
> > > > "LayerManagerControl get scene" returns. For example, somethimes
> > > > the source region what is rendered is different from what should be.
> > > > Even with sleeps, sometimes it happens that the scene get wrong
> > numbers.
> > > >
> > > > Also, I see next lines in weston.log:
> > > > [07:29:02.248] ivi-shell: source rectangle is not yet set by
> > > > ivi_layout_surface_set_source_rectangle
> > > > [07:29:02.885] ivi-shell: source rectangle is not yet set by
> > > > ivi_layout_surface_set_source_rectangle
> > > > [07:29:03.525] ivi-shell: source rectangle is not yet set by
> > > > ivi_layout_surface_set_source_rectangle
> > > > [07:29:03.178] ivi-shell: source rectangle is not yet set by
> > > > ivi_layout_surface_set_source_rectangle
> > > >
> > > > Versions that I use are:
> > > > weston: 6.0
> > > > IVI: revision 9acdaa1
> > > > Wayland: 1.17
> > > >
> > > > The question is, is there a way to somehow bump the ivi shell? I
> > > > thought that " ilm_commitChanges();" is supposed to do that, but
> > somehow it
> > > doesn't.
> > > >
> > > > Also, what I noticed is that order of functions somehow matters.
> > > > For example, if I set the visibility at end, then the image is not shown.
> > > >
> > > > By the way, I set some things from one program (add a surface to a
> > > > layer) and other things in another program (set source region).
> > > >
> > > > Mit freundlichen Grüßen
> > > >
> > > > i. A. Vladimir Jovic
> > > >
> > > > ifm ecomatic gmbh
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > genivi-ivi-layer-management mailing list
> > > > genivi-ivi-layer-management@lists.genivi.org
> > > > https://urldefense.proofpoint.com/v2/url?u=http-
> > 3A__lists.genivi.org_m
> > > > ailman_listinfo_genivi-2Divi-2Dlayer-
> > 2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
> > > > lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
> > > gQZ4ykr3tjUrejXg
> > > >
> > >
> > &m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmME
> > Vz
> > > wrB_isOPX7
> > > > FQxE8kMpAytfQhoigO7PY8&e=
> > > > management_lists.genivi.org
> >
>
UE
Ucan, Emre (ADITG/ESM1)
Fri, May 24, 2019 8:13 AM
Hi,
Origin size is the size of the buffer of the surface. Therefore, you have to start to render to set the origin size.
Best regards
Emre Ucan
Engineering Software Multimedia (ADITG/ESM)
Tel. +49 5121 49 6937
-----Original Message-----
From: genivi-ivi-layer-management <genivi-ivi-layer-management-
bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
Sent: Freitag, 24. Mai 2019 09:06
To: Friedrich, Eugen (ADITG/ESM1) efriedrich@de.adit-jv.com; genivi-ivi-
layer-management@lists.genivi.org
Subject: AW: ivi functions not executed immediately?
Hi
Actually, I was wondering what that "origin size" really is, since I couldn't find
any info on that. I do register to that callback, to get the visibility flag.
Because if the visibility is 0, then opengl functions are blocking the process.
I do set the window size with "wl_egl_window_resize()", and I see these
numbers with "LayerManagerControl get scene". But I am not sure if I have
to call "wl_display_dispatch" or " wl_display_flush" or "sl_surface_commit"
or anything else after calling "wl_egl_window_resize()". Because, the
"original size" is 0x0 - I need to set visibility first, then source and then
destination - and only then the origin is set. Do I need to start rendering to
set the origin? Or is calling the "eglSwapBuffer " enough?
Do you have a document explaining all this (link or something)? Is there a
book describing how exactly to program in ivi and wayland? I couldn't find
anything describing IVI in details.
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
callback installed to find out the original dimensions of the surface.
After creation is doesn't have any, only after application will really attach a
and send this buffer to the compositor (wl_surface_attach , wl-
wl_surface_comit, wl_display_flush sequence, should be called from you
driver initiated by eglSwapBuffer call).
This would be the synchronization point which you miss sometimes: setting
source region for the surface which doesn't have any size.
I'm surprised that the position and size are random. Looks like a issue in the
shell or ivi-conroller: actually you should never set source or destination
having the original size not sure if we documented this somewhere
take a look...
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: Jovic, Vladimir vladimir.jovic@ifm.com
Sent: Donnerstag, 23. Mai 2019 15:55
To: Friedrich, Eugen (ADITG/ESM1) efriedrich@de.adit-jv.com;
genivi-ivi- layer-management@lists.genivi.org
Subject: AW: ivi functions not executed immediately?
Hi,
In my "windows manager", I do this:
void SurfaceCreatedNotificationFunc( ilmObjectType object,
t_ilm_uint id,
t_ilm_bool created,
void* user_data ) {
if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
{
if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
{
std::cout << PRETTY_FUNCTION << " ilm_layerAddSurface()
failed after trying to add a surface to layer\n";
}
ilm_commitChanges();
}
}
void AutoAddSurfaces()
{
ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 ); }
and that is going to add every created surface to the layer with id 1.
Now, I created a script with this content:
EGLWLMockNavigation &
#sleep 0.005
LayerManagerControl set surface 10 source region 0 0 600 400
LayerManagerControl set surface 10 destination region 50 40 300 250
LayerManagerControl set surface 10 visibility 1
Without the sleep, sometimes the shown surface will be at random
position with random size, and the " LayerManagerControl get scene"
root@pdm3:/home# LayerManagerControl get scene screen 0 (0x0)
-
connector name: Unknown-1
-
resolution: x=1280, y=480
-
layer render order: 1(0x1),
layer 1 (0x1)
-
destination region: x=0, y=0, w=1280, h=480
-
source region: x=0, y=0, w=1280, h=480
-
opacity: 1
-
visibility: 1
-
surface render order: 10(0xa),
-
on screen: 0(0x0)
surface 10 (0xa)
- created by pid: 5820
- original size: x=800, y=480
- destination region: x=50, y=40, w=300, h=250
- source region: x=0, y=0, w=0, h=0
- opacity: 1
- visibility: 1
- frame counter: 169
- on layer: 1(0x1)
When my "windows manager" is not running, and I do "
LayerManagerControl add surface 10 to layer 1" from the script,
instead of sleep, then it works every time.
So, it looks like there is some time after creating a surface, that it
needs to somehow "settle down" and for the Weston to catch up.
BTW how do you find some consulting services, when it is so new?
Just ask this mailing list :-)
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
are not synchronized.
You see the error because visibility is set before surface got
source region assigned to it, so compositor doesn't know how to render
The implementation of the ivi-controller doesn't forbid you to use
the ivi-
protocol (ilm api's are wrapper around it) from different processes,
there
use-cases but in general the should be only one, it should be
application
2Dextension_tree_master_ivi-
2Dlayermanagement-2Dexamples_layer-2Dadd-
2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2E
=8wfdsMUxnRudpdLb_Cg4rnnnKI-
gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs
=nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
you will see that there are callback available to get to know when
the
client provides a buffer to a ivi-surface and after this
source/destination
and afterwards visibility can be set.
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: genivi-ivi-layer-management <genivi-ivi-layer-management-
bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
Sent: Dienstag, 21. Mai 2019 16:50
To: genivi-ivi-layer-management@lists.genivi.org
Subject: ivi functions not executed immediately?
Hi,
I am using OpenGL to render camera image into a wayland surface,
and I use IVI functions to set the position and size of the surface.
So, I do as described in IVI quick guide:
LayerManagerControl create layer 1 1024 600
LayerManagerControl set screen 0 render order 1
LayerManagerControl set layer 1 render order 5242880
LayerManagerControl set layer 1 visibility 1
LayerManagerControl set surface 5242880 source region 0 0 300 200
LayerManagerControl set surface 5242880 destination region 20
20 600
LayerManagerControl set surface 5242880 visibility 1
And the surface is shown fine.
If I do exactly the same from my C++ program, it works only if I
put sleeps between ILM functions. Something like this:
ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
ilm_commitChanges();
std::this_thread::sleep( 100ms ); and if the sleep is not long
enough, it will not work.
The "LayerManagerControl get scene" will return output as if all
functions were called properly, but what is shown is not what
"LayerManagerControl get scene" returns. For example, somethimes
the source region what is rendered is different from what should be.
Even with sleeps, sometimes it happens that the scene get wrong
Also, I see next lines in weston.log:
[07:29:02.248] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:02.885] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.525] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.178] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
Versions that I use are:
weston: 6.0
IVI: revision 9acdaa1
Wayland: 1.17
The question is, is there a way to somehow bump the ivi shell? I
thought that " ilm_commitChanges();" is supposed to do that, but
Also, what I noticed is that order of functions somehow matters.
For example, if I set the visibility at end, then the image is not shown.
By the way, I set some things from one program (add a surface to a
layer) and other things in another program (set source region).
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
genivi-ivi-layer-management mailing list
genivi-ivi-layer-management@lists.genivi.org
https://urldefense.proofpoint.com/v2/url?u=http-
ailman_listinfo_genivi-2Divi-2Dlayer-
2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmME
FQxE8kMpAytfQhoigO7PY8&e=
management_lists.genivi.org
Hi,
Origin size is the size of the buffer of the surface. Therefore, you have to start to render to set the origin size.
Best regards
Emre Ucan
Engineering Software Multimedia (ADITG/ESM)
Tel. +49 5121 49 6937
> -----Original Message-----
> From: genivi-ivi-layer-management <genivi-ivi-layer-management-
> bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
> Sent: Freitag, 24. Mai 2019 09:06
> To: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>; genivi-ivi-
> layer-management@lists.genivi.org
> Subject: AW: ivi functions not executed immediately?
>
> Hi
>
> Actually, I was wondering what that "origin size" really is, since I couldn't find
> any info on that. I do register to that callback, to get the visibility flag.
> Because if the visibility is 0, then opengl functions are blocking the process.
>
> I do set the window size with "wl_egl_window_resize()", and I see these
> numbers with "LayerManagerControl get scene". But I am not sure if I have
> to call "wl_display_dispatch" or " wl_display_flush" or "sl_surface_commit"
> or anything else after calling "wl_egl_window_resize()". Because, the
> "original size" is 0x0 - I need to set visibility first, then source and then
> destination - and only then the origin is set. Do I need to start rendering to
> set the origin? Or is calling the "eglSwapBuffer " enough?
>
> Do you have a document explaining all this (link or something)? Is there a
> book describing how exactly to program in ivi and wayland? I couldn't find
> anything describing IVI in details.
>
>
>
> Mit freundlichen Grüßen
>
> i. A. Vladimir Jovic
> ifm ecomatic gmbh
>
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>
> > Gesendet: Donnerstag, 23. Mai 2019 18:48
> > An: Jovic, Vladimir <vladimir.jovic@ifm.com>; genivi-ivi-layer-
> > management@lists.genivi.org
> > Betreff: RE: ivi functions not executed immediately?
> >
> > Hi Vladimir,
> >
> > If you would follow the example application you will see that there is
> additional
> > callback installed to find out the original dimensions of the surface.
> > After creation is doesn't have any, only after application will really attach a
> buffer
> > and send this buffer to the compositor (wl_surface_attach , wl-
> surface_damage,
> > wl_surface_comit, wl_display_flush sequence, should be called from you
> EGL
> > driver initiated by eglSwapBuffer call).
> >
> > This would be the synchronization point which you miss sometimes: setting
> the
> > source region for the surface which doesn't have any size.
> > I'm surprised that the position and size are random. Looks like a issue in the
> ivi-
> > shell or ivi-conroller: actually you should never set source or destination
> without
> > having the original size not sure if we documented this somewhere
> properly, will
> > take a look...
> >
> > Best regards
> >
> > Eugen Friedrich
> > Engineering Software Multimedia 1 (ADITG/ESM1)
> >
> > Tel. +49 5121 49 6921
> > > -----Original Message-----
> > > From: Jovic, Vladimir <vladimir.jovic@ifm.com>
> > > Sent: Donnerstag, 23. Mai 2019 15:55
> > > To: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>;
> > > genivi-ivi- layer-management@lists.genivi.org
> > > Subject: AW: ivi functions not executed immediately?
> > >
> > > Hi,
> > >
> > > In my "windows manager", I do this:
> > > void SurfaceCreatedNotificationFunc( ilmObjectType object,
> > > t_ilm_uint id,
> > > t_ilm_bool created,
> > > void* user_data ) {
> > > if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
> > > {
> > > if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
> > > {
> > > std::cout << __PRETTY_FUNCTION__ << " ilm_layerAddSurface()
> > > failed after trying to add a surface to layer\n";
> > > }
> > > ilm_commitChanges();
> > > }
> > > }
> > > void AutoAddSurfaces()
> > > {
> > > ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 ); }
> > >
> > > and that is going to add every created surface to the layer with id 1.
> > >
> > > Now, I created a script with this content:
> > >
> > > EGLWLMockNavigation &
> > > #sleep 0.005
> > > LayerManagerControl set surface 10 source region 0 0 600 400
> > > LayerManagerControl set surface 10 destination region 50 40 300 250
> > > LayerManagerControl set surface 10 visibility 1
> > >
> > > Without the sleep, sometimes the shown surface will be at random
> > > position with random size, and the " LayerManagerControl get scene"
> returns
> > this:
> > > root@pdm3:/home# LayerManagerControl get scene screen 0 (0x0)
> > > ---------------------------------------
> > > - connector name: Unknown-1
> > > - resolution: x=1280, y=480
> > > - layer render order: 1(0x1),
> > >
> > > layer 1 (0x1)
> > > ---------------------------------------
> > > - destination region: x=0, y=0, w=1280, h=480
> > > - source region: x=0, y=0, w=1280, h=480
> > > - opacity: 1
> > > - visibility: 1
> > > - surface render order: 10(0xa),
> > > - on screen: 0(0x0)
> > >
> > > surface 10 (0xa)
> > > ---------------------------------------
> > > - created by pid: 5820
> > > - original size: x=800, y=480
> > > - destination region: x=50, y=40, w=300, h=250
> > > - source region: x=0, y=0, w=0, h=0
> > > - opacity: 1
> > > - visibility: 1
> > > - frame counter: 169
> > > - on layer: 1(0x1)
> > >
> > >
> > > When my "windows manager" is not running, and I do "
> > > LayerManagerControl add surface 10 to layer 1" from the script,
> > > instead of sleep, then it works every time.
> > > So, it looks like there is some time after creating a surface, that it
> > > needs to somehow "settle down" and for the Weston to catch up.
> > >
> > > BTW how do you find some consulting services, when it is so new?
> > Just ask this mailing list :-)
> >
> > >
> > > Mit freundlichen Grüßen
> > >
> > > i. A. Vladimir Jovic
> > > ifm ecomatic gmbh
> > >
> > >
> > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>
> > > > Gesendet: Mittwoch, 22. Mai 2019 09:05
> > > > An: Jovic, Vladimir <vladimir.jovic@ifm.com>; genivi-ivi-layer-
> > > > management@lists.genivi.org
> > > > Betreff: RE: ivi functions not executed immediately?
> > > >
> > > > Hi Vladimir,
> > > >
> > > > I would guess that the issue is coming because the calls between
> > > > different
> > > process
> > > > are not synchronized.
> > > > You see the error because visibility is set before surface got
> > > > source region assigned to it, so compositor doesn't know how to render
> it.
> > > >
> > > > The implementation of the ivi-controller doesn't forbid you to use
> > > > the ivi-
> > > wm
> > > > protocol (ilm api's are wrapper around it) from different processes,
> > > > there
> > > are a few
> > > > use-cases but in general the should be only one, it should be
> > > > application
> > > controller
> > > > which will know where and how to render the surface.
> > > >
> > > > The minimalistic example of it is here:
> > > > https://urldefense.proofpoint.com/v2/url?u=https-
> > > > 3A__github.com_GENIVI_wayland-2Divi-
> 2Dextension_tree_master_ivi-
> > > > 2Dlayermanagement-2Dexamples_layer-2Dadd-
> > > >
> > >
> 2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2E
> > > M0&r
> > > > =8wfdsMUxnRudpdLb_Cg4rnnnKI-
> > > >
> > >
> gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs
> > > &s
> > > > =nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
> > > >
> > > > you will see that there are callback available to get to know when
> > > > the
> > > rendering
> > > > client provides a buffer to a ivi-surface and after this
> > > > source/destination
> > > regions
> > > > and afterwards visibility can be set.
> > > >
> > > > Best regards
> > > >
> > > > Eugen Friedrich
> > > > Engineering Software Multimedia 1 (ADITG/ESM1)
> > > >
> > > > Tel. +49 5121 49 6921
> > > >
> > > > > -----Original Message-----
> > > > > From: genivi-ivi-layer-management <genivi-ivi-layer-management-
> > > > > bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
> > > > > Sent: Dienstag, 21. Mai 2019 16:50
> > > > > To: genivi-ivi-layer-management@lists.genivi.org
> > > > > Subject: ivi functions not executed immediately?
> > > > >
> > > > > Hi,
> > > > >
> > > > > I am using OpenGL to render camera image into a wayland surface,
> > > > > and I use IVI functions to set the position and size of the surface.
> > > > > So, I do as described in IVI quick guide:
> > > > > LayerManagerControl create layer 1 1024 600
> > > > > LayerManagerControl set screen 0 render order 1
> > > > > LayerManagerControl set layer 1 render order 5242880
> > > > > LayerManagerControl set layer 1 visibility 1
> > > > > LayerManagerControl set surface 5242880 source region 0 0 300 200
> > > > > LayerManagerControl set surface 5242880 destination region 20
> > > > > 20 600
> > > 400
> > > > > LayerManagerControl set surface 5242880 visibility 1
> > > > >
> > > > > And the surface is shown fine.
> > > > > If I do exactly the same from my C++ program, it works only if I
> > > > > put sleeps between ILM functions. Something like this:
> > > > > ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
> > > > > ilm_commitChanges();
> > > > > std::this_thread::sleep( 100ms ); and if the sleep is not long
> > > > > enough, it will not work.
> > > > > The "LayerManagerControl get scene" will return output as if all
> > > > > functions were called properly, but what is shown is not what
> > > > > "LayerManagerControl get scene" returns. For example, somethimes
> > > > > the source region what is rendered is different from what should be.
> > > > > Even with sleeps, sometimes it happens that the scene get wrong
> > > numbers.
> > > > >
> > > > > Also, I see next lines in weston.log:
> > > > > [07:29:02.248] ivi-shell: source rectangle is not yet set by
> > > > > ivi_layout_surface_set_source_rectangle
> > > > > [07:29:02.885] ivi-shell: source rectangle is not yet set by
> > > > > ivi_layout_surface_set_source_rectangle
> > > > > [07:29:03.525] ivi-shell: source rectangle is not yet set by
> > > > > ivi_layout_surface_set_source_rectangle
> > > > > [07:29:03.178] ivi-shell: source rectangle is not yet set by
> > > > > ivi_layout_surface_set_source_rectangle
> > > > >
> > > > > Versions that I use are:
> > > > > weston: 6.0
> > > > > IVI: revision 9acdaa1
> > > > > Wayland: 1.17
> > > > >
> > > > > The question is, is there a way to somehow bump the ivi shell? I
> > > > > thought that " ilm_commitChanges();" is supposed to do that, but
> > > somehow it
> > > > doesn't.
> > > > >
> > > > > Also, what I noticed is that order of functions somehow matters.
> > > > > For example, if I set the visibility at end, then the image is not shown.
> > > > >
> > > > > By the way, I set some things from one program (add a surface to a
> > > > > layer) and other things in another program (set source region).
> > > > >
> > > > > Mit freundlichen Grüßen
> > > > >
> > > > > i. A. Vladimir Jovic
> > > > >
> > > > > ifm ecomatic gmbh
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > genivi-ivi-layer-management mailing list
> > > > > genivi-ivi-layer-management@lists.genivi.org
> > > > > https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__lists.genivi.org_m
> > > > > ailman_listinfo_genivi-2Divi-2Dlayer-
> > > 2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
> > > > > lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
> > > > gQZ4ykr3tjUrejXg
> > > > >
> > > >
> > >
> &m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmME
> > > Vz
> > > > wrB_isOPX7
> > > > > FQxE8kMpAytfQhoigO7PY8&e=
> > > > > management_lists.genivi.org
> > >
> >
>
>
>
> _______________________________________________
> genivi-ivi-layer-management mailing list
> genivi-ivi-layer-management@lists.genivi.org
> http://lists.genivi.org/mailman/listinfo/genivi-ivi-layer-
> management_lists.genivi.org
JV
Jovic, Vladimir
Fri, May 24, 2019 8:33 AM
Hi,
So, in order to set the "origin size", I need to start rendering. But to start rendering, I need to set the visibility, otherwise opengl blocks. To set the visibility, I need to set both source and destination regions. Source and destination can't be set before origin is set.
That means that something bellow, what I was told, to do is wrong.
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
-----Original Message-----
From: genivi-ivi-layer-management <genivi-ivi-layer-management-
bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
Sent: Freitag, 24. Mai 2019 09:06
To: Friedrich, Eugen (ADITG/ESM1) efriedrich@de.adit-jv.com;
genivi-ivi- layer-management@lists.genivi.org
Subject: AW: ivi functions not executed immediately?
Hi
Actually, I was wondering what that "origin size" really is, since I
couldn't find any info on that. I do register to that callback, to get the visibility
Because if the visibility is 0, then opengl functions are blocking the process.
I do set the window size with "wl_egl_window_resize()", and I see
these numbers with "LayerManagerControl get scene". But I am not sure
if I have to call "wl_display_dispatch" or " wl_display_flush" or
or anything else after calling "wl_egl_window_resize()". Because, the
"original size" is 0x0 - I need to set visibility first, then source
and then destination - and only then the origin is set. Do I need to
start rendering to set the origin? Or is calling the "eglSwapBuffer " enough?
Do you have a document explaining all this (link or something)? Is
there a book describing how exactly to program in ivi and wayland? I
couldn't find anything describing IVI in details.
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
callback installed to find out the original dimensions of the surface.
After creation is doesn't have any, only after application will
really attach a
and send this buffer to the compositor (wl_surface_attach , wl-
wl_surface_comit, wl_display_flush sequence, should be called from
you
driver initiated by eglSwapBuffer call).
This would be the synchronization point which you miss sometimes:
setting
source region for the surface which doesn't have any size.
I'm surprised that the position and size are random. Looks like a
issue in the
shell or ivi-conroller: actually you should never set source or
destination
having the original size not sure if we documented this somewhere
take a look...
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: Jovic, Vladimir vladimir.jovic@ifm.com
Sent: Donnerstag, 23. Mai 2019 15:55
To: Friedrich, Eugen (ADITG/ESM1) efriedrich@de.adit-jv.com;
genivi-ivi- layer-management@lists.genivi.org
Subject: AW: ivi functions not executed immediately?
Hi,
In my "windows manager", I do this:
void SurfaceCreatedNotificationFunc( ilmObjectType object,
t_ilm_uint id,
t_ilm_bool created,
void* user_data ) {
if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
{
if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
{
std::cout << PRETTY_FUNCTION << " ilm_layerAddSurface()
failed after trying to add a surface to layer\n";
}
ilm_commitChanges();
}
}
void AutoAddSurfaces()
{
ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 );
}
and that is going to add every created surface to the layer with id 1.
Now, I created a script with this content:
EGLWLMockNavigation &
#sleep 0.005
LayerManagerControl set surface 10 source region 0 0 600 400
LayerManagerControl set surface 10 destination region 50 40 300
250 LayerManagerControl set surface 10 visibility 1
Without the sleep, sometimes the shown surface will be at random
position with random size, and the " LayerManagerControl get scene"
root@pdm3:/home# LayerManagerControl get scene screen 0 (0x0)
-
connector name: Unknown-1
-
resolution: x=1280, y=480
-
layer render order: 1(0x1),
layer 1 (0x1)
-
destination region: x=0, y=0, w=1280, h=480
-
source region: x=0, y=0, w=1280, h=480
-
opacity: 1
-
visibility: 1
-
surface render order: 10(0xa),
-
on screen: 0(0x0)
surface 10 (0xa)
- created by pid: 5820
- original size: x=800, y=480
- destination region: x=50, y=40, w=300, h=250
- source region: x=0, y=0, w=0, h=0
- opacity: 1
- visibility: 1
- frame counter: 169
- on layer: 1(0x1)
When my "windows manager" is not running, and I do "
LayerManagerControl add surface 10 to layer 1" from the script,
instead of sleep, then it works every time.
So, it looks like there is some time after creating a surface,
that it needs to somehow "settle down" and for the Weston to catch up.
BTW how do you find some consulting services, when it is so new?
Just ask this mailing list :-)
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
are not synchronized.
You see the error because visibility is set before surface got
source region assigned to it, so compositor doesn't know how to
render
The implementation of the ivi-controller doesn't forbid you to
use the ivi-
protocol (ilm api's are wrapper around it) from different
processes, there
use-cases but in general the should be only one, it should be
application
2Dextension_tree_master_ivi-
2Dlayermanagement-2Dexamples_layer-2Dadd-
2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2E
=8wfdsMUxnRudpdLb_Cg4rnnnKI-
gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs
=nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
you will see that there are callback available to get to know
when the
client provides a buffer to a ivi-surface and after this
source/destination
and afterwards visibility can be set.
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: genivi-ivi-layer-management
<genivi-ivi-layer-management- bounces@lists.genivi.org> On
Behalf Of Jovic, Vladimir
Sent: Dienstag, 21. Mai 2019 16:50
To: genivi-ivi-layer-management@lists.genivi.org
Subject: ivi functions not executed immediately?
Hi,
I am using OpenGL to render camera image into a wayland
surface, and I use IVI functions to set the position and size of the
So, I do as described in IVI quick guide:
LayerManagerControl create layer 1 1024 600
LayerManagerControl set screen 0 render order 1
LayerManagerControl set layer 1 render order 5242880
LayerManagerControl set layer 1 visibility 1
LayerManagerControl set surface 5242880 source region 0 0 300 200
LayerManagerControl set surface 5242880 destination region
20
20 600
LayerManagerControl set surface 5242880 visibility 1
And the surface is shown fine.
If I do exactly the same from my C++ program, it works only if
I put sleeps between ILM functions. Something like this:
ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
ilm_commitChanges();
std::this_thread::sleep( 100ms ); and if the sleep is not
long enough, it will not work.
The "LayerManagerControl get scene" will return output as if
all functions were called properly, but what is shown is not
what "LayerManagerControl get scene" returns. For example,
somethimes the source region what is rendered is different from what
Even with sleeps, sometimes it happens that the scene get
wrong
Also, I see next lines in weston.log:
[07:29:02.248] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:02.885] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.525] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.178] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
Versions that I use are:
weston: 6.0
IVI: revision 9acdaa1
Wayland: 1.17
The question is, is there a way to somehow bump the ivi shell?
I thought that " ilm_commitChanges();" is supposed to do that,
but
Also, what I noticed is that order of functions somehow matters.
For example, if I set the visibility at end, then the image is not shown.
By the way, I set some things from one program (add a surface
to a
layer) and other things in another program (set source region).
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
genivi-ivi-layer-management mailing list
genivi-ivi-layer-management@lists.genivi.org
https://urldefense.proofpoint.com/v2/url?u=http-
ailman_listinfo_genivi-2Divi-2Dlayer-
2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmME
FQxE8kMpAytfQhoigO7PY8&e=
management_lists.genivi.org
&m=3uigexTynM1KYbjVAwQ0MZeGfnSZUU32vWqG_ytgYVQ&s=UV4fR6P3ndYPu
Wx__t3vS
s1_u-jAFWe4gkRHSLE6MZ4&e=
management_lists.genivi.org
Hi,
So, in order to set the "origin size", I need to start rendering. But to start rendering, I need to set the visibility, otherwise opengl blocks. To set the visibility, I need to set both source and destination regions. Source and destination can't be set before origin is set.
That means that something bellow, what I was told, to do is wrong.
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
> -----Ursprüngliche Nachricht-----
> Von: Ucan, Emre (ADITG/ESM1) <eucan@de.adit-jv.com>
> Gesendet: Freitag, 24. Mai 2019 10:14
> An: Jovic, Vladimir <vladimir.jovic@ifm.com>; Friedrich, Eugen (ADITG/ESM1)
> <efriedrich@de.adit-jv.com>; genivi-ivi-layer-management@lists.genivi.org
> Betreff: RE: ivi functions not executed immediately?
>
> Hi,
>
> Origin size is the size of the buffer of the surface. Therefore, you have to start to
> render to set the origin size.
>
> Best regards
>
> Emre Ucan
> Engineering Software Multimedia (ADITG/ESM)
>
> Tel. +49 5121 49 6937
> > -----Original Message-----
> > From: genivi-ivi-layer-management <genivi-ivi-layer-management-
> > bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
> > Sent: Freitag, 24. Mai 2019 09:06
> > To: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>;
> > genivi-ivi- layer-management@lists.genivi.org
> > Subject: AW: ivi functions not executed immediately?
> >
> > Hi
> >
> > Actually, I was wondering what that "origin size" really is, since I
> > couldn't find any info on that. I do register to that callback, to get the visibility
> flag.
> > Because if the visibility is 0, then opengl functions are blocking the process.
> >
> > I do set the window size with "wl_egl_window_resize()", and I see
> > these numbers with "LayerManagerControl get scene". But I am not sure
> > if I have to call "wl_display_dispatch" or " wl_display_flush" or
> "sl_surface_commit"
> > or anything else after calling "wl_egl_window_resize()". Because, the
> > "original size" is 0x0 - I need to set visibility first, then source
> > and then destination - and only then the origin is set. Do I need to
> > start rendering to set the origin? Or is calling the "eglSwapBuffer " enough?
> >
> > Do you have a document explaining all this (link or something)? Is
> > there a book describing how exactly to program in ivi and wayland? I
> > couldn't find anything describing IVI in details.
> >
> >
> >
> > Mit freundlichen Grüßen
> >
> > i. A. Vladimir Jovic
> > ifm ecomatic gmbh
> >
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>
> > > Gesendet: Donnerstag, 23. Mai 2019 18:48
> > > An: Jovic, Vladimir <vladimir.jovic@ifm.com>; genivi-ivi-layer-
> > > management@lists.genivi.org
> > > Betreff: RE: ivi functions not executed immediately?
> > >
> > > Hi Vladimir,
> > >
> > > If you would follow the example application you will see that there
> > > is
> > additional
> > > callback installed to find out the original dimensions of the surface.
> > > After creation is doesn't have any, only after application will
> > > really attach a
> > buffer
> > > and send this buffer to the compositor (wl_surface_attach , wl-
> > surface_damage,
> > > wl_surface_comit, wl_display_flush sequence, should be called from
> > > you
> > EGL
> > > driver initiated by eglSwapBuffer call).
> > >
> > > This would be the synchronization point which you miss sometimes:
> > > setting
> > the
> > > source region for the surface which doesn't have any size.
> > > I'm surprised that the position and size are random. Looks like a
> > > issue in the
> > ivi-
> > > shell or ivi-conroller: actually you should never set source or
> > > destination
> > without
> > > having the original size not sure if we documented this somewhere
> > properly, will
> > > take a look...
> > >
> > > Best regards
> > >
> > > Eugen Friedrich
> > > Engineering Software Multimedia 1 (ADITG/ESM1)
> > >
> > > Tel. +49 5121 49 6921
> > > > -----Original Message-----
> > > > From: Jovic, Vladimir <vladimir.jovic@ifm.com>
> > > > Sent: Donnerstag, 23. Mai 2019 15:55
> > > > To: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>;
> > > > genivi-ivi- layer-management@lists.genivi.org
> > > > Subject: AW: ivi functions not executed immediately?
> > > >
> > > > Hi,
> > > >
> > > > In my "windows manager", I do this:
> > > > void SurfaceCreatedNotificationFunc( ilmObjectType object,
> > > > t_ilm_uint id,
> > > > t_ilm_bool created,
> > > > void* user_data ) {
> > > > if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
> > > > {
> > > > if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
> > > > {
> > > > std::cout << __PRETTY_FUNCTION__ << " ilm_layerAddSurface()
> > > > failed after trying to add a surface to layer\n";
> > > > }
> > > > ilm_commitChanges();
> > > > }
> > > > }
> > > > void AutoAddSurfaces()
> > > > {
> > > > ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 );
> > > > }
> > > >
> > > > and that is going to add every created surface to the layer with id 1.
> > > >
> > > > Now, I created a script with this content:
> > > >
> > > > EGLWLMockNavigation &
> > > > #sleep 0.005
> > > > LayerManagerControl set surface 10 source region 0 0 600 400
> > > > LayerManagerControl set surface 10 destination region 50 40 300
> > > > 250 LayerManagerControl set surface 10 visibility 1
> > > >
> > > > Without the sleep, sometimes the shown surface will be at random
> > > > position with random size, and the " LayerManagerControl get scene"
> > returns
> > > this:
> > > > root@pdm3:/home# LayerManagerControl get scene screen 0 (0x0)
> > > > ---------------------------------------
> > > > - connector name: Unknown-1
> > > > - resolution: x=1280, y=480
> > > > - layer render order: 1(0x1),
> > > >
> > > > layer 1 (0x1)
> > > > ---------------------------------------
> > > > - destination region: x=0, y=0, w=1280, h=480
> > > > - source region: x=0, y=0, w=1280, h=480
> > > > - opacity: 1
> > > > - visibility: 1
> > > > - surface render order: 10(0xa),
> > > > - on screen: 0(0x0)
> > > >
> > > > surface 10 (0xa)
> > > > ---------------------------------------
> > > > - created by pid: 5820
> > > > - original size: x=800, y=480
> > > > - destination region: x=50, y=40, w=300, h=250
> > > > - source region: x=0, y=0, w=0, h=0
> > > > - opacity: 1
> > > > - visibility: 1
> > > > - frame counter: 169
> > > > - on layer: 1(0x1)
> > > >
> > > >
> > > > When my "windows manager" is not running, and I do "
> > > > LayerManagerControl add surface 10 to layer 1" from the script,
> > > > instead of sleep, then it works every time.
> > > > So, it looks like there is some time after creating a surface,
> > > > that it needs to somehow "settle down" and for the Weston to catch up.
> > > >
> > > > BTW how do you find some consulting services, when it is so new?
> > > Just ask this mailing list :-)
> > >
> > > >
> > > > Mit freundlichen Grüßen
> > > >
> > > > i. A. Vladimir Jovic
> > > > ifm ecomatic gmbh
> > > >
> > > >
> > > >
> > > > > -----Ursprüngliche Nachricht-----
> > > > > Von: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>
> > > > > Gesendet: Mittwoch, 22. Mai 2019 09:05
> > > > > An: Jovic, Vladimir <vladimir.jovic@ifm.com>; genivi-ivi-layer-
> > > > > management@lists.genivi.org
> > > > > Betreff: RE: ivi functions not executed immediately?
> > > > >
> > > > > Hi Vladimir,
> > > > >
> > > > > I would guess that the issue is coming because the calls between
> > > > > different
> > > > process
> > > > > are not synchronized.
> > > > > You see the error because visibility is set before surface got
> > > > > source region assigned to it, so compositor doesn't know how to
> > > > > render
> > it.
> > > > >
> > > > > The implementation of the ivi-controller doesn't forbid you to
> > > > > use the ivi-
> > > > wm
> > > > > protocol (ilm api's are wrapper around it) from different
> > > > > processes, there
> > > > are a few
> > > > > use-cases but in general the should be only one, it should be
> > > > > application
> > > > controller
> > > > > which will know where and how to render the surface.
> > > > >
> > > > > The minimalistic example of it is here:
> > > > > https://urldefense.proofpoint.com/v2/url?u=https-
> > > > > 3A__github.com_GENIVI_wayland-2Divi-
> > 2Dextension_tree_master_ivi-
> > > > > 2Dlayermanagement-2Dexamples_layer-2Dadd-
> > > > >
> > > >
> > 2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2E
> > > > M0&r
> > > > > =8wfdsMUxnRudpdLb_Cg4rnnnKI-
> > > > >
> > > >
> > gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs
> > > > &s
> > > > > =nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
> > > > >
> > > > > you will see that there are callback available to get to know
> > > > > when the
> > > > rendering
> > > > > client provides a buffer to a ivi-surface and after this
> > > > > source/destination
> > > > regions
> > > > > and afterwards visibility can be set.
> > > > >
> > > > > Best regards
> > > > >
> > > > > Eugen Friedrich
> > > > > Engineering Software Multimedia 1 (ADITG/ESM1)
> > > > >
> > > > > Tel. +49 5121 49 6921
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: genivi-ivi-layer-management
> > > > > > <genivi-ivi-layer-management- bounces@lists.genivi.org> On
> > > > > > Behalf Of Jovic, Vladimir
> > > > > > Sent: Dienstag, 21. Mai 2019 16:50
> > > > > > To: genivi-ivi-layer-management@lists.genivi.org
> > > > > > Subject: ivi functions not executed immediately?
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I am using OpenGL to render camera image into a wayland
> > > > > > surface, and I use IVI functions to set the position and size of the
> surface.
> > > > > > So, I do as described in IVI quick guide:
> > > > > > LayerManagerControl create layer 1 1024 600
> > > > > > LayerManagerControl set screen 0 render order 1
> > > > > > LayerManagerControl set layer 1 render order 5242880
> > > > > > LayerManagerControl set layer 1 visibility 1
> > > > > > LayerManagerControl set surface 5242880 source region 0 0 300 200
> > > > > > LayerManagerControl set surface 5242880 destination region
> > > > > > 20
> > > > > > 20 600
> > > > 400
> > > > > > LayerManagerControl set surface 5242880 visibility 1
> > > > > >
> > > > > > And the surface is shown fine.
> > > > > > If I do exactly the same from my C++ program, it works only if
> > > > > > I put sleeps between ILM functions. Something like this:
> > > > > > ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
> > > > > > ilm_commitChanges();
> > > > > > std::this_thread::sleep( 100ms ); and if the sleep is not
> > > > > > long enough, it will not work.
> > > > > > The "LayerManagerControl get scene" will return output as if
> > > > > > all functions were called properly, but what is shown is not
> > > > > > what "LayerManagerControl get scene" returns. For example,
> > > > > > somethimes the source region what is rendered is different from what
> should be.
> > > > > > Even with sleeps, sometimes it happens that the scene get
> > > > > > wrong
> > > > numbers.
> > > > > >
> > > > > > Also, I see next lines in weston.log:
> > > > > > [07:29:02.248] ivi-shell: source rectangle is not yet set by
> > > > > > ivi_layout_surface_set_source_rectangle
> > > > > > [07:29:02.885] ivi-shell: source rectangle is not yet set by
> > > > > > ivi_layout_surface_set_source_rectangle
> > > > > > [07:29:03.525] ivi-shell: source rectangle is not yet set by
> > > > > > ivi_layout_surface_set_source_rectangle
> > > > > > [07:29:03.178] ivi-shell: source rectangle is not yet set by
> > > > > > ivi_layout_surface_set_source_rectangle
> > > > > >
> > > > > > Versions that I use are:
> > > > > > weston: 6.0
> > > > > > IVI: revision 9acdaa1
> > > > > > Wayland: 1.17
> > > > > >
> > > > > > The question is, is there a way to somehow bump the ivi shell?
> > > > > > I thought that " ilm_commitChanges();" is supposed to do that,
> > > > > > but
> > > > somehow it
> > > > > doesn't.
> > > > > >
> > > > > > Also, what I noticed is that order of functions somehow matters.
> > > > > > For example, if I set the visibility at end, then the image is not shown.
> > > > > >
> > > > > > By the way, I set some things from one program (add a surface
> > > > > > to a
> > > > > > layer) and other things in another program (set source region).
> > > > > >
> > > > > > Mit freundlichen Grüßen
> > > > > >
> > > > > > i. A. Vladimir Jovic
> > > > > >
> > > > > > ifm ecomatic gmbh
> > > > > >
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > genivi-ivi-layer-management mailing list
> > > > > > genivi-ivi-layer-management@lists.genivi.org
> > > > > > https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__lists.genivi.org_m
> > > > > > ailman_listinfo_genivi-2Divi-2Dlayer-
> > > > 2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
> > > > > > lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
> > > > > gQZ4ykr3tjUrejXg
> > > > > >
> > > > >
> > > >
> > &m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmME
> > > > Vz
> > > > > wrB_isOPX7
> > > > > > FQxE8kMpAytfQhoigO7PY8&e=
> > > > > > management_lists.genivi.org
> > > >
> > >
> >
> >
> >
> > _______________________________________________
> > genivi-ivi-layer-management mailing list
> > genivi-ivi-layer-management@lists.genivi.org
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.genivi.org_m
> > ailman_listinfo_genivi-2Divi-2Dlayer-2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
> > lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
> gQZ4ykr3tjUrejXg
> >
> &m=3uigexTynM1KYbjVAwQ0MZeGfnSZUU32vWqG_ytgYVQ&s=UV4fR6P3ndYPu
> Wx__t3vS
> > s1_u-jAFWe4gkRHSLE6MZ4&e=
> > management_lists.genivi.org
FE
Friedrich, Eugen (ADITG/ESM1)
Fri, May 24, 2019 9:06 AM
Hi Vladimir,
The EGL implementation will block only after sending a first buffer it blocks on the second eglSwapBuffer call(you can maybe verify this with your driver), also you can run it in "unblocking mode", for testing, just set the eglSwapInterval to 0.
EGL is blocking waiting for frame sync (default behavior which is controlled with the swap interval, default is 1 so EGL will wait till the buffer is used for the composition in the compositor).
After the first frame is rendered Weston will get the original size and now you can setup the source /destination regions and set corresponding surface visible.
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: Jovic, Vladimir vladimir.jovic@ifm.com
Sent: Freitag, 24. Mai 2019 10:34
To: Ucan, Emre (ADITG/ESM1) eucan@de.adit-jv.com; Friedrich, Eugen
(ADITG/ESM1) efriedrich@de.adit-jv.com; genivi-ivi-layer-
management@lists.genivi.org
Subject: AW: ivi functions not executed immediately?
Hi,
So, in order to set the "origin size", I need to start rendering. But to start
rendering, I need to set the visibility, otherwise opengl blocks. To set the
visibility, I need to set both source and destination regions. Source and
destination can't be set before origin is set.
That means that something bellow, what I was told, to do is wrong.
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
Betreff: RE: ivi functions not executed immediately?
Hi,
Origin size is the size of the buffer of the surface. Therefore, you have to
render to set the origin size.
Best regards
Emre Ucan
Engineering Software Multimedia (ADITG/ESM)
Tel. +49 5121 49 6937
-----Original Message-----
From: genivi-ivi-layer-management <genivi-ivi-layer-management-
bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
Sent: Freitag, 24. Mai 2019 09:06
To: Friedrich, Eugen (ADITG/ESM1) efriedrich@de.adit-jv.com;
genivi-ivi- layer-management@lists.genivi.org
Subject: AW: ivi functions not executed immediately?
Hi
Actually, I was wondering what that "origin size" really is, since I
couldn't find any info on that. I do register to that callback, to get the
Because if the visibility is 0, then opengl functions are blocking the
I do set the window size with "wl_egl_window_resize()", and I see
these numbers with "LayerManagerControl get scene". But I am not sure
if I have to call "wl_display_dispatch" or " wl_display_flush" or
or anything else after calling "wl_egl_window_resize()". Because, the
"original size" is 0x0 - I need to set visibility first, then source
and then destination - and only then the origin is set. Do I need to
start rendering to set the origin? Or is calling the "eglSwapBuffer "
Do you have a document explaining all this (link or something)? Is
there a book describing how exactly to program in ivi and wayland? I
couldn't find anything describing IVI in details.
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
callback installed to find out the original dimensions of the surface.
After creation is doesn't have any, only after application will
really attach a
and send this buffer to the compositor (wl_surface_attach , wl-
wl_surface_comit, wl_display_flush sequence, should be called from
you
driver initiated by eglSwapBuffer call).
This would be the synchronization point which you miss sometimes:
setting
source region for the surface which doesn't have any size.
I'm surprised that the position and size are random. Looks like a
issue in the
shell or ivi-conroller: actually you should never set source or
destination
having the original size not sure if we documented this somewhere
take a look...
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: Jovic, Vladimir vladimir.jovic@ifm.com
Sent: Donnerstag, 23. Mai 2019 15:55
To: Friedrich, Eugen (ADITG/ESM1) efriedrich@de.adit-jv.com;
genivi-ivi- layer-management@lists.genivi.org
Subject: AW: ivi functions not executed immediately?
Hi,
In my "windows manager", I do this:
void SurfaceCreatedNotificationFunc( ilmObjectType object,
t_ilm_uint id,
t_ilm_bool created,
void* user_data ) {
if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
{
if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
{
std::cout << PRETTY_FUNCTION << "
failed after trying to add a surface to layer\n";
}
ilm_commitChanges();
}
}
void AutoAddSurfaces()
{
ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 );
}
and that is going to add every created surface to the layer with id 1.
Now, I created a script with this content:
EGLWLMockNavigation &
#sleep 0.005
LayerManagerControl set surface 10 source region 0 0 600 400
LayerManagerControl set surface 10 destination region 50 40 300
250 LayerManagerControl set surface 10 visibility 1
Without the sleep, sometimes the shown surface will be at random
position with random size, and the " LayerManagerControl get scene"
root@pdm3:/home# LayerManagerControl get scene screen 0 (0x0)
-
connector name: Unknown-1
-
resolution: x=1280, y=480
-
layer render order: 1(0x1),
layer 1 (0x1)
-
destination region: x=0, y=0, w=1280, h=480
-
source region: x=0, y=0, w=1280, h=480
-
opacity: 1
-
visibility: 1
-
surface render order: 10(0xa),
-
on screen: 0(0x0)
surface 10 (0xa)
- created by pid: 5820
- original size: x=800, y=480
- destination region: x=50, y=40, w=300, h=250
- source region: x=0, y=0, w=0, h=0
- opacity: 1
- visibility: 1
- frame counter: 169
- on layer: 1(0x1)
When my "windows manager" is not running, and I do "
LayerManagerControl add surface 10 to layer 1" from the script,
instead of sleep, then it works every time.
So, it looks like there is some time after creating a surface,
that it needs to somehow "settle down" and for the Weston to catch
BTW how do you find some consulting services, when it is so new?
Just ask this mailing list :-)
Mit freundlichen Grüßen
i. A. Vladimir Jovic
ifm ecomatic gmbh
are not synchronized.
You see the error because visibility is set before surface got
source region assigned to it, so compositor doesn't know how to
render
The implementation of the ivi-controller doesn't forbid you to
use the ivi-
protocol (ilm api's are wrapper around it) from different
processes, there
use-cases but in general the should be only one, it should be
application
2Dextension_tree_master_ivi-
2Dlayermanagement-2Dexamples_layer-2Dadd-
2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2E
=8wfdsMUxnRudpdLb_Cg4rnnnKI-
gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs
=nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
you will see that there are callback available to get to know
when the
client provides a buffer to a ivi-surface and after this
source/destination
and afterwards visibility can be set.
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
-----Original Message-----
From: genivi-ivi-layer-management
<genivi-ivi-layer-management- bounces@lists.genivi.org> On
Behalf Of Jovic, Vladimir
Sent: Dienstag, 21. Mai 2019 16:50
To: genivi-ivi-layer-management@lists.genivi.org
Subject: ivi functions not executed immediately?
Hi,
I am using OpenGL to render camera image into a wayland
surface, and I use IVI functions to set the position and size of the
So, I do as described in IVI quick guide:
LayerManagerControl create layer 1 1024 600
LayerManagerControl set screen 0 render order 1
LayerManagerControl set layer 1 render order 5242880
LayerManagerControl set layer 1 visibility 1
LayerManagerControl set surface 5242880 source region 0 0 300
LayerManagerControl set surface 5242880 destination region
20
20 600
LayerManagerControl set surface 5242880 visibility 1
And the surface is shown fine.
If I do exactly the same from my C++ program, it works only if
I put sleeps between ILM functions. Something like this:
ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
ilm_commitChanges();
std::this_thread::sleep( 100ms ); and if the sleep is not
long enough, it will not work.
The "LayerManagerControl get scene" will return output as if
all functions were called properly, but what is shown is not
what "LayerManagerControl get scene" returns. For example,
somethimes the source region what is rendered is different from
Even with sleeps, sometimes it happens that the scene get
wrong
Also, I see next lines in weston.log:
[07:29:02.248] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:02.885] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.525] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
[07:29:03.178] ivi-shell: source rectangle is not yet set by
ivi_layout_surface_set_source_rectangle
Versions that I use are:
weston: 6.0
IVI: revision 9acdaa1
Wayland: 1.17
The question is, is there a way to somehow bump the ivi shell?
I thought that " ilm_commitChanges();" is supposed to do that,
but
Also, what I noticed is that order of functions somehow matters.
For example, if I set the visibility at end, then the image is not
ailman_listinfo_genivi-2Divi-2Dlayer-
2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmME
FQxE8kMpAytfQhoigO7PY8&e=
management_lists.genivi.org
ailman_listinfo_genivi-2Divi-2Dlayer-
2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
&m=3uigexTynM1KYbjVAwQ0MZeGfnSZUU32vWqG_ytgYVQ&s=UV4fR6P3n
dYPu
s1_u-jAFWe4gkRHSLE6MZ4&e=
management_lists.genivi.org
Hi Vladimir,
The EGL implementation will block only after sending a first buffer it blocks on the second eglSwapBuffer call(you can maybe verify this with your driver), also you can run it in "unblocking mode", for testing, just set the eglSwapInterval to 0.
EGL is blocking waiting for frame sync (default behavior which is controlled with the swap interval, default is 1 so EGL will wait till the buffer is used for the composition in the compositor).
After the first frame is rendered Weston will get the original size and now you can setup the source /destination regions and set corresponding surface visible.
Best regards
Eugen Friedrich
Engineering Software Multimedia 1 (ADITG/ESM1)
Tel. +49 5121 49 6921
> -----Original Message-----
> From: Jovic, Vladimir <vladimir.jovic@ifm.com>
> Sent: Freitag, 24. Mai 2019 10:34
> To: Ucan, Emre (ADITG/ESM1) <eucan@de.adit-jv.com>; Friedrich, Eugen
> (ADITG/ESM1) <efriedrich@de.adit-jv.com>; genivi-ivi-layer-
> management@lists.genivi.org
> Subject: AW: ivi functions not executed immediately?
>
> Hi,
>
> So, in order to set the "origin size", I need to start rendering. But to start
> rendering, I need to set the visibility, otherwise opengl blocks. To set the
> visibility, I need to set both source and destination regions. Source and
> destination can't be set before origin is set.
>
> That means that something bellow, what I was told, to do is wrong.
>
>
> Mit freundlichen Grüßen
>
> i. A. Vladimir Jovic
> ifm ecomatic gmbh
>
>
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Ucan, Emre (ADITG/ESM1) <eucan@de.adit-jv.com>
> > Gesendet: Freitag, 24. Mai 2019 10:14
> > An: Jovic, Vladimir <vladimir.jovic@ifm.com>; Friedrich, Eugen
> (ADITG/ESM1)
> > <efriedrich@de.adit-jv.com>; genivi-ivi-layer-
> management@lists.genivi.org
> > Betreff: RE: ivi functions not executed immediately?
> >
> > Hi,
> >
> > Origin size is the size of the buffer of the surface. Therefore, you have to
> start to
> > render to set the origin size.
> >
> > Best regards
> >
> > Emre Ucan
> > Engineering Software Multimedia (ADITG/ESM)
> >
> > Tel. +49 5121 49 6937
> > > -----Original Message-----
> > > From: genivi-ivi-layer-management <genivi-ivi-layer-management-
> > > bounces@lists.genivi.org> On Behalf Of Jovic, Vladimir
> > > Sent: Freitag, 24. Mai 2019 09:06
> > > To: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>;
> > > genivi-ivi- layer-management@lists.genivi.org
> > > Subject: AW: ivi functions not executed immediately?
> > >
> > > Hi
> > >
> > > Actually, I was wondering what that "origin size" really is, since I
> > > couldn't find any info on that. I do register to that callback, to get the
> visibility
> > flag.
> > > Because if the visibility is 0, then opengl functions are blocking the
> process.
> > >
> > > I do set the window size with "wl_egl_window_resize()", and I see
> > > these numbers with "LayerManagerControl get scene". But I am not sure
> > > if I have to call "wl_display_dispatch" or " wl_display_flush" or
> > "sl_surface_commit"
> > > or anything else after calling "wl_egl_window_resize()". Because, the
> > > "original size" is 0x0 - I need to set visibility first, then source
> > > and then destination - and only then the origin is set. Do I need to
> > > start rendering to set the origin? Or is calling the "eglSwapBuffer "
> enough?
> > >
> > > Do you have a document explaining all this (link or something)? Is
> > > there a book describing how exactly to program in ivi and wayland? I
> > > couldn't find anything describing IVI in details.
> > >
> > >
> > >
> > > Mit freundlichen Grüßen
> > >
> > > i. A. Vladimir Jovic
> > > ifm ecomatic gmbh
> > >
> > >
> > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>
> > > > Gesendet: Donnerstag, 23. Mai 2019 18:48
> > > > An: Jovic, Vladimir <vladimir.jovic@ifm.com>; genivi-ivi-layer-
> > > > management@lists.genivi.org
> > > > Betreff: RE: ivi functions not executed immediately?
> > > >
> > > > Hi Vladimir,
> > > >
> > > > If you would follow the example application you will see that there
> > > > is
> > > additional
> > > > callback installed to find out the original dimensions of the surface.
> > > > After creation is doesn't have any, only after application will
> > > > really attach a
> > > buffer
> > > > and send this buffer to the compositor (wl_surface_attach , wl-
> > > surface_damage,
> > > > wl_surface_comit, wl_display_flush sequence, should be called from
> > > > you
> > > EGL
> > > > driver initiated by eglSwapBuffer call).
> > > >
> > > > This would be the synchronization point which you miss sometimes:
> > > > setting
> > > the
> > > > source region for the surface which doesn't have any size.
> > > > I'm surprised that the position and size are random. Looks like a
> > > > issue in the
> > > ivi-
> > > > shell or ivi-conroller: actually you should never set source or
> > > > destination
> > > without
> > > > having the original size not sure if we documented this somewhere
> > > properly, will
> > > > take a look...
> > > >
> > > > Best regards
> > > >
> > > > Eugen Friedrich
> > > > Engineering Software Multimedia 1 (ADITG/ESM1)
> > > >
> > > > Tel. +49 5121 49 6921
> > > > > -----Original Message-----
> > > > > From: Jovic, Vladimir <vladimir.jovic@ifm.com>
> > > > > Sent: Donnerstag, 23. Mai 2019 15:55
> > > > > To: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>;
> > > > > genivi-ivi- layer-management@lists.genivi.org
> > > > > Subject: AW: ivi functions not executed immediately?
> > > > >
> > > > > Hi,
> > > > >
> > > > > In my "windows manager", I do this:
> > > > > void SurfaceCreatedNotificationFunc( ilmObjectType object,
> > > > > t_ilm_uint id,
> > > > > t_ilm_bool created,
> > > > > void* user_data ) {
> > > > > if ( ( ILM_SURFACE == object ) && ( ILM_TRUE == created ) )
> > > > > {
> > > > > if ( ILM_SUCCESS != ilm_layerAddSurface( 1, id ) )
> > > > > {
> > > > > std::cout << __PRETTY_FUNCTION__ << "
> ilm_layerAddSurface()
> > > > > failed after trying to add a surface to layer\n";
> > > > > }
> > > > > ilm_commitChanges();
> > > > > }
> > > > > }
> > > > > void AutoAddSurfaces()
> > > > > {
> > > > > ilm_registerNotification( SurfaceCreatedNotificationFunc, 0 );
> > > > > }
> > > > >
> > > > > and that is going to add every created surface to the layer with id 1.
> > > > >
> > > > > Now, I created a script with this content:
> > > > >
> > > > > EGLWLMockNavigation &
> > > > > #sleep 0.005
> > > > > LayerManagerControl set surface 10 source region 0 0 600 400
> > > > > LayerManagerControl set surface 10 destination region 50 40 300
> > > > > 250 LayerManagerControl set surface 10 visibility 1
> > > > >
> > > > > Without the sleep, sometimes the shown surface will be at random
> > > > > position with random size, and the " LayerManagerControl get scene"
> > > returns
> > > > this:
> > > > > root@pdm3:/home# LayerManagerControl get scene screen 0 (0x0)
> > > > > ---------------------------------------
> > > > > - connector name: Unknown-1
> > > > > - resolution: x=1280, y=480
> > > > > - layer render order: 1(0x1),
> > > > >
> > > > > layer 1 (0x1)
> > > > > ---------------------------------------
> > > > > - destination region: x=0, y=0, w=1280, h=480
> > > > > - source region: x=0, y=0, w=1280, h=480
> > > > > - opacity: 1
> > > > > - visibility: 1
> > > > > - surface render order: 10(0xa),
> > > > > - on screen: 0(0x0)
> > > > >
> > > > > surface 10 (0xa)
> > > > > ---------------------------------------
> > > > > - created by pid: 5820
> > > > > - original size: x=800, y=480
> > > > > - destination region: x=50, y=40, w=300, h=250
> > > > > - source region: x=0, y=0, w=0, h=0
> > > > > - opacity: 1
> > > > > - visibility: 1
> > > > > - frame counter: 169
> > > > > - on layer: 1(0x1)
> > > > >
> > > > >
> > > > > When my "windows manager" is not running, and I do "
> > > > > LayerManagerControl add surface 10 to layer 1" from the script,
> > > > > instead of sleep, then it works every time.
> > > > > So, it looks like there is some time after creating a surface,
> > > > > that it needs to somehow "settle down" and for the Weston to catch
> up.
> > > > >
> > > > > BTW how do you find some consulting services, when it is so new?
> > > > Just ask this mailing list :-)
> > > >
> > > > >
> > > > > Mit freundlichen Grüßen
> > > > >
> > > > > i. A. Vladimir Jovic
> > > > > ifm ecomatic gmbh
> > > > >
> > > > >
> > > > >
> > > > > > -----Ursprüngliche Nachricht-----
> > > > > > Von: Friedrich, Eugen (ADITG/ESM1) <efriedrich@de.adit-jv.com>
> > > > > > Gesendet: Mittwoch, 22. Mai 2019 09:05
> > > > > > An: Jovic, Vladimir <vladimir.jovic@ifm.com>; genivi-ivi-layer-
> > > > > > management@lists.genivi.org
> > > > > > Betreff: RE: ivi functions not executed immediately?
> > > > > >
> > > > > > Hi Vladimir,
> > > > > >
> > > > > > I would guess that the issue is coming because the calls between
> > > > > > different
> > > > > process
> > > > > > are not synchronized.
> > > > > > You see the error because visibility is set before surface got
> > > > > > source region assigned to it, so compositor doesn't know how to
> > > > > > render
> > > it.
> > > > > >
> > > > > > The implementation of the ivi-controller doesn't forbid you to
> > > > > > use the ivi-
> > > > > wm
> > > > > > protocol (ilm api's are wrapper around it) from different
> > > > > > processes, there
> > > > > are a few
> > > > > > use-cases but in general the should be only one, it should be
> > > > > > application
> > > > > controller
> > > > > > which will know where and how to render the surface.
> > > > > >
> > > > > > The minimalistic example of it is here:
> > > > > > https://urldefense.proofpoint.com/v2/url?u=https-
> > > > > > 3A__github.com_GENIVI_wayland-2Divi-
> > > 2Dextension_tree_master_ivi-
> > > > > > 2Dlayermanagement-2Dexamples_layer-2Dadd-
> > > > > >
> > > > >
> > >
> 2Dsurfaces&d=DwIFAw&c=riR7jviByh3sGm7GIiSlHkFN0_aSATB6A8x0nHa2E
> > > > > M0&r
> > > > > > =8wfdsMUxnRudpdLb_Cg4rnnnKI-
> > > > > >
> > > > >
> > >
> gQZ4ykr3tjUrejXg&m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs
> > > > > &s
> > > > > > =nccLBZJ7E0vToNaw1lyLmvQUFywU-_p7FMp03yIxPLM&e=
> > > > > >
> > > > > > you will see that there are callback available to get to know
> > > > > > when the
> > > > > rendering
> > > > > > client provides a buffer to a ivi-surface and after this
> > > > > > source/destination
> > > > > regions
> > > > > > and afterwards visibility can be set.
> > > > > >
> > > > > > Best regards
> > > > > >
> > > > > > Eugen Friedrich
> > > > > > Engineering Software Multimedia 1 (ADITG/ESM1)
> > > > > >
> > > > > > Tel. +49 5121 49 6921
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: genivi-ivi-layer-management
> > > > > > > <genivi-ivi-layer-management- bounces@lists.genivi.org> On
> > > > > > > Behalf Of Jovic, Vladimir
> > > > > > > Sent: Dienstag, 21. Mai 2019 16:50
> > > > > > > To: genivi-ivi-layer-management@lists.genivi.org
> > > > > > > Subject: ivi functions not executed immediately?
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I am using OpenGL to render camera image into a wayland
> > > > > > > surface, and I use IVI functions to set the position and size of the
> > surface.
> > > > > > > So, I do as described in IVI quick guide:
> > > > > > > LayerManagerControl create layer 1 1024 600
> > > > > > > LayerManagerControl set screen 0 render order 1
> > > > > > > LayerManagerControl set layer 1 render order 5242880
> > > > > > > LayerManagerControl set layer 1 visibility 1
> > > > > > > LayerManagerControl set surface 5242880 source region 0 0 300
> 200
> > > > > > > LayerManagerControl set surface 5242880 destination region
> > > > > > > 20
> > > > > > > 20 600
> > > > > 400
> > > > > > > LayerManagerControl set surface 5242880 visibility 1
> > > > > > >
> > > > > > > And the surface is shown fine.
> > > > > > > If I do exactly the same from my C++ program, it works only if
> > > > > > > I put sleeps between ILM functions. Something like this:
> > > > > > > ilm_surfaceSetSourceRectangle( surfaceId, 0, 0, 300, 200 );
> > > > > > > ilm_commitChanges();
> > > > > > > std::this_thread::sleep( 100ms ); and if the sleep is not
> > > > > > > long enough, it will not work.
> > > > > > > The "LayerManagerControl get scene" will return output as if
> > > > > > > all functions were called properly, but what is shown is not
> > > > > > > what "LayerManagerControl get scene" returns. For example,
> > > > > > > somethimes the source region what is rendered is different from
> what
> > should be.
> > > > > > > Even with sleeps, sometimes it happens that the scene get
> > > > > > > wrong
> > > > > numbers.
> > > > > > >
> > > > > > > Also, I see next lines in weston.log:
> > > > > > > [07:29:02.248] ivi-shell: source rectangle is not yet set by
> > > > > > > ivi_layout_surface_set_source_rectangle
> > > > > > > [07:29:02.885] ivi-shell: source rectangle is not yet set by
> > > > > > > ivi_layout_surface_set_source_rectangle
> > > > > > > [07:29:03.525] ivi-shell: source rectangle is not yet set by
> > > > > > > ivi_layout_surface_set_source_rectangle
> > > > > > > [07:29:03.178] ivi-shell: source rectangle is not yet set by
> > > > > > > ivi_layout_surface_set_source_rectangle
> > > > > > >
> > > > > > > Versions that I use are:
> > > > > > > weston: 6.0
> > > > > > > IVI: revision 9acdaa1
> > > > > > > Wayland: 1.17
> > > > > > >
> > > > > > > The question is, is there a way to somehow bump the ivi shell?
> > > > > > > I thought that " ilm_commitChanges();" is supposed to do that,
> > > > > > > but
> > > > > somehow it
> > > > > > doesn't.
> > > > > > >
> > > > > > > Also, what I noticed is that order of functions somehow matters.
> > > > > > > For example, if I set the visibility at end, then the image is not
> shown.
> > > > > > >
> > > > > > > By the way, I set some things from one program (add a surface
> > > > > > > to a
> > > > > > > layer) and other things in another program (set source region).
> > > > > > >
> > > > > > > Mit freundlichen Grüßen
> > > > > > >
> > > > > > > i. A. Vladimir Jovic
> > > > > > >
> > > > > > > ifm ecomatic gmbh
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > genivi-ivi-layer-management mailing list
> > > > > > > genivi-ivi-layer-management@lists.genivi.org
> > > > > > > https://urldefense.proofpoint.com/v2/url?u=http-
> > > > > 3A__lists.genivi.org_m
> > > > > > > ailman_listinfo_genivi-2Divi-2Dlayer-
> > > > > 2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
> > > > > > >
> lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
> > > > > > gQZ4ykr3tjUrejXg
> > > > > > >
> > > > > >
> > > > >
> > >
> &m=YrRXzuqcsVwn7R2MF9iARhCLYWgZfYp1do7BrPdPCHs&s=WyP3ZHmME
> > > > > Vz
> > > > > > wrB_isOPX7
> > > > > > > FQxE8kMpAytfQhoigO7PY8&e=
> > > > > > > management_lists.genivi.org
> > > > >
> > > >
> > >
> > >
> > >
> > > _______________________________________________
> > > genivi-ivi-layer-management mailing list
> > > genivi-ivi-layer-management@lists.genivi.org
> > > https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__lists.genivi.org_m
> > > ailman_listinfo_genivi-2Divi-2Dlayer-
> 2D&d=DwIFAw&c=riR7jviByh3sGm7GIiS
> > > lHkFN0_aSATB6A8x0nHa2EM0&r=8wfdsMUxnRudpdLb_Cg4rnnnKI-
> > gQZ4ykr3tjUrejXg
> > >
> >
> &m=3uigexTynM1KYbjVAwQ0MZeGfnSZUU32vWqG_ytgYVQ&s=UV4fR6P3n
> dYPu
> > Wx__t3vS
> > > s1_u-jAFWe4gkRHSLE6MZ4&e=
> > > management_lists.genivi.org
>