Thursday, February 6, 2014

Help: Can be called directly in the application system has been compiled so library?


            
Doing a video playback of the project, use the havlenapetr of open source code, it uses ffmpeg as a decoder, as well as android video rendering, audio playback implementation. It will achieve compiled on android video rendering and audio playback for libjnivideo.so and libjniaudio.so two libraries (both libraries can be compiled after the Android system), and then through JNI layer called the C language-related functions to achieve the decoded video playback.
Now can not help but want to use these two libraries, a direct call system related functions? Do not know if you have any ideas you? Thank you
Reply:
System function does what is offered through a variety of library
Reply:
No use ... take a look
Reply:
Did not get off the bottom of the application layer are packaged well
Reply:
Direct correlation function call system? Are you saying that a direct call function with JAVA function? Did not understand
Reply:
Yes, now the project will be on the Android system video rendering, audio playback library placed under jni directory project, then layer in C language library function called directly.
Now what I mean is: do not put the two libraries jni directory under the project, which is attached to the program on a real machine called directly on the underlying implementation of the Android system video rendering and audio playback. Do not know can?
cited a floor ultrapro reply:
system function is not available through a variety of libraries it

Reply:
Works on the Android system libjnivideo.so video rendering and audio playback, libjniaudio.so both libraries placed under jni directory project, the project can be loaded both runtime libraries, it can be called directly in C Both the library implementation.

In Java, this function using only the setContentView for video display, decoding is done in C language level is completed, the decoded data on the buffer inside, and this buffer has to be rendered and stored in the buffer associated with the content, That can be simply understood as: the decoded data can be stored directly to the video buffer in the rendering, and then call libjnivideo.so the function can be displayed on the screen of the video screen.

Now I do not want to take these two libraries in the project, would like to directly call the program runs in the bottom of the Android system video rendering and audio playback function, do not know that okay ah?

references, 4th Floor up0826 reply:
direct correlation function of the system call you saying that a direct call function with JAVA function?? Did not understand

Reply:
Should be ah, then package these so jni
Reply:
I may say that is not very clear, libjnivideo.so and libjniaudio.so already exists in the system, if the system can be directly used in these two libraries, the application does not need to own the two libraries.
Now do not know if I can call directly to the underlying database system Android?
Reply:
No, because there are strict naming restrictions JNI, not through the JAVA class package JNI to call it, does not work
Reply:
reference to the 9th floor killpoer3 reply:
can not, because there are strict naming restrictions JNI, not through the JAVA class package JNI to call it, does not work


So I ask can the underlying C language library project level call system?
Reply:
interface must be encapsulated
c can call the system library calls, but app
Reply:
reference to the 11th floor fontlose reply:
c library, but you can call the system call interface must be packaged app


Interface app to call have a good package, and now it is not very clear in the project was how to call the C language system, the underlying library? Trouble you can talk in more detail how the underlying system library call it? Thank you.
Reply:
Modify Android.mk specified link library, c works in the header file can call the
LOCAL_LDLIBS: =-ljnivideo-ljniaudio

Refer to the help file LOCAL_LDLIBS ndk own description


Reply:
c language can be accomplished in the java down really have not tried. Another point I do not understand is, if the current program is the sequence of calls like this android app -> jni library -> c library
In that case only a matter of compiling on, no additional setup, but you have a few jni library is always the province can not afford.
Reply:
reference to the 14th floor tmy13 reply:
c language can be accomplished in the java down really have not tried. Another point I do not understand is, if the current program is the sequence of calls like this android app -> jni library -> c library
In that case only a matter of compiling on, no additional setup, but you have a few jni library is always the province can not afford.

Flow of the program is now android app-> jni Library -> C library, java layer just do UI, audio and video decoding, audio playback and video rendering is done in the C language level, the call is already Android Some library implementations (not directly call the underlying library Android system, just compile libjniaudio.so and libjnivideo.so both libraries from android source code, placed under the JNI directory project).
Will now be able to omit these two libraries in c language layer calls directly in the underlying database Android Why? If not, could I trouble you to talk about the cause? Thank you very much
Reply:
reference to the 13th floor fontlose reply:
modify Android.mk specified link library, c works in the header file can call the
LOCAL_LDLIBS: =-ljnivideo-ljniaudio

Refer to the help file LOCAL_LDLIBS ndk own description

Okay, thank you very much.
If you do, then you must file JNI libs directory in the project folder to add these two libraries do?
Reply:

As long as these two library path on compile time can search on it

Compile time, you can specify the library search pathLOCAL_LDLIBS: =-L $ (SYSROOT) / usr / lib-ljnivideo
LOCAL_LDLIBS + =-L $ (SYSROOT) / usr / lib-ljniaudio

Specifically you refer that comes under ndk example two-libs
two-libs -. a simple application that loads a shared library dynamically and calls a native method provided by the library In this case, the method is implemented in a static library imported by the shared library
.
Reply:
cited 17 floor fontlose reply:
on the path as long as these two libraries on the compile time can search on it

Compile time, you can specify the library search pathLOCAL_LDLIBS: =-L $ (SYSROOT) / usr / lib-ljnivideo
LOCAL_LDLIBS + =-L $ (SYSROOT) / usr / lib-ljniaudio

Specifically you refer that comes under ndk example two-libs
two-libs - a simple applica ......

After the compilation has been completed, the application is packaged as apk when these two libraries can out of it? This will not affect the functionality of the application you?
Reply:
Both libraries can not take away ah can not find the library or else run the

Reply:
cited 19th floor fontlose reply:
these two libraries can not take away ah can not find the library or else run the

Understand, I now think there is no way these two libraries is omitted, the direct use of the underlying Android system libraries, thank you very much
Reply:
Before seen a project. . Declared void after good. Native keyword used. . .

At that time it seems quite magical. .

Reply:
c java with two languages, they will certainly have to co-operate between the bridge, jni java is the bridge leading to c, and so may be omitted out of it?
Reply:
cited 22 floor xbinwang reply:
java with c is in two languages, they will certainly have to co-operate between the bridge, jni java is the leading c bridge, so may omit swap it?

The two are not jni library is Android system library, but placed under jni directory project and is invoked to achieve these two libraries in the project C language level, java achieve these two are not directly call the library
Reply:
The problem is libjnivideo.so and libjniaudio.so different machine is not necessarily some

If you can not beat these two libraries under specified runtime library is loaded by specifying the path to be sure the system
LOCAL_LDLIBS + = -Lsystem/usr/lib-ljniaudio
Reply:
reference to the 24th floor fontlose reply:
libjnivideo.so and libjniaudio.so problem is not necessarily any different machine

If you can not beat these two libraries under specified runtime library is loaded by specifying the path to be sure the system
LOCAL_LDLIBS + = -Lsystem/usr/lib-ljniaudio

This sentence was added in Android.mk Lane?
Reply:
QQ for pad is not in / data / data throughout the following two so it
Reply:
reference to the 25th floor xxbbc1109 reply:
reference to the 24th floor fontlose reply:

The problem is libjnivideo.so and libjniaudio.so different machine is not necessarily some

If you can not beat these two libraries under specified runtime library is loaded by specifying the path to be sure the system
LOCAL_LDLIBS + = -Lsystem/usr/lib-ljniaudio

This sentence was added in Android.mk Lane?

Yes
Reply:
Top Top
Reply:
The reply was deleted at 2011-07-26 10:54:09 moderator

Reply:
By JNIloadlibrary
Reply:
reference to the 30th floor oexpress reply:
by JNIloadlibrary

JNI layer refers to the library load it?
Reply:
This is an interesting question, plus a fine!
Reply:
Amount, just beginning to learn
Reply:
Now the children paper ah!! Basic knowledge is not solid!!!
Reply:
The reply was deleted at 2012-08-28 09:13:20 moderator

Reply:
Is learning
Reply:
The reply was deleted at the moderator 2011-08-01 09:25:24

Reply:
The reply was deleted at the moderator 2011-08-01 09:25:24

Reply:
The reply was deleted at the moderator 2011-08-01 10:03:07

Reply:
Attention to the next!
Reply:
Well ah ah ah
Reply:
This language seems very popular now
Reply:
Is not likely to, ah, oh well advanced.
Reply:
Do not know ah! ! !
Reply:
Take a look! ~ ~ ~ ~
Reply:
11111111111111111QQ secret security Thief 0228 Tutorial
Reply:
Top up ah!!!!
Reply:
Content stored in the clipboard

Reply:
jfzr
Reply:
The reply was deleted on 2012-04-03 11:05:21 moderator

Reply:
The reply was deleted at the moderator 2011-08-01 13:27:04

Reply:
Some library systems, can not be added. If you have to use these libraries to write code to call these methods, then write JNI, so it can be used JAVA library approach. You can look-source frameworks / base / media / jni implementation.
Reply:
reference to the 24th floor fontlose reply:
libjnivideo.so and libjniaudio.so problem is not necessarily any different machine

If you can not beat these two libraries under specified runtime library is loaded by specifying the path to be sure the system
LOCAL_LDLIBS + = -Lsystem/usr/lib-ljniaudio

In fact, I was the suggestion, afraid of no phone, your goal is to reduce the size of the package, or that just to use the system so?
If it is for the size of the package, it is harder to resolve, does not necessarily have all phones,
But just to try to use the system so, then you can put these two so libs in the project, but the program loadlib when the first load so the system directory, if you find it go on, can not be found on the use of bag so!
Reply:
cited 53 floor dinjay reply:
reference to the 24th floor fontlose reply:

The problem is libjnivideo.so and libjniaudio.so different machine is not necessarily some

If you can not beat these two libraries under specified runtime library is loaded by specifying the path to be sure the system
LOCAL_LDLIBS + = -Lsystem/usr/lib-ljniaudio

In fact, I was the suggestion, afraid of no phone, your goal is to reduce the size of the package, or that just to use the system s ......

Is to reduce the size of the package, these two libraries are compiled from the android source code out of the system implementation is on audio playback and video rendering, in theory, each phone has a 2.3 version of both libraries ...
Reply:
cited 52 floor fengyefenfei reply:
Some library systems, can not be added. If you have to use these libraries to write code to call these methods, then write JNI, so it can be used JAVA library approach. You can look-source frameworks / base / media / jni implementation.

Java is useless to the function of the system library, Java's main role is to: UI, touch screen event processing, decoding is done in the C language level, but also at the level C language library function call to achieve
Reply:
reference to the 34th floor icansaymyabc reply:
children paper ah now the basics are not solid

Uh, just started doing this work, there are indeed many do not know where you laughed
Reply:
Only think, not impossible ~ ~
Reply:
Haotie is too top!
Reply:
I may say that is not very clear, libjnivideo.so and libjniaudio.so already exists in the system, if the system can be directly used in these two libraries, the application does not need to own the two libraries.
Now do not know if I can call directly to the underlying database system Android?
Reply:
Pass!
Reply:
Modify Android.mk specified link library, c works in the header file can call the
LOCAL_LDLIBS: =-ljnivideo-ljniaudio

Refer to the help file LOCAL_LDLIBS ndk own description

Reply:
It should be called directly on the line. .
Reply:
UBB contents into the clipboard

Reply:
Learn
Reply:
Learning to learn
Reply:
This question is interesting, worthy of discussion, the experts continue, I continue to learn Ha!
Reply:
Worth exploring
Reply:
Passing learning
Reply:
The reply was deleted at the moderator 2011-08-03 14:02:07

Reply:
Learning ......
Reply:
Learning pass!
Reply:
Android is a mobile phone half the sky!
Reply:
I think they should be open ms c c + + interface, I heard ms for oem already open c c + +.

Reply:
The reply was deleted at the moderator 2011-08-04 10:08:02

Reply:
LOCAL_LDLIBS: =-ljnivideo-ljniaudio
NDK is not only a reference document in existence so do these two so there are no documents NDK ah

cited 61 floor m181234 reply:
modify Android.mk specified link library, c works in the header file can call the
LOCAL_LDLIBS: =-ljnivideo-ljniaudio

LOCAL_LDLIBS descriptions refer to the help file that comes with ndk

Reply:
Oh, do not know
Reply:
I do not know, come to learn about.
Reply:
Passing, learn! @
Reply:
Learn to understand ah
Reply:
Learning ~ ~ ~ ~ ~ ~ Thank you
Reply:
Best to call his library
Reply:
Amount Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose Goose
Reply:
Passing through it
Reply:
I have recently studied the related issues, the solution see
http://blog.csdn.net/zhych8419/article/details/6663848 . I hope for your help.
Reply:
The reply was deleted at the moderator 2011-09-02 16:54:41

Reply:
Really good, but that it is not a big two libraries, memory 1G era who are not on the tangled it,
Louzhu steal over JNI library kernel directly call it,
Some said very clearly, to go through JNI package, JNi is java native interface for short.

Reply:
Yes!'re Looking for this
Reply:
Should not, although each phone which has these two so library, but each specific vendor's phones are more or less likely source of these two libraries made changes. So that the corresponding dynamic link address will not last. You can link ndk in the library, so that it can ensure the phone on each are identical. Or is a custom library, and then their own use.

No comments:

Post a Comment