vlc-qt for Qt5 error

This forum is about all development around libVLC.
freddy311082
New Cone
New Cone
Posts: 2
Joined: 05 Nov 2013 04:21

vlc-qt for Qt5 error

Postby freddy311082 » 09 Dec 2013 15:18

Hi peopple

I've the following code:

#include <QApplication>
#include <vlc-qt/Common.h>
#include <vlc-qt/Instance.h>
#include <vlc-qt/Media.h>
#include <vlc-qt/MediaPlayer.h>
#include <vlc-qt/WidgetVideo.h>
#include <QWidget>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);

QWidget* mainWidget = new QWidget();
mainWidget->setSizeIncrement(400,400);
VlcInstance* vlcInstance = new VlcInstance(VlcCommon::args(), NULL);


mainWidget->show();

return a.exec();
}

the application give a segmentation fault in the VlcInstance line and the message is this one:

QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' [1024]. Previously registered size 16, now registering size 0.
The program has unexpectedly finished.

I had print the VlcCommon::args() to see what it has and this is the result:

--intf=dummy
--no-media-library
--no-plugins-cache
--no-stats
--no-osd
--no-loop
--no-video-title-show
--drop-late-frames

I'm using libvlc 2.1 and vlc-qt from it git repo

Am I have to add another parameter to solve my problem ??

best regards

freddy

Rémi Denis-Courmont
Developer
Developer
Posts: 15272
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: vlc-qt for Qt5 error

Postby Rémi Denis-Courmont » 15 Dec 2013 02:43

You need to build VLC against Qt5 (or without the Qt interface at all) to use LibVLC with Qt5. This is an unfortunate consequence of how Qt4 and Qt5 are linked.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

bernd_b
Blank Cone
Blank Cone
Posts: 50
Joined: 12 Jul 2010 19:34

Re: vlc-qt for Qt5 error

Postby bernd_b » 01 Mar 2014 14:11

What are the correct configure / make options to make sure that vlc is compiled against qt4 only? I always get a separate window when playing a video with a self compiled vlc. This was assumed to be the cause of a qt4/ qt5 mix up ( https://forum.videolan.org/viewtopic.ph ... 84#p393963

Rémi Denis-Courmont
Developer
Developer
Posts: 15272
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: vlc-qt for Qt5 error

Postby Rémi Denis-Courmont » 01 Mar 2014 18:13

At configure stage, VLC picks Qt5 if available, and falls back to Qt4 if not.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 46 guests