GithubHelp home page GithubHelp logo

Comments (6)

havlenapetr avatar havlenapetr commented on August 17, 2024

these two libs are wrappers to android native AudioTrack and surface flinger so they couldn't be build in ndk. So I have build them in android build system and copy them into my ffmpeg project. They are in libs dir, if you copy them into 'ndk_dir/out/apps/your_ffmpeg_project_name/ then ggc will link them corectlly'

from ffmpeg.

Seasky avatar Seasky commented on August 17, 2024

Thanks havlenapetr, as what you said, after I copy the two *.so files into \ffmpeg\obj\local\armeabi\objs\ dictory, this build error disappeared.

But I still meet a new problem as following:
$ $NDK/ndk-build
SharedLibrary : libffmpeg_jni.so
/cygdrive/c/android-ndk-r4b/samples/ffmpeg/obj/local/armeabi/objs/ffmpeg_jni/com_media_ffmpeg_FFMpegAVFormatContext.o: In function AVFormatContext_re lease': /cygdrive/c/android-ndk-r4b/samples/ffmpeg/jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c:85: undefined reference to__android_log_print'

I think this is because __android_log_print need external definition in android source code, but my build environment has only cygwin+NDK.

from ffmpeg.

havlenapetr avatar havlenapetr commented on August 17, 2024

sorry I don't know which branch are you building? Try debug branch and __android_log_print is defined in liblog.so which is in NDK, you can see this linkage in my Makefiles (LOCAL_LDLIBS := -llog)

from ffmpeg.

andjoy avatar andjoy commented on August 17, 2024

Dear Havlenapetr, i build this project in the same environment as seasky's, cygwin v2.721 + NDKr4b + Android SDK2.2, but i met some errors as following:
1,/cygdrive/e/cygwin/android-ndk-r4b/samples/havlenapetr-FFMpeg-ndk/jni/jni/../include/drivers_map.h:32: error: invalid conversion from 'int ()()' to 'int ()(JN
IEnv_, jobject)'
fixed as:typedef int (*audioDriver_register_t) ();
2,__android_log_print(ANDROID_LOG_INFO, TAG, "releasing FFMpegAVFormatContext"),
3,MediaPlayerControl mMediaPlayerControl = new MediaPlayerControl()
Multiple markers at this line
- The type new MediaController.MediaPlayerControl(){} must implement the inherited abstract method
MediaController.MediaPlayerControl.canSeekForward()
- The type new MediaController.MediaPlayerControl(){} must implement the inherited abstract method
MediaController.MediaPlayerControl.canSeekBackward()
- The type new MediaController.MediaPlayerControl(){} must implement the inherited abstract method MediaController.MediaPlayerControl.canPause()
fixed as: add unimplemented methods
4,\jni\jni\Android.mk
ifeq ($(IN_NDK),true)
LOCAL_LDLIBS := -llog
else
LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := liblog
endif
fixed as:
ifeq ($(IN_NDK),true)
LOCAL_LDLIBS := -llog
else
LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog
endif

I tried to fix these issues, but the final apk doesn't work well. the app can only play some special mp4 files, and the size of libffmpeg_jni.so is only 3,329K Bytes. would you please tell me the right procedure to build this project?

from ffmpeg.

ashcairo avatar ashcairo commented on August 17, 2024

Hi, I've currently gotten as far as the

SharedLibrary : libffmpeg_jni.so
/cygdrive/c/android-ndk-r4b/samples/ffmpeg/obj/local/armeabi/objs/ffmpeg_jni/com_media_ffmpeg_FFMpegAVFormatContext.o: In function AVFormatContext_re
lease':
/cygdrive/c/android-ndk-r4b/samples/ffmpeg/jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c:85: undefined reference to__android_log_print'

error.

Have you had any luck in finding a solution with getting the project to run?

from ffmpeg.

Seasky avatar Seasky commented on August 17, 2024

You can try put the liblog.so into the obj directory. Good Luck!

Date: Tue, 17 May 2011 07:41:37 -0700
From: [email protected]
To: [email protected]
Subject: Re: [FFMpeg] Build error with cygwin+NDKr4b (#1)

Hi, I've currently gotten as far as the

SharedLibrary : libffmpeg_jni.so
/cygdrive/c/android-ndk-r4b/samples/ffmpeg/obj/local/armeabi/objs/ffmpeg_jni/com_media_ffmpeg_FFMpegAVFormatContext.o: In function AVFormatContext_re
lease':
/cygdrive/c/android-ndk-r4b/samples/ffmpeg/jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c:85: undefined reference to__android_log_print'

error.

Have you had any luck in finding a solution with getting the project to run?

Reply to this email directly or view it on GitHub:
#1 (comment)

from ffmpeg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.