在Windows 7上编译适用于Android的Gstreamer SDK

时间:2012-11-14 08:54:13

标签: android-ndk gstreamer

尝试为 GStreamer SDK for Android 做Tutorial5。

当我在Cygwin 1.7终端上进入项目目录并执行时 ndk-build

我得到了

make: -n: Command not found
GStreamer      : [GEN] => gst-build/gstreamer_android.c
/bin/sh: i: command not found
/cygdrive/c/gstreamer-sdk-android-arm-debug-2012.10/share/gst-android/ndk-build/gstreamer.mk:151: recipe for target `genstatic' failed
make: [genstatic] Error 127 (ignored)
/bin/sh: i: command not found
/cygdrive/c/gstreamer-sdk-android-arm-debug-2012.10/share/gst-android/ndk-build/gstreamer.mk:151: recipe for target `genstatic' failed
make: [genstatic] Error 127 (ignored)
/bin/sh: i: command not found
/cygdrive/c/gstreamer-sdk-android-arm-debug-2012.10/share/gst-android/ndk-build/gstreamer.mk:151: recipe for target `genstatic' failed
make: [genstatic] Error 127 (ignored)
/bin/sh: i: command not found
/cygdrive/c/gstreamer-sdk-android-arm-debug-2012.10/share/gst-android/ndk-build/gstreamer.mk:151: recipe for target `genstatic' failed
make: [genstatic] Error 127 (ignored)
GStreamer      : [COMPILE] => gst-build/gstreamer_android.c
gst-build/gstreamer_android.c:1:17: fatal error: jni.h: No such file or directory
compilation terminated.
/cygdrive/c/gstreamer-sdk-android-arm-debug-2012.10/share/gst-android/ndk-build/gstreamer.mk:161: recipe for target `gst-build/gstreamer_android.o' failed
make: *** [gst-build/gstreamer_android.o] Error 1

有人知道出了什么问题吗? 我查了一下,我有 make(版本3.82.90)

gstreamer.mk:151

的第二行
# Generates a source file that declares and registers all the required plugins
genstatic:
    @$(HOST_ECHO) "GStreamer      : [GEN] => $(GSTREAMER_ANDROID_C)"
    @$(call host-mkdir,$(GSTREAMER_BUILD_DIR))
    @$(call host-cp,$(GSTREAMER_ANDROID_C_IN),$(GSTREAMER_ANDROID_C))
    @$(HOST_SED) -i "s/@PLUGINS_DECLARATION@/$(GSTREAMER_PLUGINS_DECLARE)/g" $(GSTREAMER_ANDROID_C)
    @$(HOST_SED) -i "s/@PLUGINS_REGISTRATION@/$(GSTREAMER_PLUGINS_REGISTER)/g" $(GSTREAMER_ANDROID_C)
    @$(HOST_SED) -i "s/@G_IO_MODULES_LOAD@/$(G_IO_MODULES_LOAD)/g" $(GSTREAMER_ANDROID_C)
    @$(HOST_SED) -i "s/@G_IO_MODULES_DECLARE@/$(G_IO_MODULES_DECLARE)/g" $(GSTREAMER_ANDROID_C)

问候。

2 个答案:

答案 0 :(得分:0)

确保tools.mk中的 shell 指向您的环境shell。

即。 / usr / bin / bash或/ bin / bash in cygwin。

答案 1 :(得分:0)

添加

ifeq ($(HOST_OS),cygwin)
  HOST_SED := $(GSTREAMER_NDK_BUILD_PATH)/tools/windows/sed
  GSTREAMER_LD :=
else
endif

到你的gstreamer.mk