user4458707
user4458707

Reputation:

What is the proper way to incorporate gstreamer into Qt (Windows)?

Since there is no real tutorial on the internet except for a very few similar questions that have had no answer, how do I incorporate gstreamer into Qt on Windows 7?

I have installed gstreamer throught the installer; then i copied the whole folder into my Qt project folder and put this line in the main:

#include <gstreamer/1.0/x86_64/include/gstreamer-1.0/gst/gst.h>

The compiler suggests gst_init, which means it can read gst.h, yet when I build the copiler gives this error:

C:\ ..path here...\Qt\BachelorProject_AUDIOVIDEO_STREAMING\gstreamer\1.0\x86_64\include\gstreamer-1.0\gst\gst.h:27: error: C1083: Cannot open include file: 'glib.h': No such file or directory

What am I missing?

EDIT: by adding this in the .pro file (as suggested by the gstreamer webpage) and compiling with cmake:

CONFIG += link_pkgconfig
PKGCONFIG += QtGStreamer-1.0

doesn't work either. It really seems that no "official" solution is available online

Upvotes: 1

Views: 2164

Answers (1)

nayana
nayana

Reputation: 3932

You can use pkgconfig which can be used inside Qt project (*.pro) file like

PKGCONFIG += gstreamer-1.0 gstreamer-1.0-app

If I remember correctly..

And you can link other dependant libraries like glib (GStreamer is based on GLib)

Of course you will have to provide correct path to the gstreamer .pc files which contain correct paths to where it is installed - you just keep gstreamer at the default location and it (maybe) should work..

I hope this approach is working on Windows..

Upvotes: 1

Related Questions