SDL2 + Gstreamer + hardware accelerating

Hi all, :smiley:

anyone using Gstreamer together with SDL2?

I’m facing issues using hardware accelerated SDL2 renderer with Gstreamer v0.10.
In SDL2 software mode its’s working but in accelerated mode I get a segmentation fault.

What I did under Ubuntu:
With Gstreamer setup a captured video source piped into an gst-appsink and install a callback which will be called for every video frame coming from the captured device.
Within this callback I fill a SDLTexture which will be later rendered in the App::Render routine within the main thread. (I use semaphore to avoid collosion when accessing the texture)

Unfortunatly I need hardware acceleration for the SDL framework.
Has someone an idea how to manage this with SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC?
Are there any solution Gstreamer + SDL2 accelerated outhere?

Thank and chears
Pat

is there no one who streams video from capture device with SDL? [Shocked]

Has someone an idea how to manage this with
SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC?
Are there any solution Gstreamer + SDL2 accelerated outhere?

I use avcodec + SDL2 to render up to 24 H264 cameras on the same screen
(with vsync enabled).

Every camera has a thread that decode the image to an AVPicture, then with
an SDL custom message I send the image buffer to the main thread, the main
thread fills the 24 textures with SDL_UpdateYUVTexture.

I think your approach is failing because you have to upload the frame to
the texture in the main thread (the ones that create the window, the
renderer and that does “present”), a mutex is not enough, and a shared
opengl context may cause performance hits.–
Bye,
Gabry