I am working on a mixed libVLC / openFrameworks project.
Until now I used libvLC 3.0.9 and libvlc_video_set_callbacks to get pixel frame buffers, and it works very well except for performance issues when playing many videos simultaneously.
So I decided to try libVLC 4.0 which AFAIK natively supports openGL, hoping to get some performance boost.
I downloaded and set up the last nightly build, then in order to have a starting reference point I had a look at some early Qt and SDL code using openGL at https://git.videolan.org.
I tried some openFrameworks customization and started testing, but I'm not able to get any useful result from setting libvlc_video_set_output_callbacks, not even a crash or a nasty error.
The only thing I can see in the console is that VLC media player starts parsing an .mp4 file normally and as soon as the video decoding process begins I can hear a good audio but I get a continuous stream of these errors:
Code: Select all
[0000000101705ea0] main video output error: video output display creation failed
[h264 @ 0x1018b3e00] get_buffer() failed
[h264 @ 0x1018b3e00] thread_get_buffer() failed
[h264 @ 0x1018b3e00] decode_slice_header error
[h264 @ 0x1018b3e00] no frame!
And I discovered that no one of the callbacks set with libvlc_video_set_output_callbacks gets actually called.
From debug text I also see that libvlc_video_set_output_callbacks returns 1, which is a "true" value and so it seems that callbacks are successfully set.
I'm on macOS 10.14.6, Xcode 10.1 and after a whole day of trial and error and googling around I have no idea about what's happening here.
I include below a link to the "core" class of my code: any suggestion, clue or advice is warmly welcome.
Thank you in advance.
https://pastebin.com/fEX8ybc7