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.

GStreamer Hardware Decoding Issues with Wayland

Hello,

I can't get GStreamer video playback with hardware decoding working on Spectrum Reference board.

I have tried all GLSDK versions (up to 6.10.00.02).

Following the Software Developers Guide after initializing Wayland I run the following command:

target # gst-launch playbin2 uri=file://<path-to-file-name> video-sink=waylandsink

The CPU load will go above 50 % and I'll receive the following error messages constantly:

#########################

[ 143.121337] [drm:omap_crtc_error_irq] *ERROR* tv: errors: 00008000

WARNING: from element /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:vbin/GstBin:bin0/GstWaylandSink:waylandsink0: A lot of buffers are being dropped.

Additional debug info:

gstbasesink.c(2875): gst_base_sink_is_too_late (): /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:vbin/GstBin:bin0/GstWaylandSink:waylandsink0:

There may be a timestamping problem, or this computer is too slow.

#########################

Whereas testing the same video with the X11 sink will run smoothly using hardware decoding:

target # gst-launch playbin2 uri=file://<path-to-file-name> video-sink=dri2videosink


Is this a known issue or am I doing something wrong ?

Thanks in advance.

Best regards,
Oliver

  • Hi Oliver,

    could you confirm this is DRA7x? Are you using the prebuilt images?

    Regards,

    Marc

  • Hi Marc,

    thanks for the reply. Yes, I forgot to mention: This is using the dra7xx-evm. And building Yocto from scratch without any modifications as decsribed in the Wiki here

    The outcome will be the standard arago-glsdk-multimedia-image for the dra7xx-evm.

    Thanks again,

    Oliver

  • Hi Oliver,

    Could you please answer the following?

    1. Is the issue reproducible with the default filesystem as well?
    I'm sure you are running the commands before launching gst-launch. Please confirm.
    1. pvrsrvinit
    2. weston --tty=1 (At this point you are able to see the weston desktop)
    3. gst-launch ....
    • What the displays connected to the board? Would you be able to send the output of modetest?
    • Have you tried to play the same file with viddec3test? The command is documented in the Software Developers Guide and it needs to be run on KMS (without wayland). 

    Regards

    Karthik

  • Hi Karthik,

    thank you very much for your reply. I am not sure about this:

    1. Is the issue reproducible with the default filesystem as well?

    I used the GLSDK to build a default filesystem with Yocto. No modifiacations were made to any of the recipes.

    Could you kindly explain what you mean with default filesystem ?

     

    Yes, I ran all of the commands to initialize Wayland (otherwise I wouldn't be able to run Wayland).

    The display connected is the one that comes with the Spectrum Digital EVM, but I have also tried with differenct HDMI monitors. Honestly, I do not think it is related to the display, but anyway here is the output from modetest:

    root@dra7xx-evm:~# modetest

    trying to load module i915...failed.

    trying to load module radeon...failed.

    trying to load module nouveau...failed.

    trying to load module vmwgfx...failed.

    trying to load module omapdrm...success.

    Encoders:

    id      crtc    type    possible crtcs  possible clones

    3       10      TMDS    0x00000003      0x00000000

    11      0       TMDS    0x00000002      0x00000000

     

    Connectors:

    id      encoder status          type    size (mm)       modes   encoders

    4       3       connected       unknown 0x0             1       3

      modes:

            name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)

      800x480 60 800 841 890 931 480 493 497 526 flags: nhsync, nvsync; type: preferred, driver

      props:

            1 EDID:

                    flags: immutable blob

                    blobs:

     

                    value:  2 DPMS:

                    flags: enum

                    enums: On=0 Standby=1 Suspend=2 Off=3

                    value: 0

    12      0       disconnected    HDMI-A  0x0             0       11

     

    CRTCs:

    id      fb      pos     size

    10      19      (0,0)   (800x480)

      800x480 60 800 841 890 931 480 493 497 526 flags: nhsync, nvsync; type: preferred, driver

      props:

            6 rotation:

                    flags: bitmask

                    values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10 reflect-y=0x20

                    value: 0

            7 zorder:

                    flags: range

                    values: 0 3

                    value: 0

            8 global_alpha:

                    flags: range

                    values: 0 255

                    value: 0

            9 pre_mult_alpha:

                    flags: range

                    values: 0 1

                    value: 0

    14      0       (0,0)   (0x0)

       0 0 0 0 0 0 0 0 0 flags: ; type:

      props:

            6 rotation:

                    flags: bitmask

                    values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10 reflect-y=0x20

                    value: 0

            7 zorder:

                    flags: range

                    values: 0 3

                    value: 0

            8 global_alpha:

                    flags: range

                    values: 0 255

                    value: 0

            9 pre_mult_alpha:

                    flags: range

                    values: 0 1

                    value: 0

     

    Planes:

    id      crtc    fb      CRTC x,y        x,y     gamma size

    15      0       0       0,0             0,0     0

      formats: RG16 RX12 XR12 RA12 AR12 XR15 AR15 RG24 RX24 XR24 RA24 AR24 NV12 YUYV UYVY

      props:

            6 rotation:

                    flags: bitmask

                    values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10 reflect-y=0x20

                    value: 0

            7 zorder:

                    flags: range

                    values: 0 3

                    value: 0

            8 global_alpha:

                    flags: range

                    values: 0 255

                    value: 0

            9 pre_mult_alpha:

                    flags: range

                    values: 0 1

                    value: 0

    16      0       0       0,0             0,0     0

      formats: RG16 RX12 XR12 RA12 AR12 XR15 AR15 RG24 RX24 XR24 RA24 AR24 NV12 YUYV UYVY

      props:

            6 rotation:

                    flags: bitmask

                    values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10 reflect-y=0x20

                    value: 0

            7 zorder:

                    flags: range

                    values: 0 3

                    value: 0

            8 global_alpha:

                    flags: range

                    values: 0 255

                    value: 0

            9 pre_mult_alpha:

                    flags: range

                    values: 0 1

                    value: 0

     

    Frame buffers:

    id      size    pitch

    viddec3test is working ok using hardware decoding but it is not using gstreamer if I remember correctly.

     

    The issue I am having is clearly related to the wayland-sink of gstreamer. The X11 sink is working ok.

     

    Has anybody been able to play a video using gstreamer from TI on wayland and make use of the hardware decoding ?

     

    Thanks again.

     

    Best regards,

    Oliver

     

     

     

  • Hi Oliver,

    Thanks for the providing the details. 

    By default filesystem, I was referring the filesystem that is shipped along with the GLSDK installer. If you follow the Software Developers Guide, you will see this section talks about the preparing your card.

    • Re-format your µSD card with this script mksdboot.sh from the bin directory in the GLSDK
    $ sudo ${GLSDK}/bin/mksdboot.sh --device /dev/sdY --sdk ${GLSDK}
    

    The above script would prepare the SD card with the prebuilt images and yocto filesystem for SD boot.

    I was just trying to rule out the possibility of some change in the recipe while you are building. But the above procedure is just a quick way to test things across various GLSDK releases, if you need to.

    Wayland-sink is extensively tested on the GLSDK. It is fully functional with the hardware accelerated video playback.

    This makes me suspect if this issue could be related to unsupported audio. 

    Would you be able to repeat the same experiment with the additional options on the gst-launch, that is:

    • pvrsrvinit
    • weston --tty=1
    • gst-launch ... video-sink=waylandsink flags=1

    Regards

    Karthik

  • Hi Karthik,

     

    thanks a lot for the reply and the very helpful hints.

    Your answer got me thinking and although we tested 3 different video files I've finally found one that works without any stuttering or error messages.

    When playing Sintel (HD 1080p) everything runs smoothly.

    So it could be, like you already said, that it is due to some strange audio or video codecs in the previously tested video files.

    The CPU load is still around 50 to 55 % percent and I am not sure if hardware decoding is used.

    Do you have any idea how to find out whether hardware decoding is actually being used when playing the Sintel file via gstreamer ?

    Thanks again.

    Best regards,
    Oliver

  • Oliver,

    You can do the following to determine if the hardware decoding is being used or not.

    watch -n 1 cat /proc/interrupts | grep ipu

    If you see the number is increasing while playing the video file, we can be certain that the video is being decoded on hardware.

    I checked the link that you sent, there are a lot of files there. Would you be able to point me to the exact one that plays without stuttering and the one that has a CPU load? If I get a chance, I will try it out on my hardware.

    Regards

    Karthik