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. [SOLVED]Vlc-Qt problem!
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]Vlc-Qt problem!

Scheduled Pinned Locked Moved General and Desktop
16 Posts 3 Posters 10.1k Views 2 Watching
  • 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.
  • Y Offline
    Y Offline
    Yacinoben
    wrote on last edited by
    #3

    Ah ok,
    I tried to build a simple class juste for a test, but no result, i do not know where and how to start .

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      Did you build VLC-Qt itself ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        Yacinoben
        wrote on last edited by
        #5

        It's my fault, i downloaded the VLC-QT of other personne. else now i download the official version in http://vlc-qt.tano.si/
        If I have a problem I will tell you .

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          Yacinoben
          wrote on last edited by Yacinoben
          #6

          I wanted to try a reading, but this code doesn't work ;

          #ifndef VIDEO_H
          #define VIDEO_H
          #include <QMainWindow>
          #include <vlc/VLCQtCore/Instance.h>
          #include <vlc/VLCQtCore/MediaPlayer.h>
          #include <vlc/VLCQtCore/Media.h>
          #include <vlc/VLCQtCore/Common.h>
          #include <vlc/VLCQtWidgets/WidgetVideo.h>
          class Video : public QMainWindow
          {
          Q_OBJECT
          public:
          explicit Video(QWidget *parent = 0);

          public slots:
          void player();
          private :
          VlcMedia * _media;
          VlcInstance* _instance;
          VlcMediaPlayer* _player;
          VlcWidgetVideo * widget;
          };
          #endif // VIDEO_H

          .cpp

          #include "video.h"

          Video::Video(QWidget *parent) : QMainWindow(parent)
          {
          QPushButton *buttonPlayer=new QPushButton("play",this);
          QVBoxLayout *layout=new QVBoxLayout(this);
          _instance = new VlcInstance(VlcCommon::args(), this);
          _player = new VlcMediaPlayer(_instance);
          widget=new VlcWidgetVideo(_player);
          _player->setVideoWidget(widget);
          layout->addWidget(buttonPlayer);
          layout->addWidget(widget);
          setLayout(layout);

          connect(buttonPlayer, SIGNAL(clicked()), this, SLOT(player()));
          

          }
          void Video::player()
          {
          QString file =
          QFileDialog::getOpenFileName(this, tr("Open file"),
          QDir::homePath(),
          tr("Multimedia files(*)"));

          if (file.isEmpty())
              return;
          _media = new VlcMedia(file, true, _instance);
          _player->open(_media);
          

          }
          I have this message
          QLayout: Attempting to add QLayout "" to Video "", which already has a layout
          [02cb4df4] core libvlc error: No plugins found! Check your VLC installation.
          core libvlc error: No plugins found! Check your VLC installation.
          VLC-Qt Error: libvlc failed to load!

          http://i45.tinypic.com/dzb138.png
          I downloaded version for MinGW

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #7

            QMainWindow has already a layout, don't set a new one. Use a placeholder widget that you'll set as central widget of your QMainWindow.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • Y Offline
              Y Offline
              Yacinoben
              wrote on last edited by Yacinoben
              #8

              Video::Video(QWidget parent) : QMainWindow(parent), _media(0)
              {
              QWidget
              zoneCentrale = new QWidget;
              QVBoxLayout *layout=new QVBoxLayout(this);

              QPushButton *buttonPlayer=new QPushButton("play",this);
              

              _instance = new VlcInstance(VlcCommon::args(), this);
              _player = new VlcMediaPlayer(_instance);
              widget=new VlcWidgetVideo(_player,this);

              _player->setVideoWidget(widget);
              widget->setMediaPlayer(_player);

              layout->addWidget(widget);
              layout->addWidget(buttonPlayer);
              zoneCentrale->setLayout(layout);
              

              setCentralWidget(zoneCentrale);

              connect(buttonPlayer, SIGNAL(clicked()), this, SLOT(player()));
              

              }

              Doesn't work,still same error

              ps ; even if I use QWidget in place of QMainWindows , I still get the same error

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #9

                QVBoxLayout *layout=new QVBoxLayout(this); will set the layout on this which is not what you want in this case.

                QVBoxLayout *layout=new QVBoxLayout(zoneCentrale); will set the layout on the zoneCentrale

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • Y Offline
                  Y Offline
                  Yacinoben
                  wrote on last edited by
                  #10

                  Still same error :'(, i don't know anymore

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    The layout problem ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • Y Offline
                      Y Offline
                      Yacinoben
                      wrote on last edited by
                      #12

                      When i launch the program , i have this message http://fr.tinypic.com/view.php?pic=dzb138&s=6#.Vhg6sHrtlBc

                      and error ;
                      core libvlc error: No plugins found! Check your VLC installation.
                      [03126584] core libvlc error: No plugins found! Check your VLC installation.
                      VLC-Qt Error: libvlc failed to load!

                      I test this condition

                      QLibrary lib( "libvlc" );
                      if ( lib.load() )
                      {
                      qDebug() << "libvlc loaded";
                      }
                      else
                      {
                      qDebug() << "libvlc not loaded";
                      }
                      she return always true

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #13

                        Try setting VLC_PLUGIN_PATH in your application environment variables (Run part of the project panel in Qt Creator)

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        1
                        • Y Offline
                          Y Offline
                          Yacinoben
                          wrote on last edited by Yacinoben
                          #14

                          it works, I added the folder plu gin in release !!! i"m very happy :')

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #15

                            Good :)

                            Then since you have it working now please update the thread title prepending [solved] so other forum users may know a solution has been found :)

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • vince16V Offline
                              vince16V Offline
                              vince16
                              wrote on last edited by
                              #16

                              Hi everybody, when I launch my program from Qt Creator all is OK.
                              But when I run exec file directly from windows explorer no HMI appears. I use dependency walker to see what is wring and I have got the same message :
                              GetProcAddress(0x76190000 [GDI32.DLL], "GetCharWidthI") called from "QWINDOWS.DLL" at address 0x520D4FAA and returned 0x761C8EB6.
                              GetProcAddress(0x76060000 [MSVCRT.DLL], "_get_output_format") called from "LIBVLCCORE.DLL" at address 0x5042A5E4 and returned 0x760D5CE8.
                              core libvlc error: No plugins found! Check your VLC installation.
                              VLC-Qt Error: libvlc failed to load!
                              Second chance exception 0xC0000005 (Access Violation) occurred in "LIBVLC.DLL" at address 0x5238D481.
                              Exited "TESTVIDEO.EXE" (process 0xE44) with code -1073741819 (0xC0000005).

                              Have you got an idea? I saw in last topic that I need to add environnement variable VLC_PLUGIN_PATH. Where is the plugin path? Does I need to install VLC. I only install QtVlc with the 3 folders, bin, include et lib.

                              Regards

                              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