View: 124|Reply: 0

OPi 5 Max Gstreamer glimagesink error

[Copy link]

1

threads

1

posts

7

credits

Novice

Rank: 1

credits
7
Published in 2024-11-13 16:44:45 | Show all floors |Read mode
This post was finally edited by Gol at 2024-11-13 16:49

A problem with Orange Pi 5 Max. Tryinig Gstreamer with mppvideodec  element. Decoding H264 video stream and show on HDMI display with glimagesink.

On microSD image with Orangepi5max_1.0.0_ubuntu_focal_desktop_xfce_linux5.10.160  it works but 3-4 minutes, after that video stops (disappears on HDMI) and no any messages in console, gstreamer pipeline continue work.

With microSD image Orangepi5max_1.0.0_ubuntu_jammy_desktop_xfce_linux5.10.160 decoding doesn't work at all. Shows  error

"Caught SIGSEGV
exec gdb failed: No such file or directory
Spinning.  Please run 'gdb gst-launch-1.0 4223' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
"


CPU temperature 42 degrees Celcium, so no overheating.


When testing on Orangepi5max_1.0.0_ubuntu_focal_desktop_xfce_linux5.10.160

Running pipelines in SSH console under root.

1. Test pipeline:
gst-launch-1.0 videotestsrc ! glimagesink    - works fine, no problems

2. Test pipeline:
gst-launch-1.0 -e -v udpsrc port=3000 buffer-size=300000000 do-timestamp=true ! h264parse ! mppvideodec ! glupload ! glcolorconvert ! glshader fragment="`cat shader.txt`" ! gldownload ! videoconvert ! aasink sync=false    - works with no problems  (ASCII output in console)

3. Pipeline which is needed for me:
gst-launch-1.0 -e -v udpsrc port=3000 buffer-size=300000000 do-timestamp=true ! h264parse ! mppvideodec ! glupload ! glcolorconvert ! glshader fragment="`cat shader.txt`" ! glimagesink sync=false    - it works 3-4 minutes only, sometimes less.

If enable GST_DEBUG=4 I see it hangs after some minutes with the message:
glwindow gstglwindow_gbm_egl.c:297:draw_cb: Could not initialize GBM surface


Serarching for this message, found https://github.com/GStreamer/gst-plugins-base/blob/master/gst-libs/gst/gl/gbm/gstglwindow_gbm_egl.c  Hangs after function drmModePageFlip call

/* Presently, current_bo is shown on screen. Schedule the next page
   * flip, this time flip to next_bo. The flip happens asynchronously, so
   * we can continue and render etc. in the meantime. */
  window_egl->waiting_for_flip = 1;
  ret = drmModePageFlip (display->drm_fd, display->crtc_id, framebuf->fb_id,
      DRM_MODE_PAGE_FLIP_EVENT, &(window_egl->waiting_for_flip));
  if (ret != 0) {
    /* NOTE: According to libdrm sources, the page is _not_
     * considered flipped if drmModePageFlip() reports an error,
     * so we do not update the priv->current_bo pointer here */
    GST_ERROR ("Could not initialize GBM surface");
    /* XXX: it is not possible to communicate the error to the pipeline */
    return;
  }


If I run the same pipeline under user (not root) but with sudo - getting errorgluploadelement0: Failed to bind OpenGL API: EGL_BAD_PARAMETER



How I can fix this problem?


You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list