Disable gstreamer dependency with Qt WebKit
When I run my Qt application that links Qt webkit, and I don't have gstreamer libraries in place, I get the error and my app doesn't run.
I don't need gstreamer for my application and I don;t want to have those libraries in my file system.
How do I disable this dependency without rebuilding the Qt libraries completely.
@kumararajas You either have to rebuild QtWebKit, or install gstreamer libraries.
@Konstantin-Tokarev Is that the only way? Is there any flag or macro that can say not to look for gstreamer? If I have to rebuild QtWebKit is the only way, what is the parameter that I need to mention not to depend on gstreamer?
Is there any flag or macro that can say not to look for gstreamer?
Yes, but they only take effect when QtWebKit is compiled, and when you use it in your application it's too late.
If I have to rebuild QtWebKit is the only way, what is the parameter that I need to mention not to depend on gstreamer?
If you don't have gstreamer installed, QtWebKit won't use it.
@Konstantin-Tokarev So here is the scenario. I do get the ready made libraries coming from TI - SDK. That has gstreamer and webkit libraries. To my board, I wanted to copy only web kit. When I do that, it throws error that gstreamer libraries are missing.
So, from your point, I guess that, When TI has built their SDK, they might have had gstreamer libraries already and built Qt webkit, since it has found the gstreamer libraries, it linked them as well.. Am I right?
So, I can give a try by removing the gstreamer libraries and then build Qt WebKit. That should not find the gstreamer and ignore to link them. Am I right?
Thanks for your help..
In features.pri, I see USE_QTMULTIMEDIA macro being used.
So when I run make, can I pass USE_QTMULTIMEDIA=0 as an argument to disable the gstreamer?
Am I right?
Probably yes. In this case you may need to disable video explicitly. Add WEBKIT_CONFIG-=video when running qmake.
Alternatively you may want to use build-webkit script (in Tools/Scripts directory), it has verbose --help which lists options that you can customize in WebKit. For your embedded system you may find many of them useless. See https://trac.webkit.org/wiki/BuildingQtOnLinux
If you are starting new project you may want to use my fork of QtWebKit. It is not feature complete yet, e.g. hardware acceleration support is not merged yet, but it provides modern version of WebKit engine which has much better compatibility with today's Web. See https://github.com/annulen/webkit/wiki, http://lists.qt-project.org/pipermail/development/2016-June/026282.html
The process that you explained might be good for Qt 5. Can you please explain for Qt 4.8.4? Because the architecture and folder organisation look be different..
All I need is, I need webkit, but I dont want gstreamer capability. I don't want webkit to look for gstreamer libraries.
I am ready to rebuild webkit.
When I had a look at source, I do see a plenty configurations and I dont see enough documentation.
Please help me out!
If you have to use Qt 4 don't use included QtWebKit sources to rebuild, take QtWebKit 2.3.4 instead (e.g. from here: http://pkgs.fedoraproject.org/repo/pkgs/qtwebkit/qtwebkit-2.3.4.tar.gz/md5/42ef76d0cf7d0c611ef83418e9f297ff/qtwebkit-2.3.4.tar.gz)
But if possible, migrate to Qt >= 5.4, since Qt 4 is EOL.
Up gradation - I will be happy to do that :)
But the system is already built on 4.8 by thinking that it is a stable version. We did not think that Qt is going to call off 4.8 as end of life :)
For sure, if there are possibilities to update the platform, we will do that..
@kumararajas From what I know, Milian Wolff from KDAB is working on bringing newer WebKit to Qt 4, ping milian on #qt-labs to know if this option is available and how much it would cost. It should also be possible to bring Qt 4 support to https://github.com/annulen/webkit, but you would need to hire Milian or someone else