[Video] ILM support for waylandsink query

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Video] ILM support for waylandsink query

Vikas Patil
Dear All,

I am trying to add support for wayland-ivi-extension 1.11.0 to waylandsink [1] (video sink plug-in from gstreamer1.0-plugins-bad package) for Jacinto6 SoC using following two methods.

1. Using ivi-application protocol similar to simple-egl.c (test from weston)
- This works.
- Here is video size is 1280x720 and screen resolution is 800x480 then only top left of video is visible. How should I fix this?


2. Using ilmClient and ilmControl APIs directly.
- This do not work and gives segmentation fault with below call stack. I have checked the calls and setup seems correct to me.
- I thought it might be wayland sink uses drm protocol to allocate buffers which will be attached to  created surfaces and tried to disable thatpath  and instead use SHM.
With this also the same behavior.

Any inputs? Attached here the patch for wayland sink which implements ilm support.

Any inputs after looking at the call stack?

#0  0xb6812928 in wl_proxy_marshal_constructor (proxy=0x150410, opcode=opcode@entry=1, interface=0xb6827714 <wl_registry_interface>)
    at ../wayland-1.11.0/src/wayland-client.c:729
#1  0xb6851e98 in wl_display_get_registry (wl_display=<optimized out>) at /usr/include/wayland-client-protocol.h:957
#2  init_client () at /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:207
#3  get_client_instance () at /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:235
#4  0xb6852128 in wayland_surfaceCreate (nativehandle=3051387744, width=<optimized out>, height=<optimized out>, pixelFormat=<optimized out>,
    pSurfaceId=0xb688fe04 <ilmSurfaceId>)
    at /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:273
#5  0xb687cb10 in create_ilm_surface (window=0xb5e05150, display=0x150410) at ../../../git/ext/wayland/wlwindow.c:252
#6  gst_wl_window_new_internal (display=0x150410) at ../../../git/ext/wayland/wlwindow.c:383
#7  0xb687d3b4 in gst_wl_window_new_toplevel (display=<optimized out>, info=info@entry=0x14fff0) at ../../../git/ext/wayland/wlwindow.c:395
#8  0xb68787c0 in gst_wayland_sink_render (bsink=0x14fde8, buffer=0xb5504b68) at ../../../git/ext/wayland/gstwaylandsink.c:658
#9  0xb691b134 in gst_base_sink_do_preroll () from /usr/lib/libgstbase-1.0.so.0
Cannot access memory at address 0x0
#10 0x0014fde8 in ?? ()
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


[1] https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/wayland?id=1.6.3

Thanks you all in advance.

Thanks & Regards,
Vikash

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

ilm_support_1_6_3_waylandsink_1.patch (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Video] ILM support for waylandsink query

Vikas Patil
Hi All,

Modifying the view port as follows solves the issue 1. However still not getting what could be the cause of segmentation fault with direct usage of ILM apis.

  //wl_viewport_set_destination (window->video_viewport, res.w, res.h);
  wl_viewport_set_destination (window->video_viewport, 800, 480);

Thanks & Regards,
Vikash

On Fri, Mar 24, 2017 at 3:28 PM, Vikas Patil <[hidden email]> wrote:
Dear All,

I am trying to add support for wayland-ivi-extension 1.11.0 to waylandsink [1] (video sink plug-in from gstreamer1.0-plugins-bad package) for Jacinto6 SoC using following two methods.

1. Using ivi-application protocol similar to simple-egl.c (test from weston)
- This works.
- Here is video size is 1280x720 and screen resolution is 800x480 then only top left of video is visible. How should I fix this?


2. Using ilmClient and ilmControl APIs directly.
- This do not work and gives segmentation fault with below call stack. I have checked the calls and setup seems correct to me.
- I thought it might be wayland sink uses drm protocol to allocate buffers which will be attached to  created surfaces and tried to disable thatpath  and instead use SHM.
With this also the same behavior.

Any inputs? Attached here the patch for wayland sink which implements ilm support.

Any inputs after looking at the call stack?

#0  0xb6812928 in wl_proxy_marshal_constructor (proxy=0x150410, opcode=opcode@entry=1, interface=0xb6827714 <wl_registry_interface>)
    at ../wayland-1.11.0/src/wayland-client.c:729
#1  0xb6851e98 in wl_display_get_registry (wl_display=<optimized out>) at /usr/include/wayland-client-protocol.h:957
#2  init_client () at /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:207
#3  get_client_instance () at /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:235
#4  0xb6852128 in wayland_surfaceCreate (nativehandle=3051387744, width=<optimized out>, height=<optimized out>, pixelFormat=<optimized out>,
    pSurfaceId=0xb688fe04 <ilmSurfaceId>)
    at /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:273
#5  0xb687cb10 in create_ilm_surface (window=0xb5e05150, display=0x150410) at ../../../git/ext/wayland/wlwindow.c:252
#6  gst_wl_window_new_internal (display=0x150410) at ../../../git/ext/wayland/wlwindow.c:383
#7  0xb687d3b4 in gst_wl_window_new_toplevel (display=<optimized out>, info=info@entry=0x14fff0) at ../../../git/ext/wayland/wlwindow.c:395
#8  0xb68787c0 in gst_wayland_sink_render (bsink=0x14fde8, buffer=0xb5504b68) at ../../../git/ext/wayland/gstwaylandsink.c:658
#9  0xb691b134 in gst_base_sink_do_preroll () from /usr/lib/libgstbase-1.0.so.0
Cannot access memory at address 0x0
#10 0x0014fde8 in ?? ()
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


[1] https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/wayland?id=1.6.3

Thanks you all in advance.

Thanks & Regards,
Vikash


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Video] ILM support for waylandsink query

Nicolas Dufresne-5
Le lundi 27 mars 2017 à 14:05 +0530, Vikas Patil a écrit :
> 1. Using ivi-application protocol similar to simple-egl.c (test from
> weston)
> - This works.
> - Here is video size is 1280x720 and screen resolution is 800x480
> then only top left of video is visible. How should I fix this?

Embed waylandsink into your application using the GstVideoOverlay
interface to constrain the video. This has nothing to do with the shell
being used here. Feel free to improve gst-launch support here.

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Video] ILM support for waylandsink query

Eugen Friedrich
In reply to this post by Vikas Patil
Hi Vikash,

i could not really find this out from the call stack but the problem
could be that the ilmClient api is not thread safe, and in upstream
direct after 1.11 release we decided to deprecated this,
so just remove the ilmClient calls and use wayland protocol directly
and you can continue to use the ilmCommon api this one is thread save.

Hope this helps,
Eugen

2017-03-27 10:35 GMT+02:00 Vikas Patil <[hidden email]>:

> Hi All,
>
> Modifying the view port as follows solves the issue 1. However still not
> getting what could be the cause of segmentation fault with direct usage of
> ILM apis.
>
>   //wl_viewport_set_destination (window->video_viewport, res.w, res.h);
>   wl_viewport_set_destination (window->video_viewport, 800, 480);
>
> Thanks & Regards,
> Vikash
>
> On Fri, Mar 24, 2017 at 3:28 PM, Vikas Patil <[hidden email]> wrote:
>>
>> Dear All,
>>
>> I am trying to add support for wayland-ivi-extension 1.11.0 to waylandsink
>> [1] (video sink plug-in from gstreamer1.0-plugins-bad package) for Jacinto6
>> SoC using following two methods.
>>
>> 1. Using ivi-application protocol similar to simple-egl.c (test from
>> weston)
>> - This works.
>> - Here is video size is 1280x720 and screen resolution is 800x480 then
>> only top left of video is visible. How should I fix this?
>>
>>
>> 2. Using ilmClient and ilmControl APIs directly.
>> - This do not work and gives segmentation fault with below call stack. I
>> have checked the calls and setup seems correct to me.
>> - I thought it might be wayland sink uses drm protocol to allocate buffers
>> which will be attached to  created surfaces and tried to disable thatpath
>> and instead use SHM.
>> With this also the same behavior.
>>
>> Any inputs? Attached here the patch for wayland sink which implements ilm
>> support.
>>
>> Any inputs after looking at the call stack?
>>
>> #0  0xb6812928 in wl_proxy_marshal_constructor (proxy=0x150410,
>> opcode=opcode@entry=1, interface=0xb6827714 <wl_registry_interface>)
>>     at ../wayland-1.11.0/src/wayland-client.c:729
>> #1  0xb6851e98 in wl_display_get_registry (wl_display=<optimized out>) at
>> /usr/include/wayland-client-protocol.h:957
>> #2  init_client () at
>> /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:207
>> #3  get_client_instance () at
>> /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:235
>> #4  0xb6852128 in wayland_surfaceCreate (nativehandle=3051387744,
>> width=<optimized out>, height=<optimized out>, pixelFormat=<optimized out>,
>>     pSurfaceId=0xb688fe04 <ilmSurfaceId>)
>>     at
>> /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:273
>> #5  0xb687cb10 in create_ilm_surface (window=0xb5e05150, display=0x150410)
>> at ../../../git/ext/wayland/wlwindow.c:252
>> #6  gst_wl_window_new_internal (display=0x150410) at
>> ../../../git/ext/wayland/wlwindow.c:383
>> #7  0xb687d3b4 in gst_wl_window_new_toplevel (display=<optimized out>,
>> info=info@entry=0x14fff0) at ../../../git/ext/wayland/wlwindow.c:395
>> #8  0xb68787c0 in gst_wayland_sink_render (bsink=0x14fde8,
>> buffer=0xb5504b68) at ../../../git/ext/wayland/gstwaylandsink.c:658
>> #9  0xb691b134 in gst_base_sink_do_preroll () from
>> /usr/lib/libgstbase-1.0.so.0
>> Cannot access memory at address 0x0
>> #10 0x0014fde8 in ?? ()
>> Cannot access memory at address 0x0
>> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
>>
>>
>> [1]
>> https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/wayland?id=1.6.3
>>
>> Thanks you all in advance.
>>
>> Thanks & Regards,
>> Vikash
>
>
>
> _______________________________________________
> wayland-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Video] ILM support for waylandsink query

Vikas Patil
Hi Eugen,

Yes, I have implemented using protocol and it is working. However I also want to try it with direct usage of ILM apis but no luck yet. I have done the same with glimagesink, eglvivsink video sink plugin and it is working.

Thanks & Regards,
Vikash

On Tue, Mar 28, 2017 at 1:09 AM, Eugen Friedrich <[hidden email]> wrote:
Hi Vikash,

i could not really find this out from the call stack but the problem
could be that the ilmClient api is not thread safe, and in upstream
direct after 1.11 release we decided to deprecated this,
so just remove the ilmClient calls and use wayland protocol directly
and you can continue to use the ilmCommon api this one is thread save.

Hope this helps,
Eugen

2017-03-27 10:35 GMT+02:00 Vikas Patil <[hidden email]>:
> Hi All,
>
> Modifying the view port as follows solves the issue 1. However still not
> getting what could be the cause of segmentation fault with direct usage of
> ILM apis.
>
>   //wl_viewport_set_destination (window->video_viewport, res.w, res.h);
>   wl_viewport_set_destination (window->video_viewport, 800, 480);
>
> Thanks & Regards,
> Vikash
>
> On Fri, Mar 24, 2017 at 3:28 PM, Vikas Patil <[hidden email]> wrote:
>>
>> Dear All,
>>
>> I am trying to add support for wayland-ivi-extension 1.11.0 to waylandsink
>> [1] (video sink plug-in from gstreamer1.0-plugins-bad package) for Jacinto6
>> SoC using following two methods.
>>
>> 1. Using ivi-application protocol similar to simple-egl.c (test from
>> weston)
>> - This works.
>> - Here is video size is 1280x720 and screen resolution is 800x480 then
>> only top left of video is visible. How should I fix this?
>>
>>
>> 2. Using ilmClient and ilmControl APIs directly.
>> - This do not work and gives segmentation fault with below call stack. I
>> have checked the calls and setup seems correct to me.
>> - I thought it might be wayland sink uses drm protocol to allocate buffers
>> which will be attached to  created surfaces and tried to disable thatpath
>> and instead use SHM.
>> With this also the same behavior.
>>
>> Any inputs? Attached here the patch for wayland sink which implements ilm
>> support.
>>
>> Any inputs after looking at the call stack?
>>
>> #0  0xb6812928 in wl_proxy_marshal_constructor (proxy=0x150410,
>> opcode=opcode@entry=1, interface=0xb6827714 <wl_registry_interface>)
>>     at ../wayland-1.11.0/src/wayland-client.c:729
>> #1  0xb6851e98 in wl_display_get_registry (wl_display=<optimized out>) at
>> /usr/include/wayland-client-protocol.h:957
>> #2  init_client () at
>> /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:207
>> #3  get_client_instance () at
>> /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:235
>> #4  0xb6852128 in wayland_surfaceCreate (nativehandle=3051387744,
>> width=<optimized out>, height=<optimized out>, pixelFormat=<optimized out>,
>>     pSurfaceId=0xb688fe04 <ilmSurfaceId>)
>>     at
>> /usr/src/debug/wayland-ivi-extension/1.11.0-r1/git/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c:273
>> #5  0xb687cb10 in create_ilm_surface (window=0xb5e05150, display=0x150410)
>> at ../../../git/ext/wayland/wlwindow.c:252
>> #6  gst_wl_window_new_internal (display=0x150410) at
>> ../../../git/ext/wayland/wlwindow.c:383
>> #7  0xb687d3b4 in gst_wl_window_new_toplevel (display=<optimized out>,
>> info=info@entry=0x14fff0) at ../../../git/ext/wayland/wlwindow.c:395
>> #8  0xb68787c0 in gst_wayland_sink_render (bsink=0x14fde8,
>> buffer=0xb5504b68) at ../../../git/ext/wayland/gstwaylandsink.c:658
>> #9  0xb691b134 in gst_base_sink_do_preroll () from
>> /usr/lib/libgstbase-1.0.so.0
>> Cannot access memory at address 0x0
>> #10 0x0014fde8 in ?? ()
>> Cannot access memory at address 0x0
>> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
>>
>>
>> [1]
>> https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/wayland?id=1.6.3
>>
>> Thanks you all in advance.
>>
>> Thanks & Regards,
>> Vikash
>
>
>
> _______________________________________________
> wayland-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Video] ILM support for waylandsink query

Nicolas Dufresne-5
Le mardi 28 mars 2017 à 12:18 +0530, Vikas Patil a écrit :
> Hi Eugen,
>
> Yes, I have implemented using protocol and it is working. However I
> also want to try it with direct usage of ILM apis but no luck yet. I
> have done the same with glimagesink, eglvivsink video sink plugin and
> it is working.

What is that ILM library ? Why shall be add a new deps to that library
in GStreamer ?

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Video] ILM support for waylandsink query

Eugen Friedrich
Hello Nicolas,

the ilm api is implemented for the ivi (in vehicle infotainment)
window management and allow to control applications surfaces outside
from the compositor, it is realized by the ivi-shell in weston. with
ivi-shell  every  weston surface have to have an id assigned to it
(very simple ivi-application protocol is defined for this) and the ilm
control api can use the id to reference the surface.

@Vikas so in general I will not use the ilm Client api's in the
middleware components, by just using the ivi-application wayland
protocol we can decide dynamically if the protocol is available and
register the id if not do something else: e.g. xdg surface setup.
The ivi controller (hmi master, hmi application controller or however
it is called) should still use the ilm controller api's to control the
composition.

2017-03-28 16:01 GMT+02:00 Nicolas Dufresne <[hidden email]>:

> Le mardi 28 mars 2017 à 12:18 +0530, Vikas Patil a écrit :
>> Hi Eugen,
>>
>> Yes, I have implemented using protocol and it is working. However I
>> also want to try it with direct usage of ILM apis but no luck yet. I
>> have done the same with glimagesink, eglvivsink video sink plugin and
>> it is working.
>
> What is that ILM library ? Why shall be add a new deps to that library
> in GStreamer ?
>
> regards,
> Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Loading...