Skip to main content
Explorer
June 18, 2025
Solved

STM32MP257F-DK GStreamer problem

  • June 18, 2025
  • 4 replies
  • 692 views

Hello,

I'm using Buildroot environment with the STM32MP257F-DK board. I'm testing GStreamer with a simple pipeline:

gst-launch-1.0 videotestsrc ! autovideosink

When I first run it there is no problem. The test video shows fine on the HDMI monitor. But when I run it again second time there are errors : pipeline doesn't want to preroll. And all attempts after that fail too. It works only one time after the boot.

There is additional debug info: drmModeSetPlane failed: No space left on device (28).

Maybe some setting is missing ?

BR

raimo

    This topic has been closed for replies.
    Best answer by PPAGE.13

    Hi Raimo,

    if you are fine with your last gstreamer parameters, please close the ticket.

    Have a good day.

    Philippe.

    4 replies

    ST Employee
    June 18, 2025

    Hi,

     

    in OSTL Yocto based environment, there is no issue running several times your gstreamer command.

     

    In you Builtroot env, you can try to check CMA  memory with this command into a shell script:

    "while true ; do grep CmaFree /proc/meminfo ; sleep 3 ; done"

     

    And also try a bigger and HW accelerated mp4 video with the similar command to that:

    su -l weston -c "gst-launch-1.0 filesrc location=/usr/local/demo/medical/videos/air_1024.mp4 ! qtdemux ! h264parse ! queue ! v4l2slh264dec ! autovideosink"

     

    (replace mp4 file with yours)

     

    Note: to check HW VPU is activated, check interrrupts number:

    "cat /proc/interrupts | grep vdec"

     

    BR,

    Philippe.

    Ronte.1Author
    Explorer
    June 18, 2025

    Hi,

    I did the CMA check, first it shows CmaFree 129400kB

    After a succesful gstreamer launch there was 120976 kB, and after next failing tries there's 128800 kB and it doesnt change after this.  

    BR Raimo

     

     

    ST Employee
    June 18, 2025

    Hi,

     

    could you please add "-v" option in you gstreamer command to get more info.

     

    Philippe.

    Ronte.1Author
    Explorer
    June 18, 2025

    Hi,

    Here's the log file when launch fails:

     

    # gst-launch-1.0 videotestsrc ! autovideosink -v
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms: display-width = 1920
    /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms: display-height = 1080
    /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, format=(string)BGRA, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
    /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, format=(string)BGRA, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
    /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms.GstPad:sink: caps = video/x-raw, format=(string)BGRA, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
    /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = video/x-raw, format=(string)BGRA, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
    ERROR: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms: GStreamer encountered a general resource error.
    Additional debug info:
    ../sys/kms/gstkmssink.c(2032): gst_kms_sink_show_frame (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms:
    drmModeSetPlane failed: No space left on device (28)
    ERROR: pipeline doesn't want to preroll.
    Setting pipeline to NULL ...
    ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.
    Additional debug info:
    ../libs/gst/base/gstbasesrc.c(3132): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
    streaming stopped, reason error (-5)
    ERROR: pipeline doesn't want to preroll.
    Freeing pipeline ...
    #

     

    BR Raimo

    Ronte.1Author
    Explorer
    June 23, 2025

    Hi,

    I found a sort of cure for this.

    If I add some parameters to the sink then the launch will work all times.

    gst-launch-1.0 videotestsrc ! kmssink driver-name=stm connector-id=32 force-modesetting=true.

    In my setup the kmssink was the one the autovideosink is choosing.

    BR Raimo

     

    PPAGE.13Answer
    ST Employee
    June 27, 2025

    Hi Raimo,

    if you are fine with your last gstreamer parameters, please close the ticket.

    Have a good day.

    Philippe.