Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. I want to use libvlc with qt

I want to use libvlc with qt

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 2 Posters 10.7k 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.
  • M Offline
    M Offline
    mosstachar
    wrote on last edited by
    #1

    I want to use libvlc with qt that can help me and my donnet depuit step to do the installation libqt ... execution of Application (ubuntu 14.04)

    1 Reply Last reply
    0
    • L Offline
      L Offline
      LuGRU
      wrote on last edited by
      #2

      Hi,
      I'm using LibVLC on Mac / Win and Debian in Qt base application and it do work just fine everywhere.

      On Win and Mac just download VLC Player and use SDK that is inside package, on Ubuntu install dev. libVlc from repository, add includes and libs to Your project and Your are done.

      M 1 Reply Last reply
      0
      • L LuGRU

        Hi,
        I'm using LibVLC on Mac / Win and Debian in Qt base application and it do work just fine everywhere.

        On Win and Mac just download VLC Player and use SDK that is inside package, on Ubuntu install dev. libVlc from repository, add includes and libs to Your project and Your are done.

        M Offline
        M Offline
        mosstachar
        wrote on last edited by mosstachar
        #3

        @LuGRU big thnaks to you I am a beginner you can give me the command to follow + sample code. I have installed dev libvlc but I know the enplacement of the lib and include 'the path'

        1 Reply Last reply
        0
        • L Offline
          L Offline
          LuGRU
          wrote on last edited by
          #4

          This is broad subject and what I can recommend is to just google it (i.e. "libvlc example code").
          Also take a look at Qt wrapper for libVlc - http://vlc-qt.tano.si/ - repo. contains also example usage of widget base classes to i.e. display video etc. I think that using this library will be easier for the beginner.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mosstachar
            wrote on last edited by mosstachar
            #5

            thanks for you i have installed libvlc dev and it work but when i run application give me this erreur
            /home/lyr/qtvlc/vlc_on_qt.h:32: error: 'libvlc_exception_t' does not name a type
            libvlc_exception_t *_vlcexcep;
            ^
            and errur point in this line: libvlc_exception_t _vlcexcep;

            my object is : rtp/rtsp streaming player

            1 Reply Last reply
            0
            • L Offline
              L Offline
              LuGRU
              wrote on last edited by
              #6

              Missing include?

              M 1 Reply Last reply
              0
              • L LuGRU

                Missing include?

                M Offline
                M Offline
                mosstachar
                wrote on last edited by
                #7

                @LuGRU
                #include <vlc/vlc.h>

                #include <QWidget>
                //#include <QX11EmbedContainer>

                class QVBoxLayout;
                class QPushButton;
                class QTimer;
                class QFrame;
                class QSlider;

                #define POSITION_RESOLUTION 10000

                class Player : public QWidget
                {
                Q_OBJECT
                QSlider *_positionSlider;
                QSlider *_volumeSlider;
                // [20101201 Ondra Spilka]
                // on Linux/Ubuntu Lucid and VLC >= 1.0 (at least 1.1.5 was tested) XWindow handle have to be passed
                // therefore QX11EmbedContainer have to be used instead of QFrame
                #ifdef Q_WS_X11
                QX11EmbedContainer *_videoWidget;
                #else
                QFrame *_videoWidget;
                #endif
                QTimer *poller;
                bool _isPlaying;
                libvlc_exception_t _vlcexcep;
                libvlc_instance_t *_vlcinstance;
                libvlc_media_player_t *_mp;
                libvlc_media_t *_m;

                public:
                Player();
                ~Player();
                void raise(libvlc_exception_t * ex);

                public slots:
                void playFile(QString file);
                void updateInterface();
                void changeVolume(int newVolume);
                void changePosition(int newPosition);

                };
                #endif

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mosstachar
                  wrote on last edited by
                  #8

                  there is no file with this name libvlc_exception.h
                  in /usr/include/vlc

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    LuGRU
                    wrote on last edited by LuGRU
                    #9

                    Your example is from : https://wiki.videolan.org/LibVLC_SampleCode_Qt/ ?
                    If so then this example uses libVlc version 1.1.5 and in Your repo there is probably already version 2.X with You installed that's why this error happens.

                    Either:

                    1. use examples for version 2.x
                    2. install version 1.X dev packages

                    PS. I would strongly recommend for You to use Qt libvlc wrapper from here: http://vlc-qt.tano.si/ . There are already compiled libraries plus this lib contains wrapper for QWidget that will display video. Later on, when You are more familiar with libvlc and qt, You will need to implement such widget yourself because that library has some limitations i..e no access to video frames (although I was using it long time ago so it may already changed).

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mosstachar
                      wrote on last edited by mosstachar
                      #10

                      big thanks .
                      yes i use this example https://wiki.videolan.org/LibVLC_SampleCode_Qt/.
                      is what you can give me the steps to run and devloper with vlc-qt, because what I am doing some thing without result.
                      my steps:
                      add-apt-repository ppa:ntadej/tano
                      apt-get install libvlc-qt-core1 libvlc-qt-widgets1 libvlc-qt-dbg libvlc-qt-dev

                      but whene i want to run example from here https://github.com/vlc-qt/examples
                      white this command ;1 qmake and 2 make give me erreur
                      EqualizerDialog.cpp:7:30: fatal error: vlc-qt/Equalizer.h: No such file or directory

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        LuGRU
                        wrote on last edited by
                        #11

                        You don't need to include repo. - but I suspect that would be easier for You then manually set those paths.

                        Error is related to missing include (either path or file is missing), I don't use that widget so I can't help You but error that You are experiencing is normal include issue (path issue).

                        1 Reply Last reply
                        0

                        • Login

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