├── .gitignore ├── LICENSE ├── README.md ├── build.gradle ├── example ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── xiachufang │ │ │ └── ffmpegexecutor │ │ │ ├── Constants.java │ │ │ ├── FMMRDemo.java │ │ │ ├── FMMRFragment.java │ │ │ ├── MainActivity.java │ │ │ ├── Metadata.java │ │ │ ├── MetadataLoader.java │ │ │ └── MyApplication.java │ └── res │ │ ├── layout │ │ ├── activity.xml │ │ ├── activity_main.xml │ │ ├── fragment.xml │ │ └── header.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 │ └── com │ └── xiachufang │ └── ffmpegexecutor │ ├── ApplicationTest.java │ └── 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 │ ├── Errors.h │ ├── FFmpegNativeHelper.c │ ├── FFmpegNativeHelper.h │ ├── Mutex.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_mediametadataretriever.c │ ├── ffmpeg_mediametadataretriever.h │ ├── ffmpeg_opt.c │ ├── ffmpeg_utils.c │ ├── ffmpeg_utils.h │ ├── include │ │ ├── compat │ │ │ └── va_copy.h │ │ ├── libavcodec │ │ │ ├── arm │ │ │ │ └── mathops.h │ │ │ ├── avcodec.h │ │ │ ├── avdct.h │ │ │ ├── avfft.h │ │ │ ├── d3d11va.h │ │ │ ├── dirac.h │ │ │ ├── dv_profile.h │ │ │ ├── dxva2.h │ │ │ ├── jni.h │ │ │ ├── mathops.h │ │ │ ├── mediacodec.h │ │ │ ├── old_codec_ids.h │ │ │ ├── qsv.h │ │ │ ├── vaapi.h │ │ │ ├── vda.h │ │ │ ├── vdpau.h │ │ │ ├── version.h │ │ │ ├── videotoolbox.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 │ │ │ ├── aes_ctr.h │ │ │ ├── arm │ │ │ │ └── timer.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 │ │ │ ├── des.h │ │ │ ├── dict.h │ │ │ ├── display.h │ │ │ ├── downmix_info.h │ │ │ ├── error.h │ │ │ ├── eval.h │ │ │ ├── ffversion.h │ │ │ ├── fifo.h │ │ │ ├── file.h │ │ │ ├── frame.h │ │ │ ├── hash.h │ │ │ ├── hmac.h │ │ │ ├── hwcontext.h │ │ │ ├── hwcontext_cuda.h │ │ │ ├── hwcontext_dxva2.h │ │ │ ├── hwcontext_qsv.h │ │ │ ├── hwcontext_vaapi.h │ │ │ ├── hwcontext_vdpau.h │ │ │ ├── imgutils.h │ │ │ ├── internal.h │ │ │ ├── intfloat.h │ │ │ ├── intreadwrite.h │ │ │ ├── lfg.h │ │ │ ├── libm.h │ │ │ ├── log.h │ │ │ ├── lzo.h │ │ │ ├── macros.h │ │ │ ├── mastering_display_metadata.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 │ │ │ ├── rc4.h │ │ │ ├── replaygain.h │ │ │ ├── ripemd.h │ │ │ ├── samplefmt.h │ │ │ ├── sha.h │ │ │ ├── sha512.h │ │ │ ├── spherical.h │ │ │ ├── stereo3d.h │ │ │ ├── tea.h │ │ │ ├── threadmessage.h │ │ │ ├── time.h │ │ │ ├── timecode.h │ │ │ ├── timer.h │ │ │ ├── timestamp.h │ │ │ ├── tree.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 │ ├── mediametadataretriever.cpp │ ├── mediametadataretriever.h │ ├── prebuilt │ │ └── armeabi │ │ │ ├── libavcodec-57.so │ │ │ ├── libavdevice-57.so │ │ │ ├── libavfilter-6.so │ │ │ ├── libavformat-57.so │ │ │ ├── libavutil-55.so │ │ │ ├── libpostproc-54.so │ │ │ ├── libswresample-2.so │ │ │ ├── libswscale-4.so │ │ │ └── libx264-148.so │ ├── show_func_wrapper.c │ ├── show_func_wrapper.h │ ├── wseemann_media_MediaMetadataRetriever.cpp │ └── x86_config.h ├── libs │ └── armeabi │ │ ├── libavcodec-57.so │ │ ├── libavdevice-57.so │ │ ├── libavfilter-6.so │ │ ├── libavformat-57.so │ │ ├── libavutil-55.so │ │ ├── libffmpeg_mediametadataretriever_jni.so │ │ ├── libffmpegjni.so │ │ ├── libpostproc-54.so │ │ ├── libswresample-2.so │ │ ├── libswscale-4.so │ │ └── libx264-148.so ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── xiachufang │ │ └── utils │ │ └── video │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── xiachufang │ │ │ └── utils │ │ │ └── video │ │ │ ├── FFmpegMediaMetadataRetriever.java │ │ │ └── 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.3.0' 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 | allprojects { 4 | repositories { 5 | maven { url 'https://jitpack.io' } 6 | } 7 | } 8 | 9 | android { 10 | compileSdkVersion 'android-24' 11 | buildToolsVersion '25.0.2' 12 | 13 | defaultConfig { 14 | multiDexEnabled true 15 | applicationId "com.xiachufang.ffmpegexecutor" 16 | minSdkVersion 16 17 | targetSdkVersion 23 18 | versionCode 1 19 | versionName "1.0" 20 | } 21 | buildTypes { 22 | release { 23 | minifyEnabled false 24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 25 | } 26 | } 27 | 28 | buildTypes { 29 | 30 | // 强制在 debug 和 release 时使用 armeabi,这样安装时才确保拷贝 so 文件夹 31 | debug { 32 | minifyEnabled false 33 | ndk { 34 | abiFilters 'armeabi' 35 | } 36 | } 37 | 38 | release { 39 | minifyEnabled false 40 | ndk { 41 | abiFilters 'armeabi' 42 | } 43 | } 44 | } 45 | 46 | dexOptions { 47 | incremental true 48 | javaMaxHeapSize "4g" 49 | } 50 | } 51 | 52 | dependencies { 53 | compile fileTree(include: ['*.jar'], dir: 'libs') 54 | testCompile 'junit:junit:4.12' 55 | compile project(':library') 56 | compile 'com.android.support:appcompat-v7:23.1.1' 57 | compile 'com.github.CarGuo:GSYVideoPlayer:v1.6.2' 58 | compile 'com.android.support:multidex:1.0.1' 59 | } 60 | -------------------------------------------------------------------------------- /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/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/src/main/java/com/xiachufang/ffmpegexecutor/Constants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * FFmpegMediaMetadataRetriever: A unified interface for retrieving frame 3 | * and meta data from an input media file. 4 | * 5 | * Copyright 2015 William Seemann 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | package com.xiachufang.ffmpegexecutor; 21 | 22 | 23 | import com.xiachufang.utils.video.FFmpegMediaMetadataRetriever; 24 | 25 | public class Constants { 26 | 27 | public static final String [] METADATA_KEYS = { 28 | FFmpegMediaMetadataRetriever.METADATA_KEY_ALBUM, 29 | FFmpegMediaMetadataRetriever.METADATA_KEY_ALBUM_ARTIST, 30 | FFmpegMediaMetadataRetriever.METADATA_KEY_ARTIST, 31 | FFmpegMediaMetadataRetriever.METADATA_KEY_COMMENT, 32 | FFmpegMediaMetadataRetriever.METADATA_KEY_COMPOSER, 33 | FFmpegMediaMetadataRetriever.METADATA_KEY_COPYRIGHT, 34 | FFmpegMediaMetadataRetriever.METADATA_KEY_CREATION_TIME, 35 | FFmpegMediaMetadataRetriever.METADATA_KEY_DATE, 36 | FFmpegMediaMetadataRetriever.METADATA_KEY_DISC, 37 | FFmpegMediaMetadataRetriever.METADATA_KEY_ENCODER, 38 | FFmpegMediaMetadataRetriever.METADATA_KEY_ENCODED_BY, 39 | FFmpegMediaMetadataRetriever.METADATA_KEY_FILENAME, 40 | FFmpegMediaMetadataRetriever.METADATA_KEY_GENRE, 41 | FFmpegMediaMetadataRetriever.METADATA_KEY_LANGUAGE, 42 | FFmpegMediaMetadataRetriever.METADATA_KEY_PERFORMER, 43 | FFmpegMediaMetadataRetriever.METADATA_KEY_PUBLISHER, 44 | FFmpegMediaMetadataRetriever.METADATA_KEY_SERVICE_NAME, 45 | FFmpegMediaMetadataRetriever.METADATA_KEY_SERVICE_PROVIDER, 46 | FFmpegMediaMetadataRetriever.METADATA_KEY_TITLE, 47 | FFmpegMediaMetadataRetriever.METADATA_KEY_TRACK, 48 | FFmpegMediaMetadataRetriever.METADATA_KEY_VARIANT_BITRATE, 49 | FFmpegMediaMetadataRetriever.METADATA_KEY_DURATION, 50 | FFmpegMediaMetadataRetriever.METADATA_KEY_AUDIO_CODEC, 51 | FFmpegMediaMetadataRetriever.METADATA_KEY_VIDEO_CODEC, 52 | FFmpegMediaMetadataRetriever.METADATA_KEY_ICY_METADATA, 53 | FFmpegMediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION, 54 | FFmpegMediaMetadataRetriever.METADATA_KEY_FRAMERATE, 55 | FFmpegMediaMetadataRetriever.METADATA_KEY_CHAPTER_START_TIME, 56 | FFmpegMediaMetadataRetriever.METADATA_KEY_CHAPTER_END_TIME, 57 | FFmpegMediaMetadataRetriever.METADATA_CHAPTER_COUNT, 58 | FFmpegMediaMetadataRetriever.METADATA_KEY_FILESIZE 59 | }; 60 | 61 | } 62 | -------------------------------------------------------------------------------- /example/src/main/java/com/xiachufang/ffmpegexecutor/FMMRDemo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * FFmpegMediaMetadataRetriever: A unified interface for retrieving frame 3 | * and meta data from an input media file. 4 | * 5 | * Copyright 2015 William Seemann 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | package com.xiachufang.ffmpegexecutor; 21 | 22 | import android.Manifest; 23 | import android.content.pm.PackageManager; 24 | import android.os.Bundle; 25 | import android.support.v4.app.ActivityCompat; 26 | import android.support.v4.app.FragmentActivity; 27 | import android.support.v4.content.ContextCompat; 28 | import android.view.Menu; 29 | import android.view.MenuInflater; 30 | 31 | public class FMMRDemo extends FragmentActivity { 32 | 33 | private static final int MY_PERMISSIONS_REQUEST_EXTERNAL_STORAGE = 100; 34 | 35 | @Override 36 | protected void onCreate(Bundle savedInstanceState) { 37 | super.onCreate(savedInstanceState); 38 | setContentView(R.layout.activity); 39 | 40 | checkPermission(); 41 | } 42 | 43 | @Override 44 | public boolean onCreateOptionsMenu(Menu menu) { 45 | MenuInflater inflater = getMenuInflater(); 46 | //inflater.inflate(R.menu.menu_fmmr_demo, menu); 47 | return super.onCreateOptionsMenu(menu); 48 | } 49 | 50 | private void checkPermission() { 51 | // Here, thisActivity is the current activity 52 | if (ContextCompat.checkSelfPermission(this, 53 | Manifest.permission.READ_EXTERNAL_STORAGE) 54 | != PackageManager.PERMISSION_GRANTED) { 55 | 56 | // Should we show an explanation? 57 | if (ActivityCompat.shouldShowRequestPermissionRationale(this, 58 | Manifest.permission.READ_EXTERNAL_STORAGE)) { 59 | 60 | // Show an expanation to the user *asynchronously* -- don't block 61 | // this thread waiting for the user's response! After the user 62 | // sees the explanation, try again to request the permission. 63 | 64 | } else { 65 | 66 | // No explanation needed, we can request the permission. 67 | 68 | ActivityCompat.requestPermissions(this, 69 | new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 70 | MY_PERMISSIONS_REQUEST_EXTERNAL_STORAGE); 71 | 72 | // MY_PERMISSIONS_REQUEST_EXTERNAL_STORAGE is an 73 | // app-defined int constant. The callback method gets the 74 | // result of the request. 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /example/src/main/java/com/xiachufang/ffmpegexecutor/Metadata.java: -------------------------------------------------------------------------------- 1 | /* 2 | * FFmpegMediaMetadataRetriever: A unified interface for retrieving frame 3 | * and meta data from an input media file. 4 | * 5 | * Copyright 2015 William Seemann 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | package com.xiachufang.ffmpegexecutor; 21 | 22 | public class Metadata { 23 | 24 | private String mKey; 25 | private Object mValue; 26 | 27 | public Metadata(String key, Object value) { 28 | mKey = key; 29 | mValue = value; 30 | } 31 | 32 | /** 33 | * @return the mKey 34 | */ 35 | public String getKey() { 36 | return mKey; 37 | } 38 | 39 | /** 40 | * @param mKey the mKey to set 41 | */ 42 | public void setKey(String mKey) { 43 | this.mKey = mKey; 44 | } 45 | 46 | /** 47 | * @return the mValue 48 | */ 49 | public Object getValue() { 50 | return mValue; 51 | } 52 | 53 | /** 54 | * @param mValue the mValue to set 55 | */ 56 | public void setValue(Object mValue) { 57 | this.mValue = mValue; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /example/src/main/java/com/xiachufang/ffmpegexecutor/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.xiachufang.ffmpegexecutor; 2 | 3 | import android.content.Context; 4 | import android.support.multidex.MultiDexApplication; 5 | 6 | /** 7 | * Created by michael on 2017/4/5. 8 | */ 9 | 10 | public class MyApplication extends MultiDexApplication { 11 | 12 | @Override 13 | protected void attachBaseContext(Context base) { 14 | super.attachBaseContext(base); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/src/main/res/layout/activity.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /example/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 20 | 28 | 29 |