cmake find_package(..) what is the proper gstreamer package name?

Rick Blacker rick_blacker at hotmail.com
Thu Oct 27 19:04:43 UTC 2016


I have a Cmake that looks like this now.
    cmake_minimum_required(VERSION 2.8)
    project(InitGStreamer)
    add_executable(${PROJECT_NAME} main.cpp )

    find_package(PkgConfig)
    pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4 )


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.
    -- Checking for module 'gstreamer-1.0>=1.4'
    --
    CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):
    A required package was not found
    Call Stack (most recent call first):
    /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
    CMakeLists.txt:8 (pkg_check_modules)


    -- Configuring incomplete, errors occurred!
    See also "/tmp/qtc-cmake-yMRXIp/CMakeFiles/CMakeOutput.log".
    *** cmake process exited with exit code 1.

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.

[what is 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:
1) figure out what version of gstreamer you have installed
2) shows you how to use CMake to compile against an app that is using gstreamer? Rather that is manually creating a cmake file or using the pkg-config options.
3) Lists out exactly what values you need in your cmake file?


Thanks for additional assistance.
Rick





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
gstreamer-devel at lists.freedesktop.org<mailto:gstreamer-devel at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161027/9887b2e6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: installedGStreamer.png
Type: image/png
Size: 188037 bytes
Desc: installedGStreamer.png
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161027/9887b2e6/attachment-0001.png>


More information about the gstreamer-devel mailing list