QtGstreamer on windows



  • 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.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Not a definitive guide but AFAIK:

    1. Compiler: the same you are using for Qt
    2. Tools: cmake
    3. gstreamer version: latest 1 version available (devel package)
    4. QtGstreamer: latest available
    5. 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.



  • 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?


  • Lifetime Qt Champion

    Because it's a cmake project, open the top-level CMakeLists.txt from Qt Creator.



  • @SGaist

    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= cl

    CMake 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.


  • Lifetime Qt Champion

    Which version of Qt and Visual Studio do you have installed on your computer ?



  • QtCreator 4.1.0
    Based on QT 5.7.0. (MSVC 2013, 32 bit)


  • Lifetime Qt Champion

    That's only Qt Creator.

    The Qt version is the one you use to build your application.



  • @SGaist

    Sorry, I have both 5.5 and 5.7 installed.


  • Lifetime Qt Champion

    For which compiler ? MinGW ? MSVC ? If MSVC which version ?



  • @SGaist

    MSVC is used from Visual Studio 2013.
    MinGW is from QtCreator installation.


  • Lifetime Qt Champion

    Did you install Qt for Visual Studio 2013 ?



  • Yes I did just that.


  • Lifetime Qt Champion

    Then maybe a silly question: did you install Visual Studio 2013 ?



  • @SGaist

    Of course :D :D


  • Lifetime Qt Champion

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.