2

I am trying to use Gstreamer on Android and deploy some hardware codec. However, I have trouble running the tutorials.

My environment: Windows 7, Eclipse, SDK version 19, NDK r9

I've setten the envrionment variables following the instruction of the website(http://docs.gstreamer.com/display/GstSDK/Installing+for+Android+development). Then I import Tutorial 1 following the instruction. But I have errors after I build the project.

The error is jni/Android.mk:13: * GSTREAMER_SDK_ROOT_ANDROID is not defined!. Stop.

Could anyone gives me a hint? Thank you!

Brendon Tsai
  • 1,267
  • 1
  • 17
  • 31
  • See similar thread using Android Studio:http://stackoverflow.com/questions/27530263/unable-to-build-gstreamer-tutorials-using-android-studio/27536183#27536183 – svenyonson Dec 18 '14 at 21:14

2 Answers2

0

try to set the path x:\gstreamer-lib to GSTREAMER_SDK_ROOT_ANDROID

OneGuilty
  • 53
  • 1
  • 1
  • 6
0

I was facing the same problem but found nothing clear on internet. But somehow detail study of the problem led me to solve it.

To solve it you need to do the following steps in eclipse:

go to Windows->preferences->c/c++->build->Environment Click Add button on the right most of the window in the Name field enter "GSTREAMER_SDK_ROOT_ANDROID" in the Value field enter the location of the GStreamer SDK. In my case it was "C:\GStreamer_SDK". HERE IS THE PROBLEMMMM.... you need to use forward slash "/" instead of backward "\" to make it work properly. so my Gstreamer SDK location will look like this "C:/GStreamer_SDK" Once you are done with it. You need to do some changes in the Android.mk file of your project. Go to the following line

GSTREAMER_NDK_BUILD_PATH := $(GSTREAMER_SDK_ROOT)/share/gst-android/ndk-build/

and remove the ending forward slash from the line of code. so it like will look like this.

GSTREAMER_NDK_BUILD_PATH := $(GSTREAMER_SDK_ROOT)/share/gst-android/ndk-build

Save it and you are done with it! if you dont remove the slash it will generate the path during build like this

c:/GStreamer_SDK/share/gst-android/ndk-build//gstreamer.mk

Double slashes are problem during build.

Now right click on project->clean Project

Now build it by right click on your project->build project.

if eclipse hangs while building just go to task manager and kill make.exe service two times.

Run your project on your device or emulator. Have fun!