[Android instance] FFMPEG-based Android player open source code

Source: Internet
Author: User

This open-source Android player is developed based on FFMPEG and provides direct output of audio and video at the JNI layer. It does not use BMP and audiotrack output at the Java layer. It supports Arm Assembly acceleration and is super streamlined.

The source code of audio and video decoding player source code from ffmpeg-0.6.3 (http://www.ffmpeg.org ),
JNI linking code and Java Layer Code comes from havlenapetr (https://github.com/havlenapetr/FFMpeg ).

There are a lot of posts on the Internet for reference on the general key points for porting FFMPEG to Android. You can also use the folder comparison tool to compare and see if the files have been added, modified, and deleted.

Compiling environment of the source code
1: Android SDK 2.2,
2: ndk R4 version. Be sure to export the ndk macro,
3: The IDE development environment is ipvs 3.5
4: libffplay. So is compiled in the source code tree of Android 2.2. It uses ubuntu10.04 and vmware7.1.1. Currently, the source code is not publicly available.
5: libffmpeg. So compilation steps, CD/cygwin/C/ffplay,./config_r4.sh, $ ndk/ndk-build
6: the development environment for PC hosts is Windows XP.

The key points of this open source code solution are as follows:
1: arm assembly code compilation support. It is mainly used to add local_arm_mode: = arm statements to several. mk files,
Add the -- arch = armv5te and -- enable-ASM switches to the config_r4.sh file.
2: After some unused options are disabled in the FFMPEG config_r4.sh configuration file, some inexplicable connection errors are always reported during connection,
This open source code provides the ultimate solution (in/JNI/android. add local_ldlibs + = C:/ffplay/bin/ndk/local/armeabi/libavcodec to the MK file. a ).
3: Modify the Video Display Error bug in havlenapetr. After testing, the original code of havlenapetr is correctly displayed when the simulator is set to 320x133, and an error is displayed at a higher resolution,
This bug has been modified in the source code, and can be correctly displayed at any resolution.
4: JNI code linking is much simpler than havlenapetr, making it easier for netizens to study.
5: this open source code does not include play, pause, stop, seek, and audio/video synchronization functions. This part of the code is not open-source.

Welcome to study: http://files.cnblogs.com/mcodec/ffplay1.7z

APK package download:
Http://files.cnblogs.com/mcodec/ffplay1.apk.7z
Transferred from
Http://www.cnblogs.com/mcodec/ar... 114714.html? Login = 1

Related Article

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.