Yes.1. Is this the correct path to follow? That is, will libvlc_video_set_output_callbacks() from VLCv4.0 potentially solve our problem?
https://code.videolan.org/videolan/vlc/ ... widget.cpp2. If correct, where can we find examples of how to use libvlc_video_set_output_callbacks()?
Note that if you plan to integrate other libraries for some purpose (given the extend of features you showcase), you might as well provide X11 windows to those libraries and redirect them into an OpenGL texture and then achieve composition in your app, in a general way.The application is written in C++ and uses Qt and Qml. Due to this fact, we cannot use libvlc_media_player_set_xwindow() but rather libvlc_video_set_callbacks(). Unfortunately, this results in high CPU usage due to video buffer management and decoding that cannot be done by the GPU.
Yes.1. Is this the correct path to follow? That is, will libvlc_video_set_output_callbacks() from VLCv4.0 potentially solve our problem?
https://code.videolan.org/videolan/vlc/ ... widget.cpp2. If correct, where can we find examples of how to use libvlc_video_set_output_callbacks()?
Code: Select all
static inline bool vlc_gl_StrHasToken(const char *apis, const char *api)
{
size_t apilen = strlen(api);
while (apis) {
while (*apis == ' ')
apis++;
if (!strncmp(apis, api, apilen) && memchr(" ", apis[apilen], 2))
return true;
apis = strchr(apis, ' ');
}
return false;
}
Code: Select all
auto addr = that->mContext->getProcAddress(current);
Code: Select all
Signal name : SIGSEGV
Signal meaning : Segmentation fault
Code: Select all
1 vlc_gl_StrHasToken vlc_opengl.h 147 0x7fffdcd8f40a
Code: Select all
CFLAGS="-g -Og" CXXFLAGS="-g -Og" ./configure --enable-debug --disable-optimizations --prefix=/srv/build_libs/vlc4
No.Means you've returned garbage from GetProcAddress
Code: Select all
priv->egl.queryString = vlc_gl_GetProcAddress(interop->gl, "eglQueryString");
if (priv->egl.queryString == NULL)
goto error;
/* EGL_EXT_image_dma_buf_import implies EGL_KHR_image_base */
const char *eglexts = priv->egl.queryString(priv->egl.display, EGL_EXTENSIONS);
if (eglexts == NULL || !vlc_gl_StrHasToken(eglexts, "EGL_EXT_image_dma_buf_import"))
goto error;
On which EGL implementation are you trying to do that? It should work correctly on Linux MESA and ANGLE/Native Windows implementations.
Qt currently **requires** this behaviour to load its own API, so there shouldn't be an issue with this, and the correct entrypoint seems to be returned.
However, with MESA, the return value of EGL/OpenGL/GLES functions are dependant on the context being currently bound. If there is no context bound, you might have incorrect return values. You should enable MESA debug environment variables to ensure that your state is correct: https://docs.mesa3d.org/envvars.html.
You need two context:So, as I understand, I need to implement OpenGL context switching thread-safe.
But I don't have much experience in OpenGL and threads interaction.
Code: Select all
1 ?? 0x7fff7edde18a
2 ?? 0x7fff7eda3ffc
3 ?? 0x7fff7edb7fcb
4 ?? 0x7fff7edb926d
5 ?? 0x7fff7edc0d68
6 ?? 0x7fff7f063eab
7 start_thread pthread_create.c 477 0x7ffff6328609
8 clone clone.S 95 0x7ffff676b163
Code: Select all
Using libvlc version: "4.0.0-dev Otto Chriek"
[0000000158ed7200] videotoolbox decoder: Using Video Toolbox to decode 'h264'
[000000011d2634c0] main video output error: video output display creation failed
[0000000158ed7200] videotoolbox decoder: Using Video Toolbox to decode 'h264'
[0000000158ed7200] main decoder error: buffer deadlock prevented
Texture 0x600005db9560 () used with different accesses within the same pass, this is not allowed.
Texture 0x600005db9710 () used with different accesses within the same pass, this is not allowed.
[000000011d2634c0] main video output error: video output display creation failed
[000000011d2634c0] main video output error: video output display creation failed
[000000011d2634c0] main video output error: video output display creation failed
[000000011d2634c0] main video output error: video output display creation failed
[0000000158ed7200] videotoolbox decoder: Using Video Toolbox to decode 'h264'
Return to “Development around libVLC”
Users browsing this forum: No registered users and 15 guests