// Adapted from https://wiki.videolan.org/LibVLC_SampleCode_SDL/
// Make sure VLC_PLUGIN_PATH env variable is set and using newish VLC (tested with 3.0.4).
// Currently a pretty hacky implementation, and there's bound to be a much easier way.
// Creates a new SDL window and GL context for video, as otherwise SDL_CreateRenderer alters
// the current GL context, causing a crash. Attempts to swap GL context back and forth when
// video is playing/stopped.
// VIDEO_DIRECT_WINDOW_RENDER is an attempt at rendering directly to an existing window,
// although seems to crash after video has finished. Also seems to require all the functions
// in sdl_gl_funcs.h/.cpp to be renamed to non-default GL names or crashes beforehand.
Fix for #27
Seemed like an interesting task so I had a look.
Might be worth just leaving this PR open and someone with more OpenGL/VLC/SDL knowledge could fix it up... would be a good starting point at least.
Works although:
Details from source:
Fix for #27
Seemed like an interesting task so I had a look. Might be worth just leaving this PR open and someone with more OpenGL/VLC/SDL knowledge could fix it up... would be a good starting point at least.