How to resolve invalid signal "media-configure" in gstreamer when used along with GTK+3 source - 64-bit

I am using Gstreamer to create a video streaming server along with GTK+3 for GUI. I followed below procedure to setup the source code in Windows 64bit :
GTK+3 is installed using vcpkg
Gstreamer (ver 1.16) is installed using the oficial gstreamer downloads
Gstreamer libraries are pointed in the environment variables using GST_PLUGIN_PATH
The source code is setup in visual studio 2019
I am facing issue in g_signal_connect used in gstreamer source code
g_signal_connect(G_OBJECT(app->factory), "media-configure", (GCallback)media_config, app);
with the below warning.
GLib-GObject-WARNING **: C:\vcpkg\buildtrees\glib\src\2.52.3-34a15219ec\gobject\gsignal.c:2523: signal 'media-configure' is invalid for instance '0000026441B40280' of type '(NULL)'
Since both GTK+3 and Gstreamer uses gObject for signal_connect, at runtime the gstreamer refer to gsignal.c of gtk. When I run the gstreamer source separately without using GTK runtime libraries, I am able to get the output.
If I remove the gobject reference of gtk and link the gstreamer library, then GTK signal connects are not working.
How can I fix the GObject reference issue ?

Related

Qt, OpenCV, Windows or Linux, package management?

I made this tutorial about a year and a half ago:
https://www.youtube.com/watch?v=akAAAvGyLn0
To summarize, at the time, the best way I could find to get Qt and OpenCV running together on Windows 10 was to download the source for OpenCV, download CMake, check the Qt option, compile OpenCV fully from source, and then edit the .pro file within Qt Designer.
This process is very time consuming (the video linked above is about an hour) and results in a configuration where OpenCV has to be in the exact location specified in the .pro file settings, which are cryptic and very non-intuitive.
With package management having progressed quite a bit in the last year and a half, I'd like to re-do this video using some sort of package management to use pre-compiled binaries and greatly ease and expedite the process.
Within Visual Studio I use NuGet packages for almost everything as they are quick and work great. Moreover, making your own NuGet if there is not an existing one is not that difficult.
So for those familiar with Qt and/or package management (outside of Visual Studio) more than I am, here are my questions:
-Does Qt have a NuGet equivalent? I just downloaded / installed the most recent Qt (5.8) and I can't seem to find any NuGet equivalent in the installer or the menus (this seems very archaic for 2017)
-If there is not a NuGet equivalent within Qt, is there an industry standard package manager that would work with Qt and Windows? What about for common Linux distributions such as Ubuntu? I found this link: http://rodrigoberriel.com/2014/11/using-opencv-3-qt-creator-3-2-qt-5-3/ is this the best way to use Qt / OpenCV on Linux ?
-It seems Chocolatey has an OpenCV package: https://chocolatey.org/packages/OpenCV but since the default compile options for OpenCV don't include Qt, and this page seems to state that the package is compiled with the default options, I gather Qt is not supported, is this correct? Even if Qt is supported, will putting the Chocolatey OpenCV package name in the .pro file be recognized by Qt, or is that only a Linux thing?
I would really like to continue supporting Qt in my OpenCV tutorials, but with how quick and painless it is to use OpenCV within Visual Studio now (just choose an applicable NuGet package) and how difficult it is in Qt, I'm considering no longer using Qt until they get a NuGet package equivalent going. Can anybody provide assistance with the above questions / concerns?

Developing using Anjuta and Glade for GTK2

I am developing an app for a system that has GTK2 as the latest GTK library installed. I'm using Anjuta and Glade's wysiwyg design interface.
I've used "project > add library" to add the library support for GTK2
and used the project tab on the left to remove support for GTK3.
When I try running my application I get the following error message:
CRITICAL **: couldn't load builder file: src/gtk_foobar.ui: required gtk+ version 3.0, current version is 2.24
This error starts coming up as soon as I remove GTK3 as one of the libraries.
I need this application to work on systems without GTK3.

Qt Creator as a debuging system for Linux embedded

In our system, we write the code on C++ without using Qt libraries.Actually, we write the on Windows machine, but finaly, this code must to be rebuilded for Linux Embedded machine. At first stage we did it successfully with Makefile-s, but "old style debugging" with gdb utility killed us. So I want to use Qt Creator to debug the application.
I successfully use Qt Creator to build all libraries and applications for ARM machine(of couse I have an ARM toolchain). But I cannot remotely debug the system.
I do not understand, what I do wrong.
The questions:
1. For system debuging, do I need Qt Libraries buld for ARM machine? (as I wrote above, I do not use Qt Libraries for my applications or for my libraries)
2. Do I need to redefine Mkspec for ARM compiler?
Thanks, Slava
You generally don't need Qt libraries for your system to use Qt Creator as a debugger frontend for your plain C++ program on an embedded device. However, if you use qmake as a build system, the associated Qt version must (roughly) match your target.

Compile Programs for Arduino on Ubuntu Linux - any other ways?

There are two official ways of compiling Arduino sketches; The Arduino IDE that can either be installed by ppa or by downloading the source or the "ino" compiler that also could be downloaded by source.
I don't like both of them. The Arduino IDE needs to be run as root to work fully correctly and has a way too simple editor. The Ino Compiler Doesn't work with my Sketches (especially those with ethernet support, see Arduino CLI Compiler “ino” and some basic sketches lead to compile errors) and I also don't really know how it behaves when I feed it with some C++ or even C++11
What I really like to know: Is there a way to compile the arduino sketches the "Unix"-Way either with gcc or with clang. What libraries do I need to include, are there any example makefiles? How do I upload them to my arduino?
btw. Using Ubuntu 13.10 and soon 14.04 on 64bits. Having Arduino Mega 2560, Arduino Uno and Arduino Mini/Nano compatible board as well as an Ethernet Shield.
The Arduino IDE needs to be run as root to work fully correctly and has a way too simple editor.
that is a configuration fault of the deb package. Arduino ide runs fine if user has right priviledges on the serial. Especially the newest 1.5.6-R2 witch is compatible with new linux /run rules (old RXTX has been replaced)
The Ino Compiler Doesn't work with my Sketches
you are not using the packaged compiler, but your distribution one's witch is a lot newer and break code. Also we don't know witch patch are applied on that compiler, so the results will be unreitable. Try to download the arduino IDE from the official site, and just unzip it and run. It will compile fine, as it will use its own (old) compiler. On github you'll see they are working on resolving these bug, you can download the specific branch.
Is there a way to compile the arduino sketches the "Unix"-Way
yes, but not easily. you have to convert the .ino into a .cpp and add a main() method. there are some makefile that do that, but they will be break-prone, you should use CLI now that it has been provided. If you still want to use an external makefile, see https://github.com/sudar/Arduino-Makefile

Problems in Using QML Desktop Components in Release Mode

I wanted to write c++ desktop application with fine UI, so I did it in QT Creator.
Then I decided to add some UI features, and I moved to QML(QT Quick Application).
I installed QML Desktop Components according to here instructions, used import Qt.labs.components 0.1 and it worked well.but now I have to deploy my application, and I noticed that the application runs only on Debug mode, and not on Release mode. I checked, and saw that I have just the styleplugind.dll, and not the styleplugin.dll. Shortly, I have only the debug dll, and not the release one. I installed the components again,for release, and I really got the styleplugin.dll. but when I'm running my application(I remembered adding CONFIG+=release to my .pro file),I'm getting this error:
loaded for module "Qt.labs.components": The plugin 'C:/QtSDK/Desktop/Qt/4.7.4/mingw/imports/Qt/labs/components/plugin/styleplugin.dll' uses incompatible Qt library. Expected build key "Windows mingw release full-config", got "Windows mingw debug full-config"
import Qt.labs.components 0.1
^
I don't understand why I'm getting that: I have the right .dll file, and everything seems okay.
(BTW, I'm on Windows7)
What should I do??
The problem is, as the error output states, that your styleplugin.dll is still build against an incompatible Qt build (debug, expected is release).

Resources