├── .gitignore
├── LICENSE
├── README.md
├── build.gradle
├── example
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── cn
│ │ └── dxjia
│ │ └── ffmpegexecutor
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── cn
│ │ │ └── dxjia
│ │ │ └── ffmpegexecutor
│ │ │ └── MainActivity.java
│ └── res
│ │ ├── layout
│ │ └── activity_main.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── cn
│ └── dxjia
│ └── ffmpegexecutor
│ └── ExampleUnitTest.java
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── library
├── .gitignore
├── address2line.cmd
├── bintray.gradle
├── build.gradle
├── gradle.properties
├── jni
│ ├── Android.mk
│ ├── FFmpegNativeHelper.c
│ ├── FFmpegNativeHelper.h
│ ├── android_log.h
│ ├── arm_config.h
│ ├── build.cmd
│ ├── build.sh
│ ├── cmdutils.c
│ ├── cmdutils.h
│ ├── cmdutils_common_opts.h
│ ├── config.h
│ ├── ffmpeg.h
│ ├── ffmpeg_filter.c
│ ├── ffmpeg_opt.c
│ ├── include
│ │ ├── compat
│ │ │ └── va_copy.h
│ │ ├── libavcodec
│ │ │ ├── arm
│ │ │ │ └── mathops.h
│ │ │ ├── avcodec.h
│ │ │ ├── avfft.h
│ │ │ ├── dv_profile.h
│ │ │ ├── dxva2.h
│ │ │ ├── mathops.h
│ │ │ ├── old_codec_ids.h
│ │ │ ├── qsv.h
│ │ │ ├── vaapi.h
│ │ │ ├── vda.h
│ │ │ ├── vdpau.h
│ │ │ ├── version.h
│ │ │ ├── vorbis_parser.h
│ │ │ ├── x86
│ │ │ │ └── mathops.h
│ │ │ └── xvmc.h
│ │ ├── libavdevice
│ │ │ ├── avdevice.h
│ │ │ └── version.h
│ │ ├── libavfilter
│ │ │ ├── asrc_abuffer.h
│ │ │ ├── avcodec.h
│ │ │ ├── avfilter.h
│ │ │ ├── avfiltergraph.h
│ │ │ ├── buffersink.h
│ │ │ ├── buffersrc.h
│ │ │ └── version.h
│ │ ├── libavformat
│ │ │ ├── avformat.h
│ │ │ ├── avio.h
│ │ │ ├── network.h
│ │ │ ├── os_support.h
│ │ │ ├── url.h
│ │ │ └── version.h
│ │ ├── libavresample
│ │ │ ├── avresample.h
│ │ │ └── version.h
│ │ ├── libavutil
│ │ │ ├── adler32.h
│ │ │ ├── aes.h
│ │ │ ├── attributes.h
│ │ │ ├── audio_fifo.h
│ │ │ ├── audioconvert.h
│ │ │ ├── avassert.h
│ │ │ ├── avconfig.h
│ │ │ ├── avstring.h
│ │ │ ├── avutil.h
│ │ │ ├── base64.h
│ │ │ ├── blowfish.h
│ │ │ ├── bprint.h
│ │ │ ├── bswap.h
│ │ │ ├── buffer.h
│ │ │ ├── camellia.h
│ │ │ ├── cast5.h
│ │ │ ├── channel_layout.h
│ │ │ ├── common.h
│ │ │ ├── cpu.h
│ │ │ ├── crc.h
│ │ │ ├── dict.h
│ │ │ ├── display.h
│ │ │ ├── downmix_info.h
│ │ │ ├── error.h
│ │ │ ├── eval.h
│ │ │ ├── ffversion.h
│ │ │ ├── fifo.h
│ │ │ ├── file.h
│ │ │ ├── frame.h
│ │ │ ├── hash.h
│ │ │ ├── hmac.h
│ │ │ ├── imgutils.h
│ │ │ ├── intfloat.h
│ │ │ ├── intreadwrite.h
│ │ │ ├── lfg.h
│ │ │ ├── libm.h
│ │ │ ├── log.h
│ │ │ ├── lzo.h
│ │ │ ├── macros.h
│ │ │ ├── mathematics.h
│ │ │ ├── md5.h
│ │ │ ├── mem.h
│ │ │ ├── motion_vector.h
│ │ │ ├── murmur3.h
│ │ │ ├── old_pix_fmts.h
│ │ │ ├── opt.h
│ │ │ ├── parseutils.h
│ │ │ ├── pixdesc.h
│ │ │ ├── pixelutils.h
│ │ │ ├── pixfmt.h
│ │ │ ├── random_seed.h
│ │ │ ├── rational.h
│ │ │ ├── replaygain.h
│ │ │ ├── ripemd.h
│ │ │ ├── samplefmt.h
│ │ │ ├── sha.h
│ │ │ ├── sha512.h
│ │ │ ├── stereo3d.h
│ │ │ ├── threadmessage.h
│ │ │ ├── time.h
│ │ │ ├── timecode.h
│ │ │ ├── timestamp.h
│ │ │ ├── twofish.h
│ │ │ ├── version.h
│ │ │ ├── x86
│ │ │ │ └── asm.h
│ │ │ └── xtea.h
│ │ ├── libpostproc
│ │ │ ├── postprocess.h
│ │ │ └── version.h
│ │ ├── libswresample
│ │ │ ├── swresample.h
│ │ │ └── version.h
│ │ └── libswscale
│ │ │ ├── swscale.h
│ │ │ └── version.h
│ ├── prebuilt
│ │ ├── armeabi
│ │ │ ├── libavcodec-56.so
│ │ │ ├── libavdevice-56.so
│ │ │ ├── libavfilter-5.so
│ │ │ ├── libavformat-56.so
│ │ │ ├── libavutil-54.so
│ │ │ ├── libswresample-1.so
│ │ │ └── libswscale-3.so
│ │ └── x86
│ │ │ ├── libavcodec-56.so
│ │ │ ├── libavdevice-56.so
│ │ │ ├── libavfilter-5.so
│ │ │ ├── libavformat-56.so
│ │ │ ├── libavutil-54.so
│ │ │ ├── libswresample-1.so
│ │ │ └── libswscale-3.so
│ ├── show_func_wrapper.c
│ ├── show_func_wrapper.h
│ └── x86_config.h
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── cn
│ │ └── dxjia
│ │ └── ffmpeg
│ │ └── library
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── cn
│ │ │ └── dxjia
│ │ │ └── ffmpeg
│ │ │ └── library
│ │ │ └── FFmpegNativeHelper.java
│ └── res
│ │ └── values
│ │ └── strings.xml
│ └── test
│ └── java
│ └── cn
│ └── dxjia
│ └── ffmpeg
│ └── library
│ └── ExampleUnitTest.java
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 |
15 | # Gradle files
16 | .gradle/
17 | build/
18 |
19 | # Local configuration file (sdk path, etc)
20 | local.properties
21 |
22 | # Proguard folder generated by Eclipse
23 | proguard/
24 |
25 | # Log Files
26 | *.log
27 |
28 | # Android Studio Navigation editor temp files
29 | .navigation/
30 |
31 | # Android Studio captures folder
32 | captures/
33 |
34 | # Windoes thumbs file
35 | Thumbs.db
36 |
37 | # Idea
38 | .idea/
39 | *.iml
40 |
41 | # keystore files
42 | *.keyset
43 |
44 | # DS_Store
45 | .DS_Store
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | `This is AS version`
2 | Eclipse version, please refer to [Old Eclipse Version](https://github.com/dxjia/ffmpeg-commands-executor-library/tree/master)
3 | # ffmpeg-commands-executor-library
4 | execute ffmpeg commands as a shared librar, you can try [example.apk](https://github.com/dxjia/ffmpeg-commands-executor-library/releases/download/v0.1.7/example-debug.apk)
5 | [**Note**]: This library may not support all the codecs you want, for example, h264.
6 |
7 | # Usage
8 | add dependency in your build.gradle
9 | ```
10 | dependencies {
11 | compile 'cn.dxjia:ffmpegexecutor:0.1.7'
12 | }
13 | ```
14 | import package
15 | ```
16 | import cn.dxjia.ffmpeg.library.FFmpegNativeHelper;
17 | ```
18 | run command
19 | ```
20 | FFmpegNativeHelper.runCommand("ffmpeg -version");
21 | ```
22 |
23 | **`NOTE:`**
24 | - now, runCommand() will return some strings as result, not very friendly;
25 | - this library modified some ffmpeg source code, invasion is relatively strong.
26 |
27 | # Compile library or example by yourself
28 | If you want to compile this library by yourself, you can do that as follow steps.
29 | ### Step 1
30 | Build jni manually
31 | #### Linux or Ubuntu
32 | ```
33 | cd library/jni
34 | chmod a+x build.sh
35 | . build.sh
36 | ```
37 | #### Windows
38 | Make sure you have add your NDK path to your PC Enviroment.
39 |
40 | Open a CMD terminal
41 | ```
42 | cd library\jni
43 | build.cmd
44 | ```
45 | ### Step 2
46 | Android Studio -> Open Existing Project
47 |
48 | ### Step 3
49 | modify code & build project
50 |
51 | **NOTE:** Every time you changed the jni source code, you need to build it manually before building the project from Android Studio.
52 |
53 | Any issues and PRs are welcome.
54 |
55 | # License
56 | ```
57 | Copyright (c) 2015 dxjia
58 |
59 | Licensed under the Apache License, Version 2.0 (the "License");
60 | you may not use this file except in compliance with the License.
61 | You may obtain a copy of the License at
62 |
63 | http://www.apache.org/licenses/LICENSE-2.0
64 |
65 | Unless required by applicable law or agreed to in writing, software
66 | distributed under the License is distributed on an "AS IS" BASIS,
67 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
68 | See the License for the specific language governing permissions and
69 | limitations under the License.
70 | ```
71 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.1.2'
9 |
10 | // uncomment the follow 3 lines to do bintray upload
11 | //classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
12 | //classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
13 | //classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.0.0"
14 |
15 | // NOTE: Do not place your application dependencies here; they belong
16 | // in the individual module build.gradle files
17 | }
18 | }
19 |
20 | allprojects {
21 | repositories {
22 | jcenter()
23 | }
24 | }
25 |
26 | task clean(type: Delete) {
27 | delete rootProject.buildDir
28 | }
29 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/example/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.2"
6 |
7 | defaultConfig {
8 | applicationId "cn.dxjia.ffmpegexecutor"
9 | minSdkVersion 7
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(include: ['*.jar'], dir: 'libs')
24 | testCompile 'junit:junit:4.12'
25 | compile project(':library')
26 | compile 'com.android.support:appcompat-v7:23.1.1'
27 | }
28 |
--------------------------------------------------------------------------------
/example/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\android\android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/example/src/androidTest/java/cn/dxjia/ffmpegexecutor/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package cn.dxjia.ffmpeg.executor;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/example/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/example/src/main/java/cn/dxjia/ffmpegexecutor/MainActivity.java:
--------------------------------------------------------------------------------
1 | package cn.dxjia.ffmpegexecutor;
2 |
3 | import android.app.ProgressDialog;
4 | import android.os.AsyncTask;
5 | import android.os.Handler;
6 | import android.os.Message;
7 | import android.support.v7.app.AppCompatActivity;
8 | import android.os.Bundle;
9 | import android.text.TextUtils;
10 | import android.text.method.ScrollingMovementMethod;
11 | import android.view.View;
12 | import android.widget.EditText;
13 | import android.widget.TextView;
14 |
15 | import cn.dxjia.ffmpeg.library.FFmpegNativeHelper;
16 |
17 | public class MainActivity extends AppCompatActivity {
18 |
19 | private EditText mInputEdit;
20 | private TextView mResultBoard;
21 | private String mCurrentCommand;
22 | private AsyncTask mRunCommandAsyncTask;
23 |
24 | private static final int EVENT_SHOW_PROCESS_DIALOG = 0;
25 | private static final int EVENT_DISMISS_PROCESS_DIALOG = 1;
26 | private static ProgressDialog mWaitingDialog;
27 | private WaitingDialogHanlder mWaitingDialogHandler;
28 |
29 | //private static final String testCommand = "ffmpeg -i /sdcard/demo.mp4 -vframes 30 -y -f gif /sdcard/demoout.gif";
30 | private static final String testCommand = "ffmpeg -h";
31 |
32 | @Override
33 | protected void onCreate(Bundle savedInstanceState) {
34 | super.onCreate(savedInstanceState);
35 | setContentView(R.layout.activity_main);
36 |
37 | mInputEdit = (EditText) findViewById(R.id.command_input_edit);
38 | mResultBoard = (TextView) findViewById(R.id.result_board);
39 | mResultBoard.setMovementMethod(new ScrollingMovementMethod());
40 |
41 | mRunCommandAsyncTask = null;
42 |
43 | mWaitingDialog = new ProgressDialog(this);
44 | mWaitingDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
45 | mWaitingDialog.setMessage("Waiting...");
46 |
47 | mWaitingDialogHandler = new WaitingDialogHanlder();
48 |
49 |
50 | findViewById(R.id.run_command_sync).setOnClickListener(new View.OnClickListener() {
51 | @Override
52 | public void onClick(View v) {
53 | runCommandSync();
54 | }
55 | });
56 |
57 | findViewById(R.id.run_command_async).setOnClickListener(new View.OnClickListener() {
58 | @Override
59 | public void onClick(View v) {
60 | runCommandAsync();
61 | }
62 | });
63 | }
64 |
65 | private void prepare() {
66 | clearResultBoard();
67 | mCurrentCommand = mInputEdit.getText().toString();
68 | if (TextUtils.isEmpty(mCurrentCommand)) {
69 | mCurrentCommand = testCommand;
70 | }
71 | mRunCommandAsyncTask = null;
72 | }
73 |
74 | // 同步运行命令, 阻塞
75 | private void runCommandSync() {
76 | prepare();
77 | updateResultBoard(executeCommand(mCurrentCommand));
78 | }
79 |
80 | /* 异步运行命令, 非阻塞 */
81 | private void runCommandAsync() {
82 | prepare();
83 | mRunCommandAsyncTask = new AsyncTask() {
84 | @Override
85 | protected String doInBackground(String... strings) {
86 | String command;
87 | if (strings != null && strings.length > 0) {
88 | command = strings[0];
89 | } else {
90 | return "Must input command!";
91 | }
92 |
93 | return executeCommand(command);
94 | }
95 |
96 | @Override
97 | protected void onPostExecute(String s) {
98 | super.onPostExecute(s);
99 | // we got result, dismiss waiting dialog
100 | mWaitingDialogHandler.removeMessages(EVENT_SHOW_PROCESS_DIALOG);
101 | mWaitingDialogHandler.sendEmptyMessage(EVENT_DISMISS_PROCESS_DIALOG);
102 | updateResultBoard(s);
103 | }
104 | };
105 |
106 | mRunCommandAsyncTask.execute(mCurrentCommand);
107 |
108 | // if we can`t get result after 300ms, show the waiting dialog
109 | mWaitingDialogHandler.sendEmptyMessageDelayed(EVENT_SHOW_PROCESS_DIALOG, 300);
110 |
111 | }
112 |
113 | private String executeCommand(String command) {
114 | return FFmpegNativeHelper.runCommand(command);
115 | }
116 |
117 | private void clearResultBoard() {
118 | mResultBoard.setText("");
119 | mResultBoard.scrollTo(0, 0);
120 | }
121 |
122 | private void updateResultBoard(String message) {
123 | if (message == null || message.length() == 0) {
124 | return;
125 | }
126 | String currentStr = mResultBoard.getText().toString();
127 | mResultBoard.setText(currentStr + "\n" + message);
128 | }
129 |
130 | private static class WaitingDialogHanlder extends Handler {
131 | @Override
132 | public void handleMessage(Message msg) {
133 | super.handleMessage(msg);
134 | switch (msg.what) {
135 | case EVENT_SHOW_PROCESS_DIALOG:
136 | mWaitingDialog.show();
137 | break;
138 | case EVENT_DISMISS_PROCESS_DIALOG:
139 | mWaitingDialog.dismiss();
140 | break;
141 | default: return;
142 | }
143 | }
144 | }
145 | }
146 |
--------------------------------------------------------------------------------
/example/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
20 |
28 |
29 |
36 |
37 |
45 |
46 |
47 |
48 |
56 |
57 |
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/example/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/example/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/example/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/example/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/example/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/example/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/example/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/example/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ffmpeg executor
3 | Input Command, e.g. ffmpeg -h
4 |
5 |
--------------------------------------------------------------------------------
/example/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/example/src/test/java/cn/dxjia/ffmpegexecutor/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package cn.dxjia.ffmpegexecutor;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 | android.useDeprecatedNdk=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/library/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /obj
3 |
--------------------------------------------------------------------------------
/library/address2line.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | set CURRENT_PATH=%cd%
3 |
4 | set LIB_FILE_PATH=%CURRENT_PATH%\obj\local\armeabi\%1%
5 | set CRASH_ADRESS=%2%
6 |
7 | set TOOL_PATH="D:\android\android-ndk\toolchains\arm-linux-androideabi-4.8\prebuilt\windows\bin\arm-linux-androideabi-addr2line.exe"
8 |
9 | "%TOOL_PATH%" -C -f -e "%LIB_FILE_PATH%" "%CRASH_ADRESS%" SHELL=cmd %*
--------------------------------------------------------------------------------
/library/bintray.gradle:
--------------------------------------------------------------------------------
1 | group = PROJ_GROUP
2 | version = PROJ_VERSION
3 | project.archivesBaseName = PROJ_ARTIFACTID
4 |
5 | apply plugin: 'com.jfrog.bintray'
6 | apply plugin: 'com.github.dcendents.android-maven'
7 |
8 | task sourcesJar(type: Jar) {
9 | from android.sourceSets.main.java.srcDirs
10 | classifier = 'sources'
11 | }
12 |
13 | task javadoc(type: Javadoc) {
14 | source = android.sourceSets.main.java.srcDirs
15 | classpath += configurations.compile
16 | classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
17 | }
18 |
19 | task javadocJar(type: Jar, dependsOn: javadoc) {
20 | classifier = 'javadoc'
21 | from javadoc.destinationDir
22 | }
23 |
24 | javadoc {
25 | options{
26 | encoding "UTF-8"
27 | charSet 'UTF-8'
28 | author true
29 | version true
30 | links "http://docs.oracle.com/javase/7/docs/api"
31 | title PROJ_ARTIFACTID
32 | }
33 | }
34 |
35 | artifacts {
36 | archives sourcesJar
37 | archives javadocJar
38 | }
39 |
40 | install {
41 | repositories.mavenInstaller {
42 | pom.project {
43 | name PROJ_NAME
44 | description PROJ_DESCRIPTION
45 | url PROJ_WEBSITEURL
46 | inceptionYear '2016'
47 |
48 | packaging 'aar'
49 | groupId PROJ_GROUP
50 | artifactId PROJ_ARTIFACTID
51 | version PROJ_VERSION
52 |
53 | licenses {
54 | license {
55 | name 'The Apache Software License, Version 2.0'
56 | url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
57 | distribution 'repo'
58 | }
59 | }
60 | scm {
61 | connection PROJ_VCSURL
62 | url PROJ_WEBSITEURL
63 |
64 | }
65 | developers {
66 | developer {
67 | id DEVELOPER_ID
68 | name DEVELOPER_NAME
69 | email DEVELOPER_EMAIL
70 | }
71 | }
72 | }
73 | }
74 | }
75 |
76 | bintray {
77 | user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : project.property('BINTRAY_USER')
78 | key = project.hasProperty('bintrayKey') ? project.property('bintrayKey') : project.property('BINTRAY_KEY')
79 |
80 | configurations = ['archives']
81 |
82 | dryRun = false
83 | publish = true
84 |
85 | pkg {
86 | repo = 'maven'
87 | name = PROJ_NAME
88 | licenses = ['Apache-2.0']
89 | vcsUrl = PROJ_VCSURL
90 | websiteUrl = PROJ_WEBSITEURL
91 | issueTrackerUrl = PROJ_ISSUETRACKERURL
92 | publicDownloadNumbers = true
93 | version {
94 | name = PROJ_VERSION
95 | desc = PROJ_DESCRIPTION
96 | vcsTag = PROJ_VERSION
97 |
98 | gpg {
99 | sign = true
100 | }
101 |
102 | mavenCentralSync {
103 | sync = project.hasProperty('SONATYPE_USER') && project.hasProperty('SONATYPE_KEY')
104 | user = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : ""
105 | password = project.hasProperty('SONATYPE_PASS') ? project.property('SONATYPE_PASS') : ""
106 | close = '1'
107 | }
108 | }
109 | }
110 | }
111 |
112 | //以下内容用于发布SNAPSHOT版本,如果不需要可以移除。
113 | //参考自:https://www.jfrog.com/confluence/display/RTF/Gradle+Artifactory+Plugin
114 |
115 | apply plugin: "com.jfrog.artifactory"
116 | artifactory {
117 | contextUrl = 'http://oss.jfrog.org/artifactory' //The base Artifactory URL if not overridden by the publisher/resolver
118 | resolve {
119 | repository {
120 | repoKey = 'libs-release'
121 | }
122 | }
123 | publish {
124 | repository {
125 | repoKey = 'oss-snapshot-local' //The Artifactory repository key to publish to
126 | username = bintray.user
127 | password = bintray.key
128 | maven = true
129 | }
130 | defaults {
131 | //这里的名字和前面bintray.configurations的值一致即可,会将其包含的输出上传到jfrog上去
132 | publishConfigs('archives')
133 | }
134 | }
135 | }
--------------------------------------------------------------------------------
/library/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.2"
6 |
7 | defaultConfig {
8 | minSdkVersion 7
9 | targetSdkVersion 23
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | sourceSets.main {
20 | jni.srcDirs = [] //disable automatic ndk-build
21 | jniLibs.srcDirs = ['libs']
22 | }
23 | }
24 |
25 | dependencies {
26 | compile fileTree(dir: 'libs', include: ['*.jar'])
27 | testCompile 'junit:junit:4.12'
28 | }
29 |
30 | // uncomment the follow line to do bintray upload
31 | //apply from: 'bintray.gradle'
32 |
--------------------------------------------------------------------------------
/library/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | PROJ_GROUP=cn.dxjia
21 | PROJ_VERSION=0.1.7
22 | PROJ_NAME=ffmpeg-command-executor
23 | PROJ_WEBSITEURL=https://github.com/dxjia/ffmpeg-commands-executor-library/tree/as-version
24 | PROJ_ISSUETRACKERURL=https://github.com/dxjia/ffmpeg-commands-executor-library/issues
25 | PROJ_VCSURL=git@github.com:dxjia/ffmpeg-commands-executor-library.git
26 | PROJ_DESCRIPTION=ffmpeg commands executor as a shared library
27 | PROJ_ARTIFACTID=ffmpegexecutor
28 |
29 | DEVELOPER_ID=dxjia
30 | DEVELOPER_NAME=dxjia
31 | DEVELOPER_EMAIL=jdxwind@dxjia.cn
32 |
--------------------------------------------------------------------------------
/library/jni/Android.mk:
--------------------------------------------------------------------------------
1 | ifeq ($(APP_ABI), x86)
2 | LIB_NAME_PLUS := x86
3 | else
4 | LIB_NAME_PLUS := armeabi
5 | endif
6 |
7 | LOCAL_PATH:= $(call my-dir)
8 |
9 | include $(CLEAR_VARS)
10 | LOCAL_MODULE:= avcodec-prebuilt-$(LIB_NAME_PLUS)
11 | LOCAL_SRC_FILES:= prebuilt/$(LIB_NAME_PLUS)/libavcodec-56.so
12 | include $(PREBUILT_SHARED_LIBRARY)
13 |
14 | include $(CLEAR_VARS)
15 | LOCAL_MODULE:= avdevice-prebuilt-$(LIB_NAME_PLUS)
16 | LOCAL_SRC_FILES:= prebuilt/$(LIB_NAME_PLUS)/libavdevice-56.so
17 | include $(PREBUILT_SHARED_LIBRARY)
18 |
19 | include $(CLEAR_VARS)
20 | LOCAL_MODULE:= avfilter-prebuilt-$(LIB_NAME_PLUS)
21 | LOCAL_SRC_FILES:= prebuilt/$(LIB_NAME_PLUS)/libavfilter-5.so
22 | include $(PREBUILT_SHARED_LIBRARY)
23 |
24 | include $(CLEAR_VARS)
25 | LOCAL_MODULE:= avformat-prebuilt-$(LIB_NAME_PLUS)
26 | LOCAL_SRC_FILES:= prebuilt/$(LIB_NAME_PLUS)/libavformat-56.so
27 | include $(PREBUILT_SHARED_LIBRARY)
28 |
29 | include $(CLEAR_VARS)
30 | LOCAL_MODULE := avutil-prebuilt-$(LIB_NAME_PLUS)
31 | LOCAL_SRC_FILES := prebuilt/$(LIB_NAME_PLUS)/libavutil-54.so
32 | include $(PREBUILT_SHARED_LIBRARY)
33 |
34 | include $(CLEAR_VARS)
35 | LOCAL_MODULE := swresample-prebuilt-$(LIB_NAME_PLUS)
36 | LOCAL_SRC_FILES := prebuilt/$(LIB_NAME_PLUS)/libswresample-1.so
37 | include $(PREBUILT_SHARED_LIBRARY)
38 |
39 | include $(CLEAR_VARS)
40 | LOCAL_MODULE := swscale-prebuilt-$(LIB_NAME_PLUS)
41 | LOCAL_SRC_FILES := prebuilt/$(LIB_NAME_PLUS)/libswscale-3.so
42 | include $(PREBUILT_SHARED_LIBRARY)
43 |
44 | include $(CLEAR_VARS)
45 |
46 | LOCAL_MODULE := libffmpegjni
47 |
48 | ifeq ($(APP_ABI), x86)
49 | TARGET_ARCH:=x86
50 | TARGET_ARCH_ABI:=x86
51 | else
52 | LOCAL_ARM_MODE := arm
53 | endif
54 |
55 | LOCAL_SRC_FILES := FFmpegNativeHelper.c \
56 | cmdutils.c \
57 | ffmpeg_opt.c \
58 | ffmpeg_filter.c \
59 | show_func_wrapper.c
60 |
61 | LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog -lz
62 |
63 | LOCAL_SHARED_LIBRARIES:= avcodec-prebuilt-$(LIB_NAME_PLUS) \
64 | avdevice-prebuilt-$(LIB_NAME_PLUS) \
65 | avfilter-prebuilt-$(LIB_NAME_PLUS) \
66 | avformat-prebuilt-$(LIB_NAME_PLUS) \
67 | avutil-prebuilt-$(LIB_NAME_PLUS) \
68 | swresample-prebuilt-$(LIB_NAME_PLUS) \
69 | swscale-prebuilt-$(LIB_NAME_PLUS)
70 |
71 | LOCAL_C_INCLUDES += -L$(SYSROOT)/usr/include
72 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
73 |
74 | ifeq ($(APP_ABI), x86)
75 | LOCAL_CFLAGS := -DUSE_X86_CONFIG
76 | else
77 | LOCAL_CFLAGS := -DUSE_ARM_CONFIG
78 | endif
79 |
80 | include $(BUILD_SHARED_LIBRARY)
81 |
--------------------------------------------------------------------------------
/library/jni/FFmpegNativeHelper.h:
--------------------------------------------------------------------------------
1 | /* DO NOT EDIT THIS FILE - it is machine generated */
2 | #include
3 | /* Header for class com_wind_ffmpeghelper_FfmpegNativeHelper */
4 |
5 | #ifndef _Included_FFmpegNativeHelper
6 | #define _Included_FFmpegNativeHelper
7 | #ifdef __cplusplus
8 | extern "C" {
9 | #endif
10 |
11 | /*
12 | * Class: cn_dxjia_ffmpeg_library_FfmpegNativeHelper
13 | * Method: ffmpeg_init
14 | * Signature: ()I
15 | */
16 | JNIEXPORT jint JNICALL Java_cn_dxjia_ffmpeg_library_FFmpegNativeHelper_ffmpeg_1init
17 | (JNIEnv *, jobject);
18 |
19 | /*
20 | * Class: cn_dxjia_ffmpeg_library_FfmpegNativeHelper
21 | * Method: ffmpeg_uninit
22 | * Signature: ()I
23 | */
24 | JNIEXPORT jint JNICALL Java_cn_dxjia_ffmpeg_library_FFmpegNativeHelper_ffmpeg_1uninit
25 | (JNIEnv *, jobject);
26 |
27 | /*
28 | * Class: cn_dxjia_ffmpeg_library_FfmpegNativeHelper
29 | * Method: ffmpeg_run
30 | * Signature: ()I
31 | */
32 | JNIEXPORT jstring JNICALL Java_cn_dxjia_ffmpeg_library_FFmpegNativeHelper_ffmpeg_1run
33 | (JNIEnv *, jobject, jobjectArray strArray);
34 |
35 | #ifdef __cplusplus
36 | }
37 | #endif
38 | #endif
39 |
--------------------------------------------------------------------------------
/library/jni/android_log.h:
--------------------------------------------------------------------------------
1 | #ifndef DXJIA_ANDROID_LOG_H
2 | #define DXJIA_ANDROID_LOG_H
3 |
4 | #include "libavutil/log.h"
5 |
6 | #define LOG_TAG "ffmpeg-jni"
7 | #include
8 |
9 | #define logv(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG ,__VA_ARGS__)
10 | #define logd(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG ,__VA_ARGS__)
11 | #define logi(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG ,__VA_ARGS__)
12 | #define logw(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG ,__VA_ARGS__)
13 | #define loge(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG ,__VA_ARGS__)
14 | #define logf(...) __android_log_print(ANDROID_LOG_FATAL, LOG_TAG ,__VA_ARGS__)
15 |
16 | void log_callback(void *ptr, int level, const char *fmt, va_list vl);
17 | void log_anyway(void *ptr, int level, const char *fmt, va_list vl);
18 |
19 | static printf_log(const char* fmt, ...) {
20 | va_list ap;
21 | va_start(ap, fmt);
22 | log_anyway(NULL, AV_LOG_INFO, fmt, ap);
23 | va_end(ap);
24 | }
25 |
26 | #define printf(x...) printf_log(x)
27 |
28 |
29 | #endif /* DXJIA_ANDROID_LOG_H */
30 |
--------------------------------------------------------------------------------
/library/jni/build.cmd:
--------------------------------------------------------------------------------
1 | call ndk-build APP_ABI=armeabi
2 | ren ..\libs\armeabi armeabi-bak
3 | call ndk-build APP_ABI=x86
4 | ren ..\libs\armeabi-bak armeabi
5 |
--------------------------------------------------------------------------------
/library/jni/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ndk-build APP_ABI=armeabi
3 | mv ../libs/armeabi ../libs/armeabi-bak
4 | ndk-build APP_ABI=x86
5 | mv ../libs/armeabi-bak ../libs/armeabi
--------------------------------------------------------------------------------
/library/jni/cmdutils_common_opts.h:
--------------------------------------------------------------------------------
1 | { "L" , OPT_EXIT, {.func_arg = show_license}, "show license" },
2 | { "h" , OPT_EXIT, {.func_arg = show_help}, "show help", "topic" },
3 | { "?" , OPT_EXIT, {.func_arg = show_help}, "show help", "topic" },
4 | { "help" , OPT_EXIT, {.func_arg = show_help}, "show help", "topic" },
5 | { "-help" , OPT_EXIT, {.func_arg = show_help}, "show help", "topic" },
6 | { "version" , OPT_EXIT, {.func_arg = show_version}, "show version" },
7 | { "buildconf" , OPT_EXIT, {.func_arg = show_buildconf}, "show build configuration" },
8 | { "formats" , OPT_EXIT, {.func_arg = show_formats }, "show available formats" },
9 | { "devices" , OPT_EXIT, {.func_arg = show_devices }, "show available devices" },
10 | { "codecs" , OPT_EXIT, {.func_arg = show_codecs }, "show available codecs" },
11 | { "decoders" , OPT_EXIT, {.func_arg = show_decoders }, "show available decoders" },
12 | { "encoders" , OPT_EXIT, {.func_arg = show_encoders }, "show available encoders" },
13 | { "bsfs" , OPT_EXIT, {.func_arg = show_bsfs }, "show available bit stream filters" },
14 | { "protocols" , OPT_EXIT, {.func_arg = show_protocols}, "show available protocols" },
15 | { "filters" , OPT_EXIT, {.func_arg = show_filters }, "show available filters" },
16 | { "pix_fmts" , OPT_EXIT, {.func_arg = show_pix_fmts }, "show available pixel formats" },
17 | { "layouts" , OPT_EXIT, {.func_arg = show_layouts }, "show standard channel layouts" },
18 | { "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" },
19 | { "colors" , OPT_EXIT, {.func_arg = show_colors }, "show available color names" },
20 | { "loglevel" , HAS_ARG, {.func_arg = opt_loglevel}, "set logging level", "loglevel" },
21 | { "v", HAS_ARG, {.func_arg = opt_loglevel}, "set logging level", "loglevel" },
22 | { "report" , 0, {(void*)opt_report}, "generate a report" },
23 | { "max_alloc" , HAS_ARG, {.func_arg = opt_max_alloc}, "set maximum size of a single allocated block", "bytes" },
24 | { "cpuflags" , HAS_ARG | OPT_EXPERT, { .func_arg = opt_cpuflags }, "force specific cpu flags", "flags" },
25 | { "hide_banner", OPT_BOOL | OPT_EXPERT, {&hide_banner}, "do not show program banner", "hide_banner" },
26 | #if CONFIG_OPENCL
27 | { "opencl_bench", OPT_EXIT, {.func_arg = opt_opencl_bench}, "run benchmark on all OpenCL devices and show results" },
28 | { "opencl_options", HAS_ARG, {.func_arg = opt_opencl}, "set OpenCL environment options" },
29 | #endif
30 | #if CONFIG_AVDEVICE
31 | { "sources" , OPT_EXIT | HAS_ARG, { .func_arg = show_sources },
32 | "list sources of the input device", "device" },
33 | { "sinks" , OPT_EXIT | HAS_ARG, { .func_arg = show_sinks },
34 | "list sinks of the output device", "device" },
35 | #endif
36 |
--------------------------------------------------------------------------------
/library/jni/config.h:
--------------------------------------------------------------------------------
1 | #ifndef DXJIA_FFMPEG_CONFIG_H
2 | #define DXJIA_FFMPEG_CONFIG_H
3 |
4 | #if USE_ARM_CONFIG
5 | #include "arm_config.h"
6 | #elif USE_X86_CONFIG
7 | #include "x86_config.h"
8 | #endif
9 |
10 | #endif /* DXJIA_FFMPEG_CONFIG_H */
11 |
--------------------------------------------------------------------------------
/library/jni/include/compat/va_copy.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MSVC Compatible va_copy macro
3 | * Copyright (c) 2012 Derek Buitenhuis
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #include
23 |
24 | #if !defined(va_copy) && defined(_MSC_VER)
25 | #define va_copy(dst, src) ((dst) = (src))
26 | #endif
27 | #if !defined(va_copy) && defined(__GNUC__) && __GNUC__ < 3
28 | #define va_copy(dst, src) __va_copy(dst, src)
29 | #endif
30 |
--------------------------------------------------------------------------------
/library/jni/include/libavcodec/arm/mathops.h:
--------------------------------------------------------------------------------
1 | /*
2 | * simple math operations
3 | * Copyright (c) 2006 Michael Niedermayer et al
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVCODEC_ARM_MATHOPS_H
23 | #define AVCODEC_ARM_MATHOPS_H
24 |
25 | #include
26 | #include "config.h"
27 | #include "libavutil/common.h"
28 |
29 | #if HAVE_INLINE_ASM
30 |
31 | #if HAVE_ARMV6_INLINE
32 | #define MULH MULH
33 | static inline av_const int MULH(int a, int b)
34 | {
35 | int r;
36 | __asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
37 | return r;
38 | }
39 |
40 | #define FASTDIV FASTDIV
41 | static av_always_inline av_const int FASTDIV(int a, int b)
42 | {
43 | int r;
44 | __asm__ ("cmp %2, #2 \n\t"
45 | "ldr %0, [%3, %2, lsl #2] \n\t"
46 | "ite le \n\t"
47 | "lsrle %0, %1, #1 \n\t"
48 | "smmulgt %0, %0, %1 \n\t"
49 | : "=&r"(r) : "r"(a), "r"(b), "r"(ff_inverse) : "cc");
50 | return r;
51 | }
52 |
53 | #else /* HAVE_ARMV6_INLINE */
54 |
55 | #define FASTDIV FASTDIV
56 | static av_always_inline av_const int FASTDIV(int a, int b)
57 | {
58 | int r, t;
59 | __asm__ ("umull %1, %0, %2, %3"
60 | : "=&r"(r), "=&r"(t) : "r"(a), "r"(ff_inverse[b]));
61 | return r;
62 | }
63 | #endif
64 |
65 | #define MLS64(d, a, b) MAC64(d, -(a), b)
66 |
67 | #if HAVE_ARMV5TE_INLINE
68 |
69 | /* signed 16x16 -> 32 multiply add accumulate */
70 | # define MAC16(rt, ra, rb) \
71 | __asm__ ("smlabb %0, %1, %2, %0" : "+r"(rt) : "r"(ra), "r"(rb));
72 |
73 | /* signed 16x16 -> 32 multiply */
74 | # define MUL16 MUL16
75 | static inline av_const int MUL16(int ra, int rb)
76 | {
77 | int rt;
78 | __asm__ ("smulbb %0, %1, %2" : "=r"(rt) : "r"(ra), "r"(rb));
79 | return rt;
80 | }
81 |
82 | #endif
83 |
84 | #define mid_pred mid_pred
85 | static inline av_const int mid_pred(int a, int b, int c)
86 | {
87 | int m;
88 | __asm__ (
89 | "mov %0, %2 \n\t"
90 | "cmp %1, %2 \n\t"
91 | "itt gt \n\t"
92 | "movgt %0, %1 \n\t"
93 | "movgt %1, %2 \n\t"
94 | "cmp %1, %3 \n\t"
95 | "it le \n\t"
96 | "movle %1, %3 \n\t"
97 | "cmp %0, %1 \n\t"
98 | "it gt \n\t"
99 | "movgt %0, %1 \n\t"
100 | : "=&r"(m), "+r"(a)
101 | : "r"(b), "r"(c)
102 | : "cc");
103 | return m;
104 | }
105 |
106 | #endif /* HAVE_INLINE_ASM */
107 |
108 | #endif /* AVCODEC_ARM_MATHOPS_H */
109 |
--------------------------------------------------------------------------------
/library/jni/include/libavcodec/avfft.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVCODEC_AVFFT_H
20 | #define AVCODEC_AVFFT_H
21 |
22 | /**
23 | * @file
24 | * @ingroup lavc_fft
25 | * FFT functions
26 | */
27 |
28 | /**
29 | * @defgroup lavc_fft FFT functions
30 | * @ingroup lavc_misc
31 | *
32 | * @{
33 | */
34 |
35 | typedef float FFTSample;
36 |
37 | typedef struct FFTComplex {
38 | FFTSample re, im;
39 | } FFTComplex;
40 |
41 | typedef struct FFTContext FFTContext;
42 |
43 | /**
44 | * Set up a complex FFT.
45 | * @param nbits log2 of the length of the input array
46 | * @param inverse if 0 perform the forward transform, if 1 perform the inverse
47 | */
48 | FFTContext *av_fft_init(int nbits, int inverse);
49 |
50 | /**
51 | * Do the permutation needed BEFORE calling ff_fft_calc().
52 | */
53 | void av_fft_permute(FFTContext *s, FFTComplex *z);
54 |
55 | /**
56 | * Do a complex FFT with the parameters defined in av_fft_init(). The
57 | * input data must be permuted before. No 1.0/sqrt(n) normalization is done.
58 | */
59 | void av_fft_calc(FFTContext *s, FFTComplex *z);
60 |
61 | void av_fft_end(FFTContext *s);
62 |
63 | FFTContext *av_mdct_init(int nbits, int inverse, double scale);
64 | void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
65 | void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
66 | void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
67 | void av_mdct_end(FFTContext *s);
68 |
69 | /* Real Discrete Fourier Transform */
70 |
71 | enum RDFTransformType {
72 | DFT_R2C,
73 | IDFT_C2R,
74 | IDFT_R2C,
75 | DFT_C2R,
76 | };
77 |
78 | typedef struct RDFTContext RDFTContext;
79 |
80 | /**
81 | * Set up a real FFT.
82 | * @param nbits log2 of the length of the input array
83 | * @param trans the type of transform
84 | */
85 | RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
86 | void av_rdft_calc(RDFTContext *s, FFTSample *data);
87 | void av_rdft_end(RDFTContext *s);
88 |
89 | /* Discrete Cosine Transform */
90 |
91 | typedef struct DCTContext DCTContext;
92 |
93 | enum DCTTransformType {
94 | DCT_II = 0,
95 | DCT_III,
96 | DCT_I,
97 | DST_I,
98 | };
99 |
100 | /**
101 | * Set up DCT.
102 | *
103 | * @param nbits size of the input array:
104 | * (1 << nbits) for DCT-II, DCT-III and DST-I
105 | * (1 << nbits) + 1 for DCT-I
106 | * @param type the type of transform
107 | *
108 | * @note the first element of the input of DST-I is ignored
109 | */
110 | DCTContext *av_dct_init(int nbits, enum DCTTransformType type);
111 | void av_dct_calc(DCTContext *s, FFTSample *data);
112 | void av_dct_end (DCTContext *s);
113 |
114 | /**
115 | * @}
116 | */
117 |
118 | #endif /* AVCODEC_AVFFT_H */
119 |
--------------------------------------------------------------------------------
/library/jni/include/libavcodec/dv_profile.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVCODEC_DV_PROFILE_H
20 | #define AVCODEC_DV_PROFILE_H
21 |
22 | #include
23 |
24 | #include "libavutil/pixfmt.h"
25 | #include "libavutil/rational.h"
26 | #include "avcodec.h"
27 |
28 | /* minimum number of bytes to read from a DV stream in order to
29 | * determine the profile */
30 | #define DV_PROFILE_BYTES (6 * 80) /* 6 DIF blocks */
31 |
32 |
33 | /*
34 | * AVDVProfile is used to express the differences between various
35 | * DV flavors. For now it's primarily used for differentiating
36 | * 525/60 and 625/50, but the plans are to use it for various
37 | * DV specs as well (e.g. SMPTE314M vs. IEC 61834).
38 | */
39 | typedef struct AVDVProfile {
40 | int dsf; /* value of the dsf in the DV header */
41 | int video_stype; /* stype for VAUX source pack */
42 | int frame_size; /* total size of one frame in bytes */
43 | int difseg_size; /* number of DIF segments per DIF channel */
44 | int n_difchan; /* number of DIF channels per frame */
45 | AVRational time_base; /* 1/framerate */
46 | int ltc_divisor; /* FPS from the LTS standpoint */
47 | int height; /* picture height in pixels */
48 | int width; /* picture width in pixels */
49 | AVRational sar[2]; /* sample aspect ratios for 4:3 and 16:9 */
50 | enum AVPixelFormat pix_fmt; /* picture pixel format */
51 | int bpm; /* blocks per macroblock */
52 | const uint8_t *block_sizes; /* AC block sizes, in bits */
53 | int audio_stride; /* size of audio_shuffle table */
54 | int audio_min_samples[3]; /* min amount of audio samples */
55 | /* for 48kHz, 44.1kHz and 32kHz */
56 | int audio_samples_dist[5]; /* how many samples are supposed to be */
57 | /* in each frame in a 5 frames window */
58 | const uint8_t (*audio_shuffle)[9]; /* PCM shuffling table */
59 | } AVDVProfile;
60 |
61 | #if FF_API_DV_FRAME_PROFILE
62 | /**
63 | * @deprecated use av_dv_frame_profile()
64 | */
65 | attribute_deprecated
66 | const AVDVProfile* avpriv_dv_frame_profile2(AVCodecContext* codec, const AVDVProfile *sys,
67 | const uint8_t* frame, unsigned buf_size);
68 | #endif
69 |
70 | /**
71 | * Get a DV profile for the provided compressed frame.
72 | *
73 | * @param sys the profile used for the previous frame, may be NULL
74 | * @param frame the compressed data buffer
75 | * @param buf_size size of the buffer in bytes
76 | * @return the DV profile for the supplied data or NULL on failure
77 | */
78 | const AVDVProfile *av_dv_frame_profile(const AVDVProfile *sys,
79 | const uint8_t *frame, unsigned buf_size);
80 |
81 | /**
82 | * Get a DV profile for the provided stream parameters.
83 | */
84 | const AVDVProfile *av_dv_codec_profile(int width, int height, enum AVPixelFormat pix_fmt);
85 |
86 | /**
87 | * Get a DV profile for the provided stream parameters.
88 | * The frame rate is used as a best-effort parameter.
89 | */
90 | const AVDVProfile *av_dv_codec_profile2(int width, int height, enum AVPixelFormat pix_fmt, AVRational frame_rate);
91 |
92 | #endif /* AVCODEC_DV_PROFILE_H */
93 |
--------------------------------------------------------------------------------
/library/jni/include/libavcodec/dxva2.h:
--------------------------------------------------------------------------------
1 | /*
2 | * DXVA2 HW acceleration
3 | *
4 | * copyright (c) 2009 Laurent Aimar
5 | *
6 | * This file is part of FFmpeg.
7 | *
8 | * FFmpeg is free software; you can redistribute it and/or
9 | * modify it under the terms of the GNU Lesser General Public
10 | * License as published by the Free Software Foundation; either
11 | * version 2.1 of the License, or (at your option) any later version.
12 | *
13 | * FFmpeg is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | * Lesser General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Lesser General Public
19 | * License along with FFmpeg; if not, write to the Free Software
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 | */
22 |
23 | #ifndef AVCODEC_DXVA_H
24 | #define AVCODEC_DXVA_H
25 |
26 | /**
27 | * @file
28 | * @ingroup lavc_codec_hwaccel_dxva2
29 | * Public libavcodec DXVA2 header.
30 | */
31 |
32 | #if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
33 | #undef _WIN32_WINNT
34 | #define _WIN32_WINNT 0x0600
35 | #endif
36 |
37 | #include
38 | #include
39 | #include
40 |
41 | /**
42 | * @defgroup lavc_codec_hwaccel_dxva2 DXVA2
43 | * @ingroup lavc_codec_hwaccel
44 | *
45 | * @{
46 | */
47 |
48 | #define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
49 | #define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 ///< Work around for DXVA2 and old Intel GPUs with ClearVideo interface
50 |
51 | /**
52 | * This structure is used to provides the necessary configurations and data
53 | * to the DXVA2 FFmpeg HWAccel implementation.
54 | *
55 | * The application must make it available as AVCodecContext.hwaccel_context.
56 | */
57 | struct dxva_context {
58 | /**
59 | * DXVA2 decoder object
60 | */
61 | IDirectXVideoDecoder *decoder;
62 |
63 | /**
64 | * DXVA2 configuration used to create the decoder
65 | */
66 | const DXVA2_ConfigPictureDecode *cfg;
67 |
68 | /**
69 | * The number of surface in the surface array
70 | */
71 | unsigned surface_count;
72 |
73 | /**
74 | * The array of Direct3D surfaces used to create the decoder
75 | */
76 | LPDIRECT3DSURFACE9 *surface;
77 |
78 | /**
79 | * A bit field configuring the workarounds needed for using the decoder
80 | */
81 | uint64_t workaround;
82 |
83 | /**
84 | * Private to the FFmpeg AVHWAccel implementation
85 | */
86 | unsigned report_id;
87 | };
88 |
89 | /**
90 | * @}
91 | */
92 |
93 | #endif /* AVCODEC_DXVA_H */
94 |
--------------------------------------------------------------------------------
/library/jni/include/libavcodec/qsv.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Intel MediaSDK QSV public API
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVCODEC_QSV_H
22 | #define AVCODEC_QSV_H
23 |
24 | #include
25 |
26 | typedef struct AVQSVContext {
27 | mfxSession session;
28 | int iopattern;
29 |
30 | mfxExtBuffer **ext_buffers;
31 | int nb_ext_buffers;
32 | } AVQSVContext;
33 |
34 | /**
35 | * Allocate a new context.
36 | *
37 | * It must be freed by the caller with av_free().
38 | */
39 | AVQSVContext *av_qsv_alloc_context(void);
40 |
41 | #endif /* AVCODEC_QSV_H */
42 |
--------------------------------------------------------------------------------
/library/jni/include/libavcodec/vaapi.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Video Acceleration API (shared data between FFmpeg and the video player)
3 | * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1
4 | *
5 | * Copyright (C) 2008-2009 Splitted-Desktop Systems
6 | *
7 | * This file is part of FFmpeg.
8 | *
9 | * FFmpeg is free software; you can redistribute it and/or
10 | * modify it under the terms of the GNU Lesser General Public
11 | * License as published by the Free Software Foundation; either
12 | * version 2.1 of the License, or (at your option) any later version.
13 | *
14 | * FFmpeg is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | * Lesser General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with FFmpeg; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 | */
23 |
24 | #ifndef AVCODEC_VAAPI_H
25 | #define AVCODEC_VAAPI_H
26 |
27 | /**
28 | * @file
29 | * @ingroup lavc_codec_hwaccel_vaapi
30 | * Public libavcodec VA API header.
31 | */
32 |
33 | #include
34 |
35 | /**
36 | * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding
37 | * @ingroup lavc_codec_hwaccel
38 | * @{
39 | */
40 |
41 | /**
42 | * This structure is used to share data between the FFmpeg library and
43 | * the client video application.
44 | * This shall be zero-allocated and available as
45 | * AVCodecContext.hwaccel_context. All user members can be set once
46 | * during initialization or through each AVCodecContext.get_buffer()
47 | * function call. In any case, they must be valid prior to calling
48 | * decoding functions.
49 | */
50 | struct vaapi_context {
51 | /**
52 | * Window system dependent data
53 | *
54 | * - encoding: unused
55 | * - decoding: Set by user
56 | */
57 | void *display;
58 |
59 | /**
60 | * Configuration ID
61 | *
62 | * - encoding: unused
63 | * - decoding: Set by user
64 | */
65 | uint32_t config_id;
66 |
67 | /**
68 | * Context ID (video decode pipeline)
69 | *
70 | * - encoding: unused
71 | * - decoding: Set by user
72 | */
73 | uint32_t context_id;
74 |
75 | /**
76 | * VAPictureParameterBuffer ID
77 | *
78 | * - encoding: unused
79 | * - decoding: Set by libavcodec
80 | */
81 | uint32_t pic_param_buf_id;
82 |
83 | /**
84 | * VAIQMatrixBuffer ID
85 | *
86 | * - encoding: unused
87 | * - decoding: Set by libavcodec
88 | */
89 | uint32_t iq_matrix_buf_id;
90 |
91 | /**
92 | * VABitPlaneBuffer ID (for VC-1 decoding)
93 | *
94 | * - encoding: unused
95 | * - decoding: Set by libavcodec
96 | */
97 | uint32_t bitplane_buf_id;
98 |
99 | /**
100 | * Slice parameter/data buffer IDs
101 | *
102 | * - encoding: unused
103 | * - decoding: Set by libavcodec
104 | */
105 | uint32_t *slice_buf_ids;
106 |
107 | /**
108 | * Number of effective slice buffer IDs to send to the HW
109 | *
110 | * - encoding: unused
111 | * - decoding: Set by libavcodec
112 | */
113 | unsigned int n_slice_buf_ids;
114 |
115 | /**
116 | * Size of pre-allocated slice_buf_ids
117 | *
118 | * - encoding: unused
119 | * - decoding: Set by libavcodec
120 | */
121 | unsigned int slice_buf_ids_alloc;
122 |
123 | /**
124 | * Pointer to VASliceParameterBuffers
125 | *
126 | * - encoding: unused
127 | * - decoding: Set by libavcodec
128 | */
129 | void *slice_params;
130 |
131 | /**
132 | * Size of a VASliceParameterBuffer element
133 | *
134 | * - encoding: unused
135 | * - decoding: Set by libavcodec
136 | */
137 | unsigned int slice_param_size;
138 |
139 | /**
140 | * Size of pre-allocated slice_params
141 | *
142 | * - encoding: unused
143 | * - decoding: Set by libavcodec
144 | */
145 | unsigned int slice_params_alloc;
146 |
147 | /**
148 | * Number of slices currently filled in
149 | *
150 | * - encoding: unused
151 | * - decoding: Set by libavcodec
152 | */
153 | unsigned int slice_count;
154 |
155 | /**
156 | * Pointer to slice data buffer base
157 | * - encoding: unused
158 | * - decoding: Set by libavcodec
159 | */
160 | const uint8_t *slice_data;
161 |
162 | /**
163 | * Current size of slice data
164 | *
165 | * - encoding: unused
166 | * - decoding: Set by libavcodec
167 | */
168 | uint32_t slice_data_size;
169 | };
170 |
171 | /* @} */
172 |
173 | #endif /* AVCODEC_VAAPI_H */
174 |
--------------------------------------------------------------------------------
/library/jni/include/libavcodec/vorbis_parser.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * This file is part of FFmpeg.
4 | *
5 | * FFmpeg is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2.1 of the License, or (at your option) any later version.
9 | *
10 | * FFmpeg is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public
16 | * License along with FFmpeg; if not, write to the Free Software
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 | */
19 |
20 | /**
21 | * @file
22 | * A public API for Vorbis parsing
23 | *
24 | * Determines the duration for each packet.
25 | */
26 |
27 | #ifndef AVCODEC_VORBIS_PARSE_H
28 | #define AVCODEC_VORBIS_PARSE_H
29 |
30 | #include
31 |
32 | typedef struct AVVorbisParseContext AVVorbisParseContext;
33 |
34 | /**
35 | * Allocate and initialize the Vorbis parser using headers in the extradata.
36 | *
37 | * @param avctx codec context
38 | * @param s Vorbis parser context
39 | */
40 | AVVorbisParseContext *av_vorbis_parse_init(const uint8_t *extradata,
41 | int extradata_size);
42 |
43 | /**
44 | * Free the parser and everything associated with it.
45 | */
46 | void av_vorbis_parse_free(AVVorbisParseContext **s);
47 |
48 | #define VORBIS_FLAG_HEADER 0x00000001
49 | #define VORBIS_FLAG_COMMENT 0x00000002
50 | #define VORBIS_FLAG_SETUP 0x00000004
51 |
52 | /**
53 | * Get the duration for a Vorbis packet.
54 | *
55 | * If @p flags is @c NULL,
56 | * special frames are considered invalid.
57 | *
58 | * @param s Vorbis parser context
59 | * @param buf buffer containing a Vorbis frame
60 | * @param buf_size size of the buffer
61 | * @param flags flags for special frames
62 | */
63 | int av_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf,
64 | int buf_size, int *flags);
65 |
66 | /**
67 | * Get the duration for a Vorbis packet.
68 | *
69 | * @param s Vorbis parser context
70 | * @param buf buffer containing a Vorbis frame
71 | * @param buf_size size of the buffer
72 | */
73 | int av_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf,
74 | int buf_size);
75 |
76 | void av_vorbis_parse_reset(AVVorbisParseContext *s);
77 |
78 | #endif /* AVCODEC_VORBIS_PARSE_H */
79 |
--------------------------------------------------------------------------------
/library/jni/include/libavcodec/x86/mathops.h:
--------------------------------------------------------------------------------
1 | /*
2 | * simple math operations
3 | * Copyright (c) 2006 Michael Niedermayer et al
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVCODEC_X86_MATHOPS_H
23 | #define AVCODEC_X86_MATHOPS_H
24 |
25 | #include "config.h"
26 |
27 | #include "libavutil/common.h"
28 | #include "libavutil/x86/asm.h"
29 |
30 | #if HAVE_INLINE_ASM
31 |
32 | #if ARCH_X86_32
33 |
34 | #define MULL MULL
35 | static av_always_inline av_const int MULL(int a, int b, unsigned shift)
36 | {
37 | int rt, dummy;
38 | __asm__ (
39 | "imull %3 \n\t"
40 | "shrdl %4, %%edx, %%eax \n\t"
41 | :"=a"(rt), "=d"(dummy)
42 | :"a"(a), "rm"(b), "ci"((uint8_t)shift)
43 | );
44 | return rt;
45 | }
46 |
47 | #define MULH MULH
48 | static av_always_inline av_const int MULH(int a, int b)
49 | {
50 | int rt, dummy;
51 | __asm__ (
52 | "imull %3"
53 | :"=d"(rt), "=a"(dummy)
54 | :"a"(a), "rm"(b)
55 | );
56 | return rt;
57 | }
58 |
59 | #define MUL64 MUL64
60 | static av_always_inline av_const int64_t MUL64(int a, int b)
61 | {
62 | int64_t rt;
63 | __asm__ (
64 | "imull %2"
65 | :"=A"(rt)
66 | :"a"(a), "rm"(b)
67 | );
68 | return rt;
69 | }
70 |
71 | #endif /* ARCH_X86_32 */
72 |
73 | #if HAVE_I686
74 | /* median of 3 */
75 | #define mid_pred mid_pred
76 | static inline av_const int mid_pred(int a, int b, int c)
77 | {
78 | int i=b;
79 | __asm__ (
80 | "cmp %2, %1 \n\t"
81 | "cmovg %1, %0 \n\t"
82 | "cmovg %2, %1 \n\t"
83 | "cmp %3, %1 \n\t"
84 | "cmovl %3, %1 \n\t"
85 | "cmp %1, %0 \n\t"
86 | "cmovg %1, %0 \n\t"
87 | :"+&r"(i), "+&r"(a)
88 | :"r"(b), "r"(c)
89 | );
90 | return i;
91 | }
92 |
93 | #if HAVE_6REGS
94 | #define COPY3_IF_LT(x, y, a, b, c, d)\
95 | __asm__ volatile(\
96 | "cmpl %0, %3 \n\t"\
97 | "cmovl %3, %0 \n\t"\
98 | "cmovl %4, %1 \n\t"\
99 | "cmovl %5, %2 \n\t"\
100 | : "+&r" (x), "+&r" (a), "+r" (c)\
101 | : "r" (y), "r" (b), "r" (d)\
102 | );
103 | #endif /* HAVE_6REGS */
104 |
105 | #endif /* HAVE_I686 */
106 |
107 | #define MASK_ABS(mask, level) \
108 | __asm__ ("cdq \n\t" \
109 | "xorl %1, %0 \n\t" \
110 | "subl %1, %0 \n\t" \
111 | : "+a"(level), "=&d"(mask))
112 |
113 | // avoid +32 for shift optimization (gcc should do that ...)
114 | #define NEG_SSR32 NEG_SSR32
115 | static inline int32_t NEG_SSR32( int32_t a, int8_t s){
116 | __asm__ ("sarl %1, %0\n\t"
117 | : "+r" (a)
118 | : "ic" ((uint8_t)(-s))
119 | );
120 | return a;
121 | }
122 |
123 | #define NEG_USR32 NEG_USR32
124 | static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
125 | __asm__ ("shrl %1, %0\n\t"
126 | : "+r" (a)
127 | : "ic" ((uint8_t)(-s))
128 | );
129 | return a;
130 | }
131 |
132 | #endif /* HAVE_INLINE_ASM */
133 | #endif /* AVCODEC_X86_MATHOPS_H */
134 |
--------------------------------------------------------------------------------
/library/jni/include/libavdevice/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVDEVICE_VERSION_H
20 | #define AVDEVICE_VERSION_H
21 |
22 | /**
23 | * @file
24 | * @ingroup lavd
25 | * Libavdevice version macros
26 | */
27 |
28 | #include "libavutil/version.h"
29 |
30 | #define LIBAVDEVICE_VERSION_MAJOR 56
31 | #define LIBAVDEVICE_VERSION_MINOR 4
32 | #define LIBAVDEVICE_VERSION_MICRO 100
33 |
34 | #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
35 | LIBAVDEVICE_VERSION_MINOR, \
36 | LIBAVDEVICE_VERSION_MICRO)
37 | #define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \
38 | LIBAVDEVICE_VERSION_MINOR, \
39 | LIBAVDEVICE_VERSION_MICRO)
40 | #define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT
41 |
42 | #define LIBAVDEVICE_IDENT "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION)
43 |
44 | /**
45 | * FF_API_* defines may be placed below to indicate public API that will be
46 | * dropped at a future version bump. The defines themselves are not part of
47 | * the public API and may change, break or disappear at any time.
48 | */
49 |
50 | #endif /* AVDEVICE_VERSION_H */
51 |
--------------------------------------------------------------------------------
/library/jni/include/libavfilter/asrc_abuffer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVFILTER_ASRC_ABUFFER_H
20 | #define AVFILTER_ASRC_ABUFFER_H
21 |
22 | #include "avfilter.h"
23 |
24 | /**
25 | * @file
26 | * memory buffer source for audio
27 | *
28 | * @deprecated use buffersrc.h instead.
29 | */
30 |
31 | /**
32 | * Queue an audio buffer to the audio buffer source.
33 | *
34 | * @param abuffersrc audio source buffer context
35 | * @param data pointers to the samples planes
36 | * @param linesize linesizes of each audio buffer plane
37 | * @param nb_samples number of samples per channel
38 | * @param sample_fmt sample format of the audio data
39 | * @param ch_layout channel layout of the audio data
40 | * @param planar flag to indicate if audio data is planar or packed
41 | * @param pts presentation timestamp of the audio buffer
42 | * @param flags unused
43 | *
44 | * @deprecated use av_buffersrc_add_ref() instead.
45 | */
46 | attribute_deprecated
47 | int av_asrc_buffer_add_samples(AVFilterContext *abuffersrc,
48 | uint8_t *data[8], int linesize[8],
49 | int nb_samples, int sample_rate,
50 | int sample_fmt, int64_t ch_layout, int planar,
51 | int64_t pts, int av_unused flags);
52 |
53 | /**
54 | * Queue an audio buffer to the audio buffer source.
55 | *
56 | * This is similar to av_asrc_buffer_add_samples(), but the samples
57 | * are stored in a buffer with known size.
58 | *
59 | * @param abuffersrc audio source buffer context
60 | * @param buf pointer to the samples data, packed is assumed
61 | * @param size the size in bytes of the buffer, it must contain an
62 | * integer number of samples
63 | * @param sample_fmt sample format of the audio data
64 | * @param ch_layout channel layout of the audio data
65 | * @param pts presentation timestamp of the audio buffer
66 | * @param flags unused
67 | *
68 | * @deprecated use av_buffersrc_add_ref() instead.
69 | */
70 | attribute_deprecated
71 | int av_asrc_buffer_add_buffer(AVFilterContext *abuffersrc,
72 | uint8_t *buf, int buf_size,
73 | int sample_rate,
74 | int sample_fmt, int64_t ch_layout, int planar,
75 | int64_t pts, int av_unused flags);
76 |
77 | /**
78 | * Queue an audio buffer to the audio buffer source.
79 | *
80 | * @param abuffersrc audio source buffer context
81 | * @param samplesref buffer ref to queue
82 | * @param flags unused
83 | *
84 | * @deprecated use av_buffersrc_add_ref() instead.
85 | */
86 | attribute_deprecated
87 | int av_asrc_buffer_add_audio_buffer_ref(AVFilterContext *abuffersrc,
88 | AVFilterBufferRef *samplesref,
89 | int av_unused flags);
90 |
91 | #endif /* AVFILTER_ASRC_ABUFFER_H */
92 |
--------------------------------------------------------------------------------
/library/jni/include/libavfilter/avcodec.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVFILTER_AVCODEC_H
20 | #define AVFILTER_AVCODEC_H
21 |
22 | /**
23 | * @file
24 | * libavcodec/libavfilter gluing utilities
25 | *
26 | * This should be included in an application ONLY if the installed
27 | * libavfilter has been compiled with libavcodec support, otherwise
28 | * symbols defined below will not be available.
29 | */
30 |
31 | #include "avfilter.h"
32 |
33 | #if FF_API_AVFILTERBUFFER
34 | /**
35 | * Create and return a picref reference from the data and properties
36 | * contained in frame.
37 | *
38 | * @param perms permissions to assign to the new buffer reference
39 | * @deprecated avfilter APIs work natively with AVFrame instead.
40 | */
41 | attribute_deprecated
42 | AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms);
43 |
44 |
45 | /**
46 | * Create and return a picref reference from the data and properties
47 | * contained in frame.
48 | *
49 | * @param perms permissions to assign to the new buffer reference
50 | * @deprecated avfilter APIs work natively with AVFrame instead.
51 | */
52 | attribute_deprecated
53 | AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame,
54 | int perms);
55 |
56 | /**
57 | * Create and return a buffer reference from the data and properties
58 | * contained in frame.
59 | *
60 | * @param perms permissions to assign to the new buffer reference
61 | * @deprecated avfilter APIs work natively with AVFrame instead.
62 | */
63 | attribute_deprecated
64 | AVFilterBufferRef *avfilter_get_buffer_ref_from_frame(enum AVMediaType type,
65 | const AVFrame *frame,
66 | int perms);
67 | #endif
68 |
69 | #endif /* AVFILTER_AVCODEC_H */
70 |
--------------------------------------------------------------------------------
/library/jni/include/libavfilter/avfiltergraph.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Filter graphs
3 | * copyright (c) 2007 Bobby Bingham
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVFILTER_AVFILTERGRAPH_H
23 | #define AVFILTER_AVFILTERGRAPH_H
24 |
25 | #include "avfilter.h"
26 | #include "libavutil/log.h"
27 |
28 | #endif /* AVFILTER_AVFILTERGRAPH_H */
29 |
--------------------------------------------------------------------------------
/library/jni/include/libavfilter/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Version macros.
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVFILTER_VERSION_H
22 | #define AVFILTER_VERSION_H
23 |
24 | /**
25 | * @file
26 | * @ingroup lavfi
27 | * Libavfilter version macros
28 | */
29 |
30 | #include "libavutil/version.h"
31 |
32 | #define LIBAVFILTER_VERSION_MAJOR 5
33 | #define LIBAVFILTER_VERSION_MINOR 14
34 | #define LIBAVFILTER_VERSION_MICRO 100
35 |
36 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
37 | LIBAVFILTER_VERSION_MINOR, \
38 | LIBAVFILTER_VERSION_MICRO)
39 | #define LIBAVFILTER_VERSION AV_VERSION(LIBAVFILTER_VERSION_MAJOR, \
40 | LIBAVFILTER_VERSION_MINOR, \
41 | LIBAVFILTER_VERSION_MICRO)
42 | #define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT
43 |
44 | #define LIBAVFILTER_IDENT "Lavfi" AV_STRINGIFY(LIBAVFILTER_VERSION)
45 |
46 | /**
47 | * FF_API_* defines may be placed below to indicate public API that will be
48 | * dropped at a future version bump. The defines themselves are not part of
49 | * the public API and may change, break or disappear at any time.
50 | */
51 |
52 | #ifndef FF_API_AVFILTERPAD_PUBLIC
53 | #define FF_API_AVFILTERPAD_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 6)
54 | #endif
55 | #ifndef FF_API_FOO_COUNT
56 | #define FF_API_FOO_COUNT (LIBAVFILTER_VERSION_MAJOR < 6)
57 | #endif
58 | #ifndef FF_API_AVFILTERBUFFER
59 | #define FF_API_AVFILTERBUFFER (LIBAVFILTER_VERSION_MAJOR < 6)
60 | #endif
61 | #ifndef FF_API_OLD_FILTER_OPTS
62 | #define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 6)
63 | #endif
64 | #ifndef FF_API_AVFILTER_OPEN
65 | #define FF_API_AVFILTER_OPEN (LIBAVFILTER_VERSION_MAJOR < 6)
66 | #endif
67 | #ifndef FF_API_AVFILTER_INIT_FILTER
68 | #define FF_API_AVFILTER_INIT_FILTER (LIBAVFILTER_VERSION_MAJOR < 6)
69 | #endif
70 | #ifndef FF_API_OLD_FILTER_REGISTER
71 | #define FF_API_OLD_FILTER_REGISTER (LIBAVFILTER_VERSION_MAJOR < 6)
72 | #endif
73 | #ifndef FF_API_OLD_GRAPH_PARSE
74 | #define FF_API_OLD_GRAPH_PARSE (LIBAVFILTER_VERSION_MAJOR < 5)
75 | #endif
76 | #ifndef FF_API_NOCONST_GET_NAME
77 | #define FF_API_NOCONST_GET_NAME (LIBAVFILTER_VERSION_MAJOR < 6)
78 | #endif
79 |
80 | #endif /* AVFILTER_VERSION_H */
81 |
--------------------------------------------------------------------------------
/library/jni/include/libavformat/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Version macros.
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVFORMAT_VERSION_H
22 | #define AVFORMAT_VERSION_H
23 |
24 | /**
25 | * @file
26 | * @ingroup libavf
27 | * Libavformat version macros
28 | */
29 |
30 | #include "libavutil/version.h"
31 |
32 | #define LIBAVFORMAT_VERSION_MAJOR 56
33 | #define LIBAVFORMAT_VERSION_MINOR 30
34 | #define LIBAVFORMAT_VERSION_MICRO 100
35 |
36 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
37 | LIBAVFORMAT_VERSION_MINOR, \
38 | LIBAVFORMAT_VERSION_MICRO)
39 | #define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, \
40 | LIBAVFORMAT_VERSION_MINOR, \
41 | LIBAVFORMAT_VERSION_MICRO)
42 | #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
43 |
44 | #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
45 |
46 | /**
47 | * FF_API_* defines may be placed below to indicate public API that will be
48 | * dropped at a future version bump. The defines themselves are not part of
49 | * the public API and may change, break or disappear at any time.
50 | */
51 | #ifndef FF_API_LAVF_BITEXACT
52 | #define FF_API_LAVF_BITEXACT (LIBAVFORMAT_VERSION_MAJOR < 57)
53 | #endif
54 | #ifndef FF_API_LAVF_FRAC
55 | #define FF_API_LAVF_FRAC (LIBAVFORMAT_VERSION_MAJOR < 57)
56 | #endif
57 | #ifndef FF_API_LAVF_CODEC_TB
58 | #define FF_API_LAVF_CODEC_TB (LIBAVFORMAT_VERSION_MAJOR < 57)
59 | #endif
60 | #ifndef FF_API_URL_FEOF
61 | #define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 57)
62 | #endif
63 |
64 | #ifndef FF_API_R_FRAME_RATE
65 | #define FF_API_R_FRAME_RATE 1
66 | #endif
67 | #endif /* AVFORMAT_VERSION_H */
68 |
--------------------------------------------------------------------------------
/library/jni/include/libavresample/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVRESAMPLE_VERSION_H
20 | #define AVRESAMPLE_VERSION_H
21 |
22 | /**
23 | * @file
24 | * @ingroup lavr
25 | * Libavresample version macros.
26 | */
27 |
28 | #include "libavutil/version.h"
29 |
30 | #define LIBAVRESAMPLE_VERSION_MAJOR 2
31 | #define LIBAVRESAMPLE_VERSION_MINOR 1
32 | #define LIBAVRESAMPLE_VERSION_MICRO 0
33 |
34 | #define LIBAVRESAMPLE_VERSION_INT AV_VERSION_INT(LIBAVRESAMPLE_VERSION_MAJOR, \
35 | LIBAVRESAMPLE_VERSION_MINOR, \
36 | LIBAVRESAMPLE_VERSION_MICRO)
37 | #define LIBAVRESAMPLE_VERSION AV_VERSION(LIBAVRESAMPLE_VERSION_MAJOR, \
38 | LIBAVRESAMPLE_VERSION_MINOR, \
39 | LIBAVRESAMPLE_VERSION_MICRO)
40 | #define LIBAVRESAMPLE_BUILD LIBAVRESAMPLE_VERSION_INT
41 |
42 | #define LIBAVRESAMPLE_IDENT "Lavr" AV_STRINGIFY(LIBAVRESAMPLE_VERSION)
43 |
44 | /**
45 | * FF_API_* defines may be placed below to indicate public API that will be
46 | * dropped at a future version bump. The defines themselves are not part of
47 | * the public API and may change, break or disappear at any time.
48 | */
49 |
50 | #ifndef FF_API_RESAMPLE_CLOSE_OPEN
51 | #define FF_API_RESAMPLE_CLOSE_OPEN (LIBAVRESAMPLE_VERSION_MAJOR < 3)
52 | #endif
53 |
54 | #endif /* AVRESAMPLE_VERSION_H */
55 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/adler32.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 Mans Rullgard
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_ADLER32_H
22 | #define AVUTIL_ADLER32_H
23 |
24 | #include
25 | #include "attributes.h"
26 |
27 | /**
28 | * @file
29 | * Public header for libavutil Adler32 hasher
30 | *
31 | * @defgroup lavu_adler32 Adler32
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | /**
37 | * Calculate the Adler32 checksum of a buffer.
38 | *
39 | * Passing the return value to a subsequent av_adler32_update() call
40 | * allows the checksum of multiple buffers to be calculated as though
41 | * they were concatenated.
42 | *
43 | * @param adler initial checksum value
44 | * @param buf pointer to input buffer
45 | * @param len size of input buffer
46 | * @return updated checksum
47 | */
48 | unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,
49 | unsigned int len) av_pure;
50 |
51 | /**
52 | * @}
53 | */
54 |
55 | #endif /* AVUTIL_ADLER32_H */
56 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/aes.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2007 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_AES_H
22 | #define AVUTIL_AES_H
23 |
24 | #include
25 |
26 | #include "attributes.h"
27 | #include "version.h"
28 |
29 | /**
30 | * @defgroup lavu_aes AES
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_aes_size;
36 |
37 | struct AVAES;
38 |
39 | /**
40 | * Allocate an AVAES context.
41 | */
42 | struct AVAES *av_aes_alloc(void);
43 |
44 | /**
45 | * Initialize an AVAES context.
46 | * @param key_bits 128, 192 or 256
47 | * @param decrypt 0 for encryption, 1 for decryption
48 | */
49 | int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt);
50 |
51 | /**
52 | * Encrypt or decrypt a buffer using a previously initialized context.
53 | * @param count number of 16 byte blocks
54 | * @param dst destination array, can be equal to src
55 | * @param src source array, can be equal to dst
56 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used
57 | * @param decrypt 0 for encryption, 1 for decryption
58 | */
59 | void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
60 |
61 | /**
62 | * @}
63 | */
64 |
65 | #endif /* AVUTIL_AES_H */
66 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/attributes.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | /**
22 | * @file
23 | * Macro definitions for various function/variable attributes
24 | */
25 |
26 | #ifndef AVUTIL_ATTRIBUTES_H
27 | #define AVUTIL_ATTRIBUTES_H
28 |
29 | #ifdef __GNUC__
30 | # define AV_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > (x) || __GNUC__ == (x) && __GNUC_MINOR__ >= (y))
31 | #else
32 | # define AV_GCC_VERSION_AT_LEAST(x,y) 0
33 | #endif
34 |
35 | #ifndef av_always_inline
36 | #if AV_GCC_VERSION_AT_LEAST(3,1)
37 | # define av_always_inline __attribute__((always_inline)) inline
38 | #elif defined(_MSC_VER)
39 | # define av_always_inline __forceinline
40 | #else
41 | # define av_always_inline inline
42 | #endif
43 | #endif
44 |
45 | #ifndef av_extern_inline
46 | #if defined(__ICL) && __ICL >= 1210 || defined(__GNUC_STDC_INLINE__)
47 | # define av_extern_inline extern inline
48 | #else
49 | # define av_extern_inline inline
50 | #endif
51 | #endif
52 |
53 | #if AV_GCC_VERSION_AT_LEAST(3,1)
54 | # define av_noinline __attribute__((noinline))
55 | #elif defined(_MSC_VER)
56 | # define av_noinline __declspec(noinline)
57 | #else
58 | # define av_noinline
59 | #endif
60 |
61 | #if AV_GCC_VERSION_AT_LEAST(3,1)
62 | # define av_pure __attribute__((pure))
63 | #else
64 | # define av_pure
65 | #endif
66 |
67 | #if AV_GCC_VERSION_AT_LEAST(2,6)
68 | # define av_const __attribute__((const))
69 | #else
70 | # define av_const
71 | #endif
72 |
73 | #if AV_GCC_VERSION_AT_LEAST(4,3)
74 | # define av_cold __attribute__((cold))
75 | #else
76 | # define av_cold
77 | #endif
78 |
79 | #if AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__llvm__)
80 | # define av_flatten __attribute__((flatten))
81 | #else
82 | # define av_flatten
83 | #endif
84 |
85 | #if AV_GCC_VERSION_AT_LEAST(3,1)
86 | # define attribute_deprecated __attribute__((deprecated))
87 | #elif defined(_MSC_VER)
88 | # define attribute_deprecated __declspec(deprecated)
89 | #else
90 | # define attribute_deprecated
91 | #endif
92 |
93 | /**
94 | * Disable warnings about deprecated features
95 | * This is useful for sections of code kept for backward compatibility and
96 | * scheduled for removal.
97 | */
98 | #ifndef AV_NOWARN_DEPRECATED
99 | #if AV_GCC_VERSION_AT_LEAST(4,6)
100 | # define AV_NOWARN_DEPRECATED(code) \
101 | _Pragma("GCC diagnostic push") \
102 | _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
103 | code \
104 | _Pragma("GCC diagnostic pop")
105 | #elif defined(_MSC_VER)
106 | # define AV_NOWARN_DEPRECATED(code) \
107 | __pragma(warning(push)) \
108 | __pragma(warning(disable : 4996)) \
109 | code; \
110 | __pragma(warning(pop))
111 | #else
112 | # define AV_NOWARN_DEPRECATED(code) code
113 | #endif
114 | #endif
115 |
116 |
117 | #if defined(__GNUC__)
118 | # define av_unused __attribute__((unused))
119 | #else
120 | # define av_unused
121 | #endif
122 |
123 | /**
124 | * Mark a variable as used and prevent the compiler from optimizing it
125 | * away. This is useful for variables accessed only from inline
126 | * assembler without the compiler being aware.
127 | */
128 | #if AV_GCC_VERSION_AT_LEAST(3,1)
129 | # define av_used __attribute__((used))
130 | #else
131 | # define av_used
132 | #endif
133 |
134 | #if AV_GCC_VERSION_AT_LEAST(3,3)
135 | # define av_alias __attribute__((may_alias))
136 | #else
137 | # define av_alias
138 | #endif
139 |
140 | #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
141 | # define av_uninit(x) x=x
142 | #else
143 | # define av_uninit(x) x
144 | #endif
145 |
146 | #ifdef __GNUC__
147 | # define av_builtin_constant_p __builtin_constant_p
148 | # define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
149 | #else
150 | # define av_builtin_constant_p(x) 0
151 | # define av_printf_format(fmtpos, attrpos)
152 | #endif
153 |
154 | #if AV_GCC_VERSION_AT_LEAST(2,5)
155 | # define av_noreturn __attribute__((noreturn))
156 | #else
157 | # define av_noreturn
158 | #endif
159 |
160 | #endif /* AVUTIL_ATTRIBUTES_H */
161 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/audio_fifo.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Audio FIFO
3 | * Copyright (c) 2012 Justin Ruggles
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | /**
23 | * @file
24 | * Audio FIFO Buffer
25 | */
26 |
27 | #ifndef AVUTIL_AUDIO_FIFO_H
28 | #define AVUTIL_AUDIO_FIFO_H
29 |
30 | #include "avutil.h"
31 | #include "fifo.h"
32 | #include "samplefmt.h"
33 |
34 | /**
35 | * @addtogroup lavu_audio
36 | * @{
37 | *
38 | * @defgroup lavu_audiofifo Audio FIFO Buffer
39 | * @{
40 | */
41 |
42 | /**
43 | * Context for an Audio FIFO Buffer.
44 | *
45 | * - Operates at the sample level rather than the byte level.
46 | * - Supports multiple channels with either planar or packed sample format.
47 | * - Automatic reallocation when writing to a full buffer.
48 | */
49 | typedef struct AVAudioFifo AVAudioFifo;
50 |
51 | /**
52 | * Free an AVAudioFifo.
53 | *
54 | * @param af AVAudioFifo to free
55 | */
56 | void av_audio_fifo_free(AVAudioFifo *af);
57 |
58 | /**
59 | * Allocate an AVAudioFifo.
60 | *
61 | * @param sample_fmt sample format
62 | * @param channels number of channels
63 | * @param nb_samples initial allocation size, in samples
64 | * @return newly allocated AVAudioFifo, or NULL on error
65 | */
66 | AVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels,
67 | int nb_samples);
68 |
69 | /**
70 | * Reallocate an AVAudioFifo.
71 | *
72 | * @param af AVAudioFifo to reallocate
73 | * @param nb_samples new allocation size, in samples
74 | * @return 0 if OK, or negative AVERROR code on failure
75 | */
76 | int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);
77 |
78 | /**
79 | * Write data to an AVAudioFifo.
80 | *
81 | * The AVAudioFifo will be reallocated automatically if the available space
82 | * is less than nb_samples.
83 | *
84 | * @see enum AVSampleFormat
85 | * The documentation for AVSampleFormat describes the data layout.
86 | *
87 | * @param af AVAudioFifo to write to
88 | * @param data audio data plane pointers
89 | * @param nb_samples number of samples to write
90 | * @return number of samples actually written, or negative AVERROR
91 | * code on failure. If successful, the number of samples
92 | * actually written will always be nb_samples.
93 | */
94 | int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
95 |
96 | /**
97 | * Read data from an AVAudioFifo.
98 | *
99 | * @see enum AVSampleFormat
100 | * The documentation for AVSampleFormat describes the data layout.
101 | *
102 | * @param af AVAudioFifo to read from
103 | * @param data audio data plane pointers
104 | * @param nb_samples number of samples to read
105 | * @return number of samples actually read, or negative AVERROR code
106 | * on failure. The number of samples actually read will not
107 | * be greater than nb_samples, and will only be less than
108 | * nb_samples if av_audio_fifo_size is less than nb_samples.
109 | */
110 | int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples);
111 |
112 | /**
113 | * Drain data from an AVAudioFifo.
114 | *
115 | * Removes the data without reading it.
116 | *
117 | * @param af AVAudioFifo to drain
118 | * @param nb_samples number of samples to drain
119 | * @return 0 if OK, or negative AVERROR code on failure
120 | */
121 | int av_audio_fifo_drain(AVAudioFifo *af, int nb_samples);
122 |
123 | /**
124 | * Reset the AVAudioFifo buffer.
125 | *
126 | * This empties all data in the buffer.
127 | *
128 | * @param af AVAudioFifo to reset
129 | */
130 | void av_audio_fifo_reset(AVAudioFifo *af);
131 |
132 | /**
133 | * Get the current number of samples in the AVAudioFifo available for reading.
134 | *
135 | * @param af the AVAudioFifo to query
136 | * @return number of samples available for reading
137 | */
138 | int av_audio_fifo_size(AVAudioFifo *af);
139 |
140 | /**
141 | * Get the current number of samples in the AVAudioFifo available for writing.
142 | *
143 | * @param af the AVAudioFifo to query
144 | * @return number of samples available for writing
145 | */
146 | int av_audio_fifo_space(AVAudioFifo *af);
147 |
148 | /**
149 | * @}
150 | * @}
151 | */
152 |
153 | #endif /* AVUTIL_AUDIO_FIFO_H */
154 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/audioconvert.h:
--------------------------------------------------------------------------------
1 |
2 | #include "version.h"
3 |
4 | #if FF_API_AUDIOCONVERT
5 | #include "channel_layout.h"
6 | #endif
7 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/avassert.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2010 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | /**
22 | * @file
23 | * simple assert() macros that are a bit more flexible than ISO C assert().
24 | * @author Michael Niedermayer
25 | */
26 |
27 | #ifndef AVUTIL_AVASSERT_H
28 | #define AVUTIL_AVASSERT_H
29 |
30 | #include
31 | #include "avutil.h"
32 | #include "log.h"
33 |
34 | /**
35 | * assert() equivalent, that is always enabled.
36 | */
37 | #define av_assert0(cond) do { \
38 | if (!(cond)) { \
39 | av_log(NULL, AV_LOG_PANIC, "Assertion %s failed at %s:%d\n", \
40 | AV_STRINGIFY(cond), __FILE__, __LINE__); \
41 | abort(); \
42 | } \
43 | } while (0)
44 |
45 |
46 | /**
47 | * assert() equivalent, that does not lie in speed critical code.
48 | * These asserts() thus can be enabled without fearing speedloss.
49 | */
50 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0
51 | #define av_assert1(cond) av_assert0(cond)
52 | #else
53 | #define av_assert1(cond) ((void)0)
54 | #endif
55 |
56 |
57 | /**
58 | * assert() equivalent, that does lie in speed critical code.
59 | */
60 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1
61 | #define av_assert2(cond) av_assert0(cond)
62 | #else
63 | #define av_assert2(cond) ((void)0)
64 | #endif
65 |
66 | #endif /* AVUTIL_AVASSERT_H */
67 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/avconfig.h:
--------------------------------------------------------------------------------
1 | /* Generated by ffconf */
2 | #ifndef AVUTIL_AVCONFIG_H
3 | #define AVUTIL_AVCONFIG_H
4 | #define AV_HAVE_BIGENDIAN 0
5 | #define AV_HAVE_FAST_UNALIGNED 0
6 | #define AV_HAVE_INCOMPATIBLE_LIBAV_ABI 0
7 | #endif /* AVUTIL_AVCONFIG_H */
8 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/base64.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com)
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_BASE64_H
22 | #define AVUTIL_BASE64_H
23 |
24 | #include
25 |
26 | /**
27 | * @defgroup lavu_base64 Base64
28 | * @ingroup lavu_crypto
29 | * @{
30 | */
31 |
32 |
33 | /**
34 | * Decode a base64-encoded string.
35 | *
36 | * @param out buffer for decoded data
37 | * @param in null-terminated input string
38 | * @param out_size size in bytes of the out buffer, must be at
39 | * least 3/4 of the length of in
40 | * @return number of bytes written, or a negative value in case of
41 | * invalid input
42 | */
43 | int av_base64_decode(uint8_t *out, const char *in, int out_size);
44 |
45 | /**
46 | * Encode data to base64 and null-terminate.
47 | *
48 | * @param out buffer for encoded data
49 | * @param out_size size in bytes of the out buffer (including the
50 | * null terminator), must be at least AV_BASE64_SIZE(in_size)
51 | * @param in input buffer containing the data to encode
52 | * @param in_size size in bytes of the in buffer
53 | * @return out or NULL in case of error
54 | */
55 | char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size);
56 |
57 | /**
58 | * Calculate the output size needed to base64-encode x bytes to a
59 | * null-terminated string.
60 | */
61 | #define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1)
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | #endif /* AVUTIL_BASE64_H */
68 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/blowfish.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Blowfish algorithm
3 | * Copyright (c) 2012 Samuel Pitoiset
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_BLOWFISH_H
23 | #define AVUTIL_BLOWFISH_H
24 |
25 | #include
26 |
27 | /**
28 | * @defgroup lavu_blowfish Blowfish
29 | * @ingroup lavu_crypto
30 | * @{
31 | */
32 |
33 | #define AV_BF_ROUNDS 16
34 |
35 | typedef struct AVBlowfish {
36 | uint32_t p[AV_BF_ROUNDS + 2];
37 | uint32_t s[4][256];
38 | } AVBlowfish;
39 |
40 | /**
41 | * Initialize an AVBlowfish context.
42 | *
43 | * @param ctx an AVBlowfish context
44 | * @param key a key
45 | * @param key_len length of the key
46 | */
47 | void av_blowfish_init(struct AVBlowfish *ctx, const uint8_t *key, int key_len);
48 |
49 | /**
50 | * Encrypt or decrypt a buffer using a previously initialized context.
51 | *
52 | * @param ctx an AVBlowfish context
53 | * @param xl left four bytes halves of input to be encrypted
54 | * @param xr right four bytes halves of input to be encrypted
55 | * @param decrypt 0 for encryption, 1 for decryption
56 | */
57 | void av_blowfish_crypt_ecb(struct AVBlowfish *ctx, uint32_t *xl, uint32_t *xr,
58 | int decrypt);
59 |
60 | /**
61 | * Encrypt or decrypt a buffer using a previously initialized context.
62 | *
63 | * @param ctx an AVBlowfish context
64 | * @param dst destination array, can be equal to src
65 | * @param src source array, can be equal to dst
66 | * @param count number of 8 byte blocks
67 | * @param iv initialization vector for CBC mode, if NULL ECB will be used
68 | * @param decrypt 0 for encryption, 1 for decryption
69 | */
70 | void av_blowfish_crypt(struct AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,
71 | int count, uint8_t *iv, int decrypt);
72 |
73 | /**
74 | * @}
75 | */
76 |
77 | #endif /* AVUTIL_BLOWFISH_H */
78 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/bswap.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | /**
22 | * @file
23 | * byte swapping routines
24 | */
25 |
26 | #ifndef AVUTIL_BSWAP_H
27 | #define AVUTIL_BSWAP_H
28 |
29 | #include
30 | #include "libavutil/avconfig.h"
31 | #include "attributes.h"
32 |
33 | #ifdef HAVE_AV_CONFIG_H
34 |
35 | #include "config.h"
36 |
37 | #if ARCH_AARCH64
38 | # include "aarch64/bswap.h"
39 | #elif ARCH_ARM
40 | # include "arm/bswap.h"
41 | #elif ARCH_AVR32
42 | # include "avr32/bswap.h"
43 | #elif ARCH_SH4
44 | # include "sh4/bswap.h"
45 | #elif ARCH_X86
46 | # include "x86/bswap.h"
47 | #endif
48 |
49 | #endif /* HAVE_AV_CONFIG_H */
50 |
51 | #define AV_BSWAP16C(x) (((x) << 8 & 0xff00) | ((x) >> 8 & 0x00ff))
52 | #define AV_BSWAP32C(x) (AV_BSWAP16C(x) << 16 | AV_BSWAP16C((x) >> 16))
53 | #define AV_BSWAP64C(x) (AV_BSWAP32C(x) << 32 | AV_BSWAP32C((x) >> 32))
54 |
55 | #define AV_BSWAPC(s, x) AV_BSWAP##s##C(x)
56 |
57 | #ifndef av_bswap16
58 | static av_always_inline av_const uint16_t av_bswap16(uint16_t x)
59 | {
60 | x= (x>>8) | (x<<8);
61 | return x;
62 | }
63 | #endif
64 |
65 | #ifndef av_bswap32
66 | static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
67 | {
68 | return AV_BSWAP32C(x);
69 | }
70 | #endif
71 |
72 | #ifndef av_bswap64
73 | static inline uint64_t av_const av_bswap64(uint64_t x)
74 | {
75 | return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
76 | }
77 | #endif
78 |
79 | // be2ne ... big-endian to native-endian
80 | // le2ne ... little-endian to native-endian
81 |
82 | #if AV_HAVE_BIGENDIAN
83 | #define av_be2ne16(x) (x)
84 | #define av_be2ne32(x) (x)
85 | #define av_be2ne64(x) (x)
86 | #define av_le2ne16(x) av_bswap16(x)
87 | #define av_le2ne32(x) av_bswap32(x)
88 | #define av_le2ne64(x) av_bswap64(x)
89 | #define AV_BE2NEC(s, x) (x)
90 | #define AV_LE2NEC(s, x) AV_BSWAPC(s, x)
91 | #else
92 | #define av_be2ne16(x) av_bswap16(x)
93 | #define av_be2ne32(x) av_bswap32(x)
94 | #define av_be2ne64(x) av_bswap64(x)
95 | #define av_le2ne16(x) (x)
96 | #define av_le2ne32(x) (x)
97 | #define av_le2ne64(x) (x)
98 | #define AV_BE2NEC(s, x) AV_BSWAPC(s, x)
99 | #define AV_LE2NEC(s, x) (x)
100 | #endif
101 |
102 | #define AV_BE2NE16C(x) AV_BE2NEC(16, x)
103 | #define AV_BE2NE32C(x) AV_BE2NEC(32, x)
104 | #define AV_BE2NE64C(x) AV_BE2NEC(64, x)
105 | #define AV_LE2NE16C(x) AV_LE2NEC(16, x)
106 | #define AV_LE2NE32C(x) AV_LE2NEC(32, x)
107 | #define AV_LE2NE64C(x) AV_LE2NEC(64, x)
108 |
109 | #endif /* AVUTIL_BSWAP_H */
110 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/camellia.h:
--------------------------------------------------------------------------------
1 | /*
2 | * An implementation of the CAMELLIA algorithm as mentioned in RFC3713
3 | * Copyright (c) 2014 Supraja Meedinti
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_CAMELLIA_H
23 | #define AVUTIL_CAMELLIA_H
24 |
25 | #include
26 |
27 |
28 | /**
29 | * @file
30 | * @brief Public header for libavutil CAMELLIA algorithm
31 | * @defgroup lavu_camellia CAMELLIA
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_camellia_size;
37 |
38 | struct AVCAMELLIA;
39 |
40 | /**
41 | * Allocate an AVCAMELLIA context
42 | * To free the struct: av_free(ptr)
43 | */
44 | struct AVCAMELLIA *av_camellia_alloc(void);
45 |
46 | /**
47 | * Initialize an AVCAMELLIA context.
48 | *
49 | * @param ctx an AVCAMELLIA context
50 | * @param key a key of 16, 24, 32 bytes used for encryption/decryption
51 | * @param key_bits number of keybits: possible are 128, 192, 256
52 | */
53 | int av_camellia_init(struct AVCAMELLIA *ctx, const uint8_t *key, int key_bits);
54 |
55 | /**
56 | * Encrypt or decrypt a buffer using a previously initialized context
57 | *
58 | * @param ctx an AVCAMELLIA context
59 | * @param dst destination array, can be equal to src
60 | * @param src source array, can be equal to dst
61 | * @param count number of 16 byte blocks
62 | * @paran iv initialization vector for CBC mode, NULL for ECB mode
63 | * @param decrypt 0 for encryption, 1 for decryption
64 | */
65 | void av_camellia_crypt(struct AVCAMELLIA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt);
66 |
67 | /**
68 | * @}
69 | */
70 | #endif /* AVUTIL_CAMELLIA_H */
71 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/cast5.h:
--------------------------------------------------------------------------------
1 | /*
2 | * An implementation of the CAST128 algorithm as mentioned in RFC2144
3 | * Copyright (c) 2014 Supraja Meedinti
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_CAST5_H
23 | #define AVUTIL_CAST5_H
24 |
25 | #include
26 |
27 |
28 | /**
29 | * @file
30 | * @brief Public header for libavutil CAST5 algorithm
31 | * @defgroup lavu_cast5 CAST5
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_cast5_size;
37 |
38 | struct AVCAST5;
39 |
40 | /**
41 | * Allocate an AVCAST5 context
42 | * To free the struct: av_free(ptr)
43 | */
44 | struct AVCAST5 *av_cast5_alloc(void);
45 | /**
46 | * Initialize an AVCAST5 context.
47 | *
48 | * @param ctx an AVCAST5 context
49 | * @param key a key of 5,6,...16 bytes used for encryption/decryption
50 | * @param key_bits number of keybits: possible are 40,48,...,128
51 | */
52 | int av_cast5_init(struct AVCAST5 *ctx, const uint8_t *key, int key_bits);
53 |
54 | /**
55 | * Encrypt or decrypt a buffer using a previously initialized context, ECB mode only
56 | *
57 | * @param ctx an AVCAST5 context
58 | * @param dst destination array, can be equal to src
59 | * @param src source array, can be equal to dst
60 | * @param count number of 8 byte blocks
61 | * @param decrypt 0 for encryption, 1 for decryption
62 | */
63 | void av_cast5_crypt(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, int decrypt);
64 |
65 | /**
66 | * Encrypt or decrypt a buffer using a previously initialized context
67 | *
68 | * @param ctx an AVCAST5 context
69 | * @param dst destination array, can be equal to src
70 | * @param src source array, can be equal to dst
71 | * @param count number of 8 byte blocks
72 | * @param iv initialization vector for CBC mode, NULL for ECB mode
73 | * @param decrypt 0 for encryption, 1 for decryption
74 | */
75 | void av_cast5_crypt2(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
76 | /**
77 | * @}
78 | */
79 | #endif /* AVUTIL_CAST5_H */
80 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/cpu.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_CPU_H
22 | #define AVUTIL_CPU_H
23 |
24 | #include "attributes.h"
25 |
26 | #define AV_CPU_FLAG_FORCE 0x80000000 /* force usage of selected flags (OR) */
27 |
28 | /* lower 16 bits - CPU features */
29 | #define AV_CPU_FLAG_MMX 0x0001 ///< standard MMX
30 | #define AV_CPU_FLAG_MMXEXT 0x0002 ///< SSE integer functions or AMD MMX ext
31 | #define AV_CPU_FLAG_MMX2 0x0002 ///< SSE integer functions or AMD MMX ext
32 | #define AV_CPU_FLAG_3DNOW 0x0004 ///< AMD 3DNOW
33 | #define AV_CPU_FLAG_SSE 0x0008 ///< SSE functions
34 | #define AV_CPU_FLAG_SSE2 0x0010 ///< PIV SSE2 functions
35 | #define AV_CPU_FLAG_SSE2SLOW 0x40000000 ///< SSE2 supported, but usually not faster
36 | ///< than regular MMX/SSE (e.g. Core1)
37 | #define AV_CPU_FLAG_3DNOWEXT 0x0020 ///< AMD 3DNowExt
38 | #define AV_CPU_FLAG_SSE3 0x0040 ///< Prescott SSE3 functions
39 | #define AV_CPU_FLAG_SSE3SLOW 0x20000000 ///< SSE3 supported, but usually not faster
40 | ///< than regular MMX/SSE (e.g. Core1)
41 | #define AV_CPU_FLAG_SSSE3 0x0080 ///< Conroe SSSE3 functions
42 | #define AV_CPU_FLAG_ATOM 0x10000000 ///< Atom processor, some SSSE3 instructions are slower
43 | #define AV_CPU_FLAG_SSE4 0x0100 ///< Penryn SSE4.1 functions
44 | #define AV_CPU_FLAG_SSE42 0x0200 ///< Nehalem SSE4.2 functions
45 | #define AV_CPU_FLAG_AVX 0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used
46 | #define AV_CPU_FLAG_XOP 0x0400 ///< Bulldozer XOP functions
47 | #define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions
48 | // #if LIBAVUTIL_VERSION_MAJOR <52
49 | #define AV_CPU_FLAG_CMOV 0x1001000 ///< supports cmov instruction
50 | // #else
51 | // #define AV_CPU_FLAG_CMOV 0x1000 ///< supports cmov instruction
52 | // #endif
53 | #define AV_CPU_FLAG_AVX2 0x8000 ///< AVX2 functions: requires OS support even if YMM registers aren't used
54 | #define AV_CPU_FLAG_FMA3 0x10000 ///< Haswell FMA3 functions
55 | #define AV_CPU_FLAG_BMI1 0x20000 ///< Bit Manipulation Instruction Set 1
56 | #define AV_CPU_FLAG_BMI2 0x40000 ///< Bit Manipulation Instruction Set 2
57 |
58 | #define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard
59 |
60 | #define AV_CPU_FLAG_ARMV5TE (1 << 0)
61 | #define AV_CPU_FLAG_ARMV6 (1 << 1)
62 | #define AV_CPU_FLAG_ARMV6T2 (1 << 2)
63 | #define AV_CPU_FLAG_VFP (1 << 3)
64 | #define AV_CPU_FLAG_VFPV3 (1 << 4)
65 | #define AV_CPU_FLAG_NEON (1 << 5)
66 | #define AV_CPU_FLAG_ARMV8 (1 << 6)
67 | #define AV_CPU_FLAG_SETEND (1 <<16)
68 |
69 | /**
70 | * Return the flags which specify extensions supported by the CPU.
71 | * The returned value is affected by av_force_cpu_flags() if that was used
72 | * before. So av_get_cpu_flags() can easily be used in a application to
73 | * detect the enabled cpu flags.
74 | */
75 | int av_get_cpu_flags(void);
76 |
77 | /**
78 | * Disables cpu detection and forces the specified flags.
79 | * -1 is a special case that disables forcing of specific flags.
80 | */
81 | void av_force_cpu_flags(int flags);
82 |
83 | /**
84 | * Set a mask on flags returned by av_get_cpu_flags().
85 | * This function is mainly useful for testing.
86 | * Please use av_force_cpu_flags() and av_get_cpu_flags() instead which are more flexible
87 | *
88 | * @warning this function is not thread safe.
89 | */
90 | attribute_deprecated void av_set_cpu_flags_mask(int mask);
91 |
92 | /**
93 | * Parse CPU flags from a string.
94 | *
95 | * The returned flags contain the specified flags as well as related unspecified flags.
96 | *
97 | * This function exists only for compatibility with libav.
98 | * Please use av_parse_cpu_caps() when possible.
99 | * @return a combination of AV_CPU_* flags, negative on error.
100 | */
101 | attribute_deprecated
102 | int av_parse_cpu_flags(const char *s);
103 |
104 | /**
105 | * Parse CPU caps from a string and update the given AV_CPU_* flags based on that.
106 | *
107 | * @return negative on error.
108 | */
109 | int av_parse_cpu_caps(unsigned *flags, const char *s);
110 |
111 | /**
112 | * @return the number of logical CPU cores present.
113 | */
114 | int av_cpu_count(void);
115 |
116 | #endif /* AVUTIL_CPU_H */
117 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/crc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_CRC_H
22 | #define AVUTIL_CRC_H
23 |
24 | #include
25 | #include
26 | #include "attributes.h"
27 |
28 | /**
29 | * @defgroup lavu_crc32 CRC32
30 | * @ingroup lavu_crypto
31 | * @{
32 | */
33 |
34 | typedef uint32_t AVCRC;
35 |
36 | typedef enum {
37 | AV_CRC_8_ATM,
38 | AV_CRC_16_ANSI,
39 | AV_CRC_16_CCITT,
40 | AV_CRC_32_IEEE,
41 | AV_CRC_32_IEEE_LE, /*< reversed bitorder version of AV_CRC_32_IEEE */
42 | AV_CRC_16_ANSI_LE, /*< reversed bitorder version of AV_CRC_16_ANSI */
43 | AV_CRC_24_IEEE = 12,
44 | AV_CRC_MAX, /*< Not part of public API! Do not use outside libavutil. */
45 | }AVCRCId;
46 |
47 | /**
48 | * Initialize a CRC table.
49 | * @param ctx must be an array of size sizeof(AVCRC)*257 or sizeof(AVCRC)*1024
50 | * @param le If 1, the lowest bit represents the coefficient for the highest
51 | * exponent of the corresponding polynomial (both for poly and
52 | * actual CRC).
53 | * If 0, you must swap the CRC parameter and the result of av_crc
54 | * if you need the standard representation (can be simplified in
55 | * most cases to e.g. bswap16):
56 | * av_bswap32(crc << (32-bits))
57 | * @param bits number of bits for the CRC
58 | * @param poly generator polynomial without the x**bits coefficient, in the
59 | * representation as specified by le
60 | * @param ctx_size size of ctx in bytes
61 | * @return <0 on failure
62 | */
63 | int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);
64 |
65 | /**
66 | * Get an initialized standard CRC table.
67 | * @param crc_id ID of a standard CRC
68 | * @return a pointer to the CRC table or NULL on failure
69 | */
70 | const AVCRC *av_crc_get_table(AVCRCId crc_id);
71 |
72 | /**
73 | * Calculate the CRC of a block.
74 | * @param crc CRC of previous blocks if any or initial value for CRC
75 | * @return CRC updated with the data from the given block
76 | *
77 | * @see av_crc_init() "le" parameter
78 | */
79 | uint32_t av_crc(const AVCRC *ctx, uint32_t crc,
80 | const uint8_t *buffer, size_t length) av_pure;
81 |
82 | /**
83 | * @}
84 | */
85 |
86 | #endif /* AVUTIL_CRC_H */
87 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/display.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014 Vittorio Giovara
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_DISPLAY_H
22 | #define AVUTIL_DISPLAY_H
23 |
24 | #include
25 |
26 | /**
27 | * The display transformation matrix specifies an affine transformation that
28 | * should be applied to video frames for correct presentation. It is compatible
29 | * with the matrices stored in the ISO/IEC 14496-12 container format.
30 | *
31 | * The data is a 3x3 matrix represented as a 9-element array:
32 | *
33 | * | a b u |
34 | * (a, b, u, c, d, v, x, y, w) -> | c d v |
35 | * | x y w |
36 | *
37 | * All numbers are stored in native endianness, as 16.16 fixed-point values,
38 | * except for u, v and w, which are stored as 2.30 fixed-point values.
39 | *
40 | * The transformation maps a point (p, q) in the source (pre-transformation)
41 | * frame to the point (p', q') in the destination (post-transformation) frame as
42 | * follows:
43 | * | a b u |
44 | * (p, q, 1) . | c d v | = z * (p', q', 1)
45 | * | x y w |
46 | *
47 | * The transformation can also be more explicitly written in components as
48 | * follows:
49 | * p' = (a * p + c * q + x) / z;
50 | * q' = (b * p + d * q + y) / z;
51 | * z = u * p + v * q + w
52 | */
53 |
54 | /**
55 | * Extract the rotation component of the transformation matrix.
56 | *
57 | * @param matrix the transformation matrix
58 | * @return the angle (in degrees) by which the transformation rotates the frame
59 | * counterclockwise. The angle will be in range [-180.0, 180.0],
60 | * or NaN if the matrix is singular.
61 | *
62 | * @note floating point numbers are inherently inexact, so callers are
63 | * recommended to round the return value to nearest integer before use.
64 | */
65 | double av_display_rotation_get(const int32_t matrix[9]);
66 |
67 | /**
68 | * Initialize a transformation matrix describing a pure counterclockwise
69 | * rotation by the specified angle (in degrees).
70 | *
71 | * @param matrix an allocated transformation matrix (will be fully overwritten
72 | * by this function)
73 | * @param angle rotation angle in degrees.
74 | */
75 | void av_display_rotation_set(int32_t matrix[9], double angle);
76 |
77 | /**
78 | * Flip the input matrix horizontally and/or vertically.
79 | *
80 | * @param matrix an allocated transformation matrix
81 | * @param hflip whether the matrix should be flipped horizontally
82 | * @param vflip whether the matrix should be flipped vertically
83 | */
84 | void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip);
85 |
86 | #endif /* AVUTIL_DISPLAY_H */
87 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/downmix_info.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014 Tim Walker
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_DOWNMIX_INFO_H
22 | #define AVUTIL_DOWNMIX_INFO_H
23 |
24 | #include "frame.h"
25 |
26 | /**
27 | * @file
28 | * audio downmix medatata
29 | */
30 |
31 | /**
32 | * @addtogroup lavu_audio
33 | * @{
34 | */
35 |
36 | /**
37 | * @defgroup downmix_info Audio downmix metadata
38 | * @{
39 | */
40 |
41 | /**
42 | * Possible downmix types.
43 | */
44 | enum AVDownmixType {
45 | AV_DOWNMIX_TYPE_UNKNOWN, /**< Not indicated. */
46 | AV_DOWNMIX_TYPE_LORO, /**< Lo/Ro 2-channel downmix (Stereo). */
47 | AV_DOWNMIX_TYPE_LTRT, /**< Lt/Rt 2-channel downmix, Dolby Surround compatible. */
48 | AV_DOWNMIX_TYPE_DPLII, /**< Lt/Rt 2-channel downmix, Dolby Pro Logic II compatible. */
49 | AV_DOWNMIX_TYPE_NB /**< Number of downmix types. Not part of ABI. */
50 | };
51 |
52 | /**
53 | * This structure describes optional metadata relevant to a downmix procedure.
54 | *
55 | * All fields are set by the decoder to the value indicated in the audio
56 | * bitstream (if present), or to a "sane" default otherwise.
57 | */
58 | typedef struct AVDownmixInfo {
59 | /**
60 | * Type of downmix preferred by the mastering engineer.
61 | */
62 | enum AVDownmixType preferred_downmix_type;
63 |
64 | /**
65 | * Absolute scale factor representing the nominal level of the center
66 | * channel during a regular downmix.
67 | */
68 | double center_mix_level;
69 |
70 | /**
71 | * Absolute scale factor representing the nominal level of the center
72 | * channel during an Lt/Rt compatible downmix.
73 | */
74 | double center_mix_level_ltrt;
75 |
76 | /**
77 | * Absolute scale factor representing the nominal level of the surround
78 | * channels during a regular downmix.
79 | */
80 | double surround_mix_level;
81 |
82 | /**
83 | * Absolute scale factor representing the nominal level of the surround
84 | * channels during an Lt/Rt compatible downmix.
85 | */
86 | double surround_mix_level_ltrt;
87 |
88 | /**
89 | * Absolute scale factor representing the level at which the LFE data is
90 | * mixed into L/R channels during downmixing.
91 | */
92 | double lfe_mix_level;
93 | } AVDownmixInfo;
94 |
95 | /**
96 | * Get a frame's AV_FRAME_DATA_DOWNMIX_INFO side data for editing.
97 | *
98 | * If the side data is absent, it is created and added to the frame.
99 | *
100 | * @param frame the frame for which the side data is to be obtained or created
101 | *
102 | * @return the AVDownmixInfo structure to be edited by the caller, or NULL if
103 | * the structure cannot be allocated.
104 | */
105 | AVDownmixInfo *av_downmix_info_update_side_data(AVFrame *frame);
106 |
107 | /**
108 | * @}
109 | */
110 |
111 | /**
112 | * @}
113 | */
114 |
115 | #endif /* AVUTIL_DOWNMIX_INFO_H */
116 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/ffversion.h:
--------------------------------------------------------------------------------
1 | #ifndef AVUTIL_FFVERSION_H
2 | #define AVUTIL_FFVERSION_H
3 | #define FFMPEG_VERSION "2.6.git"
4 | #endif /* AVUTIL_FFVERSION_H */
5 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/file.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVUTIL_FILE_H
20 | #define AVUTIL_FILE_H
21 |
22 | #include
23 |
24 | #include "avutil.h"
25 |
26 | /**
27 | * @file
28 | * Misc file utilities.
29 | */
30 |
31 | /**
32 | * Read the file with name filename, and put its content in a newly
33 | * allocated buffer or map it with mmap() when available.
34 | * In case of success set *bufptr to the read or mmapped buffer, and
35 | * *size to the size in bytes of the buffer in *bufptr.
36 | * The returned buffer must be released with av_file_unmap().
37 | *
38 | * @param log_offset loglevel offset used for logging
39 | * @param log_ctx context used for logging
40 | * @return a non negative number in case of success, a negative value
41 | * corresponding to an AVERROR error code in case of failure
42 | */
43 | int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
44 | int log_offset, void *log_ctx);
45 |
46 | /**
47 | * Unmap or free the buffer bufptr created by av_file_map().
48 | *
49 | * @param size size in bytes of bufptr, must be the same as returned
50 | * by av_file_map()
51 | */
52 | void av_file_unmap(uint8_t *bufptr, size_t size);
53 |
54 | /**
55 | * Wrapper to work around the lack of mkstemp() on mingw.
56 | * Also, tries to create file in /tmp first, if possible.
57 | * *prefix can be a character constant; *filename will be allocated internally.
58 | * @return file descriptor of opened file (or negative value corresponding to an
59 | * AVERROR code on error)
60 | * and opened file name in **filename.
61 | * @note On very old libcs it is necessary to set a secure umask before
62 | * calling this, av_tempfile() can't call umask itself as it is used in
63 | * libraries and could interfere with the calling application.
64 | */
65 | int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx);
66 |
67 | #endif /* AVUTIL_FILE_H */
68 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/hash.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 Reimar Döffinger
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_HASH_H
22 | #define AVUTIL_HASH_H
23 |
24 | #include
25 |
26 | struct AVHashContext;
27 |
28 | /**
29 | * Allocate a hash context for the algorithm specified by name.
30 | *
31 | * @return >= 0 for success, a negative error code for failure
32 | * @note The context is not initialized, you must call av_hash_init().
33 | */
34 | int av_hash_alloc(struct AVHashContext **ctx, const char *name);
35 |
36 | /**
37 | * Get the names of available hash algorithms.
38 | *
39 | * This function can be used to enumerate the algorithms.
40 | *
41 | * @param i index of the hash algorithm, starting from 0
42 | * @return a pointer to a static string or NULL if i is out of range
43 | */
44 | const char *av_hash_names(int i);
45 |
46 | /**
47 | * Get the name of the algorithm corresponding to the given hash context.
48 | */
49 | const char *av_hash_get_name(const struct AVHashContext *ctx);
50 |
51 | /**
52 | * Maximum value that av_hash_get_size will currently return.
53 | *
54 | * You can use this if you absolutely want or need to use static allocation
55 | * and are fine with not supporting hashes newly added to libavutil without
56 | * recompilation.
57 | * Note that you still need to check against av_hash_get_size, adding new hashes
58 | * with larger sizes will not be considered an ABI change and should not cause
59 | * your code to overflow a buffer.
60 | */
61 | #define AV_HASH_MAX_SIZE 64
62 |
63 | /**
64 | * Get the size of the resulting hash value in bytes.
65 | *
66 | * The pointer passed to av_hash_final have space for at least this many bytes.
67 | */
68 | int av_hash_get_size(const struct AVHashContext *ctx);
69 |
70 | /**
71 | * Initialize or reset a hash context.
72 | */
73 | void av_hash_init(struct AVHashContext *ctx);
74 |
75 | /**
76 | * Update a hash context with additional data.
77 | */
78 | void av_hash_update(struct AVHashContext *ctx, const uint8_t *src, int len);
79 |
80 | /**
81 | * Finalize a hash context and compute the actual hash value.
82 | */
83 | void av_hash_final(struct AVHashContext *ctx, uint8_t *dst);
84 |
85 | /**
86 | * Finalize a hash context and compute the actual hash value.
87 | * If size is smaller than the hash size, the hash is truncated;
88 | * if size is larger, the buffer is padded with 0.
89 | */
90 | void av_hash_final_bin(struct AVHashContext *ctx, uint8_t *dst, int size);
91 |
92 | /**
93 | * Finalize a hash context and compute the actual hash value as a hex string.
94 | * The string is always 0-terminated.
95 | * If size is smaller than 2 * hash_size + 1, the hex string is truncated.
96 | */
97 | void av_hash_final_hex(struct AVHashContext *ctx, uint8_t *dst, int size);
98 |
99 | /**
100 | * Finalize a hash context and compute the actual hash value as a base64 string.
101 | * The string is always 0-terminated.
102 | * If size is smaller than AV_BASE64_SIZE(hash_size), the base64 string is
103 | * truncated.
104 | */
105 | void av_hash_final_b64(struct AVHashContext *ctx, uint8_t *dst, int size);
106 |
107 | /**
108 | * Free hash context.
109 | */
110 | void av_hash_freep(struct AVHashContext **ctx);
111 |
112 | #endif /* AVUTIL_HASH_H */
113 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/hmac.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Martin Storsjo
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_HMAC_H
22 | #define AVUTIL_HMAC_H
23 |
24 | #include
25 |
26 | /**
27 | * @defgroup lavu_hmac HMAC
28 | * @ingroup lavu_crypto
29 | * @{
30 | */
31 |
32 | enum AVHMACType {
33 | AV_HMAC_MD5,
34 | AV_HMAC_SHA1,
35 | AV_HMAC_SHA224 = 10,
36 | AV_HMAC_SHA256,
37 | AV_HMAC_SHA384,
38 | AV_HMAC_SHA512,
39 | };
40 |
41 | typedef struct AVHMAC AVHMAC;
42 |
43 | /**
44 | * Allocate an AVHMAC context.
45 | * @param type The hash function used for the HMAC.
46 | */
47 | AVHMAC *av_hmac_alloc(enum AVHMACType type);
48 |
49 | /**
50 | * Free an AVHMAC context.
51 | * @param ctx The context to free, may be NULL
52 | */
53 | void av_hmac_free(AVHMAC *ctx);
54 |
55 | /**
56 | * Initialize an AVHMAC context with an authentication key.
57 | * @param ctx The HMAC context
58 | * @param key The authentication key
59 | * @param keylen The length of the key, in bytes
60 | */
61 | void av_hmac_init(AVHMAC *ctx, const uint8_t *key, unsigned int keylen);
62 |
63 | /**
64 | * Hash data with the HMAC.
65 | * @param ctx The HMAC context
66 | * @param data The data to hash
67 | * @param len The length of the data, in bytes
68 | */
69 | void av_hmac_update(AVHMAC *ctx, const uint8_t *data, unsigned int len);
70 |
71 | /**
72 | * Finish hashing and output the HMAC digest.
73 | * @param ctx The HMAC context
74 | * @param out The output buffer to write the digest into
75 | * @param outlen The length of the out buffer, in bytes
76 | * @return The number of bytes written to out, or a negative error code.
77 | */
78 | int av_hmac_final(AVHMAC *ctx, uint8_t *out, unsigned int outlen);
79 |
80 | /**
81 | * Hash an array of data with a key.
82 | * @param ctx The HMAC context
83 | * @param data The data to hash
84 | * @param len The length of the data, in bytes
85 | * @param key The authentication key
86 | * @param keylen The length of the key, in bytes
87 | * @param out The output buffer to write the digest into
88 | * @param outlen The length of the out buffer, in bytes
89 | * @return The number of bytes written to out, or a negative error code.
90 | */
91 | int av_hmac_calc(AVHMAC *ctx, const uint8_t *data, unsigned int len,
92 | const uint8_t *key, unsigned int keylen,
93 | uint8_t *out, unsigned int outlen);
94 |
95 | /**
96 | * @}
97 | */
98 |
99 | #endif /* AVUTIL_HMAC_H */
100 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/intfloat.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2011 Mans Rullgard
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_INTFLOAT_H
22 | #define AVUTIL_INTFLOAT_H
23 |
24 | #include
25 | #include "attributes.h"
26 |
27 | union av_intfloat32 {
28 | uint32_t i;
29 | float f;
30 | };
31 |
32 | union av_intfloat64 {
33 | uint64_t i;
34 | double f;
35 | };
36 |
37 | /**
38 | * Reinterpret a 32-bit integer as a float.
39 | */
40 | static av_always_inline float av_int2float(uint32_t i)
41 | {
42 | union av_intfloat32 v;
43 | v.i = i;
44 | return v.f;
45 | }
46 |
47 | /**
48 | * Reinterpret a float as a 32-bit integer.
49 | */
50 | static av_always_inline uint32_t av_float2int(float f)
51 | {
52 | union av_intfloat32 v;
53 | v.f = f;
54 | return v.i;
55 | }
56 |
57 | /**
58 | * Reinterpret a 64-bit integer as a double.
59 | */
60 | static av_always_inline double av_int2double(uint64_t i)
61 | {
62 | union av_intfloat64 v;
63 | v.i = i;
64 | return v.f;
65 | }
66 |
67 | /**
68 | * Reinterpret a double as a 64-bit integer.
69 | */
70 | static av_always_inline uint64_t av_double2int(double f)
71 | {
72 | union av_intfloat64 v;
73 | v.f = f;
74 | return v.i;
75 | }
76 |
77 | #endif /* AVUTIL_INTFLOAT_H */
78 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/lfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Lagged Fibonacci PRNG
3 | * Copyright (c) 2008 Michael Niedermayer
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_LFG_H
23 | #define AVUTIL_LFG_H
24 |
25 | typedef struct AVLFG {
26 | unsigned int state[64];
27 | int index;
28 | } AVLFG;
29 |
30 | void av_lfg_init(AVLFG *c, unsigned int seed);
31 |
32 | /**
33 | * Get the next random unsigned 32-bit number using an ALFG.
34 | *
35 | * Please also consider a simple LCG like state= state*1664525+1013904223,
36 | * it may be good enough and faster for your specific use case.
37 | */
38 | static inline unsigned int av_lfg_get(AVLFG *c){
39 | c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63];
40 | return c->state[c->index++ & 63];
41 | }
42 |
43 | /**
44 | * Get the next random unsigned 32-bit number using a MLFG.
45 | *
46 | * Please also consider av_lfg_get() above, it is faster.
47 | */
48 | static inline unsigned int av_mlfg_get(AVLFG *c){
49 | unsigned int a= c->state[(c->index-55) & 63];
50 | unsigned int b= c->state[(c->index-24) & 63];
51 | return c->state[c->index++ & 63] = 2*a*b+a+b;
52 | }
53 |
54 | /**
55 | * Get the next two numbers generated by a Box-Muller Gaussian
56 | * generator using the random numbers issued by lfg.
57 | *
58 | * @param out array where the two generated numbers are placed
59 | */
60 | void av_bmg_get(AVLFG *lfg, double out[2]);
61 |
62 | #endif /* AVUTIL_LFG_H */
63 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/libm.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | /**
20 | * @file
21 | * Replacements for frequently missing libm functions
22 | */
23 |
24 | #ifndef AVUTIL_LIBM_H
25 | #define AVUTIL_LIBM_H
26 |
27 | #include
28 | #include "config.h"
29 | #include "attributes.h"
30 | #include "intfloat.h"
31 |
32 | #if HAVE_MIPSFPU && HAVE_INLINE_ASM
33 | #include "libavutil/mips/libm_mips.h"
34 | #endif /* HAVE_MIPSFPU && HAVE_INLINE_ASM*/
35 |
36 | #if !HAVE_ATANF
37 | #undef atanf
38 | #define atanf(x) ((float)atan(x))
39 | #endif
40 |
41 | #if !HAVE_ATAN2F
42 | #undef atan2f
43 | #define atan2f(y, x) ((float)atan2(y, x))
44 | #endif
45 |
46 | #if !HAVE_POWF
47 | #undef powf
48 | #define powf(x, y) ((float)pow(x, y))
49 | #endif
50 |
51 | #if !HAVE_CBRT
52 | static av_always_inline double cbrt(double x)
53 | {
54 | return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0);
55 | }
56 | #endif
57 |
58 | #if !HAVE_CBRTF
59 | static av_always_inline float cbrtf(float x)
60 | {
61 | return x < 0 ? -powf(-x, 1.0 / 3.0) : powf(x, 1.0 / 3.0);
62 | }
63 | #endif
64 |
65 | #if !HAVE_COSF
66 | #undef cosf
67 | #define cosf(x) ((float)cos(x))
68 | #endif
69 |
70 | #if !HAVE_EXPF
71 | #undef expf
72 | #define expf(x) ((float)exp(x))
73 | #endif
74 |
75 | #if !HAVE_EXP2
76 | #undef exp2
77 | #define exp2(x) exp((x) * 0.693147180559945)
78 | #endif /* HAVE_EXP2 */
79 |
80 | #if !HAVE_EXP2F
81 | #undef exp2f
82 | #define exp2f(x) ((float)exp2(x))
83 | #endif /* HAVE_EXP2F */
84 |
85 | #if !HAVE_ISINF
86 | static av_always_inline av_const int isinf(float x)
87 | {
88 | uint32_t v = av_float2int(x);
89 | if ((v & 0x7f800000) != 0x7f800000)
90 | return 0;
91 | return !(v & 0x007fffff);
92 | }
93 | #endif /* HAVE_ISINF */
94 |
95 | #if !HAVE_ISNAN
96 | static av_always_inline av_const int isnan(float x)
97 | {
98 | uint32_t v = av_float2int(x);
99 | if ((v & 0x7f800000) != 0x7f800000)
100 | return 0;
101 | return v & 0x007fffff;
102 | }
103 | #endif /* HAVE_ISNAN */
104 |
105 | #if !HAVE_LDEXPF
106 | #undef ldexpf
107 | #define ldexpf(x, exp) ((float)ldexp(x, exp))
108 | #endif
109 |
110 | #if !HAVE_LLRINT
111 | #undef llrint
112 | #define llrint(x) ((long long)rint(x))
113 | #endif /* HAVE_LLRINT */
114 |
115 | #if !HAVE_LLRINTF
116 | #undef llrintf
117 | #define llrintf(x) ((long long)rint(x))
118 | #endif /* HAVE_LLRINT */
119 |
120 | #if !HAVE_LOG2
121 | #undef log2
122 | #define log2(x) (log(x) * 1.44269504088896340736)
123 | #endif /* HAVE_LOG2 */
124 |
125 | #if !HAVE_LOG2F
126 | #undef log2f
127 | #define log2f(x) ((float)log2(x))
128 | #endif /* HAVE_LOG2F */
129 |
130 | #if !HAVE_LOG10F
131 | #undef log10f
132 | #define log10f(x) ((float)log10(x))
133 | #endif
134 |
135 | #if !HAVE_SINF
136 | #undef sinf
137 | #define sinf(x) ((float)sin(x))
138 | #endif
139 |
140 | #if !HAVE_RINT
141 | static inline double rint(double x)
142 | {
143 | return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5);
144 | }
145 | #endif /* HAVE_RINT */
146 |
147 | #if !HAVE_LRINT
148 | static av_always_inline av_const long int lrint(double x)
149 | {
150 | return rint(x);
151 | }
152 | #endif /* HAVE_LRINT */
153 |
154 | #if !HAVE_LRINTF
155 | static av_always_inline av_const long int lrintf(float x)
156 | {
157 | return (int)(rint(x));
158 | }
159 | #endif /* HAVE_LRINTF */
160 |
161 | #if !HAVE_ROUND
162 | static av_always_inline av_const double round(double x)
163 | {
164 | return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
165 | }
166 | #endif /* HAVE_ROUND */
167 |
168 | #if !HAVE_ROUNDF
169 | static av_always_inline av_const float roundf(float x)
170 | {
171 | return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
172 | }
173 | #endif /* HAVE_ROUNDF */
174 |
175 | #if !HAVE_TRUNC
176 | static av_always_inline av_const double trunc(double x)
177 | {
178 | return (x > 0) ? floor(x) : ceil(x);
179 | }
180 | #endif /* HAVE_TRUNC */
181 |
182 | #if !HAVE_TRUNCF
183 | static av_always_inline av_const float truncf(float x)
184 | {
185 | return (x > 0) ? floor(x) : ceil(x);
186 | }
187 | #endif /* HAVE_TRUNCF */
188 |
189 | #endif /* AVUTIL_LIBM_H */
190 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/lzo.h:
--------------------------------------------------------------------------------
1 | /*
2 | * LZO 1x decompression
3 | * copyright (c) 2006 Reimar Doeffinger
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_LZO_H
23 | #define AVUTIL_LZO_H
24 |
25 | /**
26 | * @defgroup lavu_lzo LZO
27 | * @ingroup lavu_crypto
28 | *
29 | * @{
30 | */
31 |
32 | #include
33 |
34 | /** @name Error flags returned by av_lzo1x_decode
35 | * @{ */
36 | /// end of the input buffer reached before decoding finished
37 | #define AV_LZO_INPUT_DEPLETED 1
38 | /// decoded data did not fit into output buffer
39 | #define AV_LZO_OUTPUT_FULL 2
40 | /// a reference to previously decoded data was wrong
41 | #define AV_LZO_INVALID_BACKPTR 4
42 | /// a non-specific error in the compressed bitstream
43 | #define AV_LZO_ERROR 8
44 | /** @} */
45 |
46 | #define AV_LZO_INPUT_PADDING 8
47 | #define AV_LZO_OUTPUT_PADDING 12
48 |
49 | /**
50 | * @brief Decodes LZO 1x compressed data.
51 | * @param out output buffer
52 | * @param outlen size of output buffer, number of bytes left are returned here
53 | * @param in input buffer
54 | * @param inlen size of input buffer, number of bytes left are returned here
55 | * @return 0 on success, otherwise a combination of the error flags above
56 | *
57 | * Make sure all buffers are appropriately padded, in must provide
58 | * AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes.
59 | */
60 | int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen);
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | #endif /* AVUTIL_LZO_H */
67 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/macros.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | /**
20 | * @file
21 | * @ingroup lavu
22 | * Utility Preprocessor macros
23 | */
24 |
25 | #ifndef AVUTIL_MACROS_H
26 | #define AVUTIL_MACROS_H
27 |
28 | /**
29 | * @addtogroup preproc_misc Preprocessor String Macros
30 | *
31 | * String manipulation macros
32 | *
33 | * @{
34 | */
35 |
36 | #define AV_STRINGIFY(s) AV_TOSTRING(s)
37 | #define AV_TOSTRING(s) #s
38 |
39 | #define AV_GLUE(a, b) a ## b
40 | #define AV_JOIN(a, b) AV_GLUE(a, b)
41 |
42 | /**
43 | * @}
44 | */
45 |
46 | #define AV_PRAGMA(s) _Pragma(#s)
47 |
48 | #endif /* AVUTIL_MACROS_H */
49 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/md5.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_MD5_H
22 | #define AVUTIL_MD5_H
23 |
24 | #include
25 |
26 | #include "attributes.h"
27 | #include "version.h"
28 |
29 | /**
30 | * @defgroup lavu_md5 MD5
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_md5_size;
36 |
37 | struct AVMD5;
38 |
39 | /**
40 | * Allocate an AVMD5 context.
41 | */
42 | struct AVMD5 *av_md5_alloc(void);
43 |
44 | /**
45 | * Initialize MD5 hashing.
46 | *
47 | * @param ctx pointer to the function context (of size av_md5_size)
48 | */
49 | void av_md5_init(struct AVMD5 *ctx);
50 |
51 | /**
52 | * Update hash value.
53 | *
54 | * @param ctx hash function context
55 | * @param src input data to update hash with
56 | * @param len input data length
57 | */
58 | void av_md5_update(struct AVMD5 *ctx, const uint8_t *src, int len);
59 |
60 | /**
61 | * Finish hashing and output digest value.
62 | *
63 | * @param ctx hash function context
64 | * @param dst buffer where output digest value is stored
65 | */
66 | void av_md5_final(struct AVMD5 *ctx, uint8_t *dst);
67 |
68 | /**
69 | * Hash an array of data.
70 | *
71 | * @param dst The output buffer to write the digest into
72 | * @param src The data to hash
73 | * @param len The length of the data, in bytes
74 | */
75 | void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len);
76 |
77 | /**
78 | * @}
79 | */
80 |
81 | #endif /* AVUTIL_MD5_H */
82 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/motion_vector.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVUTIL_MOTION_VECTOR_H
20 | #define AVUTIL_MOTION_VECTOR_H
21 |
22 | #include
23 |
24 | typedef struct AVMotionVector {
25 | /**
26 | * Where the current macroblock comes from; negative value when it comes
27 | * from the past, positive value when it comes from the future.
28 | * XXX: set exact relative ref frame reference instead of a +/- 1 "direction".
29 | */
30 | int32_t source;
31 | /**
32 | * Width and height of the block.
33 | */
34 | uint8_t w, h;
35 | /**
36 | * Absolute source position. Can be outside the frame area.
37 | */
38 | int16_t src_x, src_y;
39 | /**
40 | * Absolute destination position. Can be outside the frame area.
41 | */
42 | int16_t dst_x, dst_y;
43 | /**
44 | * Extra flag information.
45 | * Currently unused.
46 | */
47 | uint64_t flags;
48 | } AVMotionVector;
49 |
50 | #endif /* AVUTIL_MOTION_VECTOR_H */
51 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/murmur3.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 Reimar Döffinger
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_MURMUR3_H
22 | #define AVUTIL_MURMUR3_H
23 |
24 | #include
25 |
26 | struct AVMurMur3 *av_murmur3_alloc(void);
27 | void av_murmur3_init_seeded(struct AVMurMur3 *c, uint64_t seed);
28 | void av_murmur3_init(struct AVMurMur3 *c);
29 | void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, int len);
30 | void av_murmur3_final(struct AVMurMur3 *c, uint8_t dst[16]);
31 |
32 | #endif /* AVUTIL_MURMUR3_H */
33 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/pixelutils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVUTIL_PIXELUTILS_H
20 | #define AVUTIL_PIXELUTILS_H
21 |
22 | #include
23 | #include
24 | #include "common.h"
25 |
26 | /**
27 | * Sum of abs(src1[x] - src2[x])
28 | */
29 | typedef int (*av_pixelutils_sad_fn)(const uint8_t *src1, ptrdiff_t stride1,
30 | const uint8_t *src2, ptrdiff_t stride2);
31 |
32 | /**
33 | * Get a potentially optimized pointer to a Sum-of-absolute-differences
34 | * function (see the av_pixelutils_sad_fn prototype).
35 | *
36 | * @param w_bits 1<
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_RANDOM_SEED_H
22 | #define AVUTIL_RANDOM_SEED_H
23 |
24 | #include
25 | /**
26 | * @addtogroup lavu_crypto
27 | * @{
28 | */
29 |
30 | /**
31 | * Get a seed to use in conjunction with random functions.
32 | * This function tries to provide a good seed at a best effort bases.
33 | * Its possible to call this function multiple times if more bits are needed.
34 | * It can be quite slow, which is why it should only be used as seed for a faster
35 | * PRNG. The quality of the seed depends on the platform.
36 | */
37 | uint32_t av_get_random_seed(void);
38 |
39 | /**
40 | * @}
41 | */
42 |
43 | #endif /* AVUTIL_RANDOM_SEED_H */
44 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/rational.h:
--------------------------------------------------------------------------------
1 | /*
2 | * rational numbers
3 | * Copyright (c) 2003 Michael Niedermayer
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | /**
23 | * @file
24 | * rational numbers
25 | * @author Michael Niedermayer
26 | */
27 |
28 | #ifndef AVUTIL_RATIONAL_H
29 | #define AVUTIL_RATIONAL_H
30 |
31 | #include
32 | #include
33 | #include "attributes.h"
34 |
35 | /**
36 | * @addtogroup lavu_math
37 | * @{
38 | */
39 |
40 | /**
41 | * rational number numerator/denominator
42 | */
43 | typedef struct AVRational{
44 | int num; ///< numerator
45 | int den; ///< denominator
46 | } AVRational;
47 |
48 | /**
49 | * Create a rational.
50 | * Useful for compilers that do not support compound literals.
51 | * @note The return value is not reduced.
52 | */
53 | static inline AVRational av_make_q(int num, int den)
54 | {
55 | AVRational r = { num, den };
56 | return r;
57 | }
58 |
59 | /**
60 | * Compare two rationals.
61 | * @param a first rational
62 | * @param b second rational
63 | * @return 0 if a==b, 1 if a>b, -1 if a>63)|1;
70 | else if(b.den && a.den) return 0;
71 | else if(a.num && b.num) return (a.num>>31) - (b.num>>31);
72 | else return INT_MIN;
73 | }
74 |
75 | /**
76 | * Convert rational to double.
77 | * @param a rational to convert
78 | * @return (double) a
79 | */
80 | static inline double av_q2d(AVRational a){
81 | return a.num / (double) a.den;
82 | }
83 |
84 | /**
85 | * Reduce a fraction.
86 | * This is useful for framerate calculations.
87 | * @param dst_num destination numerator
88 | * @param dst_den destination denominator
89 | * @param num source numerator
90 | * @param den source denominator
91 | * @param max the maximum allowed for dst_num & dst_den
92 | * @return 1 if exact, 0 otherwise
93 | */
94 | int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max);
95 |
96 | /**
97 | * Multiply two rationals.
98 | * @param b first rational
99 | * @param c second rational
100 | * @return b*c
101 | */
102 | AVRational av_mul_q(AVRational b, AVRational c) av_const;
103 |
104 | /**
105 | * Divide one rational by another.
106 | * @param b first rational
107 | * @param c second rational
108 | * @return b/c
109 | */
110 | AVRational av_div_q(AVRational b, AVRational c) av_const;
111 |
112 | /**
113 | * Add two rationals.
114 | * @param b first rational
115 | * @param c second rational
116 | * @return b+c
117 | */
118 | AVRational av_add_q(AVRational b, AVRational c) av_const;
119 |
120 | /**
121 | * Subtract one rational from another.
122 | * @param b first rational
123 | * @param c second rational
124 | * @return b-c
125 | */
126 | AVRational av_sub_q(AVRational b, AVRational c) av_const;
127 |
128 | /**
129 | * Invert a rational.
130 | * @param q value
131 | * @return 1 / q
132 | */
133 | static av_always_inline AVRational av_inv_q(AVRational q)
134 | {
135 | AVRational r = { q.den, q.num };
136 | return r;
137 | }
138 |
139 | /**
140 | * Convert a double precision floating point number to a rational.
141 | * inf is expressed as {1,0} or {-1,0} depending on the sign.
142 | *
143 | * @param d double to convert
144 | * @param max the maximum allowed numerator and denominator
145 | * @return (AVRational) d
146 | */
147 | AVRational av_d2q(double d, int max) av_const;
148 |
149 | /**
150 | * @return 1 if q1 is nearer to q than q2, -1 if q2 is nearer
151 | * than q1, 0 if they have the same distance.
152 | */
153 | int av_nearer_q(AVRational q, AVRational q1, AVRational q2);
154 |
155 | /**
156 | * Find the nearest value in q_list to q.
157 | * @param q_list an array of rationals terminated by {0, 0}
158 | * @return the index of the nearest value found in the array
159 | */
160 | int av_find_nearest_q_idx(AVRational q, const AVRational* q_list);
161 |
162 | /**
163 | * @}
164 | */
165 |
166 | #endif /* AVUTIL_RATIONAL_H */
167 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/replaygain.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * This file is part of FFmpeg.
4 | *
5 | * FFmpeg is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2.1 of the License, or (at your option) any later version.
9 | *
10 | * FFmpeg is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public
16 | * License along with FFmpeg; if not, write to the Free Software
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 | */
19 |
20 | #ifndef AVUTIL_REPLAYGAIN_H
21 | #define AVUTIL_REPLAYGAIN_H
22 |
23 | #include
24 |
25 | /**
26 | * ReplayGain information (see
27 | * http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification).
28 | * The size of this struct is a part of the public ABI.
29 | */
30 | typedef struct AVReplayGain {
31 | /**
32 | * Track replay gain in microbels (divide by 100000 to get the value in dB).
33 | * Should be set to INT32_MIN when unknown.
34 | */
35 | int32_t track_gain;
36 | /**
37 | * Peak track amplitude, with 100000 representing full scale (but values
38 | * may overflow). 0 when unknown.
39 | */
40 | uint32_t track_peak;
41 | /**
42 | * Same as track_gain, but for the whole album.
43 | */
44 | int32_t album_gain;
45 | /**
46 | * Same as track_peak, but for the whole album,
47 | */
48 | uint32_t album_peak;
49 | } AVReplayGain;
50 |
51 | #endif /* AVUTIL_REPLAYGAIN_H */
52 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/ripemd.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Michael Niedermayer
3 | * Copyright (C) 2013 James Almer
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_RIPEMD_H
23 | #define AVUTIL_RIPEMD_H
24 |
25 | #include
26 |
27 | #include "attributes.h"
28 | #include "version.h"
29 |
30 | /**
31 | * @defgroup lavu_ripemd RIPEMD
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_ripemd_size;
37 |
38 | struct AVRIPEMD;
39 |
40 | /**
41 | * Allocate an AVRIPEMD context.
42 | */
43 | struct AVRIPEMD *av_ripemd_alloc(void);
44 |
45 | /**
46 | * Initialize RIPEMD hashing.
47 | *
48 | * @param context pointer to the function context (of size av_ripemd_size)
49 | * @param bits number of bits in digest (128, 160, 256 or 320 bits)
50 | * @return zero if initialization succeeded, -1 otherwise
51 | */
52 | int av_ripemd_init(struct AVRIPEMD* context, int bits);
53 |
54 | /**
55 | * Update hash value.
56 | *
57 | * @param context hash function context
58 | * @param data input data to update hash with
59 | * @param len input data length
60 | */
61 | void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, unsigned int len);
62 |
63 | /**
64 | * Finish hashing and output digest value.
65 | *
66 | * @param context hash function context
67 | * @param digest buffer where output digest value is stored
68 | */
69 | void av_ripemd_final(struct AVRIPEMD* context, uint8_t *digest);
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | #endif /* AVUTIL_RIPEMD_H */
76 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/sha.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_SHA_H
22 | #define AVUTIL_SHA_H
23 |
24 | #include
25 |
26 | #include "attributes.h"
27 | #include "version.h"
28 |
29 | /**
30 | * @defgroup lavu_sha SHA
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_sha_size;
36 |
37 | struct AVSHA;
38 |
39 | /**
40 | * Allocate an AVSHA context.
41 | */
42 | struct AVSHA *av_sha_alloc(void);
43 |
44 | /**
45 | * Initialize SHA-1 or SHA-2 hashing.
46 | *
47 | * @param context pointer to the function context (of size av_sha_size)
48 | * @param bits number of bits in digest (SHA-1 - 160 bits, SHA-2 224 or 256 bits)
49 | * @return zero if initialization succeeded, -1 otherwise
50 | */
51 | int av_sha_init(struct AVSHA* context, int bits);
52 |
53 | /**
54 | * Update hash value.
55 | *
56 | * @param context hash function context
57 | * @param data input data to update hash with
58 | * @param len input data length
59 | */
60 | void av_sha_update(struct AVSHA* context, const uint8_t* data, unsigned int len);
61 |
62 | /**
63 | * Finish hashing and output digest value.
64 | *
65 | * @param context hash function context
66 | * @param digest buffer where output digest value is stored
67 | */
68 | void av_sha_final(struct AVSHA* context, uint8_t *digest);
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | #endif /* AVUTIL_SHA_H */
75 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/sha512.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Michael Niedermayer
3 | * Copyright (C) 2013 James Almer
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_SHA512_H
23 | #define AVUTIL_SHA512_H
24 |
25 | #include
26 |
27 | #include "attributes.h"
28 | #include "version.h"
29 |
30 | /**
31 | * @defgroup lavu_sha512 SHA512
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_sha512_size;
37 |
38 | struct AVSHA512;
39 |
40 | /**
41 | * Allocate an AVSHA512 context.
42 | */
43 | struct AVSHA512 *av_sha512_alloc(void);
44 |
45 | /**
46 | * Initialize SHA-2 512 hashing.
47 | *
48 | * @param context pointer to the function context (of size av_sha512_size)
49 | * @param bits number of bits in digest (224, 256, 384 or 512 bits)
50 | * @return zero if initialization succeeded, -1 otherwise
51 | */
52 | int av_sha512_init(struct AVSHA512* context, int bits);
53 |
54 | /**
55 | * Update hash value.
56 | *
57 | * @param context hash function context
58 | * @param data input data to update hash with
59 | * @param len input data length
60 | */
61 | void av_sha512_update(struct AVSHA512* context, const uint8_t* data, unsigned int len);
62 |
63 | /**
64 | * Finish hashing and output digest value.
65 | *
66 | * @param context hash function context
67 | * @param digest buffer where output digest value is stored
68 | */
69 | void av_sha512_final(struct AVSHA512* context, uint8_t *digest);
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | #endif /* AVUTIL_SHA512_H */
76 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/stereo3d.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2013 Vittorio Giovara
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_STEREO3D_H
22 | #define AVUTIL_STEREO3D_H
23 |
24 | #include
25 |
26 | #include "frame.h"
27 |
28 | /**
29 | * List of possible 3D Types
30 | */
31 | enum AVStereo3DType {
32 | /**
33 | * Video is not stereoscopic (and metadata has to be there).
34 | */
35 | AV_STEREO3D_2D,
36 |
37 | /**
38 | * Views are next to each other.
39 | *
40 | * LLLLRRRR
41 | * LLLLRRRR
42 | * LLLLRRRR
43 | * ...
44 | */
45 | AV_STEREO3D_SIDEBYSIDE,
46 |
47 | /**
48 | * Views are on top of each other.
49 | *
50 | * LLLLLLLL
51 | * LLLLLLLL
52 | * RRRRRRRR
53 | * RRRRRRRR
54 | */
55 | AV_STEREO3D_TOPBOTTOM,
56 |
57 | /**
58 | * Views are alternated temporally.
59 | *
60 | * frame0 frame1 frame2 ...
61 | * LLLLLLLL RRRRRRRR LLLLLLLL
62 | * LLLLLLLL RRRRRRRR LLLLLLLL
63 | * LLLLLLLL RRRRRRRR LLLLLLLL
64 | * ... ... ...
65 | */
66 | AV_STEREO3D_FRAMESEQUENCE,
67 |
68 | /**
69 | * Views are packed in a checkerboard-like structure per pixel.
70 | *
71 | * LRLRLRLR
72 | * RLRLRLRL
73 | * LRLRLRLR
74 | * ...
75 | */
76 | AV_STEREO3D_CHECKERBOARD,
77 |
78 | /**
79 | * Views are next to each other, but when upscaling
80 | * apply a checkerboard pattern.
81 | *
82 | * LLLLRRRR L L L L R R R R
83 | * LLLLRRRR => L L L L R R R R
84 | * LLLLRRRR L L L L R R R R
85 | * LLLLRRRR L L L L R R R R
86 | */
87 | AV_STEREO3D_SIDEBYSIDE_QUINCUNX,
88 |
89 | /**
90 | * Views are packed per line, as if interlaced.
91 | *
92 | * LLLLLLLL
93 | * RRRRRRRR
94 | * LLLLLLLL
95 | * ...
96 | */
97 | AV_STEREO3D_LINES,
98 |
99 | /**
100 | * Views are packed per column.
101 | *
102 | * LRLRLRLR
103 | * LRLRLRLR
104 | * LRLRLRLR
105 | * ...
106 | */
107 | AV_STEREO3D_COLUMNS,
108 | };
109 |
110 |
111 | /**
112 | * Inverted views, Right/Bottom represents the left view.
113 | */
114 | #define AV_STEREO3D_FLAG_INVERT (1 << 0)
115 |
116 | /**
117 | * Stereo 3D type: this structure describes how two videos are packed
118 | * within a single video surface, with additional information as needed.
119 | *
120 | * @note The struct must be allocated with av_stereo3d_alloc() and
121 | * its size is not a part of the public ABI.
122 | */
123 | typedef struct AVStereo3D {
124 | /**
125 | * How views are packed within the video.
126 | */
127 | enum AVStereo3DType type;
128 |
129 | /**
130 | * Additional information about the frame packing.
131 | */
132 | int flags;
133 | } AVStereo3D;
134 |
135 | /**
136 | * Allocate an AVStereo3D structure and set its fields to default values.
137 | * The resulting struct can be freed using av_freep().
138 | *
139 | * @return An AVStereo3D filled with default values or NULL on failure.
140 | */
141 | AVStereo3D *av_stereo3d_alloc(void);
142 |
143 | /**
144 | * Allocate a complete AVFrameSideData and add it to the frame.
145 | *
146 | * @param frame The frame which side data is added to.
147 | *
148 | * @return The AVStereo3D structure to be filled by caller.
149 | */
150 | AVStereo3D *av_stereo3d_create_side_data(AVFrame *frame);
151 |
152 | #endif /* AVUTIL_STEREO3D_H */
153 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/threadmessage.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public License
6 | * as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with FFmpeg; if not, write to the Free Software Foundation, Inc.,
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVUTIL_THREADMESSAGE_H
20 | #define AVUTIL_THREADMESSAGE_H
21 |
22 | typedef struct AVThreadMessageQueue AVThreadMessageQueue;
23 |
24 | typedef enum AVThreadMessageFlags {
25 |
26 | /**
27 | * Perform non-blocking operation.
28 | * If this flag is set, send and recv operations are non-blocking and
29 | * return AVERROR(EAGAIN) immediately if they can not proceed.
30 | */
31 | AV_THREAD_MESSAGE_NONBLOCK = 1,
32 |
33 | } AVThreadMessageFlags;
34 |
35 | /**
36 | * Allocate a new message queue.
37 | *
38 | * @param mq pointer to the message queue
39 | * @param nelem maximum number of elements in the queue
40 | * @param elsize size of each element in the queue
41 | * @return >=0 for success; <0 for error, in particular AVERROR(ENOSYS) if
42 | * lavu was built without thread support
43 | */
44 | int av_thread_message_queue_alloc(AVThreadMessageQueue **mq,
45 | unsigned nelem,
46 | unsigned elsize);
47 |
48 | /**
49 | * Free a message queue.
50 | *
51 | * The message queue must no longer be in use by another thread.
52 | */
53 | void av_thread_message_queue_free(AVThreadMessageQueue **mq);
54 |
55 | /**
56 | * Send a message on the queue.
57 | */
58 | int av_thread_message_queue_send(AVThreadMessageQueue *mq,
59 | void *msg,
60 | unsigned flags);
61 |
62 | /**
63 | * Receive a message from the queue.
64 | */
65 | int av_thread_message_queue_recv(AVThreadMessageQueue *mq,
66 | void *msg,
67 | unsigned flags);
68 |
69 | /**
70 | * Set the sending error code.
71 | *
72 | * If the error code is set to non-zero, av_thread_message_queue_recv() will
73 | * return it immediately when there are no longer available messages.
74 | * Conventional values, such as AVERROR_EOF or AVERROR(EAGAIN), can be used
75 | * to cause the receiving thread to stop or suspend its operation.
76 | */
77 | void av_thread_message_queue_set_err_send(AVThreadMessageQueue *mq,
78 | int err);
79 |
80 | /**
81 | * Set the receiving error code.
82 | *
83 | * If the error code is set to non-zero, av_thread_message_queue_send() will
84 | * return it immediately. Conventional values, such as AVERROR_EOF or
85 | * AVERROR(EAGAIN), can be used to cause the sending thread to stop or
86 | * suspend its operation.
87 | */
88 | void av_thread_message_queue_set_err_recv(AVThreadMessageQueue *mq,
89 | int err);
90 |
91 | #endif /* AVUTIL_THREADMESSAGE_H */
92 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/time.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000-2003 Fabrice Bellard
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_TIME_H
22 | #define AVUTIL_TIME_H
23 |
24 | #include
25 |
26 | /**
27 | * Get the current time in microseconds.
28 | */
29 | int64_t av_gettime(void);
30 |
31 | /**
32 | * Get the current time in microseconds since some unspecified starting point.
33 | * On platforms that support it, the time comes from a monotonic clock
34 | * This property makes this time source ideal for measuring relative time.
35 | * The returned values may not be monotonic on platforms where a monotonic
36 | * clock is not available.
37 | */
38 | int64_t av_gettime_relative(void);
39 |
40 | /**
41 | * Indicates with a boolean result if the av_gettime_relative() time source
42 | * is monotonic.
43 | */
44 | int av_gettime_relative_is_monotonic(void);
45 |
46 | /**
47 | * Sleep for a period of time. Although the duration is expressed in
48 | * microseconds, the actual delay may be rounded to the precision of the
49 | * system timer.
50 | *
51 | * @param usec Number of microseconds to sleep.
52 | * @return zero on success or (negative) error code.
53 | */
54 | int av_usleep(unsigned usec);
55 |
56 | #endif /* AVUTIL_TIME_H */
57 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/timestamp.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | /**
20 | * @file
21 | * timestamp utils, mostly useful for debugging/logging purposes
22 | */
23 |
24 | #ifndef AVUTIL_TIMESTAMP_H
25 | #define AVUTIL_TIMESTAMP_H
26 |
27 | #include "common.h"
28 |
29 | #if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) && !defined(PRId64)
30 | #error missing -D__STDC_FORMAT_MACROS / #define __STDC_FORMAT_MACROS
31 | #endif
32 |
33 | #define AV_TS_MAX_STRING_SIZE 32
34 |
35 | /**
36 | * Fill the provided buffer with a string containing a timestamp
37 | * representation.
38 | *
39 | * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE
40 | * @param ts the timestamp to represent
41 | * @return the buffer in input
42 | */
43 | static inline char *av_ts_make_string(char *buf, int64_t ts)
44 | {
45 | if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS");
46 | else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%"PRId64, ts);
47 | return buf;
48 | }
49 |
50 | /**
51 | * Convenience macro, the return value should be used only directly in
52 | * function arguments but never stand-alone.
53 | */
54 | #define av_ts2str(ts) av_ts_make_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts)
55 |
56 | /**
57 | * Fill the provided buffer with a string containing a timestamp time
58 | * representation.
59 | *
60 | * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE
61 | * @param ts the timestamp to represent
62 | * @param tb the timebase of the timestamp
63 | * @return the buffer in input
64 | */
65 | static inline char *av_ts_make_time_string(char *buf, int64_t ts, AVRational *tb)
66 | {
67 | if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS");
68 | else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.6g", av_q2d(*tb) * ts);
69 | return buf;
70 | }
71 |
72 | /**
73 | * Convenience macro, the return value should be used only directly in
74 | * function arguments but never stand-alone.
75 | */
76 | #define av_ts2timestr(ts, tb) av_ts_make_time_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts, tb)
77 |
78 | #endif /* AVUTIL_TIMESTAMP_H */
79 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/twofish.h:
--------------------------------------------------------------------------------
1 | /*
2 | * An implementation of the TwoFish algorithm
3 | * Copyright (c) 2015 Supraja Meedinti
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_TWOFISH_H
23 | #define AVUTIL_TWOFISH_H
24 |
25 | #include
26 |
27 |
28 | /**
29 | * @file
30 | * @brief Public header for libavutil TWOFISH algorithm
31 | * @defgroup lavu_twofish TWOFISH
32 | * @ingroup lavu_crypto
33 | * @{
34 | */
35 |
36 | extern const int av_twofish_size;
37 |
38 | struct AVTWOFISH;
39 |
40 | /**
41 | * Allocate an AVTWOFISH context
42 | * To free the struct: av_free(ptr)
43 | */
44 | struct AVTWOFISH *av_twofish_alloc(void);
45 |
46 | /**
47 | * Initialize an AVTWOFISH context.
48 | *
49 | * @param ctx an AVTWOFISH context
50 | * @param key a key of size ranging from 1 to 32 bytes used for encryption/decryption
51 | * @param key_bits number of keybits: 128, 192, 256 If less than the required, padded with zeroes to nearest valid value; return value is 0 if key_bits is 128/192/256, -1 if less than 0, 1 otherwise
52 | */
53 | int av_twofish_init(struct AVTWOFISH *ctx, const uint8_t *key, int key_bits);
54 |
55 | /**
56 | * Encrypt or decrypt a buffer using a previously initialized context
57 | *
58 | * @param ctx an AVTWOFISH context
59 | * @param dst destination array, can be equal to src
60 | * @param src source array, can be equal to dst
61 | * @param count number of 16 byte blocks
62 | * @paran iv initialization vector for CBC mode, NULL for ECB mode
63 | * @param decrypt 0 for encryption, 1 for decryption
64 | */
65 | void av_twofish_crypt(struct AVTWOFISH *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt);
66 |
67 | /**
68 | * @}
69 | */
70 | #endif /* AVUTIL_TWOFISH_H */
71 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2003 Fabrice Bellard
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_VERSION_H
22 | #define AVUTIL_VERSION_H
23 |
24 | #include "macros.h"
25 |
26 | /**
27 | * @addtogroup version_utils
28 | *
29 | * Useful to check and match library version in order to maintain
30 | * backward compatibility.
31 | *
32 | * @{
33 | */
34 |
35 | #define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c))
36 | #define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
37 | #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
38 |
39 | /**
40 | * @}
41 | */
42 |
43 | /**
44 | * @file
45 | * @ingroup lavu
46 | * Libavutil version macros
47 | */
48 |
49 | /**
50 | * @defgroup lavu_ver Version and Build diagnostics
51 | *
52 | * Macros and function useful to check at compiletime and at runtime
53 | * which version of libavutil is in use.
54 | *
55 | * @{
56 | */
57 |
58 | #define LIBAVUTIL_VERSION_MAJOR 54
59 | #define LIBAVUTIL_VERSION_MINOR 23
60 | #define LIBAVUTIL_VERSION_MICRO 100
61 |
62 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
63 | LIBAVUTIL_VERSION_MINOR, \
64 | LIBAVUTIL_VERSION_MICRO)
65 | #define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR, \
66 | LIBAVUTIL_VERSION_MINOR, \
67 | LIBAVUTIL_VERSION_MICRO)
68 | #define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT
69 |
70 | #define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
71 |
72 | /**
73 | * @}
74 | *
75 | * @defgroup depr_guards Deprecation guards
76 | * FF_API_* defines may be placed below to indicate public API that will be
77 | * dropped at a future version bump. The defines themselves are not part of
78 | * the public API and may change, break or disappear at any time.
79 | *
80 | * @{
81 | */
82 |
83 | #ifndef FF_API_OLD_AVOPTIONS
84 | #define FF_API_OLD_AVOPTIONS (LIBAVUTIL_VERSION_MAJOR < 55)
85 | #endif
86 | #ifndef FF_API_PIX_FMT
87 | #define FF_API_PIX_FMT (LIBAVUTIL_VERSION_MAJOR < 55)
88 | #endif
89 | #ifndef FF_API_CONTEXT_SIZE
90 | #define FF_API_CONTEXT_SIZE (LIBAVUTIL_VERSION_MAJOR < 55)
91 | #endif
92 | #ifndef FF_API_PIX_FMT_DESC
93 | #define FF_API_PIX_FMT_DESC (LIBAVUTIL_VERSION_MAJOR < 55)
94 | #endif
95 | #ifndef FF_API_AV_REVERSE
96 | #define FF_API_AV_REVERSE (LIBAVUTIL_VERSION_MAJOR < 55)
97 | #endif
98 | #ifndef FF_API_AUDIOCONVERT
99 | #define FF_API_AUDIOCONVERT (LIBAVUTIL_VERSION_MAJOR < 55)
100 | #endif
101 | #ifndef FF_API_CPU_FLAG_MMX2
102 | #define FF_API_CPU_FLAG_MMX2 (LIBAVUTIL_VERSION_MAJOR < 55)
103 | #endif
104 | #ifndef FF_API_LLS_PRIVATE
105 | #define FF_API_LLS_PRIVATE (LIBAVUTIL_VERSION_MAJOR < 55)
106 | #endif
107 | #ifndef FF_API_AVFRAME_LAVC
108 | #define FF_API_AVFRAME_LAVC (LIBAVUTIL_VERSION_MAJOR < 55)
109 | #endif
110 | #ifndef FF_API_VDPAU
111 | #define FF_API_VDPAU (LIBAVUTIL_VERSION_MAJOR < 55)
112 | #endif
113 | #ifndef FF_API_GET_CHANNEL_LAYOUT_COMPAT
114 | #define FF_API_GET_CHANNEL_LAYOUT_COMPAT (LIBAVUTIL_VERSION_MAJOR < 55)
115 | #endif
116 | #ifndef FF_API_XVMC
117 | #define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 55)
118 | #endif
119 | #ifndef FF_API_OPT_TYPE_METADATA
120 | #define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 55)
121 | #endif
122 | #ifndef FF_API_DLOG
123 | #define FF_API_DLOG (LIBAVUTIL_VERSION_MAJOR < 55)
124 | #endif
125 |
126 | #ifndef FF_CONST_AVUTIL55
127 | #if LIBAVUTIL_VERSION_MAJOR >= 55
128 | #define FF_CONST_AVUTIL55 const
129 | #else
130 | #define FF_CONST_AVUTIL55
131 | #endif
132 | #endif
133 |
134 | /**
135 | * @}
136 | */
137 |
138 | #endif /* AVUTIL_VERSION_H */
139 |
140 |
--------------------------------------------------------------------------------
/library/jni/include/libavutil/xtea.h:
--------------------------------------------------------------------------------
1 | /*
2 | * A 32-bit implementation of the XTEA algorithm
3 | * Copyright (c) 2012 Samuel Pitoiset
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_XTEA_H
23 | #define AVUTIL_XTEA_H
24 |
25 | #include
26 |
27 | /**
28 | * @file
29 | * @brief Public header for libavutil XTEA algorithm
30 | * @defgroup lavu_xtea XTEA
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | typedef struct AVXTEA {
36 | uint32_t key[16];
37 | } AVXTEA;
38 |
39 | /**
40 | * Initialize an AVXTEA context.
41 | *
42 | * @param ctx an AVXTEA context
43 | * @param key a key of 16 bytes used for encryption/decryption
44 | */
45 | void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]);
46 |
47 | /**
48 | * Encrypt or decrypt a buffer using a previously initialized context.
49 | *
50 | * @param ctx an AVXTEA context
51 | * @param dst destination array, can be equal to src
52 | * @param src source array, can be equal to dst
53 | * @param count number of 8 byte blocks
54 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used
55 | * @param decrypt 0 for encryption, 1 for decryption
56 | */
57 | void av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
58 | int count, uint8_t *iv, int decrypt);
59 |
60 | /**
61 | * @}
62 | */
63 |
64 | #endif /* AVUTIL_XTEA_H */
65 |
--------------------------------------------------------------------------------
/library/jni/include/libpostproc/postprocess.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2001-2003 Michael Niedermayer (michaelni@gmx.at)
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef POSTPROC_POSTPROCESS_H
22 | #define POSTPROC_POSTPROCESS_H
23 |
24 | /**
25 | * @file
26 | * @ingroup lpp
27 | * external API header
28 | */
29 |
30 | /**
31 | * @defgroup lpp Libpostproc
32 | * @{
33 | */
34 |
35 | #include "libpostproc/version.h"
36 |
37 | /**
38 | * Return the LIBPOSTPROC_VERSION_INT constant.
39 | */
40 | unsigned postproc_version(void);
41 |
42 | /**
43 | * Return the libpostproc build-time configuration.
44 | */
45 | const char *postproc_configuration(void);
46 |
47 | /**
48 | * Return the libpostproc license.
49 | */
50 | const char *postproc_license(void);
51 |
52 | #define PP_QUALITY_MAX 6
53 |
54 | #define QP_STORE_T int8_t
55 |
56 | #include
57 |
58 | typedef void pp_context;
59 | typedef void pp_mode;
60 |
61 | #if LIBPOSTPROC_VERSION_INT < (52<<16)
62 | typedef pp_context pp_context_t;
63 | typedef pp_mode pp_mode_t;
64 | extern const char *const pp_help; ///< a simple help text
65 | #else
66 | extern const char pp_help[]; ///< a simple help text
67 | #endif
68 |
69 | void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
70 | uint8_t * dst[3], const int dstStride[3],
71 | int horizontalSize, int verticalSize,
72 | const QP_STORE_T *QP_store, int QP_stride,
73 | pp_mode *mode, pp_context *ppContext, int pict_type);
74 |
75 |
76 | /**
77 | * Return a pp_mode or NULL if an error occurred.
78 | *
79 | * @param name the string after "-pp" on the command line
80 | * @param quality a number from 0 to PP_QUALITY_MAX
81 | */
82 | pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality);
83 | void pp_free_mode(pp_mode *mode);
84 |
85 | pp_context *pp_get_context(int width, int height, int flags);
86 | void pp_free_context(pp_context *ppContext);
87 |
88 | #define PP_CPU_CAPS_MMX 0x80000000
89 | #define PP_CPU_CAPS_MMX2 0x20000000
90 | #define PP_CPU_CAPS_3DNOW 0x40000000
91 | #define PP_CPU_CAPS_ALTIVEC 0x10000000
92 | #define PP_CPU_CAPS_AUTO 0x00080000
93 |
94 | #define PP_FORMAT 0x00000008
95 | #define PP_FORMAT_420 (0x00000011|PP_FORMAT)
96 | #define PP_FORMAT_422 (0x00000001|PP_FORMAT)
97 | #define PP_FORMAT_411 (0x00000002|PP_FORMAT)
98 | #define PP_FORMAT_444 (0x00000000|PP_FORMAT)
99 | #define PP_FORMAT_440 (0x00000010|PP_FORMAT)
100 |
101 | #define PP_PICT_TYPE_QP2 0x00000010 ///< MPEG2 style QScale
102 |
103 | /**
104 | * @}
105 | */
106 |
107 | #endif /* POSTPROC_POSTPROCESS_H */
108 |
--------------------------------------------------------------------------------
/library/jni/include/libpostproc/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Version macros.
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef POSTPROC_POSTPROCESS_VERSION_H
22 | #define POSTPROC_POSTPROCESS_VERSION_H
23 |
24 | /**
25 | * @file
26 | * Libpostproc version macros
27 | */
28 |
29 | #include "libavutil/avutil.h"
30 |
31 | #define LIBPOSTPROC_VERSION_MAJOR 53
32 | #define LIBPOSTPROC_VERSION_MINOR 3
33 | #define LIBPOSTPROC_VERSION_MICRO 100
34 |
35 | #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
36 | LIBPOSTPROC_VERSION_MINOR, \
37 | LIBPOSTPROC_VERSION_MICRO)
38 | #define LIBPOSTPROC_VERSION AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \
39 | LIBPOSTPROC_VERSION_MINOR, \
40 | LIBPOSTPROC_VERSION_MICRO)
41 | #define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT
42 |
43 | #define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION)
44 |
45 | #endif /* POSTPROC_POSTPROCESS_VERSION_H */
46 |
--------------------------------------------------------------------------------
/library/jni/include/libswresample/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Version macros.
3 | *
4 | * This file is part of libswresample
5 | *
6 | * libswresample is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * libswresample is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with libswresample; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef SWR_VERSION_H
22 | #define SWR_VERSION_H
23 |
24 | /**
25 | * @file
26 | * Libswresample version macros
27 | */
28 |
29 | #include "libavutil/avutil.h"
30 |
31 | #define LIBSWRESAMPLE_VERSION_MAJOR 1
32 | #define LIBSWRESAMPLE_VERSION_MINOR 1
33 | #define LIBSWRESAMPLE_VERSION_MICRO 100
34 |
35 | #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
36 | LIBSWRESAMPLE_VERSION_MINOR, \
37 | LIBSWRESAMPLE_VERSION_MICRO)
38 | #define LIBSWRESAMPLE_VERSION AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, \
39 | LIBSWRESAMPLE_VERSION_MINOR, \
40 | LIBSWRESAMPLE_VERSION_MICRO)
41 | #define LIBSWRESAMPLE_BUILD LIBSWRESAMPLE_VERSION_INT
42 |
43 | #define LIBSWRESAMPLE_IDENT "SwR" AV_STRINGIFY(LIBSWRESAMPLE_VERSION)
44 |
45 | #endif /* SWR_VERSION_H */
46 |
--------------------------------------------------------------------------------
/library/jni/include/libswscale/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef SWSCALE_VERSION_H
20 | #define SWSCALE_VERSION_H
21 |
22 | /**
23 | * @file
24 | * swscale version macros
25 | */
26 |
27 | #include "libavutil/version.h"
28 |
29 | #define LIBSWSCALE_VERSION_MAJOR 3
30 | #define LIBSWSCALE_VERSION_MINOR 1
31 | #define LIBSWSCALE_VERSION_MICRO 101
32 |
33 | #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
34 | LIBSWSCALE_VERSION_MINOR, \
35 | LIBSWSCALE_VERSION_MICRO)
36 | #define LIBSWSCALE_VERSION AV_VERSION(LIBSWSCALE_VERSION_MAJOR, \
37 | LIBSWSCALE_VERSION_MINOR, \
38 | LIBSWSCALE_VERSION_MICRO)
39 | #define LIBSWSCALE_BUILD LIBSWSCALE_VERSION_INT
40 |
41 | #define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION)
42 |
43 | /**
44 | * FF_API_* defines may be placed below to indicate public API that will be
45 | * dropped at a future version bump. The defines themselves are not part of
46 | * the public API and may change, break or disappear at any time.
47 | */
48 |
49 | #ifndef FF_API_SWS_CPU_CAPS
50 | #define FF_API_SWS_CPU_CAPS (LIBSWSCALE_VERSION_MAJOR < 4)
51 | #endif
52 | #ifndef FF_API_ARCH_BFIN
53 | #define FF_API_ARCH_BFIN (LIBSWSCALE_VERSION_MAJOR < 4)
54 | #endif
55 |
56 | #endif /* SWSCALE_VERSION_H */
57 |
--------------------------------------------------------------------------------
/library/jni/prebuilt/armeabi/libavcodec-56.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/armeabi/libavcodec-56.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/armeabi/libavdevice-56.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/armeabi/libavdevice-56.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/armeabi/libavfilter-5.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/armeabi/libavfilter-5.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/armeabi/libavformat-56.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/armeabi/libavformat-56.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/armeabi/libavutil-54.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/armeabi/libavutil-54.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/armeabi/libswresample-1.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/armeabi/libswresample-1.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/armeabi/libswscale-3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/armeabi/libswscale-3.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/x86/libavcodec-56.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/x86/libavcodec-56.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/x86/libavdevice-56.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/x86/libavdevice-56.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/x86/libavfilter-5.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/x86/libavfilter-5.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/x86/libavformat-56.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/x86/libavformat-56.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/x86/libavutil-54.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/x86/libavutil-54.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/x86/libswresample-1.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/x86/libswresample-1.so
--------------------------------------------------------------------------------
/library/jni/prebuilt/x86/libswscale-3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dxjia/ffmpeg-commands-executor-library/6792f1eb2dacb1f0191a0d10205a68ff1a1ad330/library/jni/prebuilt/x86/libswscale-3.so
--------------------------------------------------------------------------------
/library/jni/show_func_wrapper.c:
--------------------------------------------------------------------------------
1 | #include "show_func_wrapper.h"
2 |
3 | #include "android_log.h"
4 |
5 | #define UNUSED(a) (void*)(a);
6 |
7 | #define MAX_SIZE 4096
8 | #define RECORD_LINE_SZ 2048
9 |
10 | static int show_function_result_position = 0;
11 | static char record_result[MAX_SIZE];
12 | static char record_line[RECORD_LINE_SZ];
13 | static int print_prefix = 1;
14 |
15 | void record_show_function_result(void* avcl, int level, const char* fmt, ...) {
16 | int len;
17 | char * record;
18 | va_list ap;
19 | va_start(ap, fmt);
20 |
21 | UNUSED(avcl);
22 | UNUSED(level);
23 |
24 | memset(record_line, '\0', RECORD_LINE_SZ);
25 | av_log_format_line(NULL, AV_LOG_INFO, fmt, ap, record_line, RECORD_LINE_SZ, &print_prefix);
26 | len = strlen(record_line);
27 | record = record_result + show_function_result_position;
28 | strncpy(record, record_line, len);
29 | show_function_result_position += len;
30 |
31 | if (show_function_result_position >= MAX_SIZE) {
32 | show_function_result_position -= len;
33 | record_result[show_function_result_position] = '\0';
34 | }
35 |
36 | va_end(ap);
37 | }
38 |
39 | void reset_record() {
40 | show_function_result_position = 0;
41 | memset(record_result, '\0', MAX_SIZE);
42 | logd("reset_record done!");
43 | }
44 |
45 | char * get_record_result() {
46 | if (show_function_result_position == 0) {
47 | return NULL;
48 | }
49 | return record_result;
50 | }
--------------------------------------------------------------------------------
/library/jni/show_func_wrapper.h:
--------------------------------------------------------------------------------
1 | #ifndef DXJIA_SHOW_FUNC_WRAPPER_H
2 | #define DXJIA_SHOW_FUNC_WRAPPER_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | #include "libavutil/log.h"
11 |
12 | #include
13 |
14 | void record_show_function_result(void* avcl, int level, const char* fmt, ...);
15 | void reset_record();
16 |
17 | char * get_record_result();
18 |
19 | #define RECORD(a, b, x...) record_show_function_result(a, b, x)
20 |
21 | #define RECORD_P(x...) record_show_function_result(NULL, 0, x)
22 |
23 | #endif /* DXJIA_SHOW_FUNC_WRAPPER_H */
--------------------------------------------------------------------------------
/library/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\android\android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/library/src/androidTest/java/cn/dxjia/ffmpeg/library/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package cn.dxjia.ffmpeg.library;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/library/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/library/src/main/java/cn/dxjia/ffmpeg/library/FFmpegNativeHelper.java:
--------------------------------------------------------------------------------
1 | package cn.dxjia.ffmpeg.library;
2 |
3 | import android.util.Log;
4 |
5 | public class FFmpegNativeHelper {
6 | public FFmpegNativeHelper() {
7 | }
8 |
9 | static {
10 | System.loadLibrary("avutil-54");
11 | System.loadLibrary("swresample-1");
12 | System.loadLibrary("avcodec-56");
13 | System.loadLibrary("avformat-56");
14 | System.loadLibrary("swscale-3");
15 | System.loadLibrary("avfilter-5");
16 | System.loadLibrary("avdevice-56");
17 | System.loadLibrary("ffmpegjni");
18 | }
19 |
20 | // success 0, error 1
21 | public static String runCommand(String command) {
22 | if(command == null || command.length() == 0) {
23 | return "Command can`t be empty.";
24 | }
25 |
26 | String[] args = command.split(" ");
27 | for(int i = 0; i < args.length; i++) {
28 | Log.d("ffmpeg-jni", args[i]);
29 | }
30 | try {
31 | return ffmpeg_run(args);
32 | } catch (Exception e) {
33 | throw e;
34 | }
35 | }
36 |
37 | // Deprecated, no use anymore
38 | public static int init() {
39 | //return ffmpeg_init();
40 | return 0;
41 | }
42 |
43 | // Deprecated, no use anymore
44 | public static int uninit() {
45 | //return ffmpeg_uninit();
46 | return 0;
47 | }
48 |
49 | private static native int ffmpeg_init();
50 | private static native int ffmpeg_uninit();
51 | private static native String ffmpeg_run(String[] args);
52 | }
53 |
--------------------------------------------------------------------------------
/library/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ffmpeg.excutor.library
3 |
4 |
--------------------------------------------------------------------------------
/library/src/test/java/cn/dxjia/ffmpeg/library/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package cn.dxjia.ffmpeg.library;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':example', ':library'
2 |
--------------------------------------------------------------------------------