Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

Debian Jessie (8.7) Qt5 Multimedia Problem

Started by mt19937, March 28, 2017, 11:19:16 AM

Previous topic - Next topic

mt19937

I have a very strange issue with the QMediaPlayer class. I created a new Qt Widgets Application project with Qt Creator. In the MainWindow class (in mainwindow.h) I wrote this:
QMediaPlayer *player = new QMediaPlayer(this);

In mainwindow.h I also wrote #include <QMultimedia/QMediaPlayer>
Since building gave me an undefined reference error to QMediaPlayer, in project-name.pro I added QT += multimedia

Then building my project went smoothly. This is the really strange part: when I ran the executable generated, it logged me out of my laptop! As in I had to log into my laptop again!

This was with Qt 5.8.0 download from the Qt website. After asking on the Qt Forum (here), I uninstalled Qt completely an reinstalled the Debian provided Qt5. Now I could compile and run without getting logged out, but error messages were shown in the application output (handled in the Qt Forum). Also, audio/video couldn't be played. I installed the Qt multimedia packages since the folks on Qt Forum told me to. I installed GStreamer (errors about GStreamer) and tried to play a video file (MP4) with gst-play-1.0 name.mp4 in the terminal, but that logged me out as well! This was all after I showed them my error messages.

So, it was determined that this wasn't a Qt problem. It is a Debian problem (works fine in Windows 10). Any help to get QMediaPlayer working and why this is happening?

Output from sudo dmesg before getting logged out: Here
Output from sudo dmesg after getting logged out: Here
Output from diff -u dmesgOutputBeforeLogout.txt dmesgOutputAfterLogout.txt (differences between the two outputs [shows how first file should be changed to match second file with + (add line) and - (delete line) signs] ): Here

P.S. I can play audio/video files in the default GNOME MPlayer.

paxmark1

It might simplify things to go to Debian Stretch or any Sparky flavour.  LXQT or KDE come to mind as nice flavours for qt development.  After all, you will be in a  Debian 9 base system (or 10 in Sparky if you choose) after the freeze in the near future.  This is as stable a time as it gets to move to Sparky or Debian testing, and if you choose you can stay with Debian 9. 
Search forum for "More info easier via inxi"    If requested -  no inxi, no help for you by  me.

mt19937

Quote from: paxmark1 on March 28, 2017, 03:59:57 PM
It might simplify things to go to Debian Stretch or any Sparky flavour.  LXQT or KDE come to mind as nice flavours for qt development.  After all, you will be in a  Debian 9 base system (or 10 in Sparky if you choose) after the freeze in the near future.  This is as stable a time as it gets to move to Sparky or Debian testing, and if you choose you can stay with Debian 9.

I'm using the LXDE desktop environment with Debian. I would prefer not to upgrade or install another Linux distribution/variation just to get Qt to work. I would like to fix the problem with help. Besides changing/upgrades distributions/variations is there a way to solve this?

paxmark1

Although I have posted a bit here about QT5, I do not code it.  In a couple months your Jessie will become old-stable and  Stretch  will be the new stable.  Just change all instances of stable to testing or as I have, jessie to stretch in your /etc/apt/sources.list.  This is the quietest easiest time to go to a testing environment from stable.  And if you specify stretch, it will stay stable until buster comes along in 2019. 

On this computer - I deeply wanted the newer QT to utilize sigil and calbre. This computer has only Debian sources.  So I went to testing, but it will seamlessly convert to stable with no effort by specifying stretch in /etc/apt/sources.list

# deb cdrom:[Debian GNU/Linux stretch-DI-alpha5 _Stretch_ - Official Snapshot amd64 NETINST Binary-1 20160108-10:53]/ stretch contrib main non-free

#deb cdrom:[Debian GNU/Linux stretch-DI-alpha5 _Stretch_ - Official Snapshot amd64 NETINST Binary-1 20160108-10:53]/ stretch contrib main non-free

deb http://debian.mirror.rafal.ca/debian/ stretch main non-free contrib
deb-src http://debian.mirror.rafal.ca/debian/ stretch main non-free contrib

deb http://security.debian.org/debian-security stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free


You could probably add lxqt as another option for a DE under lightdm.  The developers for lxqt are using QT5.8 and 5.7.1  But you can just stick with lxde. 

There are many other sources of info about testing versus stable, especially on the Debian wiki  but another source would be
http://sparkylinux.org/forum/index.php/topic,3799.0.html

So on testing QT5 is

aptitude show qt5-default
Package: qt5-default                     
Version: 5.7.1+dfsg-3+b1



Search forum for "More info easier via inxi"    If requested -  no inxi, no help for you by  me.

mt19937

@paxmark1

I won't switch to LXQt. But, are you saying that upgrading to Stretch will fix my problem? If it doesn't I will still upgrade to Stretch anyways since I gave up on this (I was trying to make a video player since the default GNOME MPlayer has a play/pause delay). I have a new project now.

I have a lot of questions. When will Stretch become stable (exactly)? And changing all instances of the word "jessie" to "stretch" in /etc/apt/sources.list does it all? I don't have to do anything else? Don't I have to run a few commands in the termina (like sudo aptitude upgrade and sudo aptitude dist-upgrade)? What are they? When Stretch becomes stable is all I have to do run those two commands in the terminal? Then I'm running stable? I thought you can only go stable->testing not testing->stable.

paxmark1

All your questions are answerable in the Debian Wiki.  Also there is #debian-next in OFTC in irc.  Well of course you need to apt (or apt-get) update.  apt upgrade -d , apt upgrade, apt full-upgrade -d, ...  and it does not hurt to apt install apt-listchanges and apt install apt-listchanges. 

From my monthly freeze update mentioned above
https://wiki.debian.org/DebianStretch

off to work. peace out.
Search forum for "More info easier via inxi"    If requested -  no inxi, no help for you by  me.

View the most recent posts on the forum