“Couldn't find matching render driver” error [LIBVLC][LIBSDL2][RPi3 B]

This forum is about all development around libVLC.
paikuhan
New Cone
New Cone
Posts: 1
Joined: 10 Nov 2019 05:53

“Couldn't find matching render driver” error [LIBVLC][LIBSDL2][RPi3 B]

Postby paikuhan » 10 Nov 2019 06:09

Hi, I am trying the simple libvlc demo with libsdl2 from https://wiki.videolan.org/LibVLC_SampleCode_SDL/ (before you ban me for posting a link. know that it's a videolan link and I am limited to a certain amount of character so I can't post the source directly) but I am having issues when running the compiled binary. I get a "Couldn't find matching render driver" error from SDL_GetError() after SDL_CreateRenderer().

I've only done a few modification to the code:
  • replace "SDL.h" by <SDL2/SDL.h>
  • replace struct context{}; by typedef struct context{}context;
I don't know what the issue is but I am pretty sure it is SDL related because even a simple SDL example where I'm just clearing the screen doesn't work properly. As the picture below shows:

Image

As you can see, instead of clearing the window the renderer of the "Hello World" SDL Window does nothing. And all we see it everything that is behind the SDL Window. I moved the SDL "Hello World" window before taking the screenshot. That's why things look like they are out of place.

Here is the code for the simple SDL Hello World app:

Code: Select all

#include <SDL2/SDL.h> int main(int argc, char *argv[]) { SDL_Window *win = NULL; SDL_Renderer *renderer = NULL; int posX = 100, posY = 100, width = 640, height = 480; SDL_Init(SDL_INIT_VIDEO); win = SDL_CreateWindow("Hello World", posX, posY, width, height, 0); renderer = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED); SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255); while (1) { SDL_Event e; if (SDL_PollEvent(&e)) { if (e.type == SDL_QUIT) { break; } } SDL_RenderClear(renderer); SDL_RenderPresent(renderer); } SDL_DestroyRenderer(renderer); SDL_DestroyWindow(win); SDL_Quit(); return 0; }
Please note that the SDL Hello World app doesn't generate a "Couldn't find matching render driver" error. Although I would appreciate finding a solution for both the issue (my main concern is the libvlc one since I'm on a VLC forum); solving the Hello World app might not necessarily solve the libvlc app.

Also note that I am running everything on the Kano OS (some kind of fork of the Raspbian OS from Kano ) on a Raspberry Pi 3.

Thanks in advance!

Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 24 guests