I’m new to both GStreamer and CMake. I’m trying to create a cmake file for an app that I want to use gstreamer in. When I use the command
find_package( …. ) I’ve tried several different gstreamer package names. Things like find_package( gstreamer-1.0 ) and others. None of them worked. Does anyone know the proper value to use here? _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le mercredi 26 octobre 2016 à 17:56 +0000, Rick Blacker a écrit :
> I’m new to both GStreamer and CMake. I’m trying to create a cmake > file for an app that I want to use gstreamer in. When I use the > command > find_package( …. ) I’ve tried several different gstreamer package > names. Things like find_package( gstreamer-1.0 ) and others. None > of them worked. > > Does anyone know the proper value to use here? GStreamer implement standard pkg-config metadata. CMake provides the PkgConfig package to let you interface with that. Here's an exemple: find_package(PkgConfig) pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4 gstreamer-sdp-1.0>=1.4 gstreamer-video-1.0>=1.4 gstreamer-app-1.0>=1.4) Notice that GStreamer is a collection of libraries. The list will depend on your application needs. From there you'll have to update few things. Globally, link_directories with ${GST_LIBRARY_DIRS} (only needed if you use GStreamer from non-system installation). And per target: - target_include_directories with ${GST_INCLUDE_DIRS} - target_compile_options with ${GST_CFLAGS} - target_link_libraries with ${GST_LIBRARIES} You'll also have to choose between private and public exposure depending if you create an app or library and if you expose GStreamer through your library or not. cheers, Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Guys, I'm sorry, I know this may be second hand to some, and I'm trying to read up on this stuff, but for some reason it's not clicking very easily for me. (yes, I came from a Microsoft Visual Studio world)
Here is the path to my QT project where I'm trying to use CMake. This directory has one source code file. main.cpp ~/dev/qt_workspace/InitGStreamer$ My QT build folder is here Then I created a sub directory structure under it. I got this structure from reading the CMake docs.
https://cmake.org/Wiki/CMake:How_To_Find_Libraries In in there is a file called FindGStreamer.cmake which I found here Here is what I have done in my cmake file. cmake_minimum_required(VERSION 2.8)
However, I'm getting the following output error from CMake. Running "/usr/bin/cmake /home/rick/dev/qt_workspace/InitGStreamer '-GCodeBlocks - Unix Makefiles' -DCMAKE_CXX_COMPILER:STRING=/usr/bin/g++ -DQT_QMAKE_EXECUTABLE:STRING=/home/rick/DevApps/Qt/5.7/gcc_64/bin/qmake" in /home/rick/dev/qt_workspace/InitGStreamer/build-InitGStreamer-Desktop_Qt_5_7_0_GCC_64bit-Default. -- Configuring incomplete, errors occurred! See also "/home/rick/dev/qt_workspace/InitGStreamer/build-InitGStreamer-Desktop_Qt_5_7_0_GCC_64bit-Default/CMakeFiles/CMakeOutput.log". CMake Error at CMakeLists.txt:5 (find_package): By not providing "Findgstreamer-app.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "gstreamer-app", but CMake did not find one.
Could not find a package configuration file provided by "gstreamer-app" with any of the following names:
gstreamer-appConfig.cmake gstreamer-app-config.cmake
Add the installation prefix of "gstreamer-app" to CMAKE_PREFIX_PATH or set "gstreamer-app_DIR" to a directory containing one of the above files. If "gstreamer-app" provides a separate development package or SDK, be sure it has been installed.
*** cmake process exited with exit code 1. THEN I changed my CMake to this. This seemed to do something... I didn't get any errors, but when I went back to my source code file in QT Creator, it still could not find #include <gst/gst.h>.
On 10/26/2016 11:32 AM, Nicolas Dufresne wrote:
Le mercredi 26 octobre 2016 à 17:56 +0000, Rick Blacker a écrit :I’m new to both GStreamer and CMake. I’m trying to create a cmake file for an app that I want to use gstreamer in. When I use the command find_package( …. ) I’ve tried several different gstreamer package names. Things like find_package( gstreamer-1.0 ) and others. None of them worked. Does anyone know the proper value to use here?GStreamer implement standard pkg-config metadata. CMake provides the PkgConfig package to let you interface with that. Here's an exemple: find_package(PkgConfig) pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4 gstreamer-sdp-1.0>=1.4 gstreamer-video-1.0>=1.4 gstreamer-app-1.0>=1.4) Notice that GStreamer is a collection of libraries. The list will depend on your application needs. From there you'll have to update few things. Globally, link_directories with ${GST_LIBRARY_DIRS} (only needed if you use GStreamer from non-system installation). And per target: - target_include_directories with ${GST_INCLUDE_DIRS} - target_compile_options with ${GST_CFLAGS} - target_link_libraries with ${GST_LIBRARIES} You'll also have to choose between private and public exposure depending if you create an app or library and if you expose GStreamer through your library or not. cheers, Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
I take it back.. There is something wrong with the cmake script. When I print out these values,
I get these results found = TRUE libs = GSTREAMER_LIBRARIES-NOTFOUND base dir include =base dir libraries = GSTREAMER_BASE_LIBRARIES-NOTFOUND On 10/26/2016 11:06 PM, Rick Blacker wrote:
Guys, I'm sorry, I know this may be second hand to some, and I'm trying to read up on this stuff, but for some reason it's not clicking very easily for me. (yes, I came from a Microsoft Visual Studio world) _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by rick b
Le jeudi 27 octobre 2016 à 06:06 +0000, Rick Blacker a écrit :
Please, read my previous email. GStreamer do not provide cmake specific package. If one exist, it is most likely out-dated. Use PkgConfig package finder with the rather complete instruction I have provided. regards, Nicolas In case you missed it: Le mercredi 26 octobre 2016 à 17:56 +0000, Rick Blacker a écrit : > I’m new to both GStreamer and CMake. I’m trying to create a cmake > file for an app that I want to use gstreamer in. When I use the > command > find_package( …. ) I’ve tried several different gstreamer package > names. Things like find_package( gstreamer-1.0 ) and others. None > of them worked. > > Does anyone know the proper value to use here? GStreamer implement standard pkg-config metadata. CMake provides the PkgConfig package to let you interface with that. Here's an exemple: find_package(PkgConfig) pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4 gstreamer-sdp-1.0>=1.4 gstreamer-video-1.0>=1.4 gstreamer-app-1.0>=1.4) Notice that GStreamer is a collection of libraries. The list will depend on your application needs. From there you'll have to update few things. Globally, link_directories with ${GST_LIBRARY_DIRS} (only needed if you use GStreamer from non-system installation). And per target: - target_include_directories with ${GST_INCLUDE_DIRS} - target_compile_options with ${GST_CFLAGS} - target_link_libraries with ${GST_LIBRARIES} You'll also have to choose between private and public exposure depending if you create an app or library and if you expose GStreamer through your library or not. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by rick b
Le jeudi 27 octobre 2016 à 06:29 +0000, Rick Blacker a écrit :
> find_package(PkgConfig) > #aux_source_directory(. SRC_LIST) > #add_executable(${PROJECT_NAME} ${SRC_LIST}) > > include_directories( ${GSTREAMER_INCLUDE_DIR}) > add_definitions(${GSTREAMER_DEFINITIONS}) > #target_link_libraries(MPEG4GStreamer ${GSTREAMER_LIBRARIES}) After loading the extension, you need to call function to check package presence. The library check is done by this line: pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4 gstreamer-sdp-1.0>=1.4 gstreamer-video-1.0>=1.4 gstreamer-app-1.0>=1.4) The list can be adjusted, the required version too. Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
I have a Cmake that looks like this now. find_package(PkgConfig)
This is giving me the following error Running "/usr/bin/cmake /home/rick/dev/qt_workspace/InitGStreamer '-GCodeBlocks - Unix Makefiles'" in /tmp/qtc-cmake-yMRXIp. Even when I remove the >=1.4 part of pkg_check.. I'm still getting the same error.
I am lost, I really have no clue here. I've tried reading the information that's out there, but it does not make sense to me. I don't know if PkgConfig is just a place holder for an actual name of some package, if that is the actual value that needs to be passed in. I thought I had gstreamer-1.0 installed on my machine. Maybe I don't. Here is what I get when I search for gstreamer in Synaptic Package Manager and filter on things that are installed.
All I'm trying to do here is follow along with the gstreamer documentation so that I can ramp up on gstreamer and use it. Are there examples out there that are very explicit in how to: Thanks for additional assistance.
On 10/27/2016 06:31 AM, Nicolas Dufresne wrote:
Le jeudi 27 octobre 2016 à 06:29 +0000, Rick Blacker a écrit :find_package(PkgConfig) #aux_source_directory(. SRC_LIST) #add_executable(${PROJECT_NAME} ${SRC_LIST}) include_directories( ${GSTREAMER_INCLUDE_DIR}) add_definitions(${GSTREAMER_DEFINITIONS}) #target_link_libraries(MPEG4GStreamer ${GSTREAMER_LIBRARIES})After loading the extension, you need to call function to check package presence. The library check is done by this line: pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4 gstreamer-sdp-1.0>=1.4 gstreamer-video-1.0>=1.4 gstreamer-app-1.0>=1.4) The list can be adjusted, the required version too. Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |