Page 1 of 1

libvlcjni.c and Android

Posted: 01 Feb 2013 13:18
by VirMarGu
I'm working with the source code of VLC for Android and this includes JNI code.

I'm working with Juno Eclipse and I want to compile class libvlcjni.c when I edit it, I used the ndk-r8c order to build a "New builder" by following these guidelines: http://mobilepearls.com/labs/ndk-builder-in-eclipse\

When I modife the class libvlcjni.c, I get the following messages in console:

/ home/vmg/android/android-ndk-r8c/build/core/add-application.mk: 128: Android NDK: WARNING: APP_PLATFORM android-9 is larger than android: minSdkVersion 7 in. / AndroidManifest.xml

Gdbserver: [arm-linux-4.6-androideabi] libs / armeabi / gdbserver

Gdbsetup: libs / armeabi / gdb.setup

make: * No rule to make target jni / .. / / modules / codec / omxil / iomx.cpp ', needed by obj / local / armeabi / objs-debug / iomx-gingerbread / __ / / modules / codec / omxil / iomx.o '. Stop.

I know that I haven't the file iomx.cpp , but I don't know how generate it.

What am I doing wrong? Help, please.

Re: libvlcjni.c and Android

Posted: 05 Feb 2013 13:34
by edwardw
Eclipse build is not supported by VLC-Android. Use the proper way to compile it. See http://wiki.videolan.org/AndroidCompile

Re: libvlcjni.c and Android

Posted: 05 Feb 2013 14:50
by VirMarGu
Thank you very much for your reply!
Sorry, maybe I have not explained well.

I followed the instructions of this link (http://wiki.videolan.org/AndroidCompile) and I got a project in Android with all its folders and files, which can be run and installed as an application on a device.

Now I'm looking at the code and I need to get the frames of a video to work with them.
In the method load() of VideoPlayerACtivity.java class, there is the following lines of code:
/* Start / resume playback */
if (savedIndexPosition > -1) {
mLibVLC.playIndex(savedIndexPosition);
} else if (mLocation != null && mLocation.length() > 0 && !dontParse) {
savedIndexPosition = mLibVLC.readMedia(mLocation, false);
}

And playIndex and readMedia are native methods (JNI) which are in libvlcjni.c. These methods are programmed in C language and Eclipse is designed to work with Java language.

I want to modify the classes .c (for example, libvlcjni.c) and to can compile and run the project and that the changes are implemented correctly.

I'm working with Juno Eclipse and I used the ndk-r8c to build a "New builder" by following these guidelines: http://mobilepearls.com/labs/ndk-builder-in-eclipse\

But when I modife the class libvlcjni.c, I get the following messages in console:

/ home/vmg/android/android-ndk-r8c/build/core/add-application.mk: 128: Android NDK: WARNING: APP_PLATFORM android-9 is larger than android: minSdkVersion 7 in. / AndroidManifest.xml

Gdbserver: [arm-linux-4.6-androideabi] libs / armeabi / gdbserver

Gdbsetup: libs / armeabi / gdb.setup

make: * No rule to make target jni / .. / / modules / codec / omxil / iomx.cpp ', needed by obj / local / armeabi / objs-debug / iomx-gingerbread / __ / / modules / codec / omxil / iomx.o '. Stop.

I need help, thanks!