KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a problem with unresolved references to ffmpeg's libavcodec functions, so far failed to find the answer in other places (including my mind) :) Let me describe my setup - it takes space, but is really basic, it might be that I'm failing to see some error... I built an FFMPeg with ndk r5 toolchain, ffmpeg port I got from http://bambuser.com/opensource (as recommended in other questions here). It built fine, so I put several static libraries in my project like this: <project>/jni/bambuser_ffmpeg/libavcodec.a <project>/jni/bambuser_ffmpeg/libavformat.a <project>/jni/bambuser_ffmpeg/libavcore.a <project>/jni/bambuser_ffmpeg/libavutil.a Next, I created an Android.mk in bambuser_ffmpeg folder to list these libs as a prebuilt ones: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := bambuser-libavcore LOCAL_SRC_FILES := libavcore.a include $(PREBUILT_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := bambuser-libavformat LOCAL_SRC_FILES := libavformat.a include $(PREBUILT_STATIC_LIBRARY) (same for other two libs) Next, I have another module which references these libs in its Android.mk, sets up include paths, etc: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := ffmpegtest LOCAL_STATIC_LIBRARIES := bambuser-libavcodec bambuser-libavcore bambuser-libavformat bambuser-libavutil LOCAL_SRC_FILES := ffmpeg_test.cpp LOCAL_C_INCLUDES := $(LOCAL_PATH)/../bambuser_ffmpeg/include LOCAL_LDLIBS := -llog -lz include $(BUILD_SHARED_LIBRARY) And finally I have my ffmpeg_test.cpp which is really basic, like this: #include <jni.h> extern "C" { #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> } extern "C" { JNIEXPORT jint JNICALL Java_com_the7art_ffmpegtest_PaintThread_te
Tags (comma-separated)
Save Edits
Cancel