Qtgstreamer : Libraries error
-
Hi !
I am very new about Qt and Gstreamer(actually in developping in general), but I have to do a project for my studies. In this project I need to stream a vidéo from an IP camera. I found a code example on the web. The problem is : I get an error for every include in the code relating to QGst for example : "QGst/Pipeline : No such file or directory"
I use Ubuntu 18.04 LTS and Qt creator based on Qt 5.9.5. To install QtGstreamer plugins I used the command :
sudo apt-get install qtgstreamer-plugins-qt5 (and basically I have installed Gstreamer before).So as I said, I am very new in that field, I tried to read the documentation but I didn't understand where I can found my answers.
Thanks :D
-
Yes it is ! But I have difficulties to add files to the qmake, I do not found files in my Disk, however I downloaded thanks to the prompt.
For now my qmake is too much simple I think and I need to add libraries :"HEADERS +=
player.h
mediaapp.h \SOURCES +=
player.cpp
mediaapp.cpp
main.cppQT += widgets
" -
-
-
Yes I can, but each time I just move the problem to the include inside the other header file I had.
For exemple, I added pipeline.h, so yes my code found it, but pipeline.h needs two other header file to works, these also need two or three header files each, etc...
Can I link the entire library without moving all header files ? From the .pro maybe ? With what I'm reading from the documentation it should be possible but I dont found the command for now
-
@Chanchan I don't know what you mean by "move".
Take a look at INCLUDEPATH in https://doc.qt.io/qt-5/qmake-variable-reference.html -
I mean, I solve the problem, but create another from the fact that I added a new header which needed other header files, etc...
Thanks for your link ! In theory that is exactly what I need ! In practical, I added : INCLUDEPATH = /usr/include/Qt5GStreamer/include (Where all my header files are) But I still have the same issu : "No such file or directory".
Did I miss something, using this line ? (I added it in my .pro )
-
Update at this time, I restart the soft and it does recognize the path to the libraries ! The command "INCLUDEPATH" was the good one :) Thank you verymuch @jsulm :)
Another issue, still with libraries :
#include <QDeclarativeView>
#include <QDeclarativeContext>
#include <QDeclarativeEngine>
#include<QGLWidgets>
Still doesn't work, on forums, people said that we need to add "QT += declarative" for the three first but it doesn't work, and same for the last one -
Hi,
@Chanchan said in Qtgstreamer : Libraries error:
QDeclarativeEngine
This is a Qt 4, see here for porting to Qt 5.
Take a look at the QQmlEngine class documentation for example, you have at the top of the page which Qt module contains it.
-
I update my situation :
I still have 3 errors ( not so bad considering my 23 at the begining ><) :#include <QDeclarativeView> #include <QDeclarativeContext> #include <QdeclaratveEngine>
By Curiosity I searched on my computer files named "QDeclarativexxx" but I only found "libqdeclarativeview.so" located in a qt4 repertory, I dont know this extension and it seems that I dont have libraries refering to Qt declarative.
Basically (I'm the Doctor B-) ) I tried to download libraries throught the promptcommand, but I dont found the good commandline ><
I took a look on the @SGaist link, in the case of QDeclarative view, the change is : QQuickView and Qt+= quick in my .pro, unfortunately it doesn't work. I searched for a QQuickView library, I only found an html file... So I dont know if it is considered as a library or not, so for now that's the point
By the way, thank you for helping me :)
-
How did you install Qt ?
-
@SGaist Well, it seems that Qt += Quick and a reboot of my computer was enough to works x) So My libraries works and I can run my code :) Thank you for your precious link !
To answer your last question, to install Qt I used :
sudo apt install build-essential sudo apt install qtcreator sudo apt install qt5-default sudo apt install qt5-doc sudo apt install qt5-doc-html qtbase5-doc-html sudo apt install qtbase5-examples