Hello everyone,
First of all apologies if this has been asked before, but I honestly couldn’t find it.
So here’s my problem, I’m trying to create a simple video/stream player using SDL2.
I’m using gstreamer to get the stream from an RTSP/H264 source.
I managed to get it working when I create the renderer with SDL_RENDERER_SOFTWARE flag on, but if I leave it empty (or set SDL_RENDERER_ACCELERATED) to get HW accelleration, nothing is displayed.
I’m sure I’m missing something very fundamental, but being a newbie in SDL2 world I can’t put my finger on it.
Here’s the source code:
http://tpcg.io/_3MENV0
(not sure what the common practice here is for sharing code)
The non-working output of the above code is:
** (process:35303): DEBUG: 18:09:08.819: Detected display 0: 1920 x 1080
** (process:35303): DEBUG: 18:09:08.844: Driver 0 : opengl
** (process:35303): DEBUG: 18:09:08.844: Driver 1 : opengles2
** (process:35303): DEBUG: 18:09:08.844: Driver 2 : software
** (process:35303): DEBUG: 18:09:08.844: Current video driver: x11
** (process:35303): DEBUG: 18:09:08.844: Rendering driver: opengl
** (process:35303): DEBUG: 18:09:08.846: Starting pipeline
** (process:35303): DEBUG: 18:09:08.846: GST init
** (rtspplayer:35303): DEBUG: 18:09:08.857: GST Parse launch
** (rtspplayer:35303): DEBUG: 18:09:08.894: GST Setting frame callback (0x648abef3cc10)
** (rtspplayer:35303): DEBUG: 18:09:08.894: GST Set to ready
** (rtspplayer:35303): DEBUG: 18:09:08.894: GST Set to playing
** (rtspplayer:35303): DEBUG: 18:09:08.894: Pipeline playing
** (rtspplayer:35303): DEBUG: 18:09:18.202: Rendered!
** (rtspplayer:35303): DEBUG: 18:09:18.242: Rendered!
** (rtspplayer:35303): DEBUG: 18:09:18.283: Rendered!
** (rtspplayer:35303): DEBUG: 18:09:18.325: Rendered!
** (rtspplayer:35303): DEBUG: 18:09:18.365: Rendered!
...
...
Some additional info:
glxinfo shows “direct rendering: Yes”
Running on Ubuntu 23.04 and Intel CPU and integrated GPU with, supposedly, all proper GPU drivers installed.
The same way, when trying to use the wayland driver I get the same behavior (nothing plays)
Thank you very much!