Append marker: solving the FFMPEG porting problem on Android platform

Source: Internet
Author: User

Moruite kids shoes have solved many problems. havlenapetr transplanted FFMPEG has been improved, and many adjustments have been made to his compilation. Thanks to the continuous efforts of these shoes, today, this is the spirit and significance of open source.

What is the only pity?

Right: libjniaudio. so and libjnivideo. so is only two libraries. We only know that we want to use these two libraries. After searching the android code, we do not have these two libraries. This must be havlenapetr's packaging of the android code, however, I am confused that I didn't provide code. What should I do if I want to add interfaces? What should I do?

Waiting for the NM penalty

Result obtained by libaudio. So

000009f9 t androidaudiotrack_flush

00000ac1 t androidaudiotrack_register

000009cd t androidaudiotrack_reload

00000a1d t androidaudiotrack_set

00000a9d t androidaudiotrack_start

00000951 t androidaudiotrack_stop

00000975 t androidaudiotrack_unregister

000008d5 t androidaudiotrack_write

The result of libvideo. So is:

000009e9 t androidsurface_getpixels

00000919 t androidsurface_register

000008e1 t androidsurface_unregister

00000b6d t androidsurface_updatesurface


Okay, part of T is the c file corresponding to this library or the CPP file compiled by externc.

Find the corresponding function body ,,,

OK. We found it under JNI/include/Android. the header file for audio is audiotrack. H, and for video, it is surface. h.

It's too tricky. The compiled library does not have any relationships with the CPP file.

I tried to use sourceinsight3 to find the implementation part. Unfortunately, I found it.

I want to let you go, yes, really cool, is there really wood?
Havlenapetr is very open-source. I participated in about 30 open-source projects.

Well? There's a project called havlenapetr-android_frameworks_base. Let's talk about it next time.

I search for me, I search, haha ,,

There are two directories under the havlenapetr-android_frameworks_base/native, one is audio and the other is video. indeed, libaudio is generated. so and libvideo. so, let's look at the corresponding CPP file. That's right.

Copy these two directories to your own Android source code. Well, you are so powerful that you can compile them by yourself. You don't have to use them only for froyo (2.2). Note, 2.3 I haven't tried it yet. If the interface is changed, let's change the code. How happy it is.

PS:

Who owns the code of 3.0?


Thanks again to moruite and to halenapetr
The task of porting FFMPEG to android2.3 is still very difficult.

Aza fighting!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.