QtGstreamer on windows
-
wrote on 20 Oct 2016, 10:42 last edited by
Hello,
I would like to build qt-gstreamer on windows and use it to receive real time stream from my /dev/video0 on linux machine.
Could someone be kind to give hints on how to do it. I have searched all the forums and complete stackoverflow and cannot find one complete guide, which version of qt-gstreamer, which version of gstreamer, which compiler on windows and if possible how to make just basic test with qt-gstreamer.
If anyone could help with it I would gladly put it on github as project for everybody to have it and maintain it. -
Hi and welcome to devnet,
Not a definitive guide but AFAIK:
- Compiler: the same you are using for Qt
- Tools: cmake
- gstreamer version: latest 1 version available (devel package)
- QtGstreamer: latest available
- Dependencies: boost
You can use Qt Creator to build QtGStreamer, this will simplify the building since you'll already have the Qt version you want to use setup.
You have several examples with the sources of QtGstreamer.
-
wrote on 21 Oct 2016, 06:59 last edited by
Thanks for helping out!
I have downloaded qt-gstreamer-1.2.0 but there is no pro file in it.
I have all the tools installed, cmake/boost/gstreamer but how to use QtCreator to open it as project and start compilation? -
Because it's a cmake project, open the top-level CMakeLists.txt from Qt Creator.
-
wrote on 21 Oct 2016, 11:31 last edited by
Did that and selected MSVC 2013 and output was:
Running "C:\CMake2.8\bin\cmake.exe C:/qt-gstreamer "-GCodeBlocks - NMake Makefiles" "-DCMAKE_CXX_COMPILER:STRING=" "-DQT_QMAKE_EXECUTABLE:STRING="" in C:\build-qt-gstreamer-MSVCC_12_0_2013-Default.
CMake Warning at CMakeLists.txt:1 (project):
To use the NMake generator, cmake must be run from a shell that can use the
compiler cl from the command line. This environment does not contain
INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
work.-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
CMake Warning at C:/CMake2.8/share/cmake-2.8/Modules/Platform/Windows-MSVC.cmake:60 (enable_language):
To use the NMake generator, cmake must be run from a shell that can use the
compiler cl from the command line. This environment does not contain
INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
work.
Call Stack (most recent call first):
C:/CMake2.8/share/cmake-2.8/Modules/Platform/Windows-MSVC-C.cmake:1 (include)
C:/CMake2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (include)
CMakeLists.txt:1 (project)CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not found. Please set CMAKE_RC_COMPILER to a valid compiler path or name.
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
CMake Warning at CMakeLists.txt:2 (PROJECT):
To use the NMake generator, cmake must be run from a shell that can use the
compiler cl from the command line. This environment does not contain
INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
work.CMake Warning at C:/CMake2.8/share/cmake-2.8/Modules/Platform/Windows-MSVC.cmake:60 (enable_language):
To use the NMake generator, cmake must be run from a shell that can use the
compiler cl from the command line. This environment does not contain
INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
work.
Call Stack (most recent call first):
C:/CMake2.8/share/cmake-2.8/Modules/Platform/Windows-MSVC-C.cmake:1 (include)
C:/CMake2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (include)
CMakeLists.txt:2 (PROJECT)CMake Error at C:/CMake2.8/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22 (get_filename_component):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
C:/CMake2.8/share/cmake-2.8/Modules/Platform/Windows-MSVC.cmake:60 (enable_language)
C:/CMake2.8/share/cmake-2.8/Modules/Platform/Windows-MSVC-C.cmake:1 (include)
C:/CMake2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (include)
CMakeLists.txt:2 (PROJECT)CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
CMake Error at C:/CMake2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/cl.exe" is not able to compile a simple test program.It fails with the following output:
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:1 (project)-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- broken
-- Configuring incomplete, errors occurred!
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_CXX_COMPILER= clCMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_MAKE_PROGRAM
CMake Warning:
Manually-specified variables were not used by the project:QT_QMAKE_EXECUTABLE
-- Generating done
-- Build files have been written to: C:/build-qt-gstreamer-MSVCC_12_0_2013-Default
*** cmake process exited with exit code 1. -
Which version of Qt and Visual Studio do you have installed on your computer ?
-
wrote on 22 Oct 2016, 09:18 last edited by
QtCreator 4.1.0
Based on QT 5.7.0. (MSVC 2013, 32 bit) -
That's only Qt Creator.
The Qt version is the one you use to build your application.
-
For which compiler ? MinGW ? MSVC ? If MSVC which version ?
-
Did you install Qt for Visual Studio 2013 ?
-
wrote on 25 Oct 2016, 14:03 last edited by
Yes I did just that.
-
Then maybe a silly question: did you install Visual Studio 2013 ?
-
Then there's something strange...
Delete any
.user
file you have in the root folder of your project.Then start from scratch with Qt Creator. Select the correct Qt Kit.
I find it strange that you have to explicitly select the Visual Studio compiler. It should be done for you automatically by Qt Creator.
1/16