Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. vlc media Lecture : vlc headers vs vlc-qt SDK
QtWS25 Last Chance

vlc media Lecture : vlc headers vs vlc-qt SDK

Scheduled Pinned Locked Moved Unsolved General and Desktop
vlcvlc-qtcross platformcompilationplugins
7 Posts 3 Posters 604 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    The Qt Mayssa
    wrote on 7 May 2024, 12:23 last edited by
    #1

    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.

    J 1 Reply Last reply 7 May 2024, 12:30
    0
    • T The Qt Mayssa
      7 May 2024, 12:23

      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.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 7 May 2024, 12:30 last edited by
      #2

      @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?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply 7 May 2024, 12:45
      0
      • J jsulm
        7 May 2024, 12:30

        @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?

        T Offline
        T Offline
        The Qt Mayssa
        wrote on 7 May 2024, 12:45 last edited by
        #3

        @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 ?

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 7 May 2024, 13:03 last edited by
          #4

          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.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          T 1 Reply Last reply 7 May 2024, 13:52
          0
          • J jsulm
            7 May 2024, 13:03

            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.

            T Offline
            T Offline
            The Qt Mayssa
            wrote on 7 May 2024, 13:52 last edited by The Qt Mayssa 5 Jul 2024, 14:52
            #5

            @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-
            f38e6421-f183-4170-8abb-7b7ccd9f498a-image.png

            **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] **

            6358527f-4118-4307-81f5-74cb7cefda7f-image.png

            J 1 Reply Last reply 7 May 2024, 15:21
            0
            • T The Qt Mayssa
              7 May 2024, 13:52

              @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-
              f38e6421-f183-4170-8abb-7b7ccd9f498a-image.png

              **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] **

              6358527f-4118-4307-81f5-74cb7cefda7f-image.png

              J Offline
              J Offline
              JoeCFD
              wrote on 7 May 2024, 15:21 last edited by
              #6

              @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.

              T 1 Reply Last reply 13 May 2024, 12:48
              0
              • J JoeCFD
                7 May 2024, 15:21

                @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.

                T Offline
                T Offline
                The Qt Mayssa
                wrote on 13 May 2024, 12:48 last edited by
                #7

                @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 ?

                1 Reply Last reply
                0

                3/7

                7 May 2024, 12:45

                • Login

                • Login or register to search.
                3 out of 7
                • First post
                  3/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved