Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. gstreamer-1-0 not found on Mac
Forum Updated to NodeBB v4.3 + New Features

gstreamer-1-0 not found on Mac

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mb79
    wrote on last edited by
    #1

    Hi,

    Disclaimer: this project runs fine on linux... the problem happens on mac only.

    I have installed all libs with brew:

    $ brew list |grep gst
    gst-libav
    gst-plugins-bad
    gst-plugins-base
    gst-plugins-good
    gst-plugins-ugly
    gstreamer
    

    my project file:

    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += c++11
    
    DEFINES += QT_DEPRECATED_WARNINGS
    
    SOURCES += \
        main.cpp \
        mainwindow.cpp
    
    HEADERS += \
        mainwindow.h
    
    CONFIG += link_pkgconfig
    
    PKGCONFIG += gstreamer-1.0 \
            glib-2.0 \
            gobject-2.0 \
            gio-2.0
    
    unix: LIBS += -L/usr/lib/i386-linux-gnu/ -lgstvideo-1.0
    unix: INCLUDEPATH += \
        /usr/include/gstreamer-1.0 \
        /usr/include/glib-2.0/ \
        /usr/lib/x86_64-linux-gnu/glib-2.0/include/
    
    mac: LIBS += -L /usr/local/Cellar/gstreamer/1.16.2/lib -lgstvideo-1.0
    mac: INCLUDEPATH += \
        /usr/local/Cellar/gstreamer/1.16.2/include/gstreamer-1.0 \
        /usr/local/Cellar/gst-plugins-base/1.16.2/include/gstreamer-1.0 \
        /usr/local/Cellar/glib/2.64.0/include/glib-2.0
    
    FORMS += \
        mainwindow.ui
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    

    The problem happens when I try to compile & run that this error shows on the compile output:

    Project ERROR: gstreamer-1.0 development package not found
    

    The weird thing is that pkg-config finds gstreamer when I run it manually on bash:

    $ pkg-config --cflags gstreamer-1.0
    -I/usr/local/Cellar/libffi/3.2.1/lib/libffi-3.2.1/include -I/usr/local/Cellar/gstreamer/1.16.2/include/gstreamer-1.0 -I/usr/local/Cellar/glib/2.64.0/include -I/usr/local/Cellar/glib/2.64.0/include/glib-2.0 -I/usr/local/Cellar/glib/2.64.0/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.44/include
    

    Any help appreciated!

    jsulmJ 1 Reply Last reply
    0
    • M mb79

      Hi,

      Disclaimer: this project runs fine on linux... the problem happens on mac only.

      I have installed all libs with brew:

      $ brew list |grep gst
      gst-libav
      gst-plugins-bad
      gst-plugins-base
      gst-plugins-good
      gst-plugins-ugly
      gstreamer
      

      my project file:

      QT       += core gui
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      CONFIG += c++11
      
      DEFINES += QT_DEPRECATED_WARNINGS
      
      SOURCES += \
          main.cpp \
          mainwindow.cpp
      
      HEADERS += \
          mainwindow.h
      
      CONFIG += link_pkgconfig
      
      PKGCONFIG += gstreamer-1.0 \
              glib-2.0 \
              gobject-2.0 \
              gio-2.0
      
      unix: LIBS += -L/usr/lib/i386-linux-gnu/ -lgstvideo-1.0
      unix: INCLUDEPATH += \
          /usr/include/gstreamer-1.0 \
          /usr/include/glib-2.0/ \
          /usr/lib/x86_64-linux-gnu/glib-2.0/include/
      
      mac: LIBS += -L /usr/local/Cellar/gstreamer/1.16.2/lib -lgstvideo-1.0
      mac: INCLUDEPATH += \
          /usr/local/Cellar/gstreamer/1.16.2/include/gstreamer-1.0 \
          /usr/local/Cellar/gst-plugins-base/1.16.2/include/gstreamer-1.0 \
          /usr/local/Cellar/glib/2.64.0/include/glib-2.0
      
      FORMS += \
          mainwindow.ui
      
      # Default rules for deployment.
      qnx: target.path = /tmp/$${TARGET}/bin
      else: unix:!android: target.path = /opt/$${TARGET}/bin
      !isEmpty(target.path): INSTALLS += target
      
      

      The problem happens when I try to compile & run that this error shows on the compile output:

      Project ERROR: gstreamer-1.0 development package not found
      

      The weird thing is that pkg-config finds gstreamer when I run it manually on bash:

      $ pkg-config --cflags gstreamer-1.0
      -I/usr/local/Cellar/libffi/3.2.1/lib/libffi-3.2.1/include -I/usr/local/Cellar/gstreamer/1.16.2/include/gstreamer-1.0 -I/usr/local/Cellar/glib/2.64.0/include -I/usr/local/Cellar/glib/2.64.0/include/glib-2.0 -I/usr/local/Cellar/glib/2.64.0/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.44/include
      

      Any help appreciated!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @mb79 I'm not a MacOS expert, but I don't think Qt uses GStreamer on MacOS.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      0
      • jsulmJ jsulm

        @mb79 I'm not a MacOS expert, but I don't think Qt uses GStreamer on MacOS.

        M Offline
        M Offline
        mb79
        wrote on last edited by
        #3

        @jsulm Thanks. You are right, it does not use it by default, but regardless of that I can use gstreamer pipelines with Qt, as one would do with any other external library.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mb79
          wrote on last edited by
          #4

          Found the solution for my case.
          Just add the following to the .pro file:

          mac {
              PKG_CONFIG = /usr/local/bin/pkg-config
          }
          

          I would suggest to have this coming by default or better documented. Maybe it's me that missed it somewhere, but it should be more straighforward.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved