0

I'm currently trying to compile the first tutorial of Gstreamer but it doesn't work on my computer. I'm on Ubuntu with Eclipse. I have installed SDK et NDK Android and added to the path GSTRAMER_SDK_ROOT_ANDROID and ANDROID_NDK_HOME.

But the problem is in my Android.mk . The file gst/gst.h is not found :/ I have searched it in my folder "gstreamer-sdk-android-arm-debug-2013.6" I have downloaded from gstreamer website. And this file is in gstreamer-0.10.

How can I say to Eclipse to look into /include/gstreamer-0.10 rather than /include/gst/gst.h

( And it is the same with glib.h and other files ... :/ )

Someone has the solution please?

Anthony D'Amato
  • 748
  • 1
  • 6
  • 23

3 Answers3

1

Added this: LOCAL_EXPORT_C_INCLUDES += $(GSTREAMER_SDK_ROOT)/include/gstreamer-0.10 LOCAL_EXPORT_C_INCLUDES += $(GSTREAMER_SDK_ROOT)/include/glib-2.0 LOCAL_EXPORT_C_INCLUDES += $(GSTREAMER_SDK_ROOT)/lib/glib-2.0/include LOCAL_EXPORT_C_INCLUDES += $(GSTREAMER_SDK_ROOT)/include/libxml2/

after LOCAL_EXPORT_C_INCLUDES += $(GSTREAMER_SDK_ROOT)/include

in gstreamer-sdk-android-arm-debug-2013.6/share/gst-android/ndk-build/gstreamer.mk

noamtcohen
  • 4,432
  • 2
  • 20
  • 14
1

I had the same error, but that was just a symptom of the real problem: pkg-config: command not found. Per the answer at Unable to build GStreamer for Android Tutorials, pkg-config is not bundled with the GStream libs, so you need to install it separately for things to work. Here are my logs from the error:

/bin/sh: pkg-config: command not found
gst-build-arm64-v8a/gstreamer_android.c:2:10: fatal error: 'gst/gst.h' file not found
#include <gst/gst.h>

I installed pkg-config using Mac Ports sudo port install PkgConfig, but brew or other installation techniques should work fine.

rjferguson
  • 603
  • 3
  • 12
  • Strange thing: I have pkg-config installed, it runs at bash level. Not from the gradle build. Getting the same error "pkg-config.not found" Any idea? – decades Jun 18 '22 at 14:48
0

Several things to check:

  1. GSTRAMER_SDK_ROOT_ANDROID should be GSTREAMER_SDK_ROOT_ANDROID. Double check that you spelled it correctly.
  2. Make sure Eclipse is pointing to the correct NDK. Go to Window -> Preferences -> Android -> NDK and point it to your NDK
  3. In my experience, the latest NDK (r10e) doesn't work, because a method was taken out that gets used by the GStreamer tutorials. You can get a previous version that works here (r9d): https://dl.google.com/android/ndk/android-ndk-r9d-windows-x86_64.zip
  4. Right-click the root folder of the tutorial 1 in Eclipse. Go to: Android Tools -> Add Native Support. Then in the popup window click ok. Clean. Build.
MarkyDD
  • 272
  • 5
  • 16