Including a prebuilt static/shared NDK lib, inside another NDK lib project

So what im trying to do is:

  1. Build a rendering plugin in C++ for the NDK (pass it a bitmap + textureID and it renders the bitmap on texture). This works fine.
  2. Add the rendering plugin to a C (for NDK) project that uses ffmpeg to decode videos, each frame of the video is passed to the rendering plugin to display.

I can get the rendering plugin to build into the C project, and the relevant files are moved to the Obj/local/ or libs/ directory (I've tried both static and shared builds for the renderer). However I can't get it to include in the actual C code.

The directory looks like this:

Including a prebuilt static/shared NDK lib, inside another NDK lib project

It wont link when i try add a #include <renderplugin.h> to my code, saying file or directory could not be found

My in the jni folder:

LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := NativeMediaPlayer LOCAL_SRC_FILES := NativeMediaPlayer.c LOCAL_LDLIBS := -llog -lz -lGLESv2 LOCAL_SHARED_LIBRARIES := libavformat libavcodec libavutil liblog libswscale NativeRenderPlugin include $(BUILD_SHARED_LIBRARY) #ffmpeg $(call import-add-path, ../) $(call import-module, NativeMediaPlayer/external) #render plugin $(call import-add-path, jni) $(call import-module, prebuilt)

And the in the prebuilt folder where the plugin is:


-------------Problems Reply------------

It appears that it was something to do with where the library was placed, after moving them into the same folder as the ffmpeg libs (and updating the makefiles) the include is working correctly now.

Category:android Views:5 Time:2019-02-01

Related post

Copyright (C), All Rights Reserved.

processed in 0.093 (s). 11 q(s)