2016-01-10 50 views
0

我想顯示h264使用GStreamer SDK和Android NDK在android應用程序中編碼流。 我Android.mk的樣子:在Android中使用gstreamer插件壞

LOCAL_PATH := $(call my-dir) 
include $(CLEAR_VARS) 

LOCAL_MODULE := App 
LOCAL_SRC_FILES := App.cpp 

LOCAL_SHARED_LIBRARIES := gstreamer_android 
LOCAL_LDLIBS := -llog -landroid 

include $(BUILD_SHARED_LIBRARY) 

ifndef GSTREAMER_ROOT 
    ifndef GSTREAMER_ROOT_ANDROID 
     $(error GSTREAMER_ROOT_ANDROID is not defined!) 
    endif 
    GSTREAMER_ROOT  := $(GSTREAMER_ROOT_ANDROID) 
endif 

GSTREAMER_NDK_BUILD_PATH := $(GSTREAMER_ROOT)/share/gst-android/ndk-build/ 
include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk 
GSTREAMER_PLUGINS   := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_SYS) $(GSTREAMER_PLUGINS_EFFECTS) $(GSTREAMER_PLUGINS_NET) 
GSTREAMER_EXTRA_DEPS  := gstreamer-video-1.0 
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk 

東陽缺少插件壞我收到以下錯誤:

priv_gst_parse_yyparse no element "h264parse" 

我管如下所示:

udpsrc address=192.168.0.1 port=5000 ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink 

那麼如何我可以將gstreamer-plugins-bad包含到android構建中嗎?

回答

0

嘗試加入這一行,而不是你有一個:

GSTREAMER_PLUGINS   := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_PLAYBACK) $(GSTREAMER_PLUGINS_CODECS) $(GSTREAMER_PLUGINS_NET) $(GSTREAMER_PLUGINS_SYS) $(GSTREAMER_PLUGINS_CODECS_RESTRICTED) 

具體來說這一個應該做的工作$(GSTREAMER_PLUGINS_CODECS_RESTRICTED)