Current location - Health Preservation Learning Network - Healthy weight loss - What is the generated ffmpeg configuration script?
What is the generated ffmpeg configuration script?
Full name of NDK: native development package.

1 and NDK are collections of tools.

* NDK provides a series of tools to help developers quickly develop dynamic libraries of C (or C++), and can automatically package so and java applications into apk. These tools are of great help to developers. [ 1]

* NDK integrates cross compiler, and provides corresponding differences in mk file isolation platform, CPU, API, etc. Developers only need to simply modify mk files (indicating "which files need to be compiled" and "compilation characteristics requirements"

",and so on. ), so it can be created.

* NDK can automatically package so and Java applications together, greatly reducing the packaging work of developers.

2.NDK provides a stable and limited API header file declaration.

Google clearly states that the API is stable and supports the currently released API stably in all subsequent versions. From this version of NDK, the functions supported by these APIs are very limited, including: C standard library (libc

), standard mathematics library (libm), compression library (libz) and log library (liblog).

3. Compile ffmpeg with ndk.

Ndk's own documents, including a STANDALONE-TOOLCHAIN.html, all involve the method of independent compilation.

A typical use case is to call the "configuration" script of the open source library, which requires a cross compiler in the CC environment variable.

This obviously means that we can compile some open source libraries generated by "configuration" scripts through this independent compilation method. This paper introduces the use of ndk as a general compiling tool. Compared with the gcc commands we use in linux, ndk actually provides us with tools, and even ndk provides us with a make tool.

In addition, you need to know the configuration parameters. You can use it. //config true-help-& gt; Help.txt generates a help file. The code I compiled is as follows:

. /Configuration \

- logfile=FILE \

-prefix = '/home/ Wang Zhiping /source/ffmpeg_ndk/release' \

- enable-gpl \

- enable-version3 \

-enable- not free \

- disable-doc \

-Disable the program \

- disable-avdevice \

- enable-small \

-cross-prefix = '/home/ Wang Zhiping/arm _ Android14 _ toolchain/bin/arm-Linux-Android ABI-'\

-enable- cross-compilation \

- target-os=linux \

-extra-cflags = '-I/home/ Wang Zhiping/arm _ Android14 _ toolchain/sysroot/usr/include' \

-extra-LD flags = '-L/home/ Wang Zhiping/arm _ Android14 _ toolchain/sysroot/usr/lib' \

- arch=arm \

- disable-symver \

-Disable debugging \

-disable-disable \

-extra-cflags = "-fPIC-Dan droid " \

Logfile: It is the file name of output log one.

Prifix: After running make install, he will generate the corresponding library file and copy the specified folder of the header file.

Cross prefix: It is the prefix of your compiler.

Extra-cflags: This is an option at compile time, where you need to provide the location of the header file.

Extra-ldflags: This is an option when connecting, and you should provide a copy of the library file.

These configurations should refer to STANDALONE-TOOLCHAIN.htm, or you can play by yourself, as long as you specify gcc, compiler, header file and link library correctly. For example, you can delete extra-cflags and extra-ldflags, add sysroot first, and then run make after the configuration is completed.