Not able to make libvlc_video_set_output_callbacks work with libVLC 4.0

This forum is about all development around libVLC.
gsibaldi
New Cone
New Cone
Posts: 5
Joined: 06 Apr 2020 18:26
VLC version: 3.0.9 Vetinari
Operating System: Mac OS
Location: Florence, Italy
Contact:

Not able to make libvlc_video_set_output_callbacks work with libVLC 4.0

Postby gsibaldi » 23 May 2020 23:55

Hello everyone,

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!
So I start putting some debug feedback text into the callbacks, supposing there are video out setup problems or GL related problems.
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

gsibaldi
New Cone
New Cone
Posts: 5
Joined: 06 Apr 2020 18:26
VLC version: 3.0.9 Vetinari
Operating System: Mac OS
Location: Florence, Italy
Contact:

Re: Not able to make libvlc_video_set_output_callbacks work with libVLC 4.0

Postby gsibaldi » 24 May 2020 19:46

UPDATE: rising the "verbose" debug level now I get some more information:

Code: Select all

[0000600000ca82d0] iokit_inhibit inhibit debug: Inhibiting display sleep [000000010144a090] main video output debug: deinterlace -1, mode auto, is_needed 0 [000000010144a090] main video output debug: Opening vout display wrapper [00007000089eb568] main generic debug: looking for vout display module matching "gl": 16 candidates [00007000089eb568] main generic debug: no vout display modules matched [000000010144a090] main video output error: video output display creation failed [0000600000ca82d0] iokit_inhibit inhibit debug: Releasing previous IOPMAssertion [0000600000ca82d0] iokit_inhibit inhibit debug: Removed previous inhibition [0000000101161260] main player debug: saving a free vout [h264 @ 0x105000000] get_buffer() failed [h264 @ 0x105000000] thread_get_buffer() failed [h264 @ 0x105000000] decode_slice_header error [h264 @ 0x105000000] no frame! [h264 @ 0x102097400] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [h264 @ 0x102097400] Frame num gap 17 13
The problem appears to be "video output display creation failed" because gl module has not been found.
But how to fix that?...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 9 guests