vlc media Lecture : vlc headers vs vlc-qt SDK
-
Hello , i need your opinion about these two .
I need to add vlc for my video lecture in my applicaiton. But there was two solutions:
sol1 : just add header files and the .dlls and implément the functions.
You should know that this way was used since 10 years in the application so it needed to fresh up. I changed the headers with newer ones from git and changed the function's implementations ( the one depricated) . But my applciation crashs and i don't get why . for sure it crashs when i do the loading of the file. But no extra information.MeanWhile , i have done some tests using qt-sdk on a mini project. It worked well ( with compiled qt-vlc in msvc 2019 windows ).
I know, i should do the same in linux ( that's the tricky part about sdk it's not really cross platform). But , the good point is that the functions are simpler to use.Does anyone can help me with the crash problem ? and should i use better sdk or continue with the header files ?
Thank you for your time.
-
@The-Qt-Mayssa said in vlc media Lecture : vlc headers vs vlc-qt SDK:
But no extra information
Then please use the debugger to get the stack trace after the crash. First thing to do when analyzing a crash...
"I changed the headers with newer ones from git and changed the function's implementations" - not sure I understand what you mean here. Do you mean the header files from libvlc? And what function implementations?
-
@jsulm
1- I tried using the debugger for sure . it's reallllly slow that i shold wait 10 minutes to get to my break point.
i Debugged using qdebug() to know where it crashs.
that was how far i v'e got.void VideoItem::load(QString file) { qDebug() << __FUNCTION__ << "file = " << file; if (false) //c'est une URL { m = libvlc_media_new_location(file.toUtf8()); } else { qDebug() << __FUNCTION__ << "else"; m = libvlc_media_new_path( "C:/Users/.../Bibliotheque/test.mp4"); } qDebug() << __FUNCTION__ << "file loaded = " << m;
the libvlc_media_new_path causes the crash....
2- Concerning the headers files .. i mean these : https://github.com/videolan/vlc/tree/master/include/vlc .
for example : in the old code it used vlc 2 i guess ... so getting recent dlls and headers means code changes . Like passing from libvlc_media_new_location(inst, path) -> libvlc_media_new_location(path)Am i clear ?
-
Did you also update the lib itself (not only header files).
I was not talking about break point, but running the app in debugger until it crashes and check the stack trace to get more information about the crash. Without stack trace we can only guess.
-
@jsulm
1-yes i did .. i copied the .dlls from my installation folder of videoLan ( version 3.0.20 )
but did'nt get things better.I also tried to not pass by my comlplexe code and run the code example : https://github.com/videolan/vlc/tree/master/doc/libvlc/QtPlayer
but not better.
2-
**Run requested...
Running.Exception at 0x7ffac49f169d, code: 0xc0000005: write access violation at: 0x7ff78b135708, flags=0x0 (first chance) in ntdll!RtlEnterCriticalSection
Exception at 0x7ffac49f169d, code: 0xc0000005: write access violation at: 0x7ff78b135708, flags=0x0 in ntdll!RtlEnterCriticalSection
Exception at 0x7ffac49f169d, code: 0xc0000005: write access violation at: 0x7ff78b135708, flags=0x0
Stopped.
!qtcreatorcdbext.locals-D -e watch,local,inspect,return -v -c -a -W -w watch.0 "entry" 4
!qtcreatorcdbext.breakpoints-v
!qtcreatorcdbext.modules
<Rebuild Watchmodel 27 @ 16:45:24.260 [11605ms] ** -
@The-Qt-Mayssa you can make a debug build from the source here
https://www.videolan.org/vlc/download-sources.html
Then it will be easier for you to debug. -
@JoeCFD Hello , thank you for this answer .. building this is not easy for me on windows. could'nt find a complete tutorial without using docker images or msys2 App.
Meanwhile i tried to run the QtPlayer example in "doc\libvlc\QtPlayer" . It runs without error when i changed my .pro ... but video does'nt start affter selecting the file. What am i doing wrong ?