This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

viddec3test using wayland



System: Jacinto 6

[We dont have Weston enabled in our system]

we executed viddec3test using KMS it works ok. but using wayland(following command).

./viddec3test__toggle_thread23 -s 32:1920x1080 -w 1920x1080 /media/video/HistoryOfTI-480p.264

we are getting this error:

0xc01008: infile=/media/video/HistoryOfTI-480p.264, width=720, height=406
0xc01008: padded_width=896, padded_height=512, num_buffers=19
Setting mode 1920x1080 on connector 32, crtc 34
ERROR:post_buffer:298: Could not post buffer on crtc 34: Permission denied (-13)
0xc01008: Opening Engine..
displayBufsMode: 1
ERROR:post_vid_buffer:420: failed to enable plane 39: Permission denied
ERROR:post_vid_buffer:420: failed to enable plane 39: Permission denied

can you give insight what may be wron

  • tried this command instead:
    ./viddec3test --w 1920x1080 /media/video/HistoryOfTI-480p.264
    the following error appears instead.
    ERROR:disp_wayland_open:375: failed to connect to Wayland display: No such file or directory.
    may be libs are missing can you suggest what libs are required.
  • For wayland clients, weston should be launched first. Please launch weston using /etc/init.d weston start   and then try.

    There is one issue with omapdrmtest with wayland, fd is not initialized and results in buf_lock error

    Apply this patch and then try.

    diff --git a/util/display-wayland.c b/util/display-wayland.c
    index c0d6175..030a12a 100644
    --- a/util/display-wayland.c
    +++ b/util/display-wayland.c
    @@ -95,7 +95,7 @@ alloc_buffer(struct display *disp, uint32_t fourcc, uint32_t w, uint32_t h)
     	buf->fourcc = fourcc;
     	buf->width = w;
     	buf->height = h;
    -	buf->multiplanar = true;
    +	buf->multiplanar = false;
     
     	buf->nbo = 1;
     
    @@ -135,6 +135,7 @@ alloc_buffer(struct display *disp, uint32_t fourcc, uint32_t w, uint32_t h)
     				&bo_handles[0], &buf->pitches[0]);
     
     		omap_bo_get_name(buf->bo[0], &buf_wl->name);
    +		buf->fd[0] = omap_bo_dmabuf(buf->bo[0]);
     		/* NV12: Create a planar buffer */
     		buf_wl->wl_buf = wl_drm_create_planar_buffer(disp_wl->drm,
     			buf_wl->name, buf->width, buf->height, wl_fmt,
    

  • is it mandatory to launch weston? or wayland can work independently without weston for omapdrmtest
  • It is mandatory to launch weston for wayland client applications.
    Weston is the compositor/display server for wayland's client applications.
  • ok. thanks. is it possible to run same videos on 2 displays and different videos on 2 displays using wayland, (like in KMS mode)
  • when trying to launch weston, we are getting failures (PSDKLA for Linux kernel 4.4):

    1) Directly launch weston  (/usr/bin):

    #weston tty=1

    failure, unable to find wayland-backend.so, it is also not present in the /usr/lib or in the file system at all

    00:01:22.470] Using config file '/etc//weston.ini'
    [00:01:22.470] Loading module '/usr/lib/weston/wayland-backend.so'
    [00:01:22.470] Failed to load module: /usr/lib/weston/wayland-backend.so: cannot open shared object file: No such file or directory

    2) there is a weston utility in /etc/init.d, it does not give any failure but still i am unable to run viddec3test with -w (unable to open wayland)

    can you please tell why there is an inconsistency and which weston to use

  • 1) Default backend to be used is drm-backend. Try launching weston manually using
    #weston --tty=1 --idle-time=0 --backend=drm-backend.so &

    2) What is the failure you are observing with viddec3test? Did you apply the patch I shared?

    Regarding your question on dual video playback, You can launch any number of viddec3test with wayland or any wayland clients but you need to use mouse to move/drag image from one display to other.

    You can first try with default wayland clients in /usr/bin/ and drag and drop
  • hi,weston gives few other errors, any inputs?:[00:01:17.294] weston 1.9.0
    http://wayland.freedesktop.org
    Bug reports to: bugs.freedesktop.org/enter_bug.cgi
    Build: 1.8.93-2-gb05cdb8 configure.ac: bump to version 1.9.0 for the official release (2015-09-21 18:11:26 -0700)
    [00:01:17.295] OS: Linux, 4.4.14, # Melco-BSP-Ver=02.00.00 SMP PREEMPT Thu Nov 3 18:05:58 IST 2016, armv7l
    [00:01:17.298] Using config file '/etc//weston.ini'
    [00:01:17.303] Loading module '/usr/lib/weston/drm-backend.so'
    [00:01:17.339] Output repaint window is 7 ms maximum.
    [00:01:17.339] initializing drm backend
    [00:01:17.339] failed to get VT mode: Inappropriate ioctl for device
    [00:01:17.339] fatal: drm backend should be run using weston-launch binary or as root
    [00:01:17.339] fatal: failed to create compositor backend
  • hi,just forgot to use --tty=1, further in the o/p:
    eston --backend=drm-backend.so --tty=1Date: 1970-01-01 UTC
    [01:39:53.947] weston 1.9.0 http://wayland.freedesktop.org
    Bug reports to: bugs.freedesktop.org/enter_bug.cgi
    Build: 1.8.93-2-gb05cdb8 configure.ac: bump to version 1.9.0 for the official release (2015-09-21 18:11:26 -0700)
    [01:39:53.948] OS: Linux, 4.4.14, # BSP-Ver=02.00.00 SMP PREEMPT Thu Nov 3 18:05:58 IST 2016, armv7l
    [01:39:53.948] Using config file '/etc//weston.ini'
    [01:39:53.948] Loading module '/usr/lib/weston/drm-backend.so'
    [01:39:53.952] Output repaint window is 7 ms maximum.
    [01:39:53.952] initializing drm backend[01:39:53.954] using /dev/dri/card0
    [01:39:53.954] Loading module '/usr/lib/weston/gl-renderer.so'
    failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
    failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
    loaded module : gbm_pvr.sofound valid GBM backend : gbm_pvr.so
    [01:39:53.960] warning: either no EGL_EXT_platform_base support or specific platform support; falling back to eglGetDisplay.
    PVR:(Error): PVRSRVBridgeCall: Failed to access device. Function ID:3223086849 (strerror returns no value.). [0, ]
    PVR:(Error): PVRSRVEnumerateDevices: BridgeCall failed [0, ]
    PVR:(Error): PVRSRVConnect: Unable to enumerate devices. [0, ]
    PVR:(Error): Couldn't connect to services [0, ]
    [01:39:53.962] failed to initialize display
    [01:39:53.962] EGL error state: EGL_BAD_ALLOC (0x3003)
    [01:39:53.962] failed to initialize egl
    [01:39:53.962] fatal: failed to create compositor backend
  • weston is expecting input devices (/dev/input/eventX), currently we dont have any input source other than USB.

    How do we enable USB mouse as /dev/input/eventX source from Menuconfig, any idea?

    Failure:

    [00:03:28.468] Loading module '/usr/lib/weston/drm-backend.so'
    [00:03:28.472] Output repaint window is 7 ms maximum.
    [00:03:28.472] initializing drm backend
    [00:03:28.474] using /dev/dri/card0
    [00:03:28.474] Loading module '/usr/lib/weston/gl-renderer.so'
    failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
    failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
    loaded module : gbm_pvr.so
    found valid GBM backend : gbm_pvr.so
    [00:03:28.480] warning: either no EGL_EXT_platform_base support or specific platform support; falling back to eglGetDisplay.
    [00:03:28.487] warning: EGL_EXT_buffer_age not supported. Performance could be affected.
    [00:03:28.487] Retrieving EGL client extension string failed.
    [00:03:28.488] warning: no input devices on entering Weston. Possible causes:
            - no permissions to read /dev/input/event*
            - seats misconfigured (Weston backend option 'seat', udev device property ID_SEAT)
    [00:03:28.488] failed to create input devices
    [00:03:28.541] fatal: failed to create compositor backend

     

  • Hi
    Abled to get through and get the weston running using the command you mentioned: But, Viddec3test is failing (Below is the failure)
    viddec3test is modified per your suggest
    ./viddec3test -w 1920x1080 --pos 0x0 /media/video/HistoryOfTI-480p.264 --fps 30
    DEBUG:: Decode Open0x447008: Opening Display..Forcing playback rate at 30 fps.
    wayland display openedwayland registries obtained0x447008: Opening Demuxer..
    Input #0, h264, from '/media/video/HistoryOfTI-480p.264':
    Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p, 720x406 [SAR 406:405 DAR 16:9], 29.92 fps, 29.97 tbr, 1200k tbn, 59.94 tbc
    0x447008: infile=/media/video/HistoryOfTI-480p.264, width=720, height=406
    0x447008: padded_width=896, padded_height=512, num_buffers=19
    DEBUG:: 2 decoder open OK DEBUG:: 30x447008: Opening Engine..displayBufsMode: 1
    MmRpc_use: Error: unable to declare buffer use[ 435.709162] rpmsg_rpc rpmsg-dce: user pointer in the translated offset location is NULL for translation = 1
    [ 435.736512] rpmsg_rpc rpmsg-dce: unwinding UVA to RDA translations! translation = 1
    [ 435.744209] rpmsg_rpc rpmsg-dce: failed to translate all pointers for remote core!
    ../git/libdce_linux.c:115: dce_buf_lock ERROR: Failed eError == DCE_EOK error val -5MmRpc_call: Error: write failed
    ERROR:decoder_process:411: 0x447008: process returned error: -5
    ERROR:decoder_process:412: 0x447008: extendedError: 00000000regards
  • You will observe this error if FD submitted to dce_buf_lock is zero

    Please make sure you have applied the patch in display-wayland.c to get FD from Bo and set multiplanar to false.

  • thanks, the utility is working!
    but duing playback we see green lines in the side and bottom of the video and some glittering in the edge of videos. the video does not seem to be scaled to fullsize (due to green lines in edge). however the playback is OK during the utility is run with KMS mode
    regards
  • hi ramprasad

    would you have any idea on this.

    regards

  • The green patches at the right and bottom are due to padding added by H264 decoder. 

    In KMS case, disp_post_vid_buffer takes offset where active video starts is sent as argument and drmModeSetPlane's last four arguments are crop info and hence we don't see padded region with KMS.

    In Wayland case since full buffer with padding is sent for the surface, it is expected to see padded region.

    There should be some API to crop in wayland also.

  • thanks, i found this API in gstreamer wayland sink for cropping: gst_video_sink_center_rect
    is there a similar one can be directly used in wayland.