tinyzimmer / go-gst

Gstreamer bindings and utilities for golang
GNU Lesser General Public License v2.1
130 stars 37 forks source link

'gst/gst.h' file not found #40

Closed jokerping closed 2 years ago

jokerping commented 2 years ago
image image

When I run appsrc/main.go I get the error

brucekim commented 2 years ago

You need to install gstreamer in advance with properly configured it on you system.

jokerping commented 2 years ago

The second picture shows that I have installed gstreamer and configured it to pkg-config.

export PKG_CONFIG_PATH=/Library/Frameworks/GStreamer.framework/Versions/Current/lib/pkgconfig

Did I miss something?

jokerping commented 2 years ago

I deleted /Library/Frameworks/GStreamer.framework. and installed via homebrew

brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly

It compiles fine now, but I get a new error

ERROR! Could not create element: appsrc

brucekim commented 2 years ago

appsrc is part of gst-plugin-base. You can check it's installation status with following command.

$  gst-inspect-1.0 appsrc
Factory Details:
  Rank                     none (0)
  Long-name                AppSrc
  Klass                    Generic/Source
  Description              Allow the application to feed buffers to a pipeline
  Author                   David Schleef <ds@schleef.org>, Wim Taymans <wim.taymans@gmail.com>

Plugin Details:
  Name                     app
  Description              Elements used to communicate with applications
  Filename                 /usr/local/lib/gstreamer-1.0/libgstapp.dylib
  Version                  1.18.4
  License                  LGPL
  Source module            gst-plugins-base
  Source release date      2021-03-15
  Binary package           GStreamer Base Plug-ins source release
  Origin URL               Unknown package origin

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBaseSrc
                         +----GstAppSrc

Implemented Interfaces:
  GstURIHandler

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      ANY
jokerping commented 2 years ago
image
jokerping commented 2 years ago

I added the path below and it works fine now, thanks for your reply

export GIO_EXTRA_MODULES=/usr/local/lib/gio/modules export GST_PLUGIN_SCANNER=/usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0