FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.35k stars 72 forks source link

renderers/audio_renderer_gstreamer.c:22:10: fatal error: 'gst/gst.h' file not found #96

Closed satoshinotdead closed 2 years ago

satoshinotdead commented 2 years ago

I tried to install PKGs and brew different Gstreamer (following README.MD) but stills no working.

I'm building on MacOS Monterrey.

Mac UxPlay % make [ 18%] Built target playfair [ 30%] Built target llhttp [ 84%] Built target airplay [ 87%] Building C object renderers/CMakeFiles/renderers.dir/audio_renderer_gstreamer.c.o /Users/$USER/UxPlay/renderers/audio_renderer_gstreamer.c:22:10: fatal error: 'gst/gst.h' file not found #include <gst/gst.h> ^~~~~~~~~~~ 1 error generated. make[2]: *** [renderers/CMakeFiles/renderers.dir/audio_renderer_gstreamer.c.o] Error 1 make[1]: *** [renderers/CMakeFiles/renderers.dir/all] Error 2

I've installed on Debian with sucess (ATI weird propietary drivers problem but nothing with UxPlay)

Thanks for your time :)

fduncanh commented 2 years ago

The build on Monterey was tested using the "official" gstreamer-1.20.1 package from http://gstreamer.freedesktop.org . I recomend using that unless you need gstreamer with other homebrew packages. (a build with homebrew was tested earlier on Catalina)

I dont have Monterey available now but I will test that the build with brew on Catalina still works Are you on Intel or M1 Apple silicon?

fduncanh commented 2 years ago

I am also seeing the gst/gst.h issue.

There are some issues in the recent macOS builds of gstreamer connected to "rpath" that is messing up the include paths

I will need to find the fix. I'll get back to you. may take a day or two.

satoshinotdead commented 2 years ago

Thanks, I recieved another reply with that:

I reproduced your issue. I found it's because of changes in the GStreamer for mac build. it now needs pkg-config to be run with --define-prefix option in CMakeList.txt in directory renderers, when cmake is run, I'll fix this in the next day or two, hopefully.

I'm on Intel and I'm not a dev but I can test if you have something 🤙

fduncanh commented 2 years ago

If you are on intel, you can use the gstreamer official package Gstreamer 1.18 instead of brew.

The issue is because of packaging changes in 1.20 to accommodate M1 macs.

fduncanh commented 2 years ago

Its fixed now (simple fix).

If you use Brew for GStreamer, you probably need to

export GST_PLUGINS_PATH=/usr/local/lib/gstreamer-1.0

before running uxplay (I had to). If you need this, it should be set by your .bashrc or .zshrc (I'm surprised brew didnt seem to do this automatically)

I tested both brew and official gstreamer (/Library/Frameworks/GStreamer.framework 1.20.2) both work fine now.

fduncanh commented 2 years ago

closing now. I think its fixed, but @satoshinotdead please reply here to say if it now works for you

thanks for your report of this,

satoshinotdead commented 2 years ago

Hi there!Sorry but what's the official package that you are using? I tried with Brew and that ones, using the export path but still don't working here.

Thanks for your follow up.

fduncanh commented 2 years ago

You should only set GST_PLUGIN_PATH to /usr/local/lib/gstreamer-1.0 if you are using homebrew. This will prevent the official gstreamer from working. Unset it if you are using the official gstreamer package. "export GST_PLUGIN_PATH="

The official package is mentioned in the README, which says:

First get the latest macOS release of GStreamer-1.0 from https://gstreamer.freedesktop.org/download/. Install both the macOS runtime and development installer packages. Assuming that the latest release is 1.20.2. install gstreamer-1.0-1.20.2-universal.pkg and gstreamer-1.0-devel-1.20.2-universal.pkg. (If you have an Intel-architecture Mac, and have problems with the "universal" packages, you can also use gstreamer-1.0-1.18.6-x86_64.pkg and gstreamer-1.0-devel-1.18.6-x86_64.pkg.) Click on them to install (they install to /Library/FrameWorks/GStreamer.framework). It is recommended you use GStreamer.framework rather than install Gstreamer with Homebrew or MacPorts (see later).


Other ways (Homebrew, MacPorts) to install GStreamer on macOS (not recommended):

First make sure that pkgconfig is installed (Homebrew: "brew install pkgconfig" ; MacPorts: "sudo port install pkgconfig" ).

(a) with Homebrew: "brew install gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav". This appears to be functionally equivalent to using GStreamer.framework, but causes a large number of extra packages to be installed by Homebrew as dependencies. You may need to set the environment variable GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 to point to the Homebrew GStreamer installation.

fduncanh commented 2 years ago

@satoshinotdead

Please explain your problem fully:

Which release of macOS are you using? You said it was on an intel mac..

  1. Are you using the current github version of uxplay 1.51?
  2. which gstreamer package have you installed ? from where?\

run

gst-inspect-1.0  h264parse

what does it report ? This will show where your gstreamer is located, if you have a correctly installed gstreamer.

When you built uxplay:

  1. Did cmake work yes/no
  2. did make work yes/no
  3. did sudo make install work yes/no
  4. if you managed to compile it, what happened when you tried to run uxplay?

show any error messages you got here.