Compare commits

..

99 Commits

Author SHA1 Message Date
Taner Sener 05dee70dcc documentation update 2018-10-25 18:00:49 +03:00
Taner Sener 9fde72ac48 fixed: gpl package detection 2018-10-25 13:43:43 +03:00
Taner Sener f9912c462c android test-app versions updated 2018-10-25 13:10:53 +03:00
Taner Sener fdfef17c51 README update: package table updated 2018-10-25 01:24:08 +03:00
Taner Sener 5f86552238 README, testing html table 2018-10-25 01:09:50 +03:00
Taner Sener b4287287eb README packages table updated 2018-10-25 00:21:37 +03:00
Taner Sener 5cc967fb92 preparing release 2018-10-24 23:37:48 +03:00
Taner Sener 56df2b1018 doc updated 2018-10-24 21:43:36 +03:00
Taner Sener 5403567631 test-app updated: manual tests added for chromaprint and libwebp 2018-10-24 20:56:00 +03:00
Taner Sener 82e08a56b9 ios update: optional videotoolbox support handled in autools files 2018-10-24 10:15:39 +03:00
Taner Sener e6ff6f2951 version update: ffmpeg v4.1-dev-1517-gc2ac3b8e6a 2018-10-24 09:35:50 +03:00
Taner Sener 1b855d5762 version update: libaom v1.0.0-820-g4c118dc5 2018-10-24 01:58:57 +03:00
Taner Sener 6db573c9b3 version update: opus v1.3 2018-10-24 01:48:29 +03:00
Taner Sener 3831dcfeb8 updated:project logo 2018-10-24 01:29:50 +03:00
Taner Sener 010a11aa78 updated: media file used for https testing 2018-10-24 01:19:20 +03:00
Taner Sener 9c4092acd5 updated: using delimiter in test apps 2018-10-24 00:45:03 +03:00
Taner Sener aa99132930 updated: size optimization disabled on debug builds 2018-10-24 00:38:33 +03:00
Taner Sener 9dfae4be30 updated: cpu architectures on ios 2018-10-24 00:37:56 +03:00
Taner Sener 7f9ebf9988 new api: package detection and external library methods implemented on ios 2018-10-24 00:10:05 +03:00
Taner Sener 36f5dd2ece new api: getLastXXX methods implemented on ios 2018-10-23 19:38:14 +03:00
Taner Sener 133c0c42eb new api: executeWithDelimiter method added for ios 2018-10-23 19:37:42 +03:00
Taner Sener 48645800ec new api: getMediaInformation for ios 2018-10-23 19:26:57 +03:00
Taner Sener 998d3bfa37 updated: new test case for start time 2018-10-22 22:15:47 +03:00
Taner Sener 60d1ed9f90 updated: rounding mode for start time 2018-10-22 13:46:07 +03:00
Taner Sener 209131b92f fixed: index method handling substring length 2018-10-21 22:27:46 +03:00
Taner Sener 1a88f77684 fixed: getMediaInformation method return type fixed on android 2018-10-20 00:28:43 +03:00
Taner Sener a4fadfce40 fixed: last command output filtered based on log severity 2018-10-19 23:28:18 +03:00
Taner Sener a737b02e88 MediaInformationTests completed 2018-10-19 22:02:49 +03:00
Taner Sener 235fe08dc4 MediaInformation classes added. 2018-10-19 11:02:22 +03:00
Taner Sener 893dcf8582 FFmpegTest class added 2018-10-18 08:33:36 +03:00
Taner Sener 2e20471922 custom package name defined on android platform. 2018-10-17 23:39:45 +03:00
Taner Sener baf251e659 fixed: log level is effective for system commands 2018-10-17 22:50:35 +03:00
Taner Sener 1a9ac6dbb0 new api feature: system execute method implemented on android 2018-10-17 21:25:20 +03:00
Taner Sener 317d01c3e6 new native api: getBuildConf method added for android 2018-10-17 20:16:29 +03:00
Taner Sener cd8a8e2145 new api: getExternalLibraries on android 2018-10-17 18:04:46 +03:00
Taner Sener fa8d119669 new api: last return code and last command output on android 2018-10-17 18:03:37 +03:00
Taner Sener 9c5cf7d825 fixed: PIC for cmake based libraries on android platform 2018-10-17 12:22:44 +03:00
Taner Sener 554bbe3fbf android test app permissions updated 2018-10-17 09:28:33 +03:00
Taner Sener 2f2f779d12 android test app updated with twolame test 2018-10-17 08:15:35 +03:00
Taner Sener fe7ea3a975 reverting ffmpeg back to v4.1-dev-1368-gd3bda871f0 2018-10-16 23:07:45 +03:00
Taner Sener ed755140b3 updated: libaom version inside .pc file 2018-10-16 21:23:16 +03:00
Taner Sener b03c484fd3 ios test app updated with new codecs 2018-10-16 20:41:47 +03:00
Taner Sener b665a4ee34 avfoundation enabled for ios 2018-10-16 19:43:19 +03:00
Taner Sener f43eaa7a08 speed option implemented 2018-10-16 19:09:27 +03:00
Taner Sener 55b28d48e6 videotoolbox enabled for ios 2018-10-16 18:41:34 +03:00
Taner Sener cdd2d54f4c Updated package information 2018-10-16 18:02:39 +03:00
Taner Sener fbe3dd4806 version update: libaom-v1.0.0-773-g07f8a18bb 2018-10-16 00:47:17 +03:00
Taner Sener 76ec9d59cf version update: x264-20181015 2018-10-16 00:43:23 +03:00
Taner Sener d2a3df33b6 Public web page updated 2018-10-16 00:41:55 +03:00
Taner Sener 5bffc5ed9d README updated 2018-10-15 22:51:15 +03:00
Taner Sener 95f6fdd9e4 logo name updated 2018-10-15 22:27:51 +03:00
Taner Sener 1a9a47c65b platform specific ffmpeg outputs enabled. 2018-10-15 22:14:57 +03:00
Taner Sener 1d3c0e7f60 ffmpeg n4.1-dev-1457-ge1e6a31216 2018-10-15 21:59:10 +03:00
Taner Sener a307a10c32 updated: ios target host 2018-10-15 20:33:38 +03:00
Taner Sener 78e986bf20 bitcode removed from cxxflags for ios i386 and x86-64 architectures 2018-10-15 20:30:40 +03:00
Taner Sener e702bef31f new external library: tesseract 2018-10-15 04:16:26 +03:00
Taner Sener 006a001fd0 new external library: sdl 2018-10-14 14:14:01 +03:00
Taner Sener 7d29088799 new external library: twolame 2018-10-14 13:36:33 +03:00
Taner Sener dfddf18b52 new major version 2018-10-14 12:22:34 +03:00
Taner Sener 1336eab42f updated: ios release package information 2018-10-14 12:18:44 +03:00
Taner Sener e01989639d fixed: ios x265 v2.9 build errors 2018-10-14 11:41:09 +03:00
Taner Sener 1b041324b4 fixed; android x265 v2.9 linking errors 2018-10-14 10:10:08 +03:00
Taner Sener df3faba968 using x265 v2.9 2018-10-13 23:15:33 +03:00
Taner Sener 1b3b2c3c2f android native version bump 2018-09-29 18:17:13 +03:00
Taner Sener d9d31985df android test-app version bump 2018-09-29 18:09:12 +03:00
Taner Sener 322877b3c3 versions in fontconfig build scripts updated. 2018-09-29 18:08:49 +03:00
Taner Sener 9d414b9790 Reverted "using ffmpeg n4.1-dev-1349-g179ed2d2e0 version"
This reverts commit 318efe8a5d.
2018-09-29 18:02:18 +03:00
Taner Sener 270fc3f1ad ignored files updated for fontconfig 2018-09-29 14:09:29 +03:00
Taner Sener d2ef2da94b fontconfig patch applied for https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/109 2018-09-29 13:28:41 +03:00
Taner Sener f92c5288b9 fontconfig v2.13.1 2018-09-29 12:17:28 +03:00
Taner Sener 248a6cba7a update release version 2018-09-29 12:17:27 +03:00
Taner Sener 318efe8a5d using ffmpeg n4.1-dev-1349-g179ed2d2e0 version 2018-09-29 11:18:26 +03:00
Taner Sener ea9abafaa7 preparing next minor release 2018-09-29 10:41:21 +03:00
Taner Sener 9ede8768f5 README, misleading Xcode support information corrected 2018-09-29 09:44:05 +03:00
Taner Sener 1fcf112ed0 Minor changes for Xcode 7.3.1 compatibility, fixes #28 2018-09-29 09:31:30 +03:00
Taner Sener ace472d20c Using custom Xcode for building. 2018-09-27 12:34:39 +03:00
Taner Sener 36fa6b0028 New keys added in IOS framework Info.plist file 2018-09-26 13:41:18 +03:00
Taner Sener 29ca9e37e7 Fixed IOS dynamic framework generation, issue #27 2018-09-25 13:55:19 +03:00
Taner Sener f0a65465e9 README updated. 2018-09-22 23:08:42 +03:00
Taner Sener 4808e4c686 ios static universal libraries fixed. 2018-09-22 22:17:34 +03:00
Taner Sener 41f55f415e Updated README. 2018-09-20 19:48:00 +03:00
Taner Sener 3716c4623b Removed MinimumOSVersion from ios Info.plist 2018-09-19 15:35:45 +03:00
Taner Sener 7ccf16f130 libvpx minimum ios version set to 7.0 in order to build library on IOS 12. 2018-09-19 14:45:32 +03:00
Taner Sener 2cc3a9b0db Building static ios libraries enabled. 2018-09-19 13:48:44 +03:00
Taner Sener 21c071bebe API documentation update. 2018-09-16 20:27:52 +03:00
Taner Sener caa4ac1f9b Using latest released versions. 2018-09-16 20:21:04 +03:00
Taner Sener 09caf1e997 Android test application uses the latest published version. 2018-09-16 19:32:50 +03:00
Taner Sener b3109cf276 Preparing v2.1.1 patch for android. 2018-09-16 17:22:23 +03:00
Taner Sener 4bd20725a8 Fixed armeabi-v7a-neon ABI for issue #24 2018-09-16 15:57:31 +03:00
Taner Sener 0a127d4370 armeabi-v7a ABI load log fixed. 2018-09-16 13:59:11 +03:00
Taner Sener ba7afe784d Redirection documentation updated. 2018-09-11 12:12:02 +03:00
Taner Sener e73224d560 Updated setFontDirectory usage example 2018-09-11 07:35:12 +03:00
Taner Sener 4d544fa7ca @rpath paths fixed for frameworks in ios.sh. 2018-09-07 22:23:14 +03:00
Taner Sener d500463706 Universal binary creation fixed. 2018-09-07 20:51:53 +03:00
Taner Sener a3b95188fb Updating version to v2.2 2018-09-07 16:05:51 +03:00
Taner Sener 7d27ab7be5 Merging documentation updates from master. 2018-09-07 15:42:24 +03:00
Taner Sener 7681389a9c Updated IOS test-app to v2.1.1. 2018-09-07 14:05:49 +03:00
Taner Sener e85b08e7c2 preparing IOS v2.1.1 patch, fixes #22. 2018-09-07 12:56:37 +03:00
Taner Sener d298c9ac3b burning subtitles for ios arm architectures fixed. 2018-09-07 09:52:47 +03:00
5795 changed files with 1378078 additions and 41279 deletions
+124 -45
View File
@@ -1,60 +1,102 @@
# MobileFFmpeg [![Join the chat at https://gitter.im/mobile-ffmpeg/Lobby](https://badges.gitter.im/mobile-ffmpeg/Lobby.svg)](https://gitter.im/mobile-ffmpeg/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [ ![Download](https://api.bintray.com/packages/tanersener/maven/mobile-ffmpeg-full/images/download.svg) ](https://bintray.com/tanersener/maven/mobile-ffmpeg-full/_latestVersion)
# MobileFFmpeg [![Join the chat at https://gitter.im/mobile-ffmpeg/Lobby](https://badges.gitter.im/mobile-ffmpeg/Lobby.svg)](https://gitter.im/mobile-ffmpeg/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ![GitHub release](https://img.shields.io/badge/release-v3.0-blue.svg) ![Bintray](https://img.shields.io/badge/bintray-v3.0-blue.svg) ![CocoaPods](https://img.shields.io/badge/pod-v3.0-blue.svg)
FFmpeg for Android and IOS
<img src="https://github.com/tanersener/mobile-ffmpeg/blob/dev-v2.x/docs/mobile-ffmpeg-logo-v4.png" width="240">
<img src="https://github.com/tanersener/mobile-ffmpeg/blob/dev-v3.x/docs/assets/mobile-ffmpeg-logo-v7.png" width="320">
### 1. Features
- Use prebuilt binaries available under `Github`/`JCenter`/`CocoaPods` or build your own version with external libraries you need
- Use binaries available at `Github`/`JCenter`/`CocoaPods` or build your own version with external libraries you need
- Supports
- Both Android and IOS
- FFmpeg `v3.4.x` and `v4.0.x` releases
- 24 external libraries
- FFmpeg `v3.4.x`, `v4.0.x` and `v4.1-dev-x` (master) releases
- 27 external libraries
`chromaprint`, `fontconfig`, `freetype`, `fribidi`, `gmp`, `gnutls`, `kvazaar`, `lame`, `libaom`, `libass`, `libiconv`, `libilbc`, `libtheora`, `libvorbis`, `libvpx`, `libwebp`, `libxml2`, `opencore-amr`, `opus`, `shine`, `snappy`, `soxr`, `speex`, `wavpack`
`chromaprint`, `fontconfig`, `freetype`, `fribidi`, `gmp`, `gnutls`, `kvazaar`, `lame`, `libaom`, `libass`, `libiconv`, `libilbc`, `libtheora`, `libvorbis`, `libvpx`, `libwebp`, `libxml2`, `opencore-amr`, `opus`, `sdl`, `shine`, `snappy`, `soxr`, `speex`, `tesseract`, `twolame`, `wavpack`
- 4 external libraries with GPL license
`vid.stab`, `x264`, `x265`, `xvidcore`
- Exposes FFmpeg capabilities both directly from FFmpeg libraries and through MobileFFmpeg wrapper library
- Exposes both FFmpeg library and MobileFFmpeg wrapper library capabilities
- Creates shared libraries (.so for Android, .dylib for IOS)
- Includes cross-compile instructions for 38 open-source libraries
- Includes cross-compile instructions for 43 open-source libraries
`chromaprint`, `expat`, `ffmpeg`, `fontconfig`, `freetype`, `fribidi`, `giflib`, `gmp`, `gnutls`, `kvazaar`, `lame`, `libaom`, `libass`, `libiconv`, `libilbc`, `libjpeg`, `libjpeg-turbo`, `libogg`, `libpng`, `libtheora`, `libuuid`, `libvorbis`, `libvpx`, `libwebp`, `libxml2`, `nettle`, `opencore-amr`, `opus`, `shine`, `snappy`, `soxr`, `speex`, `tiff`, `vid.stab`, `wavpack`, `x264`, `x265`, `xvidcore`
`chromaprint`, `expat`, `ffmpeg`, `fontconfig`, `freetype`, `fribidi`, `giflib`, `gmp`, `gnutls`, `kvazaar`, `lame`, `leptonica`, `libaom`, `libass`, `libiconv`, `libilbc`, `libjpeg`, `libjpeg-turbo`, `libogg`, `libpng`, `libsndfile`, `libtheora`, `libuuid`, `libvorbis`, `libvpx`, `libwebp`, `libxml2`, `nettle`, `opencore-amr`, `opus`, `sdl`, `shine`, `snappy`, `soxr`, `speex`, `tesseract`, `tiff`, `twolame`, `vid.stab`, `wavpack`, `x264`, `x265`, `xvidcore`
- Licensed under LGPL 3.0, can be customized to support GPL v3.0
#### 1.1 Android
- Supports `arm-v7a`, `arm-v7a-neon`, `arm64-v8a`, `x86` and `x86_64` architectures
- Builds `arm-v7a`, `arm-v7a-neon`, `arm64-v8a`, `x86` and `x86_64` architectures
- Supports `zlib` and `MediaCodec` system libraries
- Creates Android archive with .aar extension
#### 1.2 IOS
- Supports `armv7`, `armv7s`, `arm64`, `i386` and `x86_64` architectures
- Builds `armv7`, `armv7s`, `arm64`, `i386` and `x86_64` architectures
- Supports `bzip2`, `zlib` system libraries and `AudioToolbox`, `CoreImage`, `VideoToolbox`, `AVFoundation` system frameworks
- `ARC` enabled library
- Built with `-fembed-bitcode` flag
- Creates IOS dynamic universal (fat) library
- Creates IOS shared/dynamic universal (fat) library
- Creates IOS static universal (fat) library
- Creates IOS dynamic framework for IOS 8 or later
- Supports Xcode 7.3.1 or later
### 2. Using
Prebuilt libraries are available under [Github](https://github.com/tanersener/mobile-ffmpeg/releases), [JCenter](https://bintray.com/bintray/jcenter) and [CocoaPods](https://cocoapods.org)
Binaries are available at [Github](https://github.com/tanersener/mobile-ffmpeg/releases), [JCenter](https://bintray.com/bintray/jcenter) and [CocoaPods](https://cocoapods.org).
There are eight different prebuilt packages. Below you can see which external libraries are enabled in each of them.
Refer to [Using IOS Universal Binaries](https://github.com/tanersener/mobile-ffmpeg/wiki/Using-IOS-Universal-Binaries) guide to import IOS universal binaries released at [Github](https://github.com/tanersener/mobile-ffmpeg/releases).
| min | min-gpl | https | https-gpl | audio | video | full | full-gpl |
| :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: |
| - | vid.stab<sup>3</sup> <br/> x264<sup>1</sup> <br/> x265<sup>3</sup> <br/> xvidcore<sup>1</sup> | gnutls | gnutls <br/> vid.stab<sup>3</sup> <br/> x264<sup>1</sup> <br/> x265<sup>3</sup> <br/> xvidcore<sup>1</sup> | chromaprint<sup>3</sup> <br/> lame <br/> libilbc<sup>1</sup> <br/> libvorbis <br/> opencore-amr <br/> opus<sup>1</sup> <br/> shine <br/> soxr<sup>2</sup> <br/> speex <br/> wavpack | fontconfig <br/> freetype <br/> fribidi <br/> kvazaar <br/> libaom<sup>2</sup> <br/> libass <br/> libiconv <br/> libtheora <br/> libvpx <br/> snappy<sup>1</sup> | chromaprint<sup>3</sup> <br/> fontconfig <br/> freetype <br/> fribidi <br/> gmp <br/> gnutls <br/> kvazaar <br/> lame <br/> libaom<sup>2</sup> <br/> libass <br/> libiconv <br/> libilbc<sup>1</sup> <br/> libtheora <br/> libvorbis <br/> libvpx <br/> libwebp <br/> libxml2 <br/> opencore-amr <br/> opus<sup>1</sup> <br/> shine <br/> snappy<sup>1</sup> <br/> soxr<sup>2</sup> <br/> speex <br/> wavpack | chromaprint<sup>3</sup> <br/> fontconfig <br/> freetype <br/> fribidi <br/> gmp <br/> gnutls <br/> kvazaar <br/> lame <br/> libaom<sup>2</sup> <br/> libass <br/> libiconv <br/> libilbc<sup>1</sup> <br/> libtheora <br/> libvorbis <br/> libvpx <br/> libwebp <br/> libxml2 <br/> opencore-amr <br/> opus<sup>1</sup> <br/> shine <br/> snappy<sup>1</sup> <br/> soxr<sup>2</sup> <br/> speex <br/> vid.stab<sup>3</sup> <br/> wavpack <br/> x264<sup>1</sup> <br/> x265<sup>3</sup> <br/> xvidcore<sup>1</sup> |
| [ ![Download](https://api.bintray.com/packages/tanersener/maven/mobile-ffmpeg-min/images/download.svg) ](https://bintray.com/tanersener/maven/mobile-ffmpeg-min/_latestVersion) | [ ![Download](https://api.bintray.com/packages/tanersener/maven/mobile-ffmpeg-min-gpl/images/download.svg) ](https://bintray.com/tanersener/maven/mobile-ffmpeg-min-gpl/_latestVersion) | [ ![Download](https://api.bintray.com/packages/tanersener/maven/mobile-ffmpeg-https/images/download.svg) ](https://bintray.com/tanersener/maven/mobile-ffmpeg-https/_latestVersion) | [ ![Download](https://api.bintray.com/packages/tanersener/maven/mobile-ffmpeg-https-gpl/images/download.svg) ](https://bintray.com/tanersener/maven/mobile-ffmpeg-https-gpl/_latestVersion) | [ ![Download](https://api.bintray.com/packages/tanersener/maven/mobile-ffmpeg-audio/images/download.svg) ](https://bintray.com/tanersener/maven/mobile-ffmpeg-audio/_latestVersion) | [ ![Download](https://api.bintray.com/packages/tanersener/maven/mobile-ffmpeg-video/images/download.svg) ](https://bintray.com/tanersener/maven/mobile-ffmpeg-video/_latestVersion) | [ ![Download](https://api.bintray.com/packages/tanersener/maven/mobile-ffmpeg-full/images/download.svg) ](https://bintray.com/tanersener/maven/mobile-ffmpeg-full/_latestVersion) | [ ![Download](https://api.bintray.com/packages/tanersener/maven/mobile-ffmpeg-full-gpl/images/download.svg) ](https://bintray.com/tanersener/maven/mobile-ffmpeg-full-gpl/_latestVersion) |
There are eight different binary packages. Below you can see which system libraries and external libraries are enabled in each of them.
<sup>1</sup> - Supported since `v1.1`
<table>
<thead>
<tr>
<th align="center"></th>
<th align="center">min</th>
<th align="center">min-gpl</th>
<th align="center">https</th>
<th align="center">https-gpl</th>
<th align="center">audio</th>
<th align="center">video</th>
<th align="center">full</th>
<th align="center">full-gpl</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><sup>external libraries</sup></td>
<td align="center">-</td>
<td align="center"><sup>vid.stab</sup><br><sup>x264</sup><br><sup>x265</sup><br><sup>xvidcore</sup></td>
<td align="center"><sup>gmp</sup><br><sup>gnutls</sup></td>
<td align="center"><sup>gmp</sup><br><sup>gnutls</sup><br><sup>vid.stab</sup><br><sup>x264</sup><br><sup>x265</sup><br><sup>xvidcore</sup></td>
<td align="center"><sup>chromaprint</sup><br><sup>lame</sup><br><sup>libilbc</sup><br><sup>libvorbis</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>shine</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>twolame</sup><br><sup>wavpack</sup></td>
<td align="center"><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>kvazaar</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libtheora</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>snappy</sup></td>
<td align="center"><sup>chromaprint</sup><br><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>gmp</sup><br><sup>gnutls</sup><br><sup>kvazaar</sup><br><sup>lame</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libilbc</sup><br><sup>libtheora</sup><br><sup>libvorbis</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>libxml2</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>sdl</sup><br><sup>shine</sup><br><sup>snappy</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>tesseract</sup><br><sup>twolame</sup><br><sup>wavpack</sup></td>
<td align="center"><sup>chromaprint</sup><br><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>gmp</sup><br><sup>gnutls</sup><br><sup>kvazaar</sup><br><sup>lame</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libilbc</sup><br><sup>libtheora</sup><br><sup>libvorbis</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>libxml2</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>sdl</sup><br><sup>shine</sup><br><sup>snappy</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>tesseract</sup><br><sup>twolame</sup><br><sup>vid.stab</sup><br><sup>wavpack</sup><br><sup>x264</sup><br><sup>x265</sup><br><sup>xvidcore</sup></td>
</tr>
<tr>
<td align="center"><sup>android system libraries</sup></td>
<td align="center" colspan=8><sup>zlib</sup><br><sup>MediaCodec</sup></td>
</tr>
<tr>
<td align="center"><sup>ios system libraries</sup></td>
<td align="center" colspan=8><sup>zlib</sup><br><sup>AudioToolbox</sup><br><sup>AVFoundation</sup><br><sup>CoreImage</sup><br><sup>VideoToolbox</sup><br><sup>bzip2</sup></td>
</tr>
</tbody>
</table>
<sup>2</sup> - Supported since `v2.0`
- `libilbc`, `opus`, `snappy`, `x264` and `xvidcore` are supported since `v1.1`
<sup>3</sup> - Supported since `v2.1`
- `libaom` and `soxr` are supported since `v2.0`
- `chromaprint`, `vid.stab` and `x265` are supported since `v2.1`
- `sdl`, `tesseract`, `twolame` external libraries; `zlib`, `MediaCodec` Android system libraries; `bzip2`, `zlib` IOS system libraries and `AudioToolbox`, `CoreImage`, `VideoToolbox`, `AVFoundation` IOS system frameworks are supported since `v3.0`
#### 2.1 Android
1. Add MobileFFmpeg dependency from `jcenter()`
```
dependencies {`
implementation 'com.arthenica:mobile-ffmpeg-full:2.1'
implementation 'com.arthenica:mobile-ffmpeg-full:3.0'
}
```
@@ -62,23 +104,39 @@ There are eight different prebuilt packages. Below you can see which external li
```
import com.arthenica.mobileffmpeg.FFmpeg;
int rc = FFmpeg.execute("-i file1.mp4 -c:v mpeg4 file2.mp4");
FFmpeg.execute("-i file1.mp4 -c:v mpeg4 file2.mp4");
```
3. Check execution output.
```
int rc = FFmpeg.getLastReturnCode();
String output = FFmpeg.getLastCommandOutput();
if (rc == RETURN_CODE_SUCCESS) {
Log.i(Config.TAG, "Command execution completed successfully.");
} else if (rc == RETURN_CODE_CANCEL) {
Log.i(Config.TAG, "Command execution cancelled by user.");
} else {
Log.i(Config.TAG, String.format("Command execution failed with rc=%d.", rc));
Log.i(Config.TAG, String.format("Command execution failed with rc=%d and output=%s.", rc, output));
}
```
3. Stop an ongoing operation.
4. Stop an ongoing operation.
```
FFmpeg.cancel();
```
4. Enable log callback.
5. Get media information for a file.
```
MediaInformation info = FFmpeg.getMediaInformation('<file path or uri>');
```
6. List enabled external libraries.
```
List<String> externalLibraries = Config.getExternalLibraries();
```
7. Enable log callback.
```
Config.enableLogCallback(new LogCallback() {
public void apply(LogMessage message) {
@@ -87,7 +145,7 @@ There are eight different prebuilt packages. Below you can see which external li
});
```
5. Enable statistics callback.
8. Enable statistics callback.
```
Config.enableStatisticsCallback(new StatisticsCallback() {
public void apply(Statistics newStatistics) {
@@ -96,43 +154,59 @@ There are eight different prebuilt packages. Below you can see which external li
});
```
6. Set log level.
9. Set log level.
```
Config.setLogLevel(Level.AV_LOG_FATAL);
```
7. Register custom fonts directory.
10. Register custom fonts directory.
```
Config.setFontDirectory(this, "fonts", Collections.EMPTY_MAP);
Config.setFontDirectory(this, "<folder with fonts>", Collections.EMPTY_MAP);
```
#### 2.2 IOS
1. Add MobileFFmpeg pod to your `Podfile`
```
pod 'mobile-ffmpeg-full', '~> 2.1'
pod 'mobile-ffmpeg-full', '~> 3.0'
```
2. Create and execute commands.
2. Execute commands.
```
#import <mobileffmpeg/MobileFFmpeg.h>
int rc = [MobileFFmpeg execute: @"-i file1.mp4 -c:v mpeg4 file2.mp4"];
[MobileFFmpeg execute: @"-i file1.mp4 -c:v mpeg4 file2.mp4"];
```
3. Check execution output.
```
int rc = [MobileFFmpeg getLastReturnCode];
NSString *output = [MobileFFmpeg getLastCommandOutput];
if (rc == RETURN_CODE_SUCCESS) {
NSLog(@"Command execution completed successfully.\n");
} else if (rc == RETURN_CODE_CANCEL) {
NSLog(@"Command execution cancelled by user.\n");
} else {
NSLog(@"Command execution failed with rc=%d.\n", rc);
NSLog(@"Command execution failed with rc=%d and output=%@.\n", rc, output);
}
```
3. Stop an ongoing operation.
4. Stop an ongoing operation.
```
[MobileFFmpeg cancel];
```
4. Enable log callback.
5. Get media information for a file.
```
MediaInformation *mediaInformation = [MobileFFmpeg getMediaInformation:@"<file path or uri>"];
```
6. List enabled external libraries.
```
NASArray *externalLibraries = [MobileFFmpegConfig getExternalLibraries];
```
7. Enable log callback.
```
- (void)logCallback: (int)level :(NSString*)message {
dispatch_async(dispatch_get_main_queue(), ^{
@@ -143,7 +217,7 @@ There are eight different prebuilt packages. Below you can see which external li
[MobileFFmpegConfig setLogDelegate:self];
```
5. Enable statistics callback.
8. Enable statistics callback.
```
- (void)statisticsCallback:(Statistics *)newStatistics {
dispatch_async(dispatch_get_main_queue(), ^{
@@ -154,19 +228,23 @@ There are eight different prebuilt packages. Below you can see which external li
[MobileFFmpegConfig setStatisticsDelegate:self];
```
6. Set log level.
9. Set log level.
```
[MobileFFmpegConfig setLogLevel:AV_LOG_FATAL];
```
7. Register custom fonts directory.
10. Register custom fonts directory.
```
[MobileFFmpegConfig setFontDirectory:@"fonts" with:nil];
[MobileFFmpegConfig setFontDirectory:@"<folder with fonts>" with:nil];
```
#### 2.3 Test Application
You can see how MobileFFmpeg is used inside an application by running test applications provided.
There is an Android test application under the `android/test-app` folder and an IOS test application under the `ios/test-app` folder. Both applications are identical and supports command execution, video encoding, accessing https, encoding audio, burning subtitles and video stabilization.
There is an Android test application under the `android/test-app` folder and an IOS test application, which requires
`Xcode 9.x` or later, under the `ios/test-app` folder. Both applications are identical and supports command
execution, video encoding, accessing https, encoding audio, burning subtitles and video stabilization.
<img src="https://github.com/tanersener/mobile-ffmpeg/blob/master/docs/assets/ios_test_app.gif" width="240">
### 3. Versions
@@ -174,6 +252,8 @@ There is an Android test application under the `android/test-app` folder and an
- `MobileFFmpeg v2.x` is the current stable, includes `FFmpeg v4.0.2`
- `MobileFFmpeg v3.x` is the next stable, includes `FFmpeg v4.1-dev-1517`
### 4. Building
#### 4.1 Prerequisites
1. Use your package manager (apt, yum, dnf, brew, etc.) to install the following packages.
@@ -187,12 +267,12 @@ Please visit [Android Prerequisites](https://github.com/tanersener/mobile-ffmpeg
2. Android builds require these additional packages.
- **Android SDK 5.0 Lollipop (API Level 21)** or later
- **Android NDK r16b** or later with LLDB and CMake
- **Android NDK r17c** or later with LLDB and CMake
- **gradle 4.4** or later
3. IOS builds need these extra packages and tools.
- **IOS SDK 7.0.x** or later
- **Xcode 8.x** or later
- **IOS SDK 8.0.x** or later
- **Xcode 7.3.1** or later
- **Command Line Tools**
#### 4.2 Build Scripts
@@ -255,4 +335,3 @@ If you have any recommendations or ideas to improve it, please feel free to subm
- [FFmpeg Wiki](https://trac.ffmpeg.org/wiki/WikiStart)
- [FFmpeg License and Legal Considerations](https://ffmpeg.org/legal.html)
- [FFmpeg External Library Licenses](https://www.ffmpeg.org/doxygen/4.0/md_LICENSE.html)
+56 -23
View File
@@ -36,22 +36,27 @@ LIBRARY_SNAPPY=24
LIBRARY_SOXR=25
LIBRARY_LIBAOM=26
LIBRARY_CHROMAPRINT=27
LIBRARY_GIFLIB=28
LIBRARY_JPEG=29
LIBRARY_LIBOGG=30
LIBRARY_LIBPNG=31
LIBRARY_LIBUUID=32
LIBRARY_NETTLE=33
LIBRARY_TIFF=34
LIBRARY_EXPAT=35
LIBRARY_ZLIB=36
LIBRARY_MEDIA_CODEC=37
LIBRARY_TWOLAME=28
LIBRARY_SDL=29
LIBRARY_TESSERACT=30
LIBRARY_GIFLIB=31
LIBRARY_JPEG=32
LIBRARY_LIBOGG=33
LIBRARY_LIBPNG=34
LIBRARY_LIBUUID=35
LIBRARY_NETTLE=36
LIBRARY_TIFF=37
LIBRARY_EXPAT=38
LIBRARY_SNDFILE=39
LIBRARY_LEPTONICA=40
LIBRARY_ZLIB=41
LIBRARY_MEDIA_CODEC=42
# ENABLE ARCH
ENABLED_ARCHITECTURES=(1 1 1 1 1)
# ENABLE LIBRARIES
ENABLED_LIBRARIES=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
ENABLED_LIBRARIES=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
export BASEDIR=$(pwd)
@@ -82,7 +87,8 @@ When compilation ends an Android Archive (AAR) file is created with enabled plat
echo -e " -h, --help\t\t\tdisplay this help and exit"
echo -e " -V, --version\t\t\tdisplay version information and exit"
echo -e " -d, --debug\t\t\tbuild with debug information\n"
echo -e " -d, --debug\t\t\tbuild with debug information"
echo -e " -S, --speed\t\t\toptimize for speed instead of size\n"
echo -e "Licensing options:"
@@ -99,8 +105,8 @@ When compilation ends an Android Archive (AAR) file is created with enabled plat
echo -e "Libraries:"
echo -e " --full\t\t\tenables all external libraries"
echo -e " --enable-android-media-codec\tbuild with built-in Android MediaCodec [no]"
echo -e " --enable-android-zlib\t\tbuild with built-in zlib [no]"
echo -e " --enable-android-media-codec\tbuild with built-in Android MediaCodec support[no]"
echo -e " --enable-android-zlib\t\tbuild with built-in zlib support[no]"
echo -e " --enable-chromaprint\t\tbuild with chromaprint [no]"
echo -e " --enable-fontconfig\t\tbuild with fontconfig [no]"
echo -e " --enable-freetype\t\tbuild with freetype [no]"
@@ -120,10 +126,13 @@ When compilation ends an Android Archive (AAR) file is created with enabled plat
echo -e " --enable-libxml2\t\tbuild with libxml2 [no]"
echo -e " --enable-opencore-amr\t\tbuild with opencore-amr [no]"
echo -e " --enable-opus\t\t\tbuild with opus [no]"
echo -e " --enable-sdl\t\t\tbuild with sdl [no]"
echo -e " --enable-shine\t\tbuild with shine [no]"
echo -e " --enable-snappy\t\tbuild with snappy [no]"
echo -e " --enable-soxr\t\t\tbuild with soxr [no]"
echo -e " --enable-speex\t\tbuild with speex [no]"
echo -e " --enable-tesseract\t\tbuild with tesseract [no]"
echo -e " --enable-twolame\t\tbuild with twolame [no]"
echo -e " --enable-wavpack\t\tbuild with wavpack [no]\n"
echo -e "GPL libraries:"
@@ -162,6 +171,10 @@ enable_debug() {
export MOBILE_FFMPEG_DEBUG="-d"
}
optimize_for_speed() {
export MOBILE_FFMPEG_OPTIMIZED_FOR_SPEED="1"
}
reconf_library() {
RECONF_VARIABLE=$(echo "RECONF_$1" | sed "s/\-/\_/g")
@@ -275,6 +288,9 @@ set_library() {
opus)
ENABLED_LIBRARIES[LIBRARY_OPUS]=$2
;;
sdl)
ENABLED_LIBRARIES[LIBRARY_SDL]=$2
;;
shine)
ENABLED_LIBRARIES[LIBRARY_SHINE]=$2
;;
@@ -288,6 +304,20 @@ set_library() {
speex)
ENABLED_LIBRARIES[LIBRARY_SPEEX]=$2
;;
tesseract)
ENABLED_LIBRARIES[LIBRARY_TESSERACT]=$2
ENABLED_LIBRARIES[LIBRARY_LEPTONICA]=$2
ENABLED_LIBRARIES[LIBRARY_LIBWEBP]=$2
ENABLED_LIBRARIES[LIBRARY_GIFLIB]=$2
ENABLED_LIBRARIES[LIBRARY_JPEG]=$2
ENABLED_LIBRARIES[LIBRARY_ZLIB]=$2
set_library "tiff" $2
set_library "libpng" $2
;;
twolame)
ENABLED_LIBRARIES[LIBRARY_TWOLAME]=$2
ENABLED_LIBRARIES[LIBRARY_SNDFILE]=$2
;;
wavpack)
ENABLED_LIBRARIES[LIBRARY_WAVPACK]=$2
;;
@@ -300,16 +330,16 @@ set_library() {
xvidcore)
ENABLED_LIBRARIES[LIBRARY_XVIDCORE]=$2
;;
tiff)
ENABLED_LIBRARIES[LIBRARY_TIFF]=$2
ENABLED_LIBRARIES[LIBRARY_JPEG]=$2
expat | giflib | jpeg | leptonica | libogg | libpng | libsndfile | libuuid)
# THESE LIBRARIES ARE NOT ENABLED DIRECTLY
;;
nettle)
ENABLED_LIBRARIES[LIBRARY_NETTLE]=$2
set_library "gmp" $2
;;
giflib | jpeg | libogg | libpng | libuuid | expat)
# THESE LIBRARIES ARE NOT ENABLED DIRECTLY
tiff)
ENABLED_LIBRARIES[LIBRARY_TIFF]=$2
ENABLED_LIBRARIES[LIBRARY_JPEG]=$2
;;
*)
print_unknown_library $1
@@ -387,7 +417,7 @@ print_enabled_libraries() {
let enabled=0;
# FIRST BUILT-IN LIBRARIES
for library in {36..37}
for library in {41..42}
do
if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then
if [[ ${enabled} -ge 1 ]]; then
@@ -399,7 +429,7 @@ print_enabled_libraries() {
done
# THEN EXTERNAL LIBRARIES
for library in {0..27}
for library in {0..30}
do
if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then
if [[ ${enabled} -ge 1 ]]; then
@@ -459,6 +489,9 @@ do
-d | --debug)
enable_debug
;;
-S | --speed)
optimize_for_speed
;;
--reconf-*)
CONF_LIBRARY=`echo $1 | sed -e 's/^--[A-Za-z]*-//g'`
@@ -470,7 +503,7 @@ do
rebuild_library ${BUILD_LIBRARY}
;;
--full)
for library in {0..37}
for library in {0..42}
do
if [[ $library -ne 18 ]] && [[ $library -ne 19 ]] && [[ $library -ne 20 ]] && [[ $library -ne 21 ]]; then
enable_library $(get_library_name $library)
@@ -563,7 +596,7 @@ do
. ${BASEDIR}/build/main-android.sh "${ENABLED_LIBRARIES[@]}" || exit 1
# CLEAR FLAGS
for library in {1..38}
for library in {1..43}
do
library_name=$(get_library_name $((library - 1)))
unset $(echo "OK_${library_name}" | sed "s/\-/\_/g")
+1 -1
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MobileFFmpeg Android API"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 2.1
PROJECT_NUMBER = 3.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
+6 -2
View File
@@ -5,8 +5,8 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 27
versionCode 21
versionName "2.1"
versionCode 30
versionName "3.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
project.archivesBaseName = "mobile-ffmpeg"
}
@@ -23,6 +23,10 @@ android {
}
}
testOptions {
unitTests.returnDefaultValues = true
}
libraryVariants.all { variant ->
variant.outputs.all { output ->
if (outputFile != null && outputFileName.endsWith('.aar')) {
+26 -2
View File
@@ -1026,7 +1026,7 @@ static int init_report(const char *env)
av_free(key);
}
av_bprint_init(&filename, 0, 1);
av_bprint_init(&filename, 0, AV_BPRINT_SIZE_AUTOMATIC);
expand_filename_template(&filename,
av_x_if_null(filename_template, "%p-%t.log"), tm);
av_free(filename_template);
@@ -1420,6 +1420,16 @@ static void print_codec(const AVCodec *c)
AV_CODEC_CAP_SLICE_THREADS |
AV_CODEC_CAP_AUTO_THREADS))
printf("threads ");
if (c->capabilities & AV_CODEC_CAP_AVOID_PROBING)
printf("avoidprobe ");
if (c->capabilities & AV_CODEC_CAP_INTRA_ONLY)
printf("intraonly ");
if (c->capabilities & AV_CODEC_CAP_LOSSLESS)
printf("lossless ");
if (c->capabilities & AV_CODEC_CAP_HARDWARE)
printf("hardware ");
if (c->capabilities & AV_CODEC_CAP_HYBRID)
printf("hybrid ");
if (!c->capabilities)
printf("none");
printf("\n");
@@ -1440,6 +1450,17 @@ static void print_codec(const AVCodec *c)
printf("\n");
}
if (avcodec_get_hw_config(c, 0)) {
printf(" Supported hardware devices: ");
for (int i = 0;; i++) {
const AVCodecHWConfig *config = avcodec_get_hw_config(c, i);
if (!config)
break;
printf("%s ", av_hwdevice_get_type_name(config->device_type));
}
printf("\n");
}
if (c->supported_framerates) {
const AVRational *fps = c->supported_framerates;
@@ -1941,7 +1962,10 @@ static void show_help_bsf(const char *name)
{
const AVBitStreamFilter *bsf = av_bsf_get_by_name(name);
if (!bsf) {
if (!name) {
av_log(NULL, AV_LOG_ERROR, "No bitstream filter name specified.\n");
return;
} else if (!bsf) {
av_log(NULL, AV_LOG_ERROR, "Unknown bit stream filter '%s'.\n", name);
return;
}
+90 -27
View File
@@ -140,8 +140,14 @@ const char *const forced_keyframes_const_names[] = {
NULL
};
typedef struct BenchmarkTimeStamps {
int64_t real_usec;
int64_t user_usec;
int64_t sys_usec;
} BenchmarkTimeStamps;
static void do_video_stats(OutputStream *ost, int frame_size);
static int64_t getutime(void);
static BenchmarkTimeStamps get_benchmark_time_stamps(void);
static int64_t getmaxrss(void);
static int ifilter_has_all_input_formats(FilterGraph *fg);
@@ -153,7 +159,7 @@ static int64_t decode_error_stat[2];
static int want_sdp = 1;
static int current_time;
static BenchmarkTimeStamps current_time;
AVIOContext *progress_avio = NULL;
static uint8_t *subtitle_out;
@@ -676,7 +682,7 @@ static void abort_codec_experimental(AVCodec *c, int encoder)
static void update_benchmark(const char *fmt, ...)
{
if (do_benchmark_all) {
int64_t t = getutime();
BenchmarkTimeStamps t = get_benchmark_time_stamps();
va_list va;
char buf[1024];
@@ -684,7 +690,11 @@ static void update_benchmark(const char *fmt, ...)
va_start(va, fmt);
vsnprintf(buf, sizeof(buf), fmt, va);
va_end(va);
av_log(NULL, AV_LOG_INFO, "bench: %8"PRIu64" %s \n", t - current_time, buf);
av_log(NULL, AV_LOG_INFO,
"bench: %8" PRIu64 " user %8" PRIu64 " sys %8" PRIu64 " real %s \n",
t.user_usec - current_time.user_usec,
t.sys_usec - current_time.sys_usec,
t.real_usec - current_time.real_usec, buf);
}
current_time = t;
}
@@ -737,11 +747,11 @@ static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int u
if (ret < 0)
exit_program(1);
}
ret = av_packet_ref(&tmp_pkt, pkt);
ret = av_packet_make_refcounted(pkt);
if (ret < 0)
exit_program(1);
av_packet_move_ref(&tmp_pkt, pkt);
av_fifo_generic_write(ost->muxing_queue, &tmp_pkt, sizeof(tmp_pkt), NULL);
av_packet_unref(pkt);
return;
}
@@ -785,7 +795,7 @@ static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int u
- FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1)
- FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1);
}
if ((st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) &&
if ((st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO || st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) &&
pkt->dts != AV_NOPTS_VALUE &&
!(st->codecpar->codec_id == AV_CODEC_ID_VP9 && ost->stream_copy) &&
ost->last_mux_dts != AV_NOPTS_VALUE) {
@@ -1134,7 +1144,7 @@ static void do_video_out(OutputFile *of,
format_video_sync != VSYNC_PASSTHROUGH &&
format_video_sync != VSYNC_DROP) {
if (delta0 < -0.6) {
av_log(NULL, AV_LOG_WARNING, "Past duration %f too large\n", -delta0);
av_log(NULL, AV_LOG_VERBOSE, "Past duration %f too large\n", -delta0);
} else
av_log(NULL, AV_LOG_DEBUG, "Clipping frame in rate conversion by %f\n", -delta0);
sync_ipts = ost->sync_opts;
@@ -1249,8 +1259,12 @@ static void do_video_out(OutputFile *of,
in_picture->quality = enc->global_quality;
in_picture->pict_type = 0;
if (ost->forced_kf_ref_pts == AV_NOPTS_VALUE &&
in_picture->pts != AV_NOPTS_VALUE)
ost->forced_kf_ref_pts = in_picture->pts;
pts_time = in_picture->pts != AV_NOPTS_VALUE ?
in_picture->pts * av_q2d(enc->time_base) : NAN;
(in_picture->pts - ost->forced_kf_ref_pts) * av_q2d(enc->time_base) : NAN;
if (ost->forced_kf_index < ost->forced_kf_count &&
in_picture->pts >= ost->forced_kf_pts[ost->forced_kf_index]) {
ost->forced_kf_index++;
@@ -1783,7 +1797,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
vid = 0;
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_AUTOMATIC);
av_bprint_init(&buf_script, 0, 1);
av_bprint_init(&buf_script, 0, AV_BPRINT_SIZE_AUTOMATIC);
for (i = 0; i < nb_output_streams; i++) {
float q = -1;
ost = output_streams[i];
@@ -1804,7 +1818,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
av_bprintf(&buf, "frame=%5d fps=%3.*f q=%3.1f ",
frame_number, fps < 9.95, fps, q);
av_bprintf(&buf_script, "frame=%d\n", frame_number);
av_bprintf(&buf_script, "fps=%.1f\n", fps);
av_bprintf(&buf_script, "fps=%.2f\n", fps);
av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n",
ost->file_index, ost->index, q);
if (is_last_report)
@@ -1888,9 +1902,11 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
if (total_size < 0) av_bprintf(&buf_script, "total_size=N/A\n");
else av_bprintf(&buf_script, "total_size=%"PRId64"\n", total_size);
if (pts == AV_NOPTS_VALUE) {
av_bprintf(&buf_script, "out_time_us=N/A\n");
av_bprintf(&buf_script, "out_time_ms=N/A\n");
av_bprintf(&buf_script, "out_time=N/A\n");
} else {
av_bprintf(&buf_script, "out_time_us=%"PRId64"\n", pts);
av_bprintf(&buf_script, "out_time_ms=%"PRId64"\n", pts);
av_bprintf(&buf_script, "out_time=%s%02d:%02d:%02d.%06d\n",
hours_sign, hours, mins, secs, us);
@@ -2202,10 +2218,12 @@ static void check_decode_result(InputStream *ist, int *got_output, int ret)
if (ret < 0 && exit_on_error)
exit_program(1);
if (exit_on_error && *got_output && ist) {
if (*got_output && ist) {
if (ist->decoded_frame->decode_error_flags || (ist->decoded_frame->flags & AV_FRAME_FLAG_CORRUPT)) {
av_log(NULL, AV_LOG_FATAL, "%s: corrupt decoded frame in stream %d\n", input_files[ist->file_index]->ctx->url, ist->st->index);
exit_program(1);
av_log(NULL, exit_on_error ? AV_LOG_FATAL : AV_LOG_WARNING,
"%s: corrupt decoded frame in stream %d\n", input_files[ist->file_index]->ctx->url, ist->st->index);
if (exit_on_error)
exit_program(1);
}
}
}
@@ -2808,6 +2826,7 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
ist->dts = ist->next_dts;
switch (ist->dec_ctx->codec_type) {
case AVMEDIA_TYPE_AUDIO:
av_assert1(pkt->duration >= 0);
if (ist->dec_ctx->sample_rate) {
ist->next_dts += ((int64_t)AV_TIME_BASE * ist->dec_ctx->frame_size) /
ist->dec_ctx->sample_rate;
@@ -3167,7 +3186,13 @@ static int init_output_stream_streamcopy(OutputStream *ost)
"Error setting up codec context options.\n");
return ret;
}
avcodec_parameters_from_context(par_src, ost->enc_ctx);
ret = avcodec_parameters_from_context(par_src, ost->enc_ctx);
if (ret < 0) {
av_log(NULL, AV_LOG_FATAL,
"Error getting reference codec parameters.\n");
return ret;
}
if (!codec_tag) {
unsigned int codec_tag_tmp;
@@ -3495,6 +3520,12 @@ static int init_output_stream_encode(OutputStream *ost)
enc_ctx->bits_per_raw_sample = frame_bits_per_raw_sample;
}
if (ost->top_field_first == 0) {
enc_ctx->field_order = AV_FIELD_BB;
} else if (ost->top_field_first == 1) {
enc_ctx->field_order = AV_FIELD_TT;
}
if (ost->forced_keyframes) {
if (!strncmp(ost->forced_keyframes, "expr:", 5)) {
ret = av_expr_parse(&ost->forced_keyframes_pexpr, ost->forced_keyframes+5,
@@ -3581,6 +3612,23 @@ static int init_output_stream(OutputStream *ost, char *error, int error_len)
return ret;
}
}
if (ist && ist->dec->type == AVMEDIA_TYPE_SUBTITLE && ost->enc->type == AVMEDIA_TYPE_SUBTITLE) {
int input_props = 0, output_props = 0;
AVCodecDescriptor const *input_descriptor =
avcodec_descriptor_get(dec->codec_id);
AVCodecDescriptor const *output_descriptor =
avcodec_descriptor_get(ost->enc_ctx->codec_id);
if (input_descriptor)
input_props = input_descriptor->props & (AV_CODEC_PROP_TEXT_SUB | AV_CODEC_PROP_BITMAP_SUB);
if (output_descriptor)
output_props = output_descriptor->props & (AV_CODEC_PROP_TEXT_SUB | AV_CODEC_PROP_BITMAP_SUB);
if (input_props && output_props && input_props != output_props) {
snprintf(error, error_len,
"Subtitle encoding currently only possible from text to text "
"or bitmap to bitmap");
return AVERROR_INVALIDDATA;
}
}
if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) < 0) {
if (ret == AVERROR_EXPERIMENTAL)
@@ -4416,9 +4464,11 @@ static int process_input(int file_index)
if (ist->discard)
goto discard_packet;
if (exit_on_error && (pkt.flags & AV_PKT_FLAG_CORRUPT)) {
av_log(NULL, AV_LOG_FATAL, "%s: corrupt input packet in stream %d\n", is->url, pkt.stream_index);
exit_program(1);
if (pkt.flags & AV_PKT_FLAG_CORRUPT) {
av_log(NULL, exit_on_error ? AV_LOG_FATAL : AV_LOG_WARNING,
"%s: corrupt input packet in stream %d\n", is->url, pkt.stream_index);
if (exit_on_error)
exit_program(1);
}
if (debug_ts) {
@@ -4853,23 +4903,30 @@ static int transcode(void)
return ret;
}
static int64_t getutime(void)
static BenchmarkTimeStamps get_benchmark_time_stamps(void)
{
BenchmarkTimeStamps time_stamps = { av_gettime_relative() };
#if HAVE_GETRUSAGE
struct rusage rusage;
getrusage(RUSAGE_SELF, &rusage);
return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
time_stamps.user_usec =
(rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
time_stamps.sys_usec =
(rusage.ru_stime.tv_sec * 1000000LL) + rusage.ru_stime.tv_usec;
#elif HAVE_GETPROCESSTIMES
HANDLE proc;
FILETIME c, e, k, u;
proc = GetCurrentProcess();
GetProcessTimes(proc, &c, &e, &k, &u);
return ((int64_t) u.dwHighDateTime << 32 | u.dwLowDateTime) / 10;
time_stamps.user_usec =
((int64_t)u.dwHighDateTime << 32 | u.dwLowDateTime) / 10;
time_stamps.sys_usec =
((int64_t)k.dwHighDateTime << 32 | k.dwLowDateTime) / 10;
#else
return av_gettime_relative();
time_stamps.user_usec = time_stamps.sys_usec = 0;
#endif
return time_stamps;
}
static int64_t getmaxrss(void)
@@ -4937,7 +4994,7 @@ void cancel_operation()
int execute(int argc, char **argv)
{
int i, ret;
int64_t ti;
BenchmarkTimeStamps ti;
int savedCode = setjmp(ex_buf__);
if (savedCode == 0) {
@@ -4994,12 +5051,18 @@ int execute(int argc, char **argv)
want_sdp = 0;
}
current_time = ti = getutime();
current_time = ti = get_benchmark_time_stamps();
if (transcode() < 0)
exit_program(1);
ti = getutime() - ti;
if (do_benchmark) {
av_log(NULL, AV_LOG_INFO, "bench: utime=%0.3fs\n", ti / 1000000.0);
int64_t utime, stime, rtime;
current_time = get_benchmark_time_stamps();
utime = current_time.user_usec - ti.user_usec;
stime = current_time.sys_usec - ti.sys_usec;
rtime = current_time.real_usec - ti.real_usec;
av_log(NULL, AV_LOG_INFO,
"bench: utime=%0.3fs stime=%0.3fs rtime=%0.3fs\n",
utime / 1000000.0, stime / 1000000.0, rtime / 1000000.0);
}
av_log(NULL, AV_LOG_DEBUG, "%"PRIu64" frames successfully decoded, %"PRIu64" decoding errors\n",
decode_error_stat[0], decode_error_stat[1]);
@@ -496,6 +496,7 @@ typedef struct OutputStream {
AVRational frame_aspect_ratio;
/* forced key frames */
int64_t forced_kf_ref_pts;
int64_t *forced_kf_pts;
int forced_kf_count;
int forced_kf_index;
@@ -73,6 +73,7 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx, AVCod
if (codec && codec->pix_fmts) {
const enum AVPixelFormat *p = codec->pix_fmts;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(target);
//FIXME: This should check for AV_PIX_FMT_FLAG_ALPHA after PAL8 pixel format without alpha is implemented
int has_alpha = desc ? desc->nb_components % 2 == 0 : 0;
enum AVPixelFormat best= AV_PIX_FMT_NONE;
@@ -782,7 +783,7 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
sar = ifilter->sample_aspect_ratio;
if(!sar.den)
sar = (AVRational){0,1};
av_bprint_init(&args, 0, 1);
av_bprint_init(&args, 0, AV_BPRINT_SIZE_AUTOMATIC);
av_bprintf(&args,
"video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:"
"pixel_aspect=%d/%d:sws_param=flags=%d",
+36 -4
View File
@@ -910,13 +910,14 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
static void assert_file_overwrite(const char *filename)
{
const char *proto_name = avio_find_protocol_name(filename);
if (file_overwrite && no_file_overwrite) {
fprintf(stderr, "Error, both -y and -n supplied. Exiting.\n");
exit_program(1);
}
if (!file_overwrite) {
const char *proto_name = avio_find_protocol_name(filename);
if (proto_name && !strcmp(proto_name, "file") && avio_check(filename, 0) == 0) {
if (stdin_interaction && !no_file_overwrite) {
fprintf(stderr,"File '%s' already exists. Overwrite ? [y/N] ", filename);
@@ -935,6 +936,19 @@ static void assert_file_overwrite(const char *filename)
}
}
}
if (proto_name && !strcmp(proto_name, "file")) {
for (int i = 0; i < nb_input_files; i++) {
InputFile *file = input_files[i];
if (file->ctx->iformat->flags & AVFMT_NOFILE)
continue;
if (!strcmp(filename, file->ctx->url)) {
av_log(NULL, AV_LOG_FATAL, "Output %s same as Input #%d - exiting\n", filename, i);
av_log(NULL, AV_LOG_WARNING, "FFmpeg cannot edit existing files in-place.\n");
exit_program(1);
}
}
}
}
static void dump_attachment(AVStream *st, const char *filename)
@@ -1113,9 +1127,22 @@ static int open_input_file(OptionsContext *o, const char *filename)
}
}
if (o->start_time != AV_NOPTS_VALUE && o->start_time_eof != AV_NOPTS_VALUE) {
av_log(NULL, AV_LOG_WARNING, "Cannot use -ss and -sseof both, using -ss for %s\n", filename);
o->start_time_eof = AV_NOPTS_VALUE;
}
if (o->start_time_eof != AV_NOPTS_VALUE) {
if (ic->duration>0) {
if (o->start_time_eof >= 0) {
av_log(NULL, AV_LOG_ERROR, "-sseof value must be negative; aborting\n");
exit_program(1);
}
if (ic->duration > 0) {
o->start_time = o->start_time_eof + ic->duration;
if (o->start_time < 0) {
av_log(NULL, AV_LOG_WARNING, "-sseof value seeks to before start of file %s; ignored\n", filename);
o->start_time = AV_NOPTS_VALUE;
}
} else
av_log(NULL, AV_LOG_WARNING, "Cannot use -sseof, duration of %s not known\n", filename);
}
@@ -1132,8 +1159,10 @@ static int open_input_file(OptionsContext *o, const char *filename)
int dts_heuristic = 0;
for (i=0; i<ic->nb_streams; i++) {
const AVCodecParameters *par = ic->streams[i]->codecpar;
if (par->video_delay)
if (par->video_delay) {
dts_heuristic = 1;
break;
}
}
if (dts_heuristic) {
seek_timestamp -= 3*AV_TIME_BASE / 23;
@@ -1334,6 +1363,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
ost->file_index = nb_output_files - 1;
ost->index = idx;
ost->st = st;
ost->forced_kf_ref_pts = AV_NOPTS_VALUE;
st->codecpar->codec_type = type;
ret = choose_encoder(o, oc, ost);
@@ -3167,7 +3197,9 @@ void show_help_default(const char *opt, const char *arg)
#if CONFIG_SWSCALE
show_help_children(sws_get_class(), flags);
#endif
#if CONFIG_SWRESAMPLE
show_help_children(swr_get_class(), AV_OPT_FLAG_AUDIO_PARAM);
#endif
show_help_children(avfilter_get_class(), AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM);
show_help_children(av_bsf_get_class(), AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_BSF_PARAM);
}
@@ -3347,7 +3379,7 @@ const OptionDef options[] = {
OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(start_time) },
"set the start time offset", "time_off" },
{ "sseof", HAS_ARG | OPT_TIME | OPT_OFFSET |
OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(start_time_eof) },
OPT_INPUT, { .off = OFFSET(start_time_eof) },
"set the start time offset relative to EOF", "time_off" },
{ "seek_timestamp", HAS_ARG | OPT_INT | OPT_OFFSET |
OPT_INPUT, { .off = OFFSET(seek_timestamp) },
+551 -23
View File
@@ -17,24 +17,443 @@
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CHANGES 10.2018
* --------------------------------------------------------
* - getBuildConf method added
*
* CHANGES 09.2018
* --------------------------------------------------------
* - Merged with mobileffmpeg_config
*
* CHANGES 08.2018
* --------------------------------------------------------
* - Copied methods with avutil_log_ prefix from libavutil/log.c
*/
#include <pthread.h>
#include "config.h"
#include "libavutil/bprint.h"
#include "mobileffmpeg.h"
#include "fftools_ffmpeg.h"
#include "mobileffmpeg.h"
/** Callback data structure */
struct CallbackData {
int type; // 1 (log callback) or 2 (statistics callback)
int logLevel; // log level
char *logData; // log data
int statisticsFrameNumber; // statistics frame number
float statisticsFps; // statistics fps
float statisticsQuality; // statistics quality
int64_t statisticsSize; // statistics size
int statisticsTime; // statistics time
double statisticsBitrate; // statistics bitrate
double statisticsSpeed; // statistics speed
struct CallbackData *next;
};
/** Redirection control variables */
pthread_mutex_t lockMutex;
pthread_mutex_t monitorMutex;
pthread_cond_t monitorCondition;
pthread_t callbackThread;
int redirectionEnabled;
struct CallbackData *callbackDataHead;
struct CallbackData *callbackDataTail;
/** Global reference to the virtual machine running */
static JavaVM *globalVm;
/** Global reference of Config class in Java */
static jclass configClass;
/** Global reference of log redirection method in Java */
static jmethodID logMethod;
/** Global reference of statistics redirection method in Java */
static jmethodID statisticsMethod;
/** Full name of the Config class */
const char *configClassName = "com/arthenica/mobileffmpeg/Config";
/** Prototypes of native functions defined by Config class. */
JNINativeMethod configMethods[] = {
{"enableNativeRedirection", "()V", (void*) Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection},
{"disableNativeRedirection", "()V", (void*) Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection},
{"setNativeLogLevel", "(I)V", (void*) Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel},
{"getNativeLogLevel", "()I", (void*) Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel},
{"getNativeFFmpegVersion", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_Config_getNativeFFmpegVersion},
{"getNativeVersion", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_Config_getNativeVersion},
{"nativeExecute", "([Ljava/lang/String;)I", (void*) Java_com_arthenica_mobileffmpeg_Config_nativeExecute},
{"nativeCancel", "()V", (void*) Java_com_arthenica_mobileffmpeg_Config_nativeCancel},
{"getNativeBuildConf", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_Config_getNativeBuildConf}
};
/** Forward declaration for function defined in fftools_ffmpeg.c */
int execute(int argc, char **argv);
/** Full name of the FFmpeg class */
const char *ffmpegClassName = "com/arthenica/mobileffmpeg/FFmpeg";
/** DEFINES LINE SIZE USED FOR LOGGING */
#define LOG_LINE_SIZE 1024
/** Prototypes of native functions defined by FFmpeg class. */
JNINativeMethod ffmpegMethods[] = {
{"getFFmpegVersion", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_FFmpeg_getFFmpegVersion},
{"getVersion", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_FFmpeg_getVersion},
{"execute", "([Ljava/lang/String;)I", (void*) Java_com_arthenica_mobileffmpeg_FFmpeg_execute}
};
static const char *avutil_log_get_level_str(int level) {
switch (level) {
case AV_LOG_QUIET:
return "quiet";
case AV_LOG_DEBUG:
return "debug";
case AV_LOG_VERBOSE:
return "verbose";
case AV_LOG_INFO:
return "info";
case AV_LOG_WARNING:
return "warning";
case AV_LOG_ERROR:
return "error";
case AV_LOG_FATAL:
return "fatal";
case AV_LOG_PANIC:
return "panic";
default:
return "";
}
}
static void avutil_log_format_line(void *avcl, int level, const char *fmt, va_list vl, AVBPrint part[4], int *print_prefix) {
int flags = av_log_get_flags();
AVClass* avc = avcl ? *(AVClass **) avcl : NULL;
av_bprint_init(part+0, 0, 1);
av_bprint_init(part+1, 0, 1);
av_bprint_init(part+2, 0, 1);
av_bprint_init(part+3, 0, 65536);
if (*print_prefix && avc) {
if (avc->parent_log_context_offset) {
AVClass** parent = *(AVClass ***) (((uint8_t *) avcl) +
avc->parent_log_context_offset);
if (parent && *parent) {
av_bprintf(part+0, "[%s @ %p] ",
(*parent)->item_name(parent), parent);
}
}
av_bprintf(part+1, "[%s @ %p] ",
avc->item_name(avcl), avcl);
}
if (*print_prefix && (level > AV_LOG_QUIET) && (flags & AV_LOG_PRINT_LEVEL))
av_bprintf(part+2, "[%s] ", avutil_log_get_level_str(level));
av_vbprintf(part+3, fmt, vl);
if(*part[0].str || *part[1].str || *part[2].str || *part[3].str) {
char lastc = part[3].len && part[3].len <= part[3].size ? part[3].str[part[3].len - 1] : 0;
*print_prefix = lastc == '\n' || lastc == '\r';
}
}
static void avutil_log_sanitize(uint8_t *line) {
while(*line){
if(*line < 0x08 || (*line > 0x0D && *line < 0x20))
*line='?';
line++;
}
}
void mutexInit() {
pthread_mutexattr_t attributes;
pthread_mutexattr_init(&attributes);
pthread_mutexattr_settype(&attributes, PTHREAD_MUTEX_RECURSIVE_NP);
pthread_mutex_init(&lockMutex, &attributes);
pthread_mutexattr_destroy(&attributes);
}
void monitorInit() {
pthread_mutexattr_t attributes;
pthread_mutexattr_init(&attributes);
pthread_mutexattr_settype(&attributes, PTHREAD_MUTEX_RECURSIVE_NP);
pthread_condattr_t cattributes;
pthread_condattr_init(&cattributes);
pthread_condattr_setpshared(&cattributes, PTHREAD_PROCESS_PRIVATE);
pthread_mutex_init(&monitorMutex, &attributes);
pthread_mutexattr_destroy(&attributes);
pthread_cond_init(&monitorCondition, &cattributes);
pthread_condattr_destroy(&cattributes);
}
void mutexUnInit() {
pthread_mutex_destroy(&lockMutex);
}
void monitorUnInit() {
pthread_mutex_destroy(&monitorMutex);
pthread_cond_destroy(&monitorCondition);
}
void mutexLock() {
pthread_mutex_lock(&lockMutex);
}
void mutexUnlock() {
pthread_mutex_unlock(&lockMutex);
}
void monitorWait(int milliSeconds) {
struct timeval tp;
struct timespec ts;
int rc;
rc = gettimeofday(&tp, NULL);
if (rc) {
return;
}
ts.tv_sec = tp.tv_sec;
ts.tv_nsec = tp.tv_usec * 1000;
ts.tv_sec += milliSeconds / 1000;
ts.tv_nsec += (milliSeconds % 1000)*1000000;
pthread_mutex_lock(&monitorMutex);
pthread_cond_timedwait(&monitorCondition, &monitorMutex, &ts);
pthread_mutex_unlock(&monitorMutex);
}
void monitorNotify() {
pthread_mutex_lock(&monitorMutex);
pthread_cond_signal(&monitorCondition);
pthread_mutex_unlock(&monitorMutex);
}
/**
* Adds log data to the end of callback data list.
*/
void logCallbackDataAdd(int level, const char *data) {
// CREATE DATA STRUCT FIRST
struct CallbackData *newData = (struct CallbackData*)malloc(sizeof(struct CallbackData));
newData->type = 1;
newData->logLevel = level;
size_t dataSize = strlen(data) + 1;
newData->logData = (char*)malloc(dataSize);
memcpy(newData->logData, data, dataSize);
newData->next = NULL;
mutexLock();
// INSERT IT TO THE END OF QUEUE
if (callbackDataTail == NULL) {
callbackDataTail = newData;
if (callbackDataHead != NULL) {
LOGE("Dangling callback data head detected. This can cause memory leak.");
} else {
callbackDataHead = newData;
}
} else {
struct CallbackData *oldTail = callbackDataTail;
oldTail->next = newData;
callbackDataTail = newData;
}
mutexUnlock();
monitorNotify();
}
/**
* Adds statistics data to the end of callback data list.
*/
void statisticsCallbackDataAdd(int frameNumber, float fps, float quality, int64_t size, int time, double bitrate, double speed) {
// CREATE DATA STRUCT FIRST
struct CallbackData *newData = (struct CallbackData*)malloc(sizeof(struct CallbackData));
newData->type = 2;
newData->statisticsFrameNumber = frameNumber;
newData->statisticsFps = fps;
newData->statisticsQuality = quality;
newData->statisticsSize = size;
newData->statisticsTime = time;
newData->statisticsBitrate = bitrate;
newData->statisticsSpeed = speed;
newData->next = NULL;
mutexLock();
// INSERT IT TO THE END OF QUEUE
if (callbackDataTail == NULL) {
callbackDataTail = newData;
if (callbackDataHead != NULL) {
LOGE("Dangling callback data head detected. This can cause memory leak.");
} else {
callbackDataHead = newData;
}
} else {
struct CallbackData *oldTail = callbackDataTail;
oldTail->next = newData;
callbackDataTail = newData;
}
mutexUnlock();
monitorNotify();
}
/**
* Removes head of callback data list.
*/
struct CallbackData *callbackDataRemove() {
struct CallbackData *currentData;
mutexLock();
if (callbackDataHead == NULL) {
currentData = NULL;
} else {
currentData = callbackDataHead;
struct CallbackData *nextHead = currentData->next;
if (nextHead == NULL) {
if (callbackDataHead != callbackDataTail) {
LOGE("Head and tail callback data pointers do not match for single callback data element. This can cause memory leak.");
} else {
callbackDataTail = NULL;
}
callbackDataHead = NULL;
} else {
callbackDataHead = nextHead;
}
}
mutexUnlock();
return currentData;
}
/**
* Callback function for FFmpeg logs.
*
* \param pointer to AVClass struct
* \param level
* \param format
* \param arguments
*/
void mobileffmpeg_log_callback_function(void *ptr, int level, const char* format, va_list vargs) {
char line[LOG_LINE_SIZE];
AVBPrint part[4];
int print_prefix = 1;
if (level >= 0) {
level &= 0xff;
}
avutil_log_format_line(ptr, level, format, vargs, part, &print_prefix);
snprintf(line, sizeof(line), "%s%s%s%s", part[0].str, part[1].str, part[2].str, part[3].str);
avutil_log_sanitize(part[0].str);
logCallbackDataAdd(level, part[0].str);
avutil_log_sanitize(part[1].str);
logCallbackDataAdd(level, part[1].str);
avutil_log_sanitize(part[2].str);
logCallbackDataAdd(level, part[2].str);
avutil_log_sanitize(part[3].str);
logCallbackDataAdd(level, part[3].str);
av_bprint_finalize(part+3, NULL);
}
/**
* Callback function for FFmpeg statistics.
*
* \param frameNumber last processed frame number
* \param fps frames processed per second
* \param quality quality of the output stream (video only)
* \param size size in bytes
* \param time processed output duration
* \param bitrate output bit rate in kbits/s
* \param speed processing speed = processed duration / operation duration
*/
void mobileffmpeg_statistics_callback_function(int frameNumber, float fps, float quality, int64_t size, int time, double bitrate, double speed) {
statisticsCallbackDataAdd(frameNumber, fps, quality, size, time, bitrate, speed);
}
/**
* Forwards callback messages to Java classes.
*/
void *callbackThreadFunction() {
JNIEnv *env;
jint getEnvRc = (*globalVm)->GetEnv(globalVm, (void**) &env, JNI_VERSION_1_6);
if (getEnvRc != JNI_OK) {
if (getEnvRc != JNI_EDETACHED) {
LOGE("Callback thread failed to GetEnv for class %s with rc %d.\n", configClassName, getEnvRc);
return NULL;
}
if ((*globalVm)->AttachCurrentThread(globalVm, &env, NULL) != 0) {
LOGE("Callback thread failed to AttachCurrentThread for class %s.\n", configClassName);
return NULL;
}
}
LOGD("Callback thread started.\n");
while(redirectionEnabled) {
struct CallbackData *callbackData = callbackDataRemove();
if (callbackData != NULL) {
if (callbackData->type == 1) {
// LOG CALLBACK
size_t size = strlen(callbackData->logData);
jbyteArray byteArray = (jbyteArray) (*env)->NewByteArray(env, size);
(*env)->SetByteArrayRegion(env, byteArray, 0, size, (jbyte *)callbackData->logData);
(*env)->CallStaticVoidMethod(env, configClass, logMethod, callbackData->logLevel, byteArray);
(*env)->DeleteLocalRef(env, byteArray);
// CLEAN LOG DATA
free(callbackData->logData);
} else {
// STATISTICS CALLBACK
(*env)->CallStaticVoidMethod(env, configClass, statisticsMethod,
callbackData->statisticsFrameNumber, callbackData->statisticsFps,
callbackData->statisticsQuality, callbackData->statisticsSize,
callbackData->statisticsTime, callbackData->statisticsBitrate,
callbackData->statisticsSpeed);
}
// CLEAN STRUCT
callbackData->next = NULL;
free(callbackData);
} else {
monitorWait(100);
}
}
(*globalVm)->DetachCurrentThread(globalVm);
LOGD("Callback thread stopped.\n");
return NULL;
}
/**
* Called when 'mobileffmpeg' native library is loaded.
@@ -46,55 +465,153 @@ JNINativeMethod ffmpegMethods[] = {
jint JNI_OnLoad(JavaVM *vm, void *reserved) {
JNIEnv *env;
if ((*vm)->GetEnv(vm, (void**)(&env), JNI_VERSION_1_6) != JNI_OK) {
LOGE("OnLoad failed to GetEnv for class %s.\n", ffmpegClassName);
LOGE("OnLoad failed to GetEnv for class %s.\n", configClassName);
return JNI_FALSE;
}
jclass ffmpegClass = (*env)->FindClass(env, ffmpegClassName);
if (ffmpegClass == NULL) {
LOGE("OnLoad failed to FindClass %s.\n", ffmpegClassName);
jclass localConfigClass = (*env)->FindClass(env, configClassName);
if (localConfigClass == NULL) {
LOGE("OnLoad failed to FindClass %s.\n", configClassName);
return JNI_FALSE;
}
if ((*env)->RegisterNatives(env, ffmpegClass, ffmpegMethods, 3) < 0) {
LOGE("OnLoad failed to RegisterNatives for class %s.\n", ffmpegClassName);
if ((*env)->RegisterNatives(env, localConfigClass, configMethods, 9) < 0) {
LOGE("OnLoad failed to RegisterNatives for class %s.\n", configClassName);
return JNI_FALSE;
}
(*env)->GetJavaVM(env, &globalVm);
logMethod = (*env)->GetStaticMethodID(env, localConfigClass, "log", "(I[B)V");
if (logMethod == NULL) {
LOGE("OnLoad thread failed to GetMethodID for %s.\n", "log");
(*globalVm)->DetachCurrentThread(globalVm);
return JNI_FALSE;
}
statisticsMethod = (*env)->GetStaticMethodID(env, localConfigClass, "statistics", "(IFFJIDD)V");
if (logMethod == NULL) {
LOGE("OnLoad thread failed to GetMethodID for %s.\n", "statistics");
(*globalVm)->DetachCurrentThread(globalVm);
return JNI_FALSE;
}
configClass = (jclass) ((*env)->NewGlobalRef(env, localConfigClass));
redirectionEnabled = 0;
callbackDataHead = NULL;
callbackDataTail = NULL;
mutexInit();
monitorInit();
return JNI_VERSION_1_6;
}
/**
* Returns FFmpeg version bundled within the library.
* Sets log level.
*
* \param env pointer to native method interface
* \param reference to the class on which this method is invoked
* \param log level
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel(JNIEnv *env, jclass object, jint level) {
av_log_set_level(level);
}
/**
* Returns current log level.
*
* \param env pointer to native method interface
* \param reference to the class on which this method is invoked
*/
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel(JNIEnv *env, jclass object) {
return av_log_get_level();
}
/**
* Enables log and statistics redirection.
*
* \param env pointer to native method interface
* \param reference to the class on which this method is invoked
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection(JNIEnv *env, jclass object) {
mutexLock();
if (redirectionEnabled != 0) {
mutexUnlock();
return;
}
redirectionEnabled = 1;
mutexUnlock();
int rc = pthread_create(&callbackThread, 0, callbackThreadFunction, 0);
if (rc != 0) {
LOGE("Failed to create callback thread (rc=%d).\n", rc);
return;
}
av_log_set_callback(mobileffmpeg_log_callback_function);
set_report_callback(mobileffmpeg_statistics_callback_function);
}
/**
* Disables log and statistics redirection.
*
* \param env pointer to native method interface
* \param reference to the class on which this method is invoked
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection(JNIEnv *env, jclass object) {
mutexLock();
if (redirectionEnabled != 1) {
mutexUnlock();
return;
}
redirectionEnabled = 0;
mutexUnlock();
av_log_set_callback(av_log_default_callback);
set_report_callback(NULL);
monitorNotify();
}
/**
* Returns FFmpeg version bundled within the library natively.
*
* \param env pointer to native method interface
* \param object reference to the class on which this method is invoked
* \return FFmpeg version string
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_getFFmpegVersion(JNIEnv *env, jclass object) {
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeFFmpegVersion(JNIEnv *env, jclass object) {
return (*env)->NewStringUTF(env, FFMPEG_VERSION);
}
/**
* Returns MobileFFmpeg library version.
* Returns MobileFFmpeg library version natively.
*
* \param env pointer to native method interface
* \param object reference to the class on which this method is invoked
* \return MobileFFmpeg version string
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_getVersion(JNIEnv *env, jclass object) {
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeVersion(JNIEnv *env, jclass object) {
return (*env)->NewStringUTF(env, MOBILE_FFMPEG_VERSION);
}
/**
* Synchronously executes FFmpeg command with arguments provided.
* Synchronously executes FFmpeg command natively with arguments provided.
*
* \param env pointer to native method interface
* \param object reference to the class on which this method is invoked
* \param stringArray reference to the object holding FFmpeg command arguments
* \return zero on successful execution, non-zero on error
*/
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_execute(JNIEnv *env, jclass object, jobjectArray stringArray) {
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_nativeExecute(JNIEnv *env, jclass object, jobjectArray stringArray) {
jstring *tempArray = NULL;
int argumentCount = 1;
char **argv = NULL;
@@ -142,11 +659,22 @@ JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_execute(JNIEnv *en
}
/**
* Cancels an ongoing operation.
* Cancels an ongoing operation natively.
*
* \param env pointer to native method interface
* \param object reference to the class on which this method is invoked
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_cancel(JNIEnv *env, jclass object) {
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_nativeCancel(JNIEnv *env, jclass object) {
cancel_operation();
}
/**
* Returns build configuration for FFmpeg.
*
* \param env pointer to native method interface
* \param object reference to the class on which this method is invoked
* \return build configuration string
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeBuildConf(JNIEnv *env, jclass object) {
return (*env)->NewStringUTF(env, FFMPEG_CONFIGURATION);
}
+81 -27
View File
@@ -21,39 +21,93 @@
#define MOBILE_FFMPEG_H
#include <jni.h>
#include <android/log.h>
#include "libavutil/log.h"
#include "libavutil/ffversion.h"
#include "mobileffmpeg_config.h"
/** Library version string */
#define MOBILE_FFMPEG_VERSION "2.1"
#define MOBILE_FFMPEG_VERSION "3.0"
/** Defines tag used for Android logging. */
#define LIB_NAME "mobile-ffmpeg"
/** Verbose Android logging macro. */
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LIB_NAME, __VA_ARGS__)
/** Debug Android logging macro. */
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LIB_NAME, __VA_ARGS__)
/** Info Android logging macro. */
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LIB_NAME, __VA_ARGS__)
/** Warn Android logging macro. */
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LIB_NAME, __VA_ARGS__)
/** Error Android logging macro. */
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LIB_NAME, __VA_ARGS__)
/*
* Class: com_arthenica_mobileffmpeg_FFmpeg
* Method: getFFmpegVersion
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_getFFmpegVersion(JNIEnv *, jclass);
/*
* Class: com_arthenica_mobileffmpeg_FFmpeg
* Method: getVersion
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_getVersion(JNIEnv *, jclass);
/*
* Class: com_arthenica_mobileffmpeg_FFmpeg
* Method: execute
* Signature: ([Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_execute(JNIEnv *, jclass, jobjectArray);
/*
* Class: com_arthenica_mobileffmpeg_FFmpeg
* Method: cancel
* Class: com_arthenica_mobileffmpeg_Config
* Method: enableNativeRedirection
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_cancel(JNIEnv *, jclass);
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection(JNIEnv *, jclass);
#endif /* MOBILE_FFMPEG_H */
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: disableNativeRedirection
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection(JNIEnv *, jclass);
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: setNativeLogLevel
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel(JNIEnv *, jclass, jint);
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: getNativeLogLevel
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel(JNIEnv *, jclass);
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: getNativeFFmpegVersion
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeFFmpegVersion(JNIEnv *, jclass);
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: getNativeVersion
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeVersion(JNIEnv *, jclass);
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: nativeExecute
* Signature: ([Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_nativeExecute(JNIEnv *, jclass, jobjectArray);
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: nativeCancel
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_nativeCancel(JNIEnv *, jclass);
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: getNativeBuildConf
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeBuildConf(JNIEnv *, jclass);
#endif /* MOBILE_FFMPEG_H */
@@ -1,565 +0,0 @@
/*
* Copyright (c) 2018 Taner Sener
*
* This file is part of MobileFFmpeg.
*
* MobileFFmpeg is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MobileFFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CHANGES 08.2018
* --------------------------------------------------------
* - Copied methods with avutil_log_ prefix from libavutil/log.c
*/
#include <pthread.h>
#include "fftools_ffmpeg.h"
#include "mobileffmpeg_config.h"
#include "libavutil/bprint.h"
/** Callback data structure */
struct CallbackData {
int type; // 1 (log callback) or 2 (statistics callback)
int logLevel; // log level
char *logData; // log data
int statisticsFrameNumber; // statistics frame number
float statisticsFps; // statistics fps
float statisticsQuality; // statistics quality
int64_t statisticsSize; // statistics size
int statisticsTime; // statistics time
double statisticsBitrate; // statistics bitrate
double statisticsSpeed; // statistics speed
struct CallbackData *next;
};
/** Redirection control variables */
pthread_mutex_t lockMutex;
pthread_mutex_t monitorMutex;
pthread_cond_t monitorCondition;
pthread_t callbackThread;
int redirectionEnabled;
struct CallbackData *callbackDataHead;
struct CallbackData *callbackDataTail;
/** Global reference to the virtual machine running */
static JavaVM *globalVm;
/** Global reference of Config class in Java */
static jclass configClass;
/** Global reference of log redirection method in Java */
static jmethodID logMethod;
/** Global reference of statistics redirection method in Java */
static jmethodID statisticsMethod;
/** Full name of the Config class */
const char *configClassName = "com/arthenica/mobileffmpeg/Config";
/** Prototypes of native functions defined by Config class. */
JNINativeMethod configMethods[] = {
{"enableNativeRedirection", "()V", (void*) Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection},
{"disableNativeRedirection", "()V", (void*) Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection},
{"setNativeLogLevel", "(I)V", (void*) Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel},
{"getNativeLogLevel", "()I", (void*) Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel}
};
/** DEFINES LINE SIZE USED FOR LOGGING */
#define LOG_LINE_SIZE 1024
static const char *avutil_log_get_level_str(int level) {
switch (level) {
case AV_LOG_QUIET:
return "quiet";
case AV_LOG_DEBUG:
return "debug";
case AV_LOG_VERBOSE:
return "verbose";
case AV_LOG_INFO:
return "info";
case AV_LOG_WARNING:
return "warning";
case AV_LOG_ERROR:
return "error";
case AV_LOG_FATAL:
return "fatal";
case AV_LOG_PANIC:
return "panic";
default:
return "";
}
}
static void avutil_log_format_line(void *avcl, int level, const char *fmt, va_list vl, AVBPrint part[4], int *print_prefix) {
int flags = av_log_get_flags();
AVClass* avc = avcl ? *(AVClass **) avcl : NULL;
av_bprint_init(part+0, 0, 1);
av_bprint_init(part+1, 0, 1);
av_bprint_init(part+2, 0, 1);
av_bprint_init(part+3, 0, 65536);
if (*print_prefix && avc) {
if (avc->parent_log_context_offset) {
AVClass** parent = *(AVClass ***) (((uint8_t *) avcl) +
avc->parent_log_context_offset);
if (parent && *parent) {
av_bprintf(part+0, "[%s @ %p] ",
(*parent)->item_name(parent), parent);
}
}
av_bprintf(part+1, "[%s @ %p] ",
avc->item_name(avcl), avcl);
}
if (*print_prefix && (level > AV_LOG_QUIET) && (flags & AV_LOG_PRINT_LEVEL))
av_bprintf(part+2, "[%s] ", avutil_log_get_level_str(level));
av_vbprintf(part+3, fmt, vl);
if(*part[0].str || *part[1].str || *part[2].str || *part[3].str) {
char lastc = part[3].len && part[3].len <= part[3].size ? part[3].str[part[3].len - 1] : 0;
*print_prefix = lastc == '\n' || lastc == '\r';
}
}
static void avutil_log_sanitize(uint8_t *line) {
while(*line){
if(*line < 0x08 || (*line > 0x0D && *line < 0x20))
*line='?';
line++;
}
}
void mutexInit() {
pthread_mutexattr_t attributes;
pthread_mutexattr_init(&attributes);
pthread_mutexattr_settype(&attributes, PTHREAD_MUTEX_RECURSIVE_NP);
pthread_mutex_init(&lockMutex, &attributes);
pthread_mutexattr_destroy(&attributes);
}
void monitorInit() {
pthread_mutexattr_t attributes;
pthread_mutexattr_init(&attributes);
pthread_mutexattr_settype(&attributes, PTHREAD_MUTEX_RECURSIVE_NP);
pthread_condattr_t cattributes;
pthread_condattr_init(&cattributes);
pthread_condattr_setpshared(&cattributes, PTHREAD_PROCESS_PRIVATE);
pthread_mutex_init(&monitorMutex, &attributes);
pthread_mutexattr_destroy(&attributes);
pthread_cond_init(&monitorCondition, &cattributes);
pthread_condattr_destroy(&cattributes);
}
void mutexUnInit() {
pthread_mutex_destroy(&lockMutex);
}
void monitorUnInit() {
pthread_mutex_destroy(&monitorMutex);
pthread_cond_destroy(&monitorCondition);
}
void mutexLock() {
pthread_mutex_lock(&lockMutex);
}
void mutexUnlock() {
pthread_mutex_unlock(&lockMutex);
}
void monitorWait(int milliSeconds) {
struct timeval tp;
struct timespec ts;
int rc;
rc = gettimeofday(&tp, NULL);
if (rc) {
return;
}
ts.tv_sec = tp.tv_sec;
ts.tv_nsec = tp.tv_usec * 1000;
ts.tv_sec += milliSeconds / 1000;
ts.tv_nsec += (milliSeconds % 1000)*1000000;
pthread_mutex_lock(&monitorMutex);
pthread_cond_timedwait(&monitorCondition, &monitorMutex, &ts);
pthread_mutex_unlock(&monitorMutex);
}
void monitorNotify() {
pthread_mutex_lock(&monitorMutex);
pthread_cond_signal(&monitorCondition);
pthread_mutex_unlock(&monitorMutex);
}
/**
* Adds log data to the end of callback data list.
*/
void logCallbackDataAdd(int level, const char *data) {
// CREATE DATA STRUCT FIRST
struct CallbackData *newData = (struct CallbackData*)malloc(sizeof(struct CallbackData));
newData->type = 1;
newData->logLevel = level;
size_t dataSize = strlen(data) + 1;
newData->logData = (char*)malloc(dataSize);
memcpy(newData->logData, data, dataSize);
newData->next = NULL;
mutexLock();
// INSERT IT TO THE END OF QUEUE
if (callbackDataTail == NULL) {
callbackDataTail = newData;
if (callbackDataHead != NULL) {
LOGE("Dangling callback data head detected. This can cause memory leak.");
} else {
callbackDataHead = newData;
}
} else {
struct CallbackData *oldTail = callbackDataTail;
oldTail->next = newData;
callbackDataTail = newData;
}
mutexUnlock();
monitorNotify();
}
/**
* Adds statistics data to the end of callback data list.
*/
void statisticsCallbackDataAdd(int frameNumber, float fps, float quality, int64_t size, int time, double bitrate, double speed) {
// CREATE DATA STRUCT FIRST
struct CallbackData *newData = (struct CallbackData*)malloc(sizeof(struct CallbackData));
newData->type = 2;
newData->statisticsFrameNumber = frameNumber;
newData->statisticsFps = fps;
newData->statisticsQuality = quality;
newData->statisticsSize = size;
newData->statisticsTime = time;
newData->statisticsBitrate = bitrate;
newData->statisticsSpeed = speed;
newData->next = NULL;
mutexLock();
// INSERT IT TO THE END OF QUEUE
if (callbackDataTail == NULL) {
callbackDataTail = newData;
if (callbackDataHead != NULL) {
LOGE("Dangling callback data head detected. This can cause memory leak.");
} else {
callbackDataHead = newData;
}
} else {
struct CallbackData *oldTail = callbackDataTail;
oldTail->next = newData;
callbackDataTail = newData;
}
mutexUnlock();
monitorNotify();
}
/**
* Removes head of callback data list.
*/
struct CallbackData *callbackDataRemove() {
struct CallbackData *currentData;
mutexLock();
if (callbackDataHead == NULL) {
currentData = NULL;
} else {
currentData = callbackDataHead;
struct CallbackData *nextHead = currentData->next;
if (nextHead == NULL) {
if (callbackDataHead != callbackDataTail) {
LOGE("Head and tail callback data pointers do not match for single callback data element. This can cause memory leak.");
} else {
callbackDataTail = NULL;
}
callbackDataHead = NULL;
} else {
callbackDataHead = nextHead;
}
}
mutexUnlock();
return currentData;
}
/**
* Callback function for FFmpeg logs.
*
* \param pointer to AVClass struct
* \param level
* \param format
* \param arguments
*/
void mobileffmpeg_log_callback_function(void *ptr, int level, const char* format, va_list vargs) {
char line[LOG_LINE_SIZE];
AVBPrint part[4];
int print_prefix = 1;
if (level >= 0) {
level &= 0xff;
}
avutil_log_format_line(ptr, level, format, vargs, part, &print_prefix);
snprintf(line, sizeof(line), "%s%s%s%s", part[0].str, part[1].str, part[2].str, part[3].str);
avutil_log_sanitize(part[0].str);
logCallbackDataAdd(level, part[0].str);
avutil_log_sanitize(part[1].str);
logCallbackDataAdd(level, part[1].str);
avutil_log_sanitize(part[2].str);
logCallbackDataAdd(level, part[2].str);
avutil_log_sanitize(part[3].str);
logCallbackDataAdd(level, part[3].str);
av_bprint_finalize(part+3, NULL);
}
/**
* Callback function for FFmpeg statistics.
*
* \param frameNumber last processed frame number
* \param fps frames processed per second
* \param quality quality of the output stream (video only)
* \param size size in bytes
* \param time processed output duration
* \param bitrate output bit rate in kbits/s
* \param speed processing speed = processed duration / operation duration
*/
void mobileffmpeg_statistics_callback_function(int frameNumber, float fps, float quality, int64_t size, int time, double bitrate, double speed) {
statisticsCallbackDataAdd(frameNumber, fps, quality, size, time, bitrate, speed);
}
/**
* Forwards callback messages to Java classes.
*/
void *callbackThreadFunction() {
JNIEnv *env;
jint getEnvRc = (*globalVm)->GetEnv(globalVm, (void**) &env, JNI_VERSION_1_6);
if (getEnvRc != JNI_OK) {
if (getEnvRc != JNI_EDETACHED) {
LOGE("Callback thread failed to GetEnv for class %s with rc %d.\n", configClassName, getEnvRc);
return NULL;
}
if ((*globalVm)->AttachCurrentThread(globalVm, &env, NULL) != 0) {
LOGE("Callback thread failed to AttachCurrentThread for class %s.\n", configClassName);
return NULL;
}
}
LOGD("Callback thread started.\n");
while(redirectionEnabled) {
struct CallbackData *callbackData = callbackDataRemove();
if (callbackData != NULL) {
if (callbackData->type == 1) {
// LOG CALLBACK
size_t size = strlen(callbackData->logData);
jbyteArray byteArray = (jbyteArray) (*env)->NewByteArray(env, size);
(*env)->SetByteArrayRegion(env, byteArray, 0, size, (jbyte *)callbackData->logData);
(*env)->CallStaticVoidMethod(env, configClass, logMethod, callbackData->logLevel, byteArray);
(*env)->DeleteLocalRef(env, byteArray);
// CLEAN LOG DATA
free(callbackData->logData);
} else {
// STATISTICS CALLBACK
(*env)->CallStaticVoidMethod(env, configClass, statisticsMethod,
callbackData->statisticsFrameNumber, callbackData->statisticsFps,
callbackData->statisticsQuality, callbackData->statisticsSize,
callbackData->statisticsTime, callbackData->statisticsBitrate,
callbackData->statisticsSpeed);
}
// CLEAN STRUCT
callbackData->next = NULL;
free(callbackData);
} else {
monitorWait(100);
}
}
(*globalVm)->DetachCurrentThread(globalVm);
LOGD("Callback thread stopped.\n");
return NULL;
}
/**
* Called when 'mobileffmpeg-config' native library is loaded.
*
* \param vm pointer to the running virtual machine
* \param reserved reserved
* \return JNI version needed by 'mobileffmpeg' library
*/
jint JNI_OnLoad(JavaVM *vm, void *reserved) {
JNIEnv *env;
if ((*vm)->GetEnv(vm, (void**)(&env), JNI_VERSION_1_6) != JNI_OK) {
LOGE("OnLoad failed to GetEnv for class %s.\n", configClassName);
return JNI_FALSE;
}
jclass localConfigClass = (*env)->FindClass(env, configClassName);
if (localConfigClass == NULL) {
LOGE("OnLoad failed to FindClass %s.\n", configClassName);
return JNI_FALSE;
}
if ((*env)->RegisterNatives(env, localConfigClass, configMethods, 4) < 0) {
LOGE("OnLoad failed to RegisterNatives for class %s.\n", configClassName);
return JNI_FALSE;
}
(*env)->GetJavaVM(env, &globalVm);
logMethod = (*env)->GetStaticMethodID(env, localConfigClass, "log", "(I[B)V");
if (logMethod == NULL) {
LOGE("OnLoad thread failed to GetMethodID for %s.\n", "log");
(*globalVm)->DetachCurrentThread(globalVm);
return JNI_FALSE;
}
statisticsMethod = (*env)->GetStaticMethodID(env, localConfigClass, "statistics", "(IFFJIDD)V");
if (logMethod == NULL) {
LOGE("OnLoad thread failed to GetMethodID for %s.\n", "statistics");
(*globalVm)->DetachCurrentThread(globalVm);
return JNI_FALSE;
}
configClass = (jclass) ((*env)->NewGlobalRef(env, localConfigClass));
redirectionEnabled = 0;
callbackDataHead = NULL;
callbackDataTail = NULL;
mutexInit();
monitorInit();
return JNI_VERSION_1_6;
}
/**
* Sets log level.
*
* \param env pointer to native method interface
* \param reference to the class on which this method is invoked
* \param log level
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel(JNIEnv *env, jclass object, jint level) {
av_log_set_level(level);
}
/**
* Returns current log level.
*
* \param env pointer to native method interface
* \param reference to the class on which this method is invoked
*/
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel(JNIEnv *env, jclass object) {
return av_log_get_level();
}
/**
* Enables log and statistics redirection.
*
* \param env pointer to native method interface
* \param reference to the class on which this method is invoked
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection(JNIEnv *env, jclass object) {
mutexLock();
if (redirectionEnabled != 0) {
mutexUnlock();
return;
}
redirectionEnabled = 1;
mutexUnlock();
int rc = pthread_create(&callbackThread, 0, callbackThreadFunction, 0);
if (rc != 0) {
LOGE("Failed to create callback thread (rc=%d).\n", rc);
return;
}
av_log_set_callback(mobileffmpeg_log_callback_function);
set_report_callback(mobileffmpeg_statistics_callback_function);
}
/**
* Disables log and statistics redirection.
*
* \param env pointer to native method interface
* \param reference to the class on which this method is invoked
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection(JNIEnv *env, jclass object) {
mutexLock();
if (redirectionEnabled != 1) {
mutexUnlock();
return;
}
redirectionEnabled = 0;
mutexUnlock();
av_log_set_callback(av_log_default_callback);
set_report_callback(NULL);
monitorNotify();
}
@@ -1,76 +0,0 @@
/*
* Copyright (c) 2018 Taner Sener
*
* This file is part of MobileFFmpeg.
*
* MobileFFmpeg is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MobileFFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MOBILE_FFMPEG_CONFIG_H
#define MOBILE_FFMPEG_CONFIG_H
#include <jni.h>
#include <android/log.h>
#include "libavutil/log.h"
#include "libavutil/ffversion.h"
#include "mobileffmpeg.h"
/** Defines tag used for Android logging. */
#define LIB_NAME "mobile-ffmpeg"
/** Verbose Android logging macro. */
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LIB_NAME, __VA_ARGS__)
/** Debug Android logging macro. */
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LIB_NAME, __VA_ARGS__)
/** Info Android logging macro. */
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LIB_NAME, __VA_ARGS__)
/** Warn Android logging macro. */
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LIB_NAME, __VA_ARGS__)
/** Error Android logging macro. */
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LIB_NAME, __VA_ARGS__)
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: enableNativeRedirection
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection(JNIEnv *, jclass);
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: disableNativeRedirection
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection(JNIEnv *, jclass);
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: setNativeLogLevel
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel(JNIEnv *, jclass, jint);
/*
* Class: com_arthenica_mobileffmpeg_Config
* Method: getNativeLogLevel
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel(JNIEnv *, jclass);
#endif /* MOBILE_FFMPEG_CONFIG_H */
@@ -27,9 +27,12 @@ import android.util.Log;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import static com.arthenica.mobileffmpeg.FFmpeg.getVersion;
/**
* <p>This class is used to configure MobileFFmpeg library utilities/tools.
*
@@ -69,8 +72,14 @@ public class Config {
private static Statistics lastReceivedStatistics;
private static final AtomicReference<StringBuffer> systemCommandOutputReference;
private static boolean runningSystemCommand;
static {
Log.i(Config.TAG, "Loading mobile-ffmpeg.");
/* ALL LIBRARIES LOADED AT STARTUP */
String abiName = AbiDetect.getAbi();
Abi abi = Abi.from(abiName);
@@ -82,23 +91,31 @@ public class Config {
boolean nativeLibraryLoaded = false;
if (abi == Abi.ABI_ARMV7A_NEON) {
try {
System.loadLibrary("mobileffmpeg-config-armv7a-neon");
System.loadLibrary("mobileffmpeg-armv7a-neon");
nativeLibraryLoaded = true;
} catch (UnsatisfiedLinkError e) {
} catch (final UnsatisfiedLinkError e) {
Log.i(Config.TAG, "NEON supported armeabi-v7a library not found. Loading default armeabi-v7a library.", e);
abi = Abi.ABI_ARMV7A;
}
}
if (!nativeLibraryLoaded) {
System.loadLibrary("mobileffmpeg-config");
System.loadLibrary("mobileffmpeg");
}
Log.i(Config.TAG, String.format("Loaded mobile-ffmpeg-%s-%s-%s.", getPackageName(), abi.getName(), getVersion()));
/* NATIVE LOG LEVEL IS RECEIVED ONLY ON STARTUP */
activeLogLevel = Level.from(getNativeLogLevel());
lastReceivedStatistics = new Statistics();
Config.enableRedirection();
systemCommandOutputReference = new AtomicReference<>();
systemCommandOutputReference.set(new StringBuffer());
runningSystemCommand = false;
}
/**
@@ -109,6 +126,14 @@ public class Config {
/**
* <p>Enables log and statistics redirection.
* <p>When redirection is not enabled FFmpeg logs are printed to stderr. By enabling redirection, they are routed
* to Logcat and can be routed further to a callback function.
* <p>Statistics redirection behaviour is similar. Statistics are not printed at all if redirection is not enabled.
* If it is enabled then it is possible to define a statistics callback function but if you don't, they are not
* printed anywhere and only saved as <code>lastReceivedStatistics</code> data which can be polled with
* {@link #getLastReceivedStatistics()}.
* <p>Note that redirection is enabled by default. If you do not want to use its functionality please use
* {@link #disableRedirection()} to disable it.
*/
public static void enableRedirection() {
enableNativeRedirection();
@@ -145,7 +170,7 @@ public class Config {
/**
* <p>Sets a callback function to redirect FFmpeg logs.
*
* @param newLogCallback new log callback function
* @param newLogCallback new log callback function or NULL to disable a previously defined callback
*/
public static void enableLogCallback(final LogCallback newLogCallback) {
logCallbackFunction = newLogCallback;
@@ -154,7 +179,7 @@ public class Config {
/**
* <p>Sets a callback function to redirect FFmpeg statistics.
*
* @param statisticsCallback new statistics callback function
* @param statisticsCallback new statistics callback function or NULL to disable a previously defined callback
*/
public static void enableStatisticsCallback(final StatisticsCallback statisticsCallback) {
statisticsCallbackFunction = statisticsCallback;
@@ -170,11 +195,23 @@ public class Config {
final Level level = Level.from(levelValue);
final String text = new String(logMessage);
if (runningSystemCommand) {
// REDIRECT SYSTEM OUTPUT
if (activeLogLevel != Level.AV_LOG_QUIET && levelValue <= activeLogLevel.getValue()) {
systemCommandOutputReference.get().append(text);
}
return;
}
if (activeLogLevel == Level.AV_LOG_QUIET || levelValue > activeLogLevel.getValue()) {
// LOG NEITHER PRINTED NOR FORWARDED
return;
}
// ALWAYS REDIRECT COMMAND OUTPUT
FFmpeg.appendCommandOutput(text);
if (logCallbackFunction != null) {
logCallbackFunction.apply(new LogMessage(level, text));
} else {
@@ -218,16 +255,16 @@ public class Config {
* <p>Statistics redirection method called by JNI/native part.
*
* @param videoFrameNumber last processed frame number for videos
* @param videoFps frames processed per second for videos
* @param videoQuality quality of the video stream
* @param size size in bytes
* @param time processed duration in milliseconds
* @param bitrate output bit rate in kbits/s
* @param speed processing speed = processed duration / operation duration
* @param videoFps frames processed per second for videos
* @param videoQuality quality of the video stream
* @param size size in bytes
* @param time processed duration in milliseconds
* @param bitrate output bit rate in kbits/s
* @param speed processing speed = processed duration / operation duration
*/
private static void statistics(final int videoFrameNumber, final float videoFps,
final float videoQuality, final long size, final int time,
final double bitrate, final double speed) {
final float videoQuality, final long size, final int time,
final double bitrate, final double speed) {
final Statistics newStatistics = new Statistics(videoFrameNumber, videoFps, videoQuality, size, time, bitrate, speed);
lastReceivedStatistics.update(newStatistics);
@@ -246,7 +283,7 @@ public class Config {
}
/**
* <p>Resets last received statistics.
* <p>Resets last received statistics. It is recommended to call it before starting a new execution.
*/
public static void resetStatistics() {
lastReceivedStatistics = new Statistics();
@@ -263,7 +300,7 @@ public class Config {
}
/**
* <p>Registers fonts inside the given path, so they are available in FFmpeg filters.
* <p>Registers fonts inside the given path, so they are available to use in FFmpeg filters.
*
* <p>Note that you need to build <code>MobileFFmpeg</code> with <code>fontconfig</code>
* enabled or use a prebuilt package with <code>fontconfig</code> inside to use this feature.
@@ -346,6 +383,80 @@ public class Config {
}
}
/**
* <p>Returns package name.
*
* @return guessed package name according to supported external libraries
* @since 3.0
*/
public static String getPackageName() {
return Packages.getPackageName();
}
/**
* <p>Returns supported external libraries.
*
* @return list of supported external libraries
* @since 3.0
*/
public static List<String> getExternalLibraries() {
return Packages.getExternalLibraries();
}
/**
* Executes system command. System command is not logged to output.
*
* @param arguments command arguments
* @param commandOutputEndPatternList list of patterns which will indicate that operation has ended
* @param timeout execution timeout
* @return return code
*/
static int systemExecute(final String[] arguments, final List<String> commandOutputEndPatternList, final long timeout) {
systemCommandOutputReference.set(new StringBuffer());
runningSystemCommand = true;
int rc = Config.nativeExecute(arguments);
long totalWaitTime = 0;
try {
while (!systemCommandOutputContainsPattern(commandOutputEndPatternList) && (totalWaitTime < timeout)) {
synchronized (systemCommandOutputReference) {
systemCommandOutputReference.wait(20);
}
totalWaitTime += 20;
}
} catch (final InterruptedException e) {
Log.w(TAG, "systemExecute operation interrupted.", e);
}
runningSystemCommand = false;
nativeCancel();
return rc;
}
private static boolean systemCommandOutputContainsPattern(final List<String> patternList) {
String string = systemCommandOutputReference.get().toString();
for (String pattern : patternList) {
if (string.contains(pattern)) {
return true;
}
}
return false;
}
/**
* Returns output of last executed system command.
*
* @return output of last executed system command
*/
static String getSystemCommandOutput() {
return systemCommandOutputReference.get().toString();
}
/**
* <p>Enables native redirection. Necessary for log and statistics callback functions.
*/
@@ -370,4 +481,39 @@ public class Config {
*/
private static native int getNativeLogLevel();
/**
* <p>Returns FFmpeg version bundled within the library natively.
*
* @return FFmpeg version
*/
native static String getNativeFFmpegVersion();
/**
* <p>Returns MobileFFmpeg library version natively.
*
* @return MobileFFmpeg version
*/
native static String getNativeVersion();
/**
* <p>Synchronously executes FFmpeg natively with arguments provided.
*
* @param arguments FFmpeg command options/arguments as string array
* @return zero on successful execution, 255 on user cancel and non-zero on error
*/
native static int nativeExecute(final String[] arguments);
/**
* <p>Cancels an ongoing operation natively. This function does not wait for termination to
* complete and returns immediately.
*/
native static void nativeCancel();
/**
* <p>Returns build configuration for <code>FFmpeg</code>.
*
* @return build configuration string
*/
native static String getNativeBuildConf();
}
@@ -21,6 +21,8 @@ package com.arthenica.mobileffmpeg;
import android.util.Log;
import java.util.Arrays;
/**
* <p>Main class for FFmpeg operations. Provides {@link #execute(String...)} method to execute
* FFmpeg commands.
@@ -38,15 +40,13 @@ public class FFmpeg {
public static final int RETURN_CODE_CANCEL = 255;
private static int lastReturnCode = 0;
private static StringBuffer lastCommandOutput = new StringBuffer();
static {
Log.i(Config.TAG, "Loading mobile-ffmpeg.");
System.loadLibrary("mobileffmpeg");
AbiDetect.class.getName();
Config.class.getName();
Log.i(Config.TAG, String.format("Loaded mobile-ffmpeg-%s-%s.", AbiDetect.getAbi(), getVersion()));
}
/**
@@ -55,19 +55,32 @@ public class FFmpeg {
private FFmpeg() {
}
/**
* <p>Appends given log output to the last command output.
*
* @param output log output
*/
static void appendCommandOutput(final String output) {
lastCommandOutput.append(output);
}
/**
* <p>Returns FFmpeg version bundled within the library.
*
* @return FFmpeg version
*/
public native static String getFFmpegVersion();
public static String getFFmpegVersion() {
return Config.getNativeFFmpegVersion();
}
/**
* <p>Returns MobileFFmpeg library version.
*
* @return MobileFFmpeg version
*/
public native static String getVersion();
public static String getVersion() {
return Config.getNativeVersion();
}
/**
* <p>Synchronously executes FFmpeg with arguments provided.
@@ -75,23 +88,95 @@ public class FFmpeg {
* @param arguments FFmpeg command options/arguments as string array
* @return zero on successful execution, 255 on user cancel and non-zero on error
*/
public native static int execute(final String[] arguments);
public static int execute(final String[] arguments) {
lastCommandOutput = new StringBuffer();
/**
* <p>Synchronously executes FFmpeg with arguments provided.
*
* @param arguments FFmpeg command options/arguments in one string
* @return zero on successful execution, 255 on user cancel and non-zero on error
*/
public static int execute(final String arguments) {
return execute((arguments == null) ? new String[]{""} : arguments.split(" "));
lastReturnCode = Config.nativeExecute(arguments);
return lastReturnCode;
}
/**
* <p>Cancels an ongoing operation.
* <p>Synchronously executes FFmpeg command provided. Command is split into arguments using
* provided delimiter.
*
* <p>This function does not wait for termination to complete and returns immediately.
* @param command FFmpeg command
* @param delimiter delimiter used between arguments
* @return zero on successful execution, 255 on user cancel and non-zero on error
* @since 3.0
*/
public native static void cancel();
public static int execute(final String command, final String delimiter) {
return execute((command == null) ? new String[]{""} : command.split(delimiter));
}
/**
* <p>Synchronously executes FFmpeg command provided. Space character is used to split command
* into arguments.
*
* @param command FFmpeg command
* @return zero on successful execution, 255 on user cancel and non-zero on error
*/
public static int execute(final String command) {
return execute(command, " ");
}
/**
* <p>Cancels an ongoing operation. This function does not wait for termination to complete and
* returns immediately.
*/
public static void cancel() {
Config.nativeCancel();
}
/**
* <p>Returns return code of last executed command.
*
* @return return code of last executed command
* @since 3.0
*/
public static int getLastReturnCode() {
return lastReturnCode;
}
/**
* <p>Returns log output of last executed command. Please note that disabling redirection using
* {@link Config#disableRedirection()} method also disables this functionality.
*
* @return output of last executed command
* @since 3.0
*/
public static String getLastCommandOutput() {
return lastCommandOutput.toString();
}
/**
* <p>Returns media information for given file.
*
* @param path path or uri of media file
* @return media information
* @since 3.0
*/
public static MediaInformation getMediaInformation(final String path) {
return getMediaInformation(path, 10000L);
}
/**
* <p>Returns media information for given file.
*
* @param path path or uri of media file
* @param timeout complete timeout
* @return media information
* @since 3.0
*/
public static MediaInformation getMediaInformation(final String path, final Long timeout) {
int rc = Config.systemExecute(new String[]{"-v", "info", "-hide_banner", "-i", path, "-f", "null", "-"}, Arrays.asList("Press [q] to stop, [?] for help", "No such file or directory", "Input/output error", "Conversion failed"), timeout);
if (rc == 0) {
return MediaInformationParser.from(Config.getSystemCommandOutput());
} else {
Log.i(Config.TAG, Config.getSystemCommandOutput());
return null;
}
}
}
@@ -0,0 +1,225 @@
/*
* Copyright (c) 2018 Taner Sener
*
* This file is part of MobileFFmpeg.
*
* MobileFFmpeg is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MobileFFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
package com.arthenica.mobileffmpeg;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Media information class.
*
* @since 3.0
*/
public class MediaInformation {
/**
* Format
*/
private String format;
/**
* Path
*/
private String path;
/**
* Duration, in milliseconds
*/
private Long duration;
/**
* Start time, in milliseconds
*/
private Long startTime;
/**
* Bitrate, kb/s
*/
private Long bitrate;
/**
* Metadata map
*/
private Map<String, String> metadata;
/**
* List of streams
*/
private List<StreamInformation> streams;
/**
* Raw unparsed media information
*/
private String rawInformation;
public MediaInformation() {
this.metadata = new HashMap<>();
this.streams = new ArrayList<>();
}
/**
* Returns format.
*
* @return media format
*/
public String getFormat() {
return format;
}
/**
* Sets media format.
*
* @param format media format
*/
public void setFormat(String format) {
this.format = format;
}
/**
* Returns path.
*
* @return media path
*/
public String getPath() {
return path;
}
/**
* Sets path.
*
* @param path media path
*/
public void setPath(String path) {
this.path = path;
}
/**
* Returns duration.
*
* @return media duration in milliseconds
*/
public Long getDuration() {
return duration;
}
/**
* Sets duration.
*
* @param duration media duration in milliseconds
*/
public void setDuration(Long duration) {
this.duration = duration;
}
/**
* Returns start time.
*
* @return media start time in milliseconds
*/
public Long getStartTime() {
return startTime;
}
/**
* Sets start time.
*
* @param startTime media start time in milliseconds
*/
public void setStartTime(Long startTime) {
this.startTime = startTime;
}
/**
* Returns bitrate.
*
* @return media bitrate in kb/s
*/
public Long getBitrate() {
return bitrate;
}
/**
* Sets bitrate.
*
* @param bitrate media bitrate in kb/s
*/
public void setBitrate(Long bitrate) {
this.bitrate = bitrate;
}
/**
* Returns unparsed media information.
*
* @return unparsed media information data
*/
public String getRawInformation() {
return rawInformation;
}
/**
* Sets unparsed media information.
*
* @param rawInformation unparsed media information data
*/
public void setRawInformation(String rawInformation) {
this.rawInformation = rawInformation;
}
/**
* Adds metadata.
*
* @param key metadata key
* @param value metadata value
*/
public void addMetadata(String key, String value) {
this.metadata.put(key, value);
}
/**
* Returns all metadata entries.
*
* @return set of metadata entries
*/
public Set<Map.Entry<String, String>> getMetadataEntries() {
return this.metadata.entrySet();
}
/**
* Adds new stream.
*
* @param stream new stream information
*/
public void addStream(StreamInformation stream) {
this.streams.add(stream);
}
/**
* Returns all streams.
*
* @return list of streams
*/
public List<StreamInformation> getStreams() {
return streams;
}
}
@@ -0,0 +1,501 @@
/*
* Copyright (c) 2018 Taner Sener
*
* This file is part of MobileFFmpeg.
*
* MobileFFmpeg is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MobileFFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
package com.arthenica.mobileffmpeg;
import android.util.Log;
import com.arthenica.mobileffmpeg.util.Pair;
import com.arthenica.mobileffmpeg.util.Trio;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Locale;
/**
* Helper class for {@link MediaInformation}.
*
* @since 3.0
*/
public class MediaInformationParser {
public static SimpleDateFormat DURATION_FORMAT;
public static Date REFERENCE_DURATION;
static {
try {
DURATION_FORMAT = new SimpleDateFormat("kk:mm:ss", Locale.getDefault());
REFERENCE_DURATION = DURATION_FORMAT.parse("00:00:00");
} catch (final ParseException e) {
Log.i(Config.TAG, "Preparing duration reference failed.", e);
DURATION_FORMAT = null;
REFERENCE_DURATION = null;
}
}
/**
* Parses media information command output and builds a {@link MediaInformation} instance.
*
* @param rawCommandOutput media information command output
* @return parsed instance of null if a parsing error occurs
*/
public static MediaInformation from(final String rawCommandOutput) {
final MediaInformation mediaInformation = new MediaInformation();
if (rawCommandOutput != null) {
final String[] split = rawCommandOutput.split("\n");
boolean metadata = false;
StreamInformation lastCreatedStream = null;
final StringBuilder rawInformation = new StringBuilder();
for (final String outputLine : split) {
if (outputLine.startsWith("[")) {
metadata = false;
continue;
}
final String trimmedLine = outputLine.trim();
if (trimmedLine.startsWith("Input")) {
metadata = false;
lastCreatedStream = null;
Pair<String, String> pair = parseInputBlock(trimmedLine);
mediaInformation.setFormat(pair.getFirst());
mediaInformation.setPath(pair.getSecond());
} else if (trimmedLine.startsWith("Duration")) {
metadata = false;
lastCreatedStream = null;
Trio<Long, Long, Long> trio = parseDurationBlock(trimmedLine);
mediaInformation.setDuration(trio.getFirst());
mediaInformation.setStartTime(trio.getSecond());
mediaInformation.setBitrate(trio.getThird());
} else if (trimmedLine.startsWith("Metadata")) {
metadata = true;
} else if (trimmedLine.startsWith("Stream mapping") || trimmedLine.startsWith("Press [q] to stop") || trimmedLine.startsWith("Output")) {
break;
} else if (trimmedLine.startsWith("Stream")) {
metadata = false;
lastCreatedStream = MediaInformationParser.parseStreamBlock(trimmedLine);
mediaInformation.addStream(lastCreatedStream);
} else if (metadata) {
Pair<String, String> pair = parseMetadataBlock(trimmedLine);
if (pair.getFirst() != null && pair.getSecond() != null) {
if (lastCreatedStream != null) {
lastCreatedStream.addMetadata(pair.getFirst(), pair.getSecond());
} else {
mediaInformation.addMetadata(pair.getFirst(), pair.getSecond());
}
}
}
rawInformation.append(outputLine);
rawInformation.append("\n");
}
mediaInformation.setRawInformation(rawInformation.toString());
}
return mediaInformation;
}
static Pair<String, String> parseInputBlock(final String input) {
String format = substring(input, ",", ", from", Collections.<String>emptyList());
String path = substring(input, "\'", "\'", Collections.<String>emptyList());
return new Pair<>(format, path);
}
static Trio<Long, Long, Long> parseDurationBlock(final String line) {
Long duration = parseDuration(substring(line, "Duration:", ",", Collections.singletonList("uration:")));
Long start = parseStartTime(substring(line, "start:", ",", Collections.singletonList("tart:")));
Long bitrate = toLongObject(substring(line, "bitrate:", Arrays.asList("itrate:", "kb/s")));
return new Trio<>(duration, start, bitrate);
}
static Pair<String, String> parseMetadataBlock(final String metadata) {
String key = null;
String value = null;
if (metadata != null) {
int index = metadata.indexOf(':');
if (index > -1) {
key = metadata.substring(0, index).trim();
value = metadata.substring(index + 1).trim();
}
}
return new Pair<>(key, value);
}
static StreamInformation parseStreamBlock(final String input) {
final StreamInformation streamInformation = new StreamInformation();
if (input != null) {
streamInformation.setIndex(parseStreamIndex(input));
int typeBlockStartIndex = index(input, ":", 0, 2);
if (typeBlockStartIndex > -1 && (typeBlockStartIndex < input.length())) {
String[] parts = input.substring(typeBlockStartIndex + 1).split(",");
String typePart = safeGet(parts, 0);
final String type = parseStreamType(typePart);
streamInformation.setType(type);
streamInformation.setCodec(parseStreamCodec(typePart));
streamInformation.setFullCodec(parseStreamFullCodec(typePart));
String part2 = safeGet(parts, 1);
String part3 = safeGet(parts, 2);
String part4 = safeGet(parts, 3);
String part5 = safeGet(parts, 4);
if ("video".equals(type)) {
int lastUsedPart = 1;
if (part2 != null) {
int pStart = count(part2, "(");
int pEnd = count(part2, ")");
while (pStart != pEnd) {
lastUsedPart++;
String newPart = safeGet(parts, lastUsedPart);
if (newPart == null) {
break;
}
part2 = String.format("%s,%s", part2, newPart);
pStart = count(part2, "(");
pEnd = count(part2, ")");
}
streamInformation.setFullFormat(part2.toLowerCase().trim());
streamInformation.setFormat(part2.replaceAll("\\(.*\\)", "").toLowerCase().trim());
}
lastUsedPart++;
String videoDimensionPart = safeGet(parts, lastUsedPart);
if (videoDimensionPart != null) {
String videoLayout = videoDimensionPart.toLowerCase().trim();
Pair<Long, Long> dimensions = parseVideoDimensions(videoLayout);
streamInformation.setWidth(dimensions.getFirst());
streamInformation.setHeight(dimensions.getSecond());
streamInformation.setSampleAspectRatio(parseVideoStreamSampleAspectRatio(videoLayout));
streamInformation.setDisplayAspectRatio(parseVideoStreamDisplayAspectRatio(videoLayout));
}
for (int i = lastUsedPart + 1; i < parts.length; i++) {
String part = parts[i].replaceAll("\\(.*\\)", "").toLowerCase();
if (part.contains("kb/s")) {
streamInformation.setBitrate(toLongObject(part.replaceAll("kb/s", "").trim()));
} else if (part.contains("fps")) {
streamInformation.setAverageFrameRate(part.replaceAll("fps", "").trim());
} else if (part.contains("tbr")) {
streamInformation.setRealFrameRate(part.replaceAll("tbr", "").trim());
} else if (part.contains("tbn")) {
streamInformation.setTimeBase(part.replaceAll("tbn", "").trim());
} else if (part.contains("tbc")) {
streamInformation.setCodecTimeBase(part.replaceAll("tbc", "").trim());
}
}
}
if ("audio".equals(type)) {
if (part2 != null) {
streamInformation.setSampleRate(parseAudioStreamSampleRate(part2));
}
if (part3 != null) {
streamInformation.setChannelLayout(part3.toLowerCase().trim());
}
if (part4 != null) {
streamInformation.setSampleFormat(part4.toLowerCase().trim());
}
if (part5 != null) {
streamInformation.setBitrate(toLongObject(part5.toLowerCase().replaceAll("\\(.*\\)", "").replaceAll("kb/s", "").trim()));
}
}
}
}
return streamInformation;
}
static Pair<Long, Long> parseVideoDimensions(final String input) {
Long width = null;
Long height = null;
if (input != null) {
final String[] dimensions = input.toLowerCase().replaceAll("\\[.*\\]", "").trim().split("x");
width = toLongObject(safeGet(dimensions, 0));
height = toLongObject(safeGet(dimensions, 1));
}
return new Pair<>(width, height);
}
static String parseVideoStreamSampleAspectRatio(final String input) {
if (input != null) {
String[] parts = input.replaceAll("\\[", "").replaceAll("\\]", "").split(" ");
for (int i = 0; i < parts.length; i++) {
if (parts[i].toLowerCase().equals("sar")) {
return safeGet(parts, i + 1);
}
}
}
return null;
}
static String parseVideoStreamDisplayAspectRatio(final String input) {
if (input != null) {
String[] parts = input.replaceAll("\\[", "").replaceAll("\\]", "").split(" ");
for (int i = 0; i < parts.length; i++) {
if (parts[i].toLowerCase().equals("dar")) {
return safeGet(parts, i + 1);
}
}
}
return null;
}
static Long parseAudioStreamSampleRate(final String input) {
if (input != null) {
boolean khz = false;
boolean mhz = false;
String lowerCase = input.toLowerCase();
if (lowerCase.contains("khz")) {
khz = true;
}
if (lowerCase.contains("mhz")) {
mhz = true;
}
String sampleRate = lowerCase
.replaceAll("khz", "")
.replaceAll("mhz", "")
.replaceAll("hz", "")
.trim();
if (khz) {
return 1000 * toLong(sampleRate);
} else if (mhz) {
return 1000000 * toLong(sampleRate);
} else {
return toLong(sampleRate);
}
}
return null;
}
static String parseStreamType(final String input) {
if (input != null) {
if (input.toLowerCase().contains("audio:")) {
return "audio";
} else if (input.toLowerCase().contains("video:")) {
return "video";
}
}
return null;
}
static String parseStreamCodec(final String input) {
if (input != null) {
return input.toLowerCase()
.replaceAll("\\(.*\\)", "")
.replaceAll("video:", "")
.replaceAll("audio:", "")
.trim();
}
return null;
}
static String parseStreamFullCodec(final String input) {
if (input != null) {
return input.toLowerCase()
.replaceAll("video:", "")
.replaceAll("audio:", "")
.trim();
}
return null;
}
static Long parseStreamIndex(final String input) {
String substring = substring(input, "Stream #0:", ":", Collections.singletonList("tream #0"));
if (substring != null) {
// DISCARD PARANTHESIS
return toLongObject(substring
.replace(":", "")
.replaceAll("\\(.*\\)", ""));
}
return null;
}
static Long parseDuration(final String duration) {
if (duration == null || duration.equals("N/A")) {
return null;
}
try {
final Date calculated = DURATION_FORMAT.parse(duration);
long secondsPartInMilliseconds = calculated.getTime() - REFERENCE_DURATION.getTime();
int index = duration.indexOf('.');
if (index > -1) {
Long centiSeconds = toLong(duration.substring(index + 1));
secondsPartInMilliseconds += 10 * centiSeconds;
}
return secondsPartInMilliseconds;
} catch (final ParseException e) {
Log.d(Config.TAG, String.format("Parsing duration: %s failed.", duration), e);
return null;
}
}
static Long parseStartTime(final String startTime) {
if (startTime == null || startTime.equals("N/A")) {
return null;
}
try {
BigDecimal bigDecimal = new BigDecimal(startTime);
bigDecimal = bigDecimal.setScale(3, BigDecimal.ROUND_CEILING).multiply(new BigDecimal(1000));
return bigDecimal.longValue();
} catch (NumberFormatException e) {
Log.d(Config.TAG, String.format("Parsing startTime: %s failed.", startTime), e);
return null;
}
}
public static String substring(final String string, final String start, final String end, final List<String> ignoredTokens) {
String extractedSubstring = null;
if (string != null) {
int formatStart = string.indexOf(start);
if (formatStart > -1) {
int formatEnd = string.indexOf(end, formatStart + start.length());
if (formatEnd > -1) {
extractedSubstring = string.substring(formatStart + start.length(), formatEnd);
}
}
}
if ((ignoredTokens != null) && (extractedSubstring != null)) {
for (String token : ignoredTokens) {
extractedSubstring = extractedSubstring.replaceAll(token, "");
}
}
return (extractedSubstring == null) ? null : extractedSubstring.trim();
}
public static String substring(final String string, final String start, final List<String> ignoredTokens) {
String extractedSubstring = null;
if (string != null) {
int formatStart = string.indexOf(start);
if (formatStart > -1) {
extractedSubstring = string.substring(formatStart + 1);
}
}
if ((ignoredTokens != null) && (extractedSubstring != null)) {
for (String token : ignoredTokens) {
extractedSubstring = extractedSubstring.replaceAll(token, "");
}
}
return (extractedSubstring == null) ? null : extractedSubstring.trim();
}
public static int index(final String string, String substring, int startIndex, int n) {
int count = 1;
while (count <= n) {
startIndex = string.indexOf(substring, startIndex + substring.length());
count++;
}
return startIndex;
}
public static int count(final String string, String substring) {
int count = 0;
int index = 0;
do {
index = string.indexOf(substring, index);
if (index >= 0) {
count++;
index = index + substring.length();
}
} while (index >= 0);
return count;
}
private static <K> K safeGet(final K[] array, final int index) {
if (array == null) {
return null;
}
try {
final int size = array.length;
if (size > index) {
return array[index];
} else {
return null;
}
} catch (final ArrayIndexOutOfBoundsException e) {
return null;
}
}
private static long toLong(final String value) {
try {
return Long.parseLong(value);
} catch (NumberFormatException e) {
return 0;
}
}
static Long toLongObject(final String value) {
try {
return Long.parseLong(value);
} catch (NumberFormatException e) {
return null;
}
}
}
@@ -0,0 +1,279 @@
/*
* Copyright (c) 2018 Taner Sener
*
* This file is part of MobileFFmpeg.
*
* MobileFFmpeg is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MobileFFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
package com.arthenica.mobileffmpeg;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* <p>Provides helper methods to extract binary package information.
*
* @since 3.0
*/
class Packages {
private static final List<String> supportedExternalLibraries;
static {
supportedExternalLibraries = new ArrayList<>();
supportedExternalLibraries.add("chromaprint");
supportedExternalLibraries.add("fontconfig");
supportedExternalLibraries.add("freetype");
supportedExternalLibraries.add("fribidi");
supportedExternalLibraries.add("gmp");
supportedExternalLibraries.add("gnutls");
supportedExternalLibraries.add("kvazaar");
supportedExternalLibraries.add("mp3lame");
supportedExternalLibraries.add("libaom");
supportedExternalLibraries.add("libass");
supportedExternalLibraries.add("iconv");
supportedExternalLibraries.add("libilbc");
supportedExternalLibraries.add("libtheora");
supportedExternalLibraries.add("libvidstab");
supportedExternalLibraries.add("libvorbis");
supportedExternalLibraries.add("libvpx");
supportedExternalLibraries.add("libwebp");
supportedExternalLibraries.add("libxml2");
supportedExternalLibraries.add("opencore-amr");
supportedExternalLibraries.add("opus");
supportedExternalLibraries.add("shine");
supportedExternalLibraries.add("sdl");
supportedExternalLibraries.add("snappy");
supportedExternalLibraries.add("soxr");
supportedExternalLibraries.add("speex");
supportedExternalLibraries.add("tesseract");
supportedExternalLibraries.add("twolame");
supportedExternalLibraries.add("wavpack");
supportedExternalLibraries.add("x264");
supportedExternalLibraries.add("x265");
supportedExternalLibraries.add("xvid");
}
/**
* Returns enabled external libraries by FFmpeg.
*
* @return enabled external libraries
*/
static List<String> getExternalLibraries() {
final String buildConfiguration = Config.getNativeBuildConf();
final List<String> enabledLibraryList = new ArrayList<>();
for (String supportedExternalLibrary : supportedExternalLibraries) {
if (buildConfiguration.contains("enable-" + supportedExternalLibrary) ||
buildConfiguration.contains("enable-lib" + supportedExternalLibrary)) {
enabledLibraryList.add(supportedExternalLibrary);
}
}
Collections.sort(enabledLibraryList);
return enabledLibraryList;
}
/**
* Returns MobileFFmpeg binary package name.
*
* @return guessed MobileFFmpeg binary package name
*/
static String getPackageName() {
final List<String> externalLibraryList = getExternalLibraries();
final boolean speex = externalLibraryList.contains("speex");
final boolean fribidi = externalLibraryList.contains("fribidi");
final boolean gnutls = externalLibraryList.contains("gnutls");
final boolean xvid = externalLibraryList.contains("xvid");
boolean min = false;
boolean minGpl = false;
boolean https = false;
boolean httpsGpl = false;
boolean audio = false;
boolean video = false;
boolean full = false;
boolean fullGpl = false;
if (speex && fribidi) {
if (xvid) {
fullGpl = true;
} else {
full = true;
}
} else if (speex) {
audio = true;
} else if (fribidi) {
video = true;
} else if (xvid) {
if (gnutls) {
httpsGpl = true;
} else {
minGpl = true;
}
} else {
if (gnutls) {
https = true;
} else {
min = true;
}
}
if (fullGpl) {
if (externalLibraryList.contains("chromaprint") &&
externalLibraryList.contains("fontconfig") &&
externalLibraryList.contains("freetype") &&
externalLibraryList.contains("fribidi") &&
externalLibraryList.contains("gmp") &&
externalLibraryList.contains("gnutls") &&
externalLibraryList.contains("kvazaar") &&
externalLibraryList.contains("mp3lame") &&
externalLibraryList.contains("libaom") &&
externalLibraryList.contains("libass") &&
externalLibraryList.contains("iconv") &&
externalLibraryList.contains("libilbc") &&
externalLibraryList.contains("libtheora") &&
externalLibraryList.contains("libvidstab") &&
externalLibraryList.contains("libvorbis") &&
externalLibraryList.contains("libvpx") &&
externalLibraryList.contains("libwebp") &&
externalLibraryList.contains("libxml2") &&
externalLibraryList.contains("opencore-amr") &&
externalLibraryList.contains("opus") &&
externalLibraryList.contains("shine") &&
externalLibraryList.contains("sdl") &&
externalLibraryList.contains("snappy") &&
externalLibraryList.contains("soxr") &&
externalLibraryList.contains("speex") &&
externalLibraryList.contains("tesseract") &&
externalLibraryList.contains("twolame") &&
externalLibraryList.contains("wavpack") &&
externalLibraryList.contains("x264") &&
externalLibraryList.contains("x265") &&
externalLibraryList.contains("xvid")) {
return "full-gpl";
} else {
return "custom";
}
}
if (full) {
if (externalLibraryList.contains("chromaprint") &&
externalLibraryList.contains("fontconfig") &&
externalLibraryList.contains("freetype") &&
externalLibraryList.contains("fribidi") &&
externalLibraryList.contains("gmp") &&
externalLibraryList.contains("gnutls") &&
externalLibraryList.contains("kvazaar") &&
externalLibraryList.contains("mp3lame") &&
externalLibraryList.contains("libaom") &&
externalLibraryList.contains("libass") &&
externalLibraryList.contains("iconv") &&
externalLibraryList.contains("libilbc") &&
externalLibraryList.contains("libtheora") &&
externalLibraryList.contains("libvorbis") &&
externalLibraryList.contains("libvpx") &&
externalLibraryList.contains("libwebp") &&
externalLibraryList.contains("libxml2") &&
externalLibraryList.contains("opencore-amr") &&
externalLibraryList.contains("opus") &&
externalLibraryList.contains("shine") &&
externalLibraryList.contains("sdl") &&
externalLibraryList.contains("snappy") &&
externalLibraryList.contains("soxr") &&
externalLibraryList.contains("speex") &&
externalLibraryList.contains("tesseract") &&
externalLibraryList.contains("twolame") &&
externalLibraryList.contains("wavpack")) {
return "full";
} else {
return "custom";
}
}
if (video) {
if (externalLibraryList.contains("fontconfig") &&
externalLibraryList.contains("freetype") &&
externalLibraryList.contains("fribidi") &&
externalLibraryList.contains("kvazaar") &&
externalLibraryList.contains("libaom") &&
externalLibraryList.contains("libass") &&
externalLibraryList.contains("iconv") &&
externalLibraryList.contains("libtheora") &&
externalLibraryList.contains("libvpx") &&
externalLibraryList.contains("libwebp") &&
externalLibraryList.contains("snappy")) {
return "video";
} else {
return "custom";
}
}
if (audio) {
if (externalLibraryList.contains("mp3lame") &&
externalLibraryList.contains("libilbc") &&
externalLibraryList.contains("libvorbis") &&
externalLibraryList.contains("opencore-amr") &&
externalLibraryList.contains("opus") &&
externalLibraryList.contains("shine") &&
externalLibraryList.contains("soxr") &&
externalLibraryList.contains("speex") &&
externalLibraryList.contains("twolame") &&
externalLibraryList.contains("wavpack")) {
return "audio";
} else {
return "custom";
}
}
if (httpsGpl) {
if (externalLibraryList.contains("gmp") &&
externalLibraryList.contains("gnutls") &&
externalLibraryList.contains("libvidstab") &&
externalLibraryList.contains("x264") &&
externalLibraryList.contains("x265") &&
externalLibraryList.contains("xvid")) {
return "https-gpl";
} else {
return "custom";
}
}
if (https) {
if (externalLibraryList.contains("gmp") &&
externalLibraryList.contains("gnutls")) {
return "https";
} else {
return "custom";
}
}
if (minGpl) {
if (externalLibraryList.contains("libvidstab") &&
externalLibraryList.contains("x264") &&
externalLibraryList.contains("x265") &&
externalLibraryList.contains("xvid")) {
return "min-gpl";
} else {
return "custom";
}
}
return "min";
}
}
@@ -0,0 +1,434 @@
/*
* Copyright (c) 2018 Taner Sener
*
* This file is part of MobileFFmpeg.
*
* MobileFFmpeg is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MobileFFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
package com.arthenica.mobileffmpeg;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/**
* Stream information class.
*
* @since 3.0
*/
public class StreamInformation {
/**
* Stream index
*/
private Long index;
private String type;
private String codec;
private String fullCodec;
private String format;
private String fullFormat;
private Long width;
private Long height;
private Long bitrate;
private Long sampleRate;
private String sampleFormat;
private String channelLayout;
/**
* SAR
*/
private String sampleAspectRatio;
/**
* DAR
*/
private String displayAspectRatio;
/**
* fps
*/
private String averageFrameRate;
/**
* tbr
*/
private String realFrameRate;
/**
* tbn
*/
private String timeBase;
/**
* tbc
*/
private String codecTimeBase;
/**
* Metadata map
*/
private final Map<String, String> metadata;
public StreamInformation() {
this.metadata = new HashMap<>();
}
/**
* Returns stream index.
*
* @return stream index, starting from zero
*/
public Long getIndex() {
return index;
}
/**
* Sets stream index.
*
* @param index stream index, starting from zero
*/
public void setIndex(Long index) {
this.index = index;
}
/**
* Returns stream type.
*
* @return stream type; audio or video
*/
public String getType() {
return type;
}
/**
* Sets stream type.
*
* @param type stream type; audio or video
*/
public void setType(String type) {
this.type = type;
}
/**
* Returns stream codec.
*
* @return stream codec
*/
public String getCodec() {
return codec;
}
/**
* Sets stream codec.
*
* @param codec stream codec
*/
public void setCodec(String codec) {
this.codec = codec;
}
/**
* Returns full stream codec.
*
* @return stream codec with additional profile and mode information
*/
public String getFullCodec() {
return fullCodec;
}
/**
* Sets full stream codec.
*
* @param fullCodec stream codec with additional profile and mode information
*/
public void setFullCodec(String fullCodec) {
this.fullCodec = fullCodec;
}
/**
* Returns stream format.
*
* @return stream format
*/
public String getFormat() {
return format;
}
/**
* Sets stream format.
*
* @param format stream format
*/
public void setFormat(String format) {
this.format = format;
}
/**
* Returns full stream format.
*
* @return stream format with
*/
public String getFullFormat() {
return fullFormat;
}
/**
* Sets full stream format.
*
* @param fullFormat stream format with
*/
public void setFullFormat(String fullFormat) {
this.fullFormat = fullFormat;
}
/**
* Returns width.
*
* @return width in pixels
*/
public Long getWidth() {
return width;
}
/**
* Sets width.
*
* @param width width in pixels
*/
public void setWidth(Long width) {
this.width = width;
}
/**
* Returns height.
*
* @return height in pixels
*/
public Long getHeight() {
return height;
}
/**
* Sets height.
*
* @param height height in pixels
*/
public void setHeight(Long height) {
this.height = height;
}
/**
* Returns bitrate.
*
* @return bitrate in kb/s
*/
public Long getBitrate() {
return bitrate;
}
/**
* Sets bitrate.
*
* @param bitrate bitrate in kb/s
*/
public void setBitrate(Long bitrate) {
this.bitrate = bitrate;
}
/**
* Returns sample rate.
*
* @return sample rate in hz
*/
public Long getSampleRate() {
return sampleRate;
}
/**
* Sets sample rate.
*
* @param sampleRate sample rate in hz
*/
public void setSampleRate(Long sampleRate) {
this.sampleRate = sampleRate;
}
/**
* Returns sample format.
*
* @return sample format
*/
public String getSampleFormat() {
return sampleFormat;
}
/**
* Sets sample format.
*
* @param sampleFormat sample format
*/
public void setSampleFormat(String sampleFormat) {
this.sampleFormat = sampleFormat;
}
/**
* Returns channel layout.
*
* @return channel layout
*/
public String getChannelLayout() {
return channelLayout;
}
/**
* Sets channel layout.
*
* @param channelLayout channel layout
*/
public void setChannelLayout(String channelLayout) {
this.channelLayout = channelLayout;
}
/**
* Returns sample aspect ratio.
*
* @return sample aspect ratio
*/
public String getSampleAspectRatio() {
return sampleAspectRatio;
}
/**
* Sets sample aspect ratio.
*
* @param sampleAspectRatio sample aspect ratio
*/
public void setSampleAspectRatio(String sampleAspectRatio) {
this.sampleAspectRatio = sampleAspectRatio;
}
/**
* Returns display aspect ratio.
*
* @return display aspect ratio
*/
public String getDisplayAspectRatio() {
return displayAspectRatio;
}
/**
* Sets display aspect ratio.
*
* @param displayAspectRatio display aspect ratio
*/
public void setDisplayAspectRatio(String displayAspectRatio) {
this.displayAspectRatio = displayAspectRatio;
}
/**
* Returns display aspect ratio.
*
* @return average frame rate in fps
*/
public String getAverageFrameRate() {
return averageFrameRate;
}
/**
* Sets average frame rate.
*
* @param averageFrameRate average frame rate in fps
*/
public void setAverageFrameRate(String averageFrameRate) {
this.averageFrameRate = averageFrameRate;
}
/**
* Returns real frame rate.
*
* @return real frame rate in tbr
*/
public String getRealFrameRate() {
return realFrameRate;
}
/**
* Sets real frame rate.
*
* @param realFrameRate real frame rate in tbr
*/
public void setRealFrameRate(String realFrameRate) {
this.realFrameRate = realFrameRate;
}
/**
* Returns time base.
*
* @return time base in tbn
*/
public String getTimeBase() {
return timeBase;
}
/**
* Sets time base.
*
* @param timeBase time base in tbn
*/
public void setTimeBase(String timeBase) {
this.timeBase = timeBase;
}
/**
* Returns codec time base.
*
* @return codec time base in tbc
*/
public String getCodecTimeBase() {
return codecTimeBase;
}
/**
* Sets codec time base.
*
* @param codecTimeBase codec time base in tbc
*/
public void setCodecTimeBase(String codecTimeBase) {
this.codecTimeBase = codecTimeBase;
}
/**
* Adds metadata.
*
* @param key metadata key
* @param value metadata value
*/
public void addMetadata(String key, String value) {
this.metadata.put(key, value);
}
/**
* Returns all metadata entries.
*
* @return set of metadata entries
*/
public Set<Map.Entry<String, String>> getMetadataEntries() {
return this.metadata.entrySet();
}
}
@@ -17,20 +17,31 @@
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
package com.arthenica.mobileffmpeg;
package com.arthenica.mobileffmpeg.util;
import org.junit.Test;
public class Pair<A, B> {
import static org.junit.Assert.*;
/**
* The first element of the pair.
*/
protected A first;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
/**
* The second element of the pair.
*/
protected B second;
public Pair(final A first, final B second) {
this.first = first;
this.second = second;
}
}
public A getFirst() {
return first;
}
public B getSecond() {
return second;
}
}
@@ -0,0 +1,57 @@
/*
* Copyright (c) 2018 Taner Sener
*
* This file is part of MobileFFmpeg.
*
* MobileFFmpeg is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MobileFFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
package com.arthenica.mobileffmpeg.util;
public class Trio<A, B, C> {
/**
* The first element of the trio.
*/
protected final A first;
/**
* The second element of the trio.
*/
protected final B second;
/**
* The third element of the trio.
*/
protected final C third;
public Trio(final A first, final B second, final C third) {
this.first = first;
this.second = second;
this.third = third;
}
public A getFirst() {
return first;
}
public B getSecond() {
return second;
}
public C getThird() {
return third;
}
}
@@ -0,0 +1,187 @@
/*
* Copyright (c) 2018 Taner Sener
*
* This file is part of MobileFFmpeg.
*
* MobileFFmpeg is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MobileFFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
package com.arthenica.mobileffmpeg;
import junit.framework.Assert;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* <p>Tests for {@link Config} class.
*/
public class ConfigTest {
private static final String externalLibrariesCommandOutput = " configuration:\n" +
" --cross-prefix=i686-linux-android-\n" +
" --sysroot=/Users/taner/Library/Android/sdk/ndk-bundle/toolchains/mobile-ffmpeg-i686/sysroot\n" +
" --prefix=/Users/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/ffmpeg\n" +
" --pkg-config=/usr/local/bin/pkg-config --extra-cflags='-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32 -Wno-unused-function -fstrict-aliasing -fPIC -DANDROID -D__ANDROID__ -D__ANDROID_API__=21 -O2 -I/Users/taner/Library/Android/sdk/ndk-bundle/toolchains/mobile-ffmpeg-i686/sysroot/usr/include -I/Users/taner/Library/Android/sdk/ndk-bundle/toolchains/mobile-ffmpeg-i686/sysroot/usr/local/include'\n" +
" --extra-cxxflags='-std=c++11 -fno-exceptions -fno-rtti'\n" +
" --extra-ldflags='-march=i686 -Wl,--gc-sections,--icf=safe -lc -lm -ldl -llog -lc++_shared -L/Users/taner/Library/Android/sdk/ndk-bundle/toolchains/mobile-ffmpeg-i686/i686-linux-android/lib -L/Users/taner/Library/Android/sdk/ndk-bundle/toolchains/mobile-ffmpeg-i686/sysroot/usr/lib -L/Users/taner/Library/Android/sdk/ndk-bundle/toolchains/mobile-ffmpeg-i686/lib -L/Users/taner/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-x86/usr/lib'\n" +
" --enable-version3\n" +
" --arch=i686\n" +
" --cpu=i686\n" +
" --target-os=android\n" +
" --disable-neon\n" +
" --disable-asm\n" +
" --disable-inline-asm\n" +
" --enable-cross-compile\n" +
" --enable-pic\n" +
" --enable-jni\n" +
" --enable-libvorbis\n" +
" --enable-optimizations\n" +
" --enable-swscale\n" +
" --enable-shared\n" +
" --enable-v4l2-m2m\n" +
" --enable-small\n" +
" --disable-openssl\n" +
" --disable-xmm-clobber-test\n" +
" --disable-debug\n" +
" --disable-neon-clobber-test\n" +
" --disable-programs\n" +
" --disable-postproc\n" +
" --disable-doc\n" +
" --disable-htmlpages\n" +
" --disable-manpages\n" +
" --disable-podpages\n" +
" --disable-txtpages\n" +
" --disable-static\n" +
" --disable-sndio\n" +
" --disable-schannel\n" +
" --disable-securetransport\n" +
" --disable-xlib\n" +
" --disable-cuda\n" +
" --disable-cuvid\n" +
" --disable-nvenc\n" +
" --disable-vaapi\n" +
" --disable-vdpau\n" +
" --disable-videotoolbox\n" +
" --disable-audiotoolbox\n" +
" --disable-appkit\n" +
" --disable-alsa\n" +
" --disable-cuda\n" +
" --disable-cuvid\n" +
" --disable-nvenc\n" +
" --disable-vaapi\n" +
" --disable-vdpau\n" +
" --disable-zlib\n";
@Test
public void getExternalLibraries() {
final List<String> supportedExternalLibraries = new ArrayList<>();
supportedExternalLibraries.add("chromaprint");
supportedExternalLibraries.add("fontconfig");
supportedExternalLibraries.add("freetype");
supportedExternalLibraries.add("fribidi");
supportedExternalLibraries.add("gmp");
supportedExternalLibraries.add("gnutls");
supportedExternalLibraries.add("kvazaar");
supportedExternalLibraries.add("lame");
supportedExternalLibraries.add("libaom");
supportedExternalLibraries.add("libass");
supportedExternalLibraries.add("libiconv");
supportedExternalLibraries.add("libilbc");
supportedExternalLibraries.add("libtheora");
supportedExternalLibraries.add("libvidstab");
supportedExternalLibraries.add("libvorbis");
supportedExternalLibraries.add("libvpx");
supportedExternalLibraries.add("libwebp");
supportedExternalLibraries.add("libxml2");
supportedExternalLibraries.add("opencore-amr");
supportedExternalLibraries.add("opus");
supportedExternalLibraries.add("shine");
supportedExternalLibraries.add("sdl");
supportedExternalLibraries.add("snappy");
supportedExternalLibraries.add("soxr");
supportedExternalLibraries.add("speex");
supportedExternalLibraries.add("tesseract");
supportedExternalLibraries.add("twolame");
supportedExternalLibraries.add("wavpack");
supportedExternalLibraries.add("x264");
supportedExternalLibraries.add("x265");
supportedExternalLibraries.add("xvidcore");
supportedExternalLibraries.add("android-zlib");
supportedExternalLibraries.add("android-media-codec");
final List<String> enabledList = new ArrayList<>();
for (String supportedExternalLibrary : supportedExternalLibraries) {
if (externalLibrariesCommandOutput.contains("enable-" + supportedExternalLibrary) ||
externalLibrariesCommandOutput.contains("enable-lib" + supportedExternalLibrary)) {
enabledList.add(supportedExternalLibrary);
}
}
Collections.sort(enabledList);
Assert.assertNotNull(enabledList);
Assert.assertTrue(enabledList.size() == 1);
}
@Test
public void getPackageName() {
Assert.assertEquals("min", listToPackageName(Collections.singletonList("")));
Assert.assertEquals("min-gpl", listToPackageName(Collections.singletonList("xvidcore")));
Assert.assertEquals("full-gpl", listToPackageName(Arrays.asList("gnutls", "speex", "fribidi", "xvidcore")));
Assert.assertEquals("full", listToPackageName(Arrays.asList("fribidi", "speex")));
Assert.assertEquals("video", listToPackageName(Collections.singletonList("fribidi")));
Assert.assertEquals("audio", listToPackageName(Collections.singletonList("speex")));
Assert.assertEquals("https", listToPackageName(Collections.singletonList("gnutls")));
Assert.assertEquals("https-gpl", listToPackageName(Arrays.asList("gnutls", "xvidcore")));
}
private String listToPackageName(final List<String> externalLibraryList) {
boolean speex = externalLibraryList.contains("speex");
boolean fribidi = externalLibraryList.contains("fribidi");
boolean gnutls = externalLibraryList.contains("gnutls");
boolean xvidcore = externalLibraryList.contains("xvidcore");
if (speex && fribidi) {
if (xvidcore) {
return "full-gpl";
} else {
return "full";
}
} else if (speex) {
return "audio";
} else if (fribidi) {
return "video";
} else if (xvidcore) {
if (gnutls) {
return "https-gpl";
} else {
return "min-gpl";
}
} else {
if (gnutls) {
return "https";
} else {
return "min";
}
}
}
}
@@ -0,0 +1,458 @@
/*
* Copyright (c) 2018 Taner Sener
*
* This file is part of MobileFFmpeg.
*
* MobileFFmpeg is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MobileFFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
package com.arthenica.mobileffmpeg;
import org.junit.Assert;
import org.junit.Test;
/**
* <p>Tests for {@link FFmpeg} class.
*/
public class FFmpegTest {
private static final String MEDIA_INFORMATION_MP3 =
"Unknown attached picture mimetype: audio/x-wav, skipping.\n" +
"[mp3 @ 0x7ffb94805800] Estimating duration from bitrate, this may be inaccurate\n" +
"Input #0, mp3, from 'beethoven_-_symphony_no_9.mp3':\n" +
" Metadata:\n" +
" comment : \n" +
" album : Symphony No.9\n" +
" compilation : 0\n" +
" date : -1\n" +
" title : Symphony No.9\n" +
" artist : Beethoven\n" +
" album_artist : Beethoven\n" +
" track : -1\n" +
" lyrics-XXX : \n" +
" Duration: 00:03:33.24, start: 0.000000, bitrate: 320 kb/s\n" +
" Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 320 kb/s\n" +
"Stream mapping:\n" +
" Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))\n" +
"Press [q] to stop, [?] for help\n" +
"Output #0, null, to 'pipe:':\n" +
" Metadata:\n" +
" comment : \n" +
" album : Symphony No.9\n" +
" compilation : 0\n" +
" date : -1\n" +
" title : Symphony No.9\n" +
" artist : Beethoven\n" +
" album_artist : Beethoven\n" +
" track : -1\n" +
" lyrics-XXX : \n" +
" encoder : Lavf58.12.100\n" +
" Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s\n" +
" Metadata:\n" +
" encoder : Lavc58.18.100 pcm_s16le\n" +
"size=N/A time=00:03:33.24 bitrate=N/A speed= 618x \n" +
"video:0kB audio:39982kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown";
private static final String MEDIA_INFORMATION_JPG =
"Input #0, image2, from '/data/user/0/com.arthenica.mobileffmpeg.test/cache/colosseum.jpg':\n" +
" Duration: 00:00:00.04, start: 0.000000, bitrate: 391187 kb/s\n" +
" Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 2560x1708 [SAR 1:1 DAR 640:427], 25 tbr, 25 tbn, 25 tbc\n" +
"Stream mapping:\n" +
" Stream #0:0 -> #0:0 (mjpeg (native) -> wrapped_avframe (native))\n" +
"Press [q] to stop, [?] for help\n" +
"Output #0, null, to 'pipe:':\n" +
" Metadata:\n" +
" encoder : Lavf58.18.104\n" +
" Stream #0:0: Video: wrapped_avframe, yuvj420p, 2560x1708 [SAR 1:1 DAR 640:427], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc\n" +
" Metadata:\n" +
" encoder : Lavc58.31.102 wrapped_avframe\n" +
"frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=0.668x \n" +
"video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown\n";
private static final String MEDIA_INFORMATION_GIF =
"Input #0, gif, from 'advanced_zoom_in_and_pan_with_fade_in_out.gif':\n" +
" Duration: N/A, bitrate: N/A\n" +
" Stream #0:0: Video: gif, bgra, 420x236, 6 fps, 6 tbr, 100 tbn, 100 tbc\n" +
"Stream mapping:\n" +
" Stream #0:0 -> #0:0 (gif (native) -> wrapped_avframe (native))\n" +
"Press [q] to stop, [?] for help\n" +
"Output #0, null, to 'pipe:':\n" +
" Metadata:\n" +
" encoder : Lavf58.12.100\n" +
" Stream #0:0: Video: wrapped_avframe, bgra, 420x236 [SAR 63:64 DAR 6615:3776], q=2-31, 200 kb/s, 6 fps, 6 tbn, 6 tbc\n" +
" Metadata:\n" +
" encoder : Lavc58.18.100 wrapped_avframe\n" +
"frame= 61 fps=0.0 q=-0.0 Lsize=N/A time=00:00:10.16 bitrate=N/A speed= 219x \n" +
"video:32kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown";
private static final String MEDIA_INFORMATION_H264 =
"Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'transition_rotate.mp4':\n" +
" Metadata:\n" +
" major_brand : isom\n" +
" minor_version : 512\n" +
" compatible_brands: isomiso2avc1mp41\n" +
" encoder : Lavf58.12.100\n" +
" Duration: 00:00:15.00, start: 0.000000, bitrate: 7764 kb/s\n" +
" Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 7762 kb/s, 25 fps, 30 tbr, 15360 tbn, 60 tbc (default)\n" +
" Metadata:\n" +
" handler_name : VideoHandler\n" +
"Stream mapping:\n" +
" Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))\n" +
"Press [q] to stop, [?] for help\n" +
"Output #0, null, to 'pipe:':\n" +
" Metadata:\n" +
" major_brand : isom\n" +
" minor_version : 512\n" +
" compatible_brands: isomiso2avc1mp41\n" +
" encoder : Lavf58.12.100\n" +
" Stream #0:0(und): Video: wrapped_avframe, yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)\n" +
" Metadata:\n" +
" handler_name : VideoHandler\n" +
" encoder : Lavc58.18.100 wrapped_avframe\n" +
"frame= 375 fps=0.0 q=-0.0 Lsize=N/A time=00:00:15.00 bitrate=N/A speed=35.9x \n" +
"video:196kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown";
private static final String MEDIA_INFORMATION_PNG =
"Input #0, png_pipe, from 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png':\n" +
" Duration: N/A, bitrate: N/A\n" +
" Stream #0:0: Video: png, rgba(pc), 544x184, 25 tbr, 25 tbn, 25 tbc\n" +
"Stream mapping:\n" +
" Stream #0:0 -> #0:0 (png (native) -> wrapped_avframe (native))\n" +
"Press [q] to stop, [?] for help\n" +
"Output #0, null, to 'pipe:':\n" +
" Metadata:\n" +
" encoder : Lavf58.12.100\n" +
" Stream #0:0: Video: wrapped_avframe, rgba, 544x184, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc\n" +
" Metadata:\n" +
" encoder : Lavc58.18.100 wrapped_avframe\n" +
"frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=27.1x \n" +
"video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown";
private static final String MEDIA_INFORMATION_H264_2 =
"Input #0, h264, from 'test.h264':\n" +
" Duration: N/A, bitrate: N/A\n" +
" Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc\n" +
"Stream mapping:\n" +
" Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))\n" +
"Press [q] to stop, [?] for help\n" +
"Output #0, null, to 'pipe:':\n" +
" Metadata:\n" +
" encoder : Lavf58.12.100\n" +
" Stream #0:0: Video: wrapped_avframe, yuv420p, 1920x1080, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc\n" +
" Metadata:\n" +
" encoder : Lavc58.18.100 wrapped_avframe\n" +
"frame= 360 fps=0.0 q=-0.0 Lsize=N/A time=00:00:14.40 bitrate=N/A speed=25.5x \n" +
"video:188kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown";
private static final String MEDIA_INFORMATION_MP4 =
"Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_30fps_stereo_abl.mp4':\n" +
" Metadata:\n" +
" major_brand : isom\n" +
" minor_version : 1\n" +
" compatible_brands: isomavc1\n" +
" creation_time : 2013-12-16T17:21:55.000000Z\n" +
" title : Big Buck Bunny, Sunflower version\n" +
" artist : Blender Foundation 2008, Janus Bager Kristensen 2013\n" +
" comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net\n" +
" genre : Animation\n" +
" composer : Sacha Goedegebure\n" +
" Duration: 00:10:34.53, start: 0.000000, bitrate: 10385 kb/s\n" +
" Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 3840x4320 [SAR 1:1 DAR 8:9], 9902 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)\n" +
" Metadata:\n" +
" creation_time : 2013-12-16T17:21:55.000000Z\n" +
" handler_name : GPAC ISO Video Handler\n" +
" Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)\n" +
" Metadata:\n" +
" creation_time : 2013-12-16T17:21:58.000000Z\n" +
" handler_name : GPAC ISO Audio Handler\n" +
" Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default)\n" +
" Metadata:\n" +
" creation_time : 2013-12-16T17:21:58.000000Z\n" +
" handler_name : GPAC ISO Audio Handler\n" +
" Side data:\n" +
" audio service type: main\n" +
"Stream mapping:\n" +
" Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))\n" +
" Stream #0:2 -> #0:1 (ac3 (native) -> pcm_s16le (native))\n" +
"Press [q] to stop, [?] for help\n" +
"Output #0, null, to 'pipe:':\n" +
" Metadata:\n" +
" major_brand : isom\n" +
" minor_version : 1\n" +
" compatible_brands: isomavc1\n" +
" composer : Sacha Goedegebure\n" +
" title : Big Buck Bunny, Sunflower version\n" +
" artist : Blender Foundation 2008, Janus Bager Kristensen 2013\n" +
" comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net\n" +
" genre : Animation\n" +
" encoder : Lavf58.12.100\n" +
" Stream #0:0(und): Video: wrapped_avframe, yuv420p(progressive), 3840x4320 [SAR 1:1 DAR 8:9], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)\n" +
" Metadata:\n" +
" creation_time : 2013-12-16T17:21:55.000000Z\n" +
" handler_name : GPAC ISO Video Handler\n" +
" encoder : Lavc58.18.100 wrapped_avframe\n" +
" Stream #0:1(und): Audio: pcm_s16le, 48000 Hz, 5.1(side), s16, 4608 kb/s (default)\n" +
" Metadata:\n" +
" creation_time : 2013-12-16T17:21:58.000000Z\n" +
" handler_name : GPAC ISO Audio Handler\n" +
" encoder : Lavc58.18.100 pcm_s16le\n" +
" Side data:\n" +
" audio service type: main\n" +
"frame= 2798 fps= 85 q=-0.0 size=N/A time=00:01:33.33 bitrate=N/A speed=2.85x \n";
private static final String MEDIA_INFORMATION_MP4_2 =
"Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_stereo_arcd.mp4':\n" +
" Metadata:\n" +
" major_brand : isom\n" +
" minor_version : 1\n" +
" compatible_brands: isomavc1\n" +
" creation_time : 2013-12-16T17:49:59.000000Z\n" +
" title : Big Buck Bunny, Sunflower version\n" +
" artist : Blender Foundation 2008, Janus Bager Kristensen 2013\n" +
" comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net\n" +
" genre : Animation\n" +
" composer : Sacha Goedegebure\n" +
" Duration: 00:10:34.53, start: 0.000000, bitrate: 4474 kb/s\n" +
" Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 3992 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)\n" +
" Metadata:\n" +
" creation_time : 2013-12-16T17:49:59.000000Z\n" +
" handler_name : GPAC ISO Video Handler\n" +
" Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)\n" +
" Metadata:\n" +
" creation_time : 2013-12-16T17:50:04.000000Z\n" +
" handler_name : GPAC ISO Audio Handler\n" +
" Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default)\n" +
" Metadata:\n" +
" creation_time : 2013-12-16T17:50:04.000000Z\n" +
" handler_name : GPAC ISO Audio Handler\n" +
" Side data:\n" +
" audio service type: main\n" +
"Stream mapping:\n" +
" Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))\n" +
" Stream #0:2 -> #0:1 (ac3 (native) -> pcm_s16le (native))\n" +
"Press [q] to stop, [?] for help\n" +
"Output #0, null, to 'pipe:':\n" +
" Metadata:\n" +
" major_brand : isom\n" +
" minor_version : 1\n" +
" compatible_brands: isomavc1\n" +
" composer : Sacha Goedegebure\n" +
" title : Big Buck Bunny, Sunflower version\n" +
" artist : Blender Foundation 2008, Janus Bager Kristensen 2013\n" +
" comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net\n" +
" genre : Animation\n" +
" encoder : Lavf58.12.100\n" +
" Stream #0:0(und): Video: wrapped_avframe, yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)\n" +
" Metadata:\n" +
" creation_time : 2013-12-16T17:49:59.000000Z\n" +
" handler_name : GPAC ISO Video Handler\n" +
" encoder : Lavc58.18.100 wrapped_avframe\n" +
" Stream #0:1(und): Audio: pcm_s16le, 48000 Hz, 5.1(side), s16, 4608 kb/s (default)\n" +
" Metadata:\n" +
" creation_time : 2013-12-16T17:50:04.000000Z\n" +
" handler_name : GPAC ISO Audio Handler\n" +
" encoder : Lavc58.18.100 pcm_s16le\n" +
" Side data:\n" +
" audio service type: main\n" +
"frame=19036 fps=401 q=-0.0 Lsize=N/A time=00:10:34.60 bitrate=N/A speed=13.4x \n" +
"video:9964kB audio:356706kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown";
private static final String MEDIA_INFORMATION_OGG =
"[theora @ 0x7fa30c026e00] 7 bits left in packet 82\n" +
"[ogg @ 0x7fa30c005e00] Broken file, keyframe not correctly marked.\n" +
"Input #0, ogg, from 'trailer_400p.ogg':\n" +
" Duration: 00:00:33.00, start: 0.000000, bitrate: 1057 kb/s\n" +
" Stream #0:0: Video: theora, yuv420p(bt470bg/bt470bg/bt709), 720x400, 25 fps, 25 tbr, 25 tbn, 25 tbc\n" +
" Metadata:\n" +
" ENCODER : ffmpeg2theora 0.19\n" +
" Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp, 80 kb/s\n" +
" Metadata:\n" +
" ENCODER : ffmpeg2theora 0.19\n" +
"[theora @ 0x7fa30c1bd600] 7 bits left in packet 82\n" +
"Stream mapping:\n" +
" Stream #0:0 -> #0:0 (theora (native) -> wrapped_avframe (native))\n" +
" Stream #0:1 -> #0:1 (vorbis (native) -> pcm_s16le (native))\n" +
"Press [q] to stop, [?] for help\n" +
"Output #0, null, to 'pipe:':\n" +
" Metadata:\n" +
" encoder : Lavf58.12.100\n" +
" Stream #0:0: Video: wrapped_avframe, yuv420p(progressive), 720x400, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc\n" +
" Metadata:\n" +
" encoder : Lavc58.18.100 wrapped_avframe\n" +
" Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s\n" +
" Metadata:\n" +
" encoder : Lavc58.18.100 pcm_s16le\n" +
"[ogg @ 0x7fa30c005e00] Broken file, keyframe not correctly marked.\n" +
" Last message repeated 5 times\n" +
"frame= 813 fps=0.0 q=-0.0 Lsize=N/A time=00:00:33.01 bitrate=N/A speed= 234x \n" +
"video:426kB audio:6190kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown";
@Test
public void mediaInformationMp3() {
MediaInformation mediaInformation = MediaInformationParser.from(MEDIA_INFORMATION_MP3);
Assert.assertNotNull(mediaInformation);
assertMediaInput(mediaInformation, "mp3", "beethoven_-_symphony_no_9.mp3");
assertMediaDuration(mediaInformation, 213240L, 0L, 320L);
Assert.assertNotNull(mediaInformation.getStreams());
Assert.assertEquals(1, mediaInformation.getStreams().size());
assertAudioStream(mediaInformation.getStreams().get(0), 0L, "mp3", "mp3", 48000L, "stereo", "fltp", 320L);
}
@Test
public void mediaInformationJpg() {
MediaInformation mediaInformation = MediaInformationParser.from(MEDIA_INFORMATION_JPG);
Assert.assertNotNull(mediaInformation);
assertMediaInput(mediaInformation, "image2", "/data/user/0/com.arthenica.mobileffmpeg.test/cache/colosseum.jpg");
assertMediaDuration(mediaInformation, 40L, 0L, 391187L);
Assert.assertNotNull(mediaInformation.getStreams());
Assert.assertEquals(1, mediaInformation.getStreams().size());
assertVideoStream(mediaInformation.getStreams().get(0), 0L, "mjpeg", "mjpeg", "yuvj420p", "yuvj420p(pc, bt470bg/unknown/unknown)", 2560L, 1708L, "1:1", "640:427", null, null, "25", "25", "25");
}
@Test
public void mediaInformationGif() {
MediaInformation mediaInformation = MediaInformationParser.from(MEDIA_INFORMATION_GIF);
Assert.assertNotNull(mediaInformation);
assertMediaInput(mediaInformation, "gif", "advanced_zoom_in_and_pan_with_fade_in_out.gif");
assertMediaDuration(mediaInformation, null, null, null);
Assert.assertNotNull(mediaInformation.getStreams());
Assert.assertEquals(1, mediaInformation.getStreams().size());
assertVideoStream(mediaInformation.getStreams().get(0), 0L, "gif", "gif", "bgra", "bgra", 420L, 236L, null, null, null, "6", "6", "100", "100");
}
@Test
public void mediaInformationH264() {
MediaInformation mediaInformation = MediaInformationParser.from(MEDIA_INFORMATION_H264);
Assert.assertNotNull(mediaInformation);
assertMediaInput(mediaInformation, "mov,mp4,m4a,3gp,3g2,mj2", "transition_rotate.mp4");
assertMediaDuration(mediaInformation, 15000L, 0L, 7764L);
Assert.assertNotNull(mediaInformation.getStreams());
Assert.assertEquals(1, mediaInformation.getStreams().size());
assertVideoStream(mediaInformation.getStreams().get(0), 0L, "h264", "h264 (main) (avc1 / 0x31637661)", "yuv420p", "yuv420p", 1280L, 720L, "1:1", "16:9", 7762L, "25", "30", "15360", "60");
}
@Test
public void mediaInformationPng() {
MediaInformation mediaInformation = MediaInformationParser.from(MEDIA_INFORMATION_PNG);
Assert.assertNotNull(mediaInformation);
assertMediaInput(mediaInformation, "png_pipe", "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png");
assertMediaDuration(mediaInformation, null, null, null);
Assert.assertNotNull(mediaInformation.getStreams());
Assert.assertEquals(1, mediaInformation.getStreams().size());
assertVideoStream(mediaInformation.getStreams().get(0), 0L, "png", "png", "rgba", "rgba(pc)", 544L, 184L, null, null, null, null, "25", "25", "25");
}
@Test
public void mediaInformationH2642() {
MediaInformation mediaInformation = MediaInformationParser.from(MEDIA_INFORMATION_H264_2);
Assert.assertNotNull(mediaInformation);
assertMediaInput(mediaInformation, "h264", "test.h264");
assertMediaDuration(mediaInformation, null, null, null);
Assert.assertNotNull(mediaInformation.getStreams());
Assert.assertEquals(1, mediaInformation.getStreams().size());
assertVideoStream(mediaInformation.getStreams().get(0), 0L, "h264", "h264 (main)", "yuv420p", "yuv420p(tv, bt709, progressive)", 1920L, 1080L, null, null, null, "25", "25", "1200k", "50");
}
@Test
public void mediaInformationMp4() {
MediaInformation mediaInformation = MediaInformationParser.from(MEDIA_INFORMATION_MP4);
Assert.assertNotNull(mediaInformation);
assertMediaInput(mediaInformation, "mov,mp4,m4a,3gp,3g2,mj2", "http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_30fps_stereo_abl.mp4");
assertMediaDuration(mediaInformation, 634530L, 0L, 10385L);
Assert.assertNotNull(mediaInformation.getStreams());
Assert.assertEquals(3, mediaInformation.getStreams().size());
assertVideoStream(mediaInformation.getStreams().get(0), 0L, "h264", "h264 (high) (avc1 / 0x31637661)", "yuv420p", "yuv420p", 3840L, 4320L, "1:1", "8:9", 9902L, "30", "30", "30k", "60");
assertAudioStream(mediaInformation.getStreams().get(1), 1L, "mp3", "mp3 (mp4a / 0x6134706d)", 48000L, "stereo", "fltp", 160L);
assertAudioStream(mediaInformation.getStreams().get(2), 2L, "ac3", "ac3 (ac-3 / 0x332d6361)", 48000L, "5.1(side)", "fltp", 320L);
}
@Test
public void mediaInformationMp42() {
MediaInformation mediaInformation = MediaInformationParser.from(MEDIA_INFORMATION_MP4_2);
Assert.assertNotNull(mediaInformation);
assertMediaInput(mediaInformation, "mov,mp4,m4a,3gp,3g2,mj2", "http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_stereo_arcd.mp4");
assertMediaDuration(mediaInformation, 634530L, 0L, 4474L);
Assert.assertNotNull(mediaInformation.getStreams());
Assert.assertEquals(3, mediaInformation.getStreams().size());
assertVideoStream(mediaInformation.getStreams().get(0), 0L, "h264", "h264 (high) (avc1 / 0x31637661)", "yuv420p", "yuv420p", 1920L, 1080L, "1:1", "16:9", 3992L, "30", "30", "30k", "60");
assertAudioStream(mediaInformation.getStreams().get(1), 1L, "mp3", "mp3 (mp4a / 0x6134706d)", 48000L, "stereo", "fltp", 160L);
assertAudioStream(mediaInformation.getStreams().get(2), 2L, "ac3", "ac3 (ac-3 / 0x332d6361)", 48000L, "5.1(side)", "fltp", 320L);
}
@Test
public void mediaInformationOgg() {
MediaInformation mediaInformation = MediaInformationParser.from(MEDIA_INFORMATION_OGG);
Assert.assertNotNull(mediaInformation);
assertMediaInput(mediaInformation, "ogg", "trailer_400p.ogg");
assertMediaDuration(mediaInformation, 33000L, 0L, 1057L);
Assert.assertNotNull(mediaInformation.getStreams());
Assert.assertEquals(2, mediaInformation.getStreams().size());
assertVideoStream(mediaInformation.getStreams().get(0), 0L, "theora", "theora", "yuv420p", "yuv420p(bt470bg/bt470bg/bt709)", 720L, 400L, null, null, null, "25", "25", "25", "25");
assertAudioStream(mediaInformation.getStreams().get(1), 1L, "vorbis", "vorbis", 48000L, "stereo", "fltp", 80L);
}
private void assertMediaInput(MediaInformation mediaInformation, String format, String path) {
Assert.assertEquals(format, mediaInformation.getFormat());
Assert.assertEquals(path, mediaInformation.getPath());
}
private void assertMediaDuration(MediaInformation mediaInformation, Long duration, Long startTime, Long bitrate) {
Assert.assertEquals(duration, mediaInformation.getDuration());
Assert.assertEquals(startTime, mediaInformation.getStartTime());
Assert.assertEquals(bitrate, mediaInformation.getBitrate());
}
private void assertAudioStream(StreamInformation streamInformation, Long index, String codec, String fullCodec, Long sampleRate, String channelLayout, String sampleFormat, Long bitrate) {
Assert.assertEquals(index, streamInformation.getIndex());
Assert.assertEquals("audio", streamInformation.getType());
Assert.assertEquals(codec, streamInformation.getCodec());
Assert.assertEquals(fullCodec, streamInformation.getFullCodec());
Assert.assertEquals(sampleRate, streamInformation.getSampleRate());
Assert.assertEquals(channelLayout, streamInformation.getChannelLayout());
Assert.assertEquals(sampleFormat, streamInformation.getSampleFormat());
Assert.assertEquals(bitrate, streamInformation.getBitrate());
}
private void assertVideoStream(StreamInformation streamInformation, Long index, String codec, String fullCodec, String format, String fullFormat, Long width, Long height, String sar, String dar, Long bitrate, String averageFrameRate, String realFrameRate, String timeBase, String codecTimeBase) {
Assert.assertEquals(index, streamInformation.getIndex());
Assert.assertEquals("video", streamInformation.getType());
Assert.assertEquals(codec, streamInformation.getCodec());
Assert.assertEquals(fullCodec, streamInformation.getFullCodec());
Assert.assertEquals(format, streamInformation.getFormat());
Assert.assertEquals(fullFormat, streamInformation.getFullFormat());
Assert.assertEquals(width, streamInformation.getWidth());
Assert.assertEquals(height, streamInformation.getHeight());
Assert.assertEquals(sar, streamInformation.getSampleAspectRatio());
Assert.assertEquals(dar, streamInformation.getDisplayAspectRatio());
Assert.assertEquals(bitrate, streamInformation.getBitrate());
Assert.assertEquals(averageFrameRate, streamInformation.getAverageFrameRate());
Assert.assertEquals(realFrameRate, streamInformation.getRealFrameRate());
Assert.assertEquals(timeBase, streamInformation.getTimeBase());
Assert.assertEquals(codecTimeBase, streamInformation.getCodecTimeBase());
}
}
@@ -0,0 +1,300 @@
/*
* Copyright (c) 2018 Taner Sener
*
* This file is part of MobileFFmpeg.
*
* MobileFFmpeg is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MobileFFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
*/
package com.arthenica.mobileffmpeg;
import com.arthenica.mobileffmpeg.util.Pair;
import com.arthenica.mobileffmpeg.util.Trio;
import junit.framework.Assert;
import org.junit.Test;
public class MediaInformationTest {
@Test
public void parseVideoStream() {
parseVideoStreamBlock(" Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 2560x1708 [SAR 1:1 DAR 640:427], 25 tbr, 25 tbn, 25 tbc", 0L, "mjpeg", "mjpeg", "yuvj420p", "yuvj420p(pc, bt470bg/unknown/unknown)", 2560L, 1708L, "1:1", "640:427", null, null, "25", "25", "25");
parseVideoStreamBlock(" Stream #0:0: Video: gif, bgra, 420x236, 6 fps, 6 tbr, 100 tbn, 100 tbc", 0L, "gif",
"gif", "bgra", "bgra", 420L, 236L, null, null, null, "6", "6", "100", "100");
parseVideoStreamBlock(" Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 7762 kb/s, 25 fps, 30 tbr, 15360 tbn, 60 tbc (default)", 0L, "h264", "h264 (main) (avc1 / 0x31637661)", "yuv420p", "yuv420p", 1280L, 720L, "1:1", "16:9", 7762L, "25", "30", "15360", "60");
parseVideoStreamBlock(" Stream #0:0: Video: png, rgba(pc), 544x184, 25 tbr, 25 tbn, 25 tbc", 0L, "png", "png", "rgba", "rgba(pc)", 544L, 184L, null, null, null, null, "25", "25", "25");
parseVideoStreamBlock(" Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc", 0L, "h264", "h264 (main)", "yuv420p", "yuv420p(tv, bt709, progressive)", 1920L, 1080L, null, null, null, "25", "25", "1200k", "50");
parseVideoStreamBlock(" Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 3840x4320 [SAR 1:1 DAR 8:9], 9902 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)", 0L, "h264", "h264 (high) (avc1 / 0x31637661)", "yuv420p", "yuv420p", 3840L, 4320L, "1:1", "8:9", 9902L, "30", "30", "30k", "60");
parseVideoStreamBlock(" Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 3992 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)", 0L, "h264", "h264 (high) (avc1 / 0x31637661)", "yuv420p", "yuv420p", 1920L, 1080L, "1:1", "16:9", 3992L, "30", "30", "30k", "60");
parseVideoStreamBlock(" Stream #0:0: Video: theora, yuv420p(bt470bg/bt470bg/bt709), 720x400, 25 fps, 25 tbr, 25 tbn, 25 tbc", 0L, "theora", "theora", "yuv420p", "yuv420p(bt470bg/bt470bg/bt709)", 720L, 400L, null, null, null, "25", "25", "25", "25");
}
@Test
public void parseAudioStream() {
parseAudioStreamBlock("Stream #0:0: Audio: adpcm_ms ([2][0][0][0] / 0x0002), 22050 Hz, stereo, s16, 176 kb/s", 0L, "adpcm_ms", "adpcm_ms ([2][0][0][0] / 0x0002)", 22050L, "stereo", "s16", 176L);
parseAudioStreamBlock("Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s", 0L, "pcm_s16le", "pcm_s16le ([1][0][0][0] / 0x0001)", 44100L, "mono", "s16", 705L);
parseAudioStreamBlock("Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s32 (24 bit), 1152 kb/s", 0L, "pcm_s24le", "pcm_s24le ([1][0][0][0] / 0x0001)", 48000L, "mono", "s32 (24 bit)", 1152L);
parseAudioStreamBlock("Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 192 kb/s", 0L, "mp3", "mp3", 48000L, "stereo", "fltp", 192L);
parseAudioStreamBlock("Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 128 kb/s", 0L, "vorbis", "vorbis", 44100L, "stereo", "fltp", 128L);
parseAudioStreamBlock("Stream #0:0: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 44100 Hz, stereo, u8, 705 kb/s", 0L, "pcm_u8", "pcm_u8 ([1][0][0][0] / 0x0001)", 44100L, "stereo", "u8", 705L);
parseAudioStreamBlock("Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)", 1L, "mp3", "mp3 (mp4a / 0x6134706d)", 48000L, "stereo", "fltp", 160L);
parseAudioStreamBlock("Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default)", 2L, "ac3", "ac3 (ac-3 / 0x332d6361)", 48000L, "5.1(side)", "fltp", 320L);
parseAudioStreamBlock("Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)", 1L, "mp3", "mp3 (mp4a / 0x6134706d)", 48000L, "stereo", "fltp", 160L);
parseAudioStreamBlock("Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default)", 2L, "ac3", "ac3 (ac-3 / 0x332d6361)", 48000L, "5.1(side)", "fltp", 320L);
}
@Test
public void index() {
Assert.assertEquals(7, MediaInformationParser.index("one:two:three:", ":", 0, 2));
Assert.assertEquals(13, MediaInformationParser.index("one:two:three:", ":", 0, 3));
Assert.assertEquals(8, MediaInformationParser.index("one::two::three::", "::", 0, 2));
}
@Test
public void count() {
Assert.assertEquals(3, MediaInformationParser.count("one:two:three:", ":"));
Assert.assertEquals(2, MediaInformationParser.count("one,two:three,four", ","));
}
@Test
public void parseAverageFrameRate() {
Assert.assertEquals("24", "24 fps".replaceAll("fps", "").trim());
Assert.assertEquals("30", "30 fps".replaceAll("fps", "").trim());
}
@Test
public void parseBitrate() {
Assert.assertEquals((Long) 3992L, MediaInformationParser.toLongObject("3992 kb/s".replaceAll("kb/s", "").trim()));
Assert.assertEquals((Long) 7762L, MediaInformationParser.toLongObject("7762 kb/s".replaceAll("kb/s", "").trim()));
}
@Test
public void parseVideoStreamDisplayAspectRatio() {
Assert.assertEquals(null, MediaInformationParser.parseVideoStreamDisplayAspectRatio(""));
Assert.assertEquals(null, MediaInformationParser.parseVideoStreamDisplayAspectRatio("544x184"));
Assert.assertEquals("640:427", MediaInformationParser.parseVideoStreamDisplayAspectRatio("2560x1708 [SAR 1:1 DAR 640:427]"));
Assert.assertEquals("8:9", MediaInformationParser.parseVideoStreamDisplayAspectRatio("3840x4320 [SAR 1:1 DAR 8:9]"));
}
@Test
public void parseVideoStreamSampleAspectRatio() {
Assert.assertEquals(null, MediaInformationParser.parseVideoStreamSampleAspectRatio(""));
Assert.assertEquals(null, MediaInformationParser.parseVideoStreamSampleAspectRatio("544x184"));
Assert.assertEquals("1:1", MediaInformationParser.parseVideoStreamSampleAspectRatio("2560x1708 [SAR 1:1 DAR 640:427]"));
Assert.assertEquals("1:1", MediaInformationParser.parseVideoStreamSampleAspectRatio("3840x4320 [SAR 1:1 DAR 8:9]"));
}
@Test
public void parseVideoDimensions() {
parseVideoDimensions("", null, null);
parseVideoDimensions("544x184", 544L, 184L);
parseVideoDimensions("720x400", 720L, 400L);
parseVideoDimensions("2560x1708 [SAR 1:1 DAR 640:427]", 2560L, 1708L);
parseVideoDimensions("3840x4320 [SAR 1:1 DAR 8:9]", 3840L, 4320L);
}
@Test
public void parseAudioSampleRate() {
Assert.assertEquals((Long) 44000L, MediaInformationParser.parseAudioStreamSampleRate("44000"));
Assert.assertEquals((Long) 44000L, MediaInformationParser.parseAudioStreamSampleRate("44 khz"));
Assert.assertEquals((Long) 44100L, MediaInformationParser.parseAudioStreamSampleRate("44100"));
Assert.assertEquals((Long) 5000000L, MediaInformationParser.parseAudioStreamSampleRate("5 mhz"));
}
@Test
public void parseAudioStreamType() {
Assert.assertEquals("video", MediaInformationParser.parseStreamType("Video: theora"));
Assert.assertEquals("video", MediaInformationParser.parseStreamType("Video: png"));
Assert.assertEquals("video", MediaInformationParser.parseStreamType("Video: h264 (Main)"));
Assert.assertEquals("audio", MediaInformationParser.parseStreamType("Audio: adpcm_ms ([2][0][0][0] / 0x0002)"));
Assert.assertEquals("audio", MediaInformationParser.parseStreamType("Audio: mp3 (mp4a / 0x6134706D)"));
Assert.assertEquals("audio", MediaInformationParser.parseStreamType("Audio: pcm_u8 ([1][0][0][0] / 0x0001)"));
}
@Test
public void parseStreamCodec() {
Assert.assertEquals("theora", MediaInformationParser.parseStreamCodec("Video: theora"));
Assert.assertEquals("png", MediaInformationParser.parseStreamCodec("Video: png"));
Assert.assertEquals("h264", MediaInformationParser.parseStreamCodec("Video: h264 (Main)"));
Assert.assertEquals("adpcm_ms", MediaInformationParser.parseStreamCodec("Audio: adpcm_ms ([2][0][0][0] / 0x0002)"));
Assert.assertEquals("mp3", MediaInformationParser.parseStreamCodec("Audio: mp3 (mp4a / 0x6134706D)"));
Assert.assertEquals("pcm_u8", MediaInformationParser.parseStreamCodec("Audio: pcm_u8 ([1][0][0][0] / 0x0001)"));
}
@Test
public void parseStreamFullCodec() {
Assert.assertEquals("theora", MediaInformationParser.parseStreamFullCodec("Video: theora"));
Assert.assertEquals("png", MediaInformationParser.parseStreamFullCodec("Video: png"));
Assert.assertEquals("h264 (main)", MediaInformationParser.parseStreamFullCodec("Video: h264 (Main)"));
Assert.assertEquals("adpcm_ms ([2][0][0][0] / 0x0002)", MediaInformationParser.parseStreamFullCodec("Audio: adpcm_ms ([2][0][0][0] / 0x0002)"));
Assert.assertEquals("mp3 (mp4a / 0x6134706d)", MediaInformationParser.parseStreamFullCodec("Audio: mp3 (mp4a / 0x6134706D)"));
Assert.assertEquals("pcm_u8 ([1][0][0][0] / 0x0001)", MediaInformationParser.parseStreamFullCodec("Audio: pcm_u8 ([1][0][0][0] / 0x0001)"));
}
@Test
public void parseStreamIndex() {
Assert.assertEquals((Long) 0L, MediaInformationParser.parseStreamIndex("Stream #0:0(und): Audio"));
Assert.assertEquals((Long) 1L, MediaInformationParser.parseStreamIndex("Stream #0:1(und): Video"));
Assert.assertEquals((Long) 2L, MediaInformationParser.parseStreamIndex("Stream #0:2(und): Audio"));
Assert.assertEquals((Long) 0L, MediaInformationParser.parseStreamIndex("Stream #0:0: Video"));
Assert.assertEquals((Long) 1L, MediaInformationParser.parseStreamIndex("Stream #0:1: Audio"));
Assert.assertEquals((Long) 2L, MediaInformationParser.parseStreamIndex("Stream #0:2: Video"));
}
@Test
public void parseDuration() {
parseDuration(null, null);
parseDuration("", null);
parseDuration("N/A", null);
parseDuration("00:03:33.24", 213240L);
parseDuration("00:10:34.53", 634530L);
parseDuration("00:00:00.04", 40L);
parseDuration("00:00:15.00", 15000L);
}
@Test
public void parseStartTime() {
parseStartTime(null, null);
parseStartTime("", null);
parseStartTime("N/A", null);
parseStartTime("0.000000", 0L);
parseStartTime("10.003000", 10003L);
parseStartTime("324.000000", 324000L);
parseStartTime("-4.000000", -4000L);
parseStartTime("14.00030", 14001L);
parseStartTime("14.00080", 14001L);
}
@Test
public void parseDurationBlock() {
parseDurationBlock(" Duration: 00:03:33.24, start: 0.000000, bitrate: 320 kb/s", 213240L, 0L, 320L);
parseDurationBlock(" Duration: 00:00:00.04, start: 0.000000, bitrate: 391187 kb/s", 40L, 0L, 391187L);
parseDurationBlock(" Duration: N/A, bitrate: N/A", null, null, null);
parseDurationBlock(" Duration: 00:00:15.00, start: 0.000000, bitrate: 7764 kb/s", 15000L, 0L, 7764L);
parseDurationBlock(" Duration: 00:10:34.53, start: 0.000000, bitrate: 4474 kb/s", 634530L, 0L, 4474L);
}
@Test
public void parseInputBlock() {
parseInputBlock("Input #0,", null, null);
parseInputBlock("Input #0, ogg, from 'trailer_400p.ogg':", "ogg", "trailer_400p.ogg");
parseInputBlock("Input #0, mp3, from 'beethoven_-_symphony_no_9.mp3':", "mp3", "beethoven_-_symphony_no_9.mp3");
parseInputBlock("Input #0, image2, from '/data/user/0/com.arthenica.mobileffmpeg.test/cache/colosseum.jpg':", "image2", "/data/user/0/com.arthenica.mobileffmpeg.test/cache/colosseum.jpg");
parseInputBlock("Input #0, gif, from 'advanced_zoom_in_and_pan_with_fade_in_out.gif':", "gif", "advanced_zoom_in_and_pan_with_fade_in_out.gif");
parseInputBlock("Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'transition_rotate.mp4':", "mov,mp4,m4a,3gp,3g2,mj2", "transition_rotate.mp4");
parseInputBlock("Input #0, png_pipe, from 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png':", "png_pipe", "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png");
}
@Test
public void parseMetadataBlock() {
parseMetadataBlock(" ENCODER:", "ENCODER", "");
parseMetadataBlock(" ENCODER:ffmpeg2theora 0.19", "ENCODER", "ffmpeg2theora 0.19");
parseMetadataBlock(" ENCODER : ffmpeg2theora 0.19", "ENCODER", "ffmpeg2theora 0.19");
parseMetadataBlock(" creation_time : 2013-12-16T17:50:04.000000Z", "creation_time", "2013-12-16T17:50:04.000000Z");
parseMetadataBlock(" handler_name : GPAC ISO Audio Handler", "handler_name", "GPAC ISO Audio Handler");
parseMetadataBlock(" comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net", "comment", "Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net");
parseMetadataBlock(" minor_version : 1", "minor_version", "1");
parseMetadataBlock(" encoder : Lavf58.12.100", "encoder", "Lavf58.12.100");
parseMetadataBlock(" title : Planet X", "title", "Planet X");
parseMetadataBlock(" compatible_brands: isomiso2avc1mp41", "compatible_brands", "isomiso2avc1mp41");
}
private void parseVideoStreamBlock(String input, Long index, String codec, String fullCodec, String format, String fullFormat, Long width, Long height, String sampleAspectRatio, String displayAspectRatio, Long bitrate, String averageFrameRate, String realFrameRate, String timeBase, String codecTimeBase) {
StreamInformation stream = MediaInformationParser.parseStreamBlock(input);
Assert.assertNotNull(stream);
Assert.assertEquals(index, stream.getIndex());
Assert.assertEquals("video", stream.getType());
Assert.assertEquals(codec, stream.getCodec());
Assert.assertEquals(fullCodec, stream.getFullCodec());
Assert.assertEquals(format, stream.getFormat());
Assert.assertEquals(fullFormat, stream.getFullFormat());
Assert.assertEquals(width, stream.getWidth());
Assert.assertEquals(height, stream.getHeight());
Assert.assertEquals(sampleAspectRatio, stream.getSampleAspectRatio());
Assert.assertEquals(displayAspectRatio, stream.getDisplayAspectRatio());
Assert.assertEquals(bitrate, stream.getBitrate());
Assert.assertEquals(averageFrameRate, stream.getAverageFrameRate());
Assert.assertEquals(realFrameRate, stream.getRealFrameRate());
Assert.assertEquals(timeBase, stream.getTimeBase());
Assert.assertEquals(codecTimeBase, stream.getCodecTimeBase());
}
private void parseAudioStreamBlock(String input, Long index, String codec, String fullCodec, Long sampleRate, String channelLayout, String sampleFormat, Long bitrate) {
StreamInformation stream = MediaInformationParser.parseStreamBlock(input);
Assert.assertNotNull(stream);
Assert.assertEquals(index, stream.getIndex());
Assert.assertEquals("audio", stream.getType());
Assert.assertEquals(codec, stream.getCodec());
Assert.assertEquals(fullCodec, stream.getFullCodec());
Assert.assertEquals(sampleRate, stream.getSampleRate());
Assert.assertEquals(channelLayout, stream.getChannelLayout());
Assert.assertEquals(sampleFormat, stream.getSampleFormat());
Assert.assertEquals(bitrate, stream.getBitrate());
}
private void parseVideoDimensions(String value, Long width, Long height) {
Pair<Long, Long> videoDimensions = MediaInformationParser.parseVideoDimensions(value);
Assert.assertNotNull(videoDimensions);
Assert.assertEquals(width, videoDimensions.getFirst());
Assert.assertEquals(height, videoDimensions.getSecond());
}
private void parseDuration(String value, Long expected) {
Long duration = MediaInformationParser.parseDuration(value);
Assert.assertEquals(expected, duration);
}
private void parseStartTime(String value, Long expected) {
Long duration = MediaInformationParser.parseStartTime(value);
Assert.assertEquals(expected, duration);
}
private void parseDurationBlock(String value, Long first, Long second, Long third) {
Trio<Long, Long, Long> pair = MediaInformationParser.parseDurationBlock(value);
Assert.assertNotNull(pair);
Assert.assertEquals(first, pair.getFirst());
Assert.assertEquals(second, pair.getSecond());
Assert.assertEquals(third, pair.getThird());
}
private void parseInputBlock(String value, String first, String second) {
Pair<String, String> pair = MediaInformationParser.parseInputBlock(value);
Assert.assertNotNull(pair);
Assert.assertEquals(first, pair.getFirst());
Assert.assertEquals(second, pair.getSecond());
}
private void parseMetadataBlock(String value, String first, String second) {
Pair<String, String> pair = MediaInformationParser.parseMetadataBlock(value);
Assert.assertNotNull(pair);
Assert.assertNotNull(pair.getFirst());
Assert.assertNotNull(pair.getSecond());
Assert.assertEquals(first, pair.getFirst());
Assert.assertEquals(second, pair.getSecond());
}
}
+5 -14
View File
@@ -25,19 +25,10 @@ include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_ARM_MODE := $(MY_ARM_MODE)
LOCAL_MODULE := mobileffmpeg
LOCAL_SRC_FILES := $(MY_PATH)/mobileffmpeg.c
LOCAL_SRC_FILES := $(MY_PATH)/mobileffmpeg.c $(MY_PATH)/fftools_cmdutils.c $(MY_PATH)/fftools_ffmpeg.c $(MY_PATH)/fftools_ffmpeg_opt.c $(MY_PATH)/fftools_ffmpeg_hw.c $(MY_PATH)/fftools_ffmpeg_filter.c
LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter -Wno-switch -Wno-sign-compare -I${LOCAL_PATH}/../../prebuilt/android-$(TARGET_ARCH)/ffmpeg/include
LOCAL_LDLIBS := -llog -lz -landroid
LOCAL_SHARED_LIBRARIES := c++_shared mobileffmpeg-config
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_ARM_MODE := $(MY_ARM_MODE)
LOCAL_MODULE := mobileffmpeg-config
LOCAL_SRC_FILES := $(MY_PATH)/mobileffmpeg_config.c $(MY_PATH)/fftools_cmdutils.c $(MY_PATH)/fftools_ffmpeg.c $(MY_PATH)/fftools_ffmpeg_opt.c $(MY_PATH)/fftools_ffmpeg_hw.c $(MY_PATH)/fftools_ffmpeg_filter.c
LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter -Wno-switch -Wno-sign-compare -I${LOCAL_PATH}/../../prebuilt/android-$(TARGET_ARCH)/ffmpeg/include
LOCAL_LDLIBS := -llog -lz -landroid
LOCAL_SHARED_LIBRARIES := libavfilter libavformat libavcodec libavutil libswresample libavdevice libswscale
LOCAL_SHARED_LIBRARIES := c++_shared libavfilter libavformat libavcodec libavutil libswresample libavdevice libswscale
include $(BUILD_SHARED_LIBRARY)
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
@@ -45,11 +36,11 @@ ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
include $(CLEAR_VARS)
LOCAL_ARM_MODE := $(MY_ARM_MODE)
LOCAL_MODULE := mobileffmpeg-config-armv7a-neon
LOCAL_SRC_FILES := $(MY_PATH)/mobileffmpeg_config.c $(MY_PATH)/fftools_cmdutils.c $(MY_PATH)/fftools_ffmpeg.c $(MY_PATH)/fftools_ffmpeg_opt.c $(MY_PATH)/fftools_ffmpeg_hw.c $(MY_PATH)/fftools_ffmpeg_filter.c
LOCAL_MODULE := mobileffmpeg-armv7a-neon
LOCAL_SRC_FILES := $(MY_PATH)/mobileffmpeg.c $(MY_PATH)/fftools_cmdutils.c $(MY_PATH)/fftools_ffmpeg.c $(MY_PATH)/fftools_ffmpeg_opt.c $(MY_PATH)/fftools_ffmpeg_hw.c $(MY_PATH)/fftools_ffmpeg_filter.c
LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter -Wno-switch -Wno-sign-compare -I${LOCAL_PATH}/../../prebuilt/android-$(TARGET_ARCH)/ffmpeg/include
LOCAL_LDLIBS := -llog -lz -landroid
LOCAL_SHARED_LIBRARIES := libavcodec-neon libavfilter-neon libswscale-neon libavformat libavutil libswresample libavdevice
LOCAL_SHARED_LIBRARIES := c++_shared libavcodec-neon libavfilter-neon libswscale-neon libavformat libavutil libswresample libavdevice
LOCAL_ARM_NEON := true
include $(BUILD_SHARED_LIBRARY)
+3 -3
View File
@@ -6,8 +6,8 @@ android {
applicationId "com.arthenica.mobileffmpeg.test"
minSdkVersion 21
targetSdkVersion 27
versionCode 21
versionName "2.1"
versionCode 30
versionName "3.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -20,7 +20,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.arthenica:mobile-ffmpeg-full:2.1'
implementation 'com.arthenica:mobile-ffmpeg-full:3.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
@@ -7,6 +7,9 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<application
android:allowBackup="true"
@@ -25,6 +25,7 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -77,6 +78,7 @@ public class AudioTabFragment extends Fragment implements AdapterView.OnItemSele
@Override
public void onClick(View v) {
encodeAudio();
// encodeChromaprint();
}
});
encodeButton.setEnabled(false);
@@ -184,6 +186,20 @@ public class AudioTabFragment extends Fragment implements AdapterView.OnItemSele
}, ffmpegCommand);
}
protected void encodeChromaprint() {
File audioSampleFile = getAudioSampleFile();
Log.d(TAG, "Testing AUDIO encoding with 'chromaprint' muxer");
final String ffmpegCommand = String.format("-v quiet -i %s -f chromaprint -fp_format 2 -", audioSampleFile.getAbsolutePath());
Log.d(TAG, String.format("FFmpeg process started with arguments\n'%s'", ffmpegCommand));
int returnCode = FFmpeg.execute(ffmpegCommand);
Log.d(TAG, String.format("FFmpeg process exited with rc %d", returnCode));
}
public void createAudioSample() {
android.util.Log.d(TAG, "Creating AUDIO sample before the test.");
@@ -192,7 +208,7 @@ public class AudioTabFragment extends Fragment implements AdapterView.OnItemSele
audioSampleFile.delete();
}
String ffmpegCommand = String.format("-y -f lavfi -i sine=frequency=1000:duration=5 -c:a pcm_s16le %s", audioSampleFile.getAbsolutePath());
String ffmpegCommand = String.format("-hide_banner -y -f lavfi -i sine=frequency=1000:duration=5 -c:a pcm_s16le %s", audioSampleFile.getAbsolutePath());
android.util.Log.d(TAG, String.format("Sample file is created with '%s'", ffmpegCommand));
@@ -211,6 +227,9 @@ public class AudioTabFragment extends Fragment implements AdapterView.OnItemSele
String extension;
switch (audioCodec) {
case "mp2 (twolame)":
extension = "mpg";
break;
case "mp3 (liblame)":
case "mp3 (libshine)":
extension = "mp3";
@@ -278,26 +297,28 @@ public class AudioTabFragment extends Fragment implements AdapterView.OnItemSele
String audioOutputFile = getAudioOutputFile().getAbsolutePath();
switch (audioCodec) {
case "mp2 (twolame)":
return String.format("-hide_banner -y -i %s -c:a mp2 -b:a 192k %s", audioSampleFile, audioOutputFile);
case "mp3 (liblame)":
return String.format("-y -i %s -c:a libmp3lame -qscale:a 2 %s", audioSampleFile, audioOutputFile);
return String.format("-hide_banner -y -i %s -c:a libmp3lame -qscale:a 2 %s", audioSampleFile, audioOutputFile);
case "mp3 (libshine)":
return String.format("-y -i %s -c:a libshine -qscale:a 2 %s", audioSampleFile, audioOutputFile);
return String.format("-hide_banner -y -i %s -c:a libshine -qscale:a 2 %s", audioSampleFile, audioOutputFile);
case "vorbis":
return String.format("-y -i %s -c:a libvorbis -b:a 64k %s", audioSampleFile, audioOutputFile);
return String.format("-hide_banner -y -i %s -c:a libvorbis -b:a 64k %s", audioSampleFile, audioOutputFile);
case "opus":
return String.format("-y -i %s -c:a libopus -b:a 64k -vbr on -compression_level 10 %s", audioSampleFile, audioOutputFile);
return String.format("-hide_banner -y -i %s -c:a libopus -b:a 64k -vbr on -compression_level 10 %s", audioSampleFile, audioOutputFile);
case "amr":
return String.format("-y -i %s -ar 8000 -ab 12.2k %s", audioSampleFile, audioOutputFile);
return String.format("-hide_banner -y -i %s -ar 8000 -ab 12.2k %s", audioSampleFile, audioOutputFile);
case "ilbc":
return String.format("-y -i %s -c:a ilbc -ar 8000 -b:a 15200 %s", audioSampleFile, audioOutputFile);
return String.format("-hide_banner -y -i %s -c:a ilbc -ar 8000 -b:a 15200 %s", audioSampleFile, audioOutputFile);
case "speex":
return String.format("-y -i %s -c:a libspeex -ar 16000 %s", audioSampleFile, audioOutputFile);
return String.format("-hide_banner -y -i %s -c:a libspeex -ar 16000 %s", audioSampleFile, audioOutputFile);
case "wavpack":
return String.format("-y -i %s -c:a wavpack -b:a 64k %s", audioSampleFile, audioOutputFile);
return String.format("-hide_banner -y -i %s -c:a wavpack -b:a 64k %s", audioSampleFile, audioOutputFile);
default:
// soxr
return String.format("-y -i %s -af aresample=resampler=soxr -ar 44100 %s", audioSampleFile, audioOutputFile);
return String.format("-hide_banner -y -i %s -af aresample=resampler=soxr -ar 44100 %s", audioSampleFile, audioOutputFile);
}
}
@@ -123,7 +123,7 @@ public class CommandTabFragment extends Fragment {
android.util.Log.d(MainActivity.TAG, String.format("FFmpeg process started with arguments\n\'%s\'", ffmpegCommand));
int result = FFmpeg.execute(ffmpegCommand);
int result = FFmpeg.execute(ffmpegCommand, " ");
android.util.Log.d(MainActivity.TAG, String.format("FFmpeg process exited with rc %d", result));
@@ -39,7 +39,7 @@ import java.util.concurrent.Callable;
public class HttpsTabFragment extends Fragment {
public static final String HTTPS_TEST_DEFAULT_URL = "https://download.blender.org/peach/trailer/trailer_400p.ogg";
public static final String HTTPS_TEST_DEFAULT_URL = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4b/FFmpeg-Logo.svg/568px-FFmpeg-Logo.svg.png";
private MainActivity mainActivity;
private EditText urlText;
@@ -119,7 +119,7 @@ public class HttpsTabFragment extends Fragment {
}
// HTTPS COMMAND ARGUMENTS
final String ffmpegCommand = String.format("-hide_banner -i %s", testUrl);
final String ffmpegCommand = String.format("-hide_banner -i %s -f null -", testUrl);
android.util.Log.d(MainActivity.TAG, String.format("FFmpeg process started with arguments\n'%s'", ffmpegCommand));
@@ -41,8 +41,8 @@ import android.widget.TextView;
import com.arthenica.mobileffmpeg.Config;
import com.arthenica.mobileffmpeg.FFmpeg;
import com.arthenica.mobileffmpeg.util.RunCallback;
import com.arthenica.mobileffmpeg.util.AsynchronousTaskService;
import com.arthenica.mobileffmpeg.util.RunCallback;
import java.io.File;
import java.io.FileOutputStream;
@@ -59,9 +59,10 @@ public class MainActivity extends AppCompatActivity {
public static final String TAG = "mobile-ffmpeg-test";
public static final int REQUEST_EXTERNAL_STORAGE = 1;
public static String[] PERMISSIONS_STORAGE = {
public static String[] PERMISSIONS_ALL = {
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.CAMERA
};
protected static final AsynchronousTaskService asynchronousTaskService = new AsynchronousTaskService();
@@ -119,7 +120,19 @@ public class MainActivity extends AppCompatActivity {
int permission = ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);
if (permission != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this,
PERMISSIONS_STORAGE,
PERMISSIONS_ALL,
REQUEST_EXTERNAL_STORAGE);
}
permission = ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);
if (permission != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this,
PERMISSIONS_ALL,
REQUEST_EXTERNAL_STORAGE);
}
permission = ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA);
if (permission != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this,
PERMISSIONS_ALL,
REQUEST_EXTERNAL_STORAGE);
}
@@ -150,7 +163,7 @@ public class MainActivity extends AppCompatActivity {
@Override
public Integer call() {
int returnCode = FFmpeg.execute(arguments);
int returnCode = FFmpeg.execute(arguments, " ");
if (runCallback != null) {
runCallback.apply(returnCode);
}
@@ -28,7 +28,7 @@ public class Video {
public static String generateEncodeVideoScript(final String image1Path, final String image2Path, final String image3Path, final String videoFilePath, final String videoCodec, final String customOptions) {
return
"-y -loop 1 -i " + image1Path + " " +
"-hide_banner -y -loop 1 -i " + image1Path + " " +
"-loop 1 -i " + image2Path + " " +
"-loop 1 -i " + image3Path + " " +
"-filter_complex " +
@@ -49,7 +49,7 @@ public class Video {
public static String generateShakingVideoScript(final String image1Path, final String image2Path, final String image3Path, final String videoFilePath) {
return
"-y -loop 1 -i " + image1Path + " " +
"-hide_banner -y -loop 1 -i " + image1Path + " " +
"-loop 1 -i " + image2Path + " " +
"-loop 1 -i " + image3Path + " " +
"-f lavfi -i color=black:s=640x427 " +
@@ -38,11 +38,12 @@ import android.widget.TextView;
import android.widget.VideoView;
import com.arthenica.mobileffmpeg.Config;
import com.arthenica.mobileffmpeg.FFmpeg;
import com.arthenica.mobileffmpeg.LogCallback;
import com.arthenica.mobileffmpeg.LogMessage;
import com.arthenica.mobileffmpeg.util.RunCallback;
import com.arthenica.mobileffmpeg.Statistics;
import com.arthenica.mobileffmpeg.StatisticsCallback;
import com.arthenica.mobileffmpeg.util.RunCallback;
import java.io.File;
import java.io.IOException;
@@ -84,6 +85,7 @@ public class VideoTabFragment extends Fragment implements AdapterView.OnItemSele
@Override
public void onClick(View v) {
encodeVideo();
// encodeWebp();
}
});
}
@@ -213,6 +215,28 @@ public class VideoTabFragment extends Fragment implements AdapterView.OnItemSele
}
}
protected void encodeWebp() {
final File imageFile = new File(mainActivity.getCacheDir(), "colosseum.jpg");
final File outputFile = new File(mainActivity.getFilesDir(), "video.webp");
try {
mainActivity.resourceToFile(R.drawable.colosseum, imageFile);
Log.d(TAG, "Testing VIDEO encoding with 'webp' codec");
final String ffmpegCommand = String.format("-hide_banner -i %s %s", imageFile.getAbsolutePath(), outputFile.getAbsolutePath());
Log.d(TAG, String.format("FFmpeg process started with arguments\n'%s'", ffmpegCommand));
int returnCode = FFmpeg.execute(ffmpegCommand);
Log.d(TAG, String.format("FFmpeg process exited with rc %d", returnCode));
} catch (IOException e) {
Log.e(TAG, "Encode webp failed", e);
Popup.show(mainActivity, "Encode webp failed");
}
}
protected void playVideo() {
MediaController mediaController = new MediaController(mainActivity);
mediaController.setAnchorView(videoView);
@@ -238,6 +262,8 @@ public class VideoTabFragment extends Fragment implements AdapterView.OnItemSele
}
public String getSelectedVideoCodec() {
// NOTE THAT MPEG4 CODEC IS ASSIGNED HERE
String videoCodec = selectedCodec;
// VIDEO CODEC SPINNER HAS BASIC NAMES, FFMPEG NEEDS LONGER AND EXACT CODEC NAMES.
@@ -320,6 +346,8 @@ public class VideoTabFragment extends Fragment implements AdapterView.OnItemSele
case "hap":
return "-format hap_q ";
default:
// mpeg4, x264, xvid
return "";
}
}
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="audio_codec">
<item>mp2 (twolame)</item>
<item>mp3 (liblame)</item>
<item>mp3 (libshine)</item>
<item>vorbis</item>
+2 -1
View File
@@ -56,8 +56,9 @@ cmake -Wno-dev \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DFFT_LIB=kissfft \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DFFT_LIB=kissfft \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
+51 -19
View File
@@ -46,16 +46,21 @@ get_library_name() {
25) echo "soxr" ;;
26) echo "libaom" ;;
27) echo "chromaprint" ;;
28) echo "giflib" ;;
29) echo "jpeg" ;;
30) echo "libogg" ;;
31) echo "libpng" ;;
32) echo "libuuid" ;;
33) echo "nettle" ;;
34) echo "tiff" ;;
35) echo "expat" ;;
36) echo "android-zlib" ;;
37) echo "android-media-codec" ;;
28) echo "twolame" ;;
29) echo "sdl" ;;
30) echo "tesseract" ;;
31) echo "giflib" ;;
32) echo "jpeg" ;;
33) echo "libogg" ;;
34) echo "libpng" ;;
35) echo "libuuid" ;;
36) echo "nettle" ;;
37) echo "tiff" ;;
38) echo "expat" ;;
39) echo "libsndfile" ;;
40) echo "leptonica" ;;
41) echo "android-zlib" ;;
42) echo "android-media-codec" ;;
esac
}
@@ -256,7 +261,11 @@ get_cflags() {
ARCH_FLAGS=$(get_arch_specific_cflags)
APP_FLAGS=$(get_app_specific_cflags $1)
COMMON_FLAGS=$(get_common_cflags)
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
else
OPTIMIZATION_FLAGS=""
fi
COMMON_INCLUDES=$(get_common_includes)
echo "${ARCH_FLAGS} ${APP_FLAGS} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS} ${COMMON_INCLUDES}"
@@ -283,7 +292,7 @@ get_common_linked_libraries() {
local COMMON_LIBRARY_PATHS="-L${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/${TARGET_HOST}/lib -L${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot/usr/lib -L${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/lib"
case $1 in
ffmpeg)
ffmpeg | tesseract)
echo "-lc -lm -ldl -llog -lc++_shared ${COMMON_LIBRARY_PATHS}"
;;
libvpx)
@@ -466,7 +475,7 @@ libdir=\${prefix}/lib
includedir=\${prefix}/include
Name: aom
Description: AV1 codec library v0.1.0.
Description: AV1 codec library v${AOM_VERSION}.
Version: ${AOM_VERSION}
Requires:
@@ -641,6 +650,29 @@ Cflags: -I\${includedir}
EOF
}
create_tesseract_package_config() {
local TESSERACT_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/tesseract.pc" << EOF
prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/tesseract
exec_prefix=\${prefix}
bindir=\${exec_prefix}/bin
datarootdir=\${prefix}/share
datadir=\${datarootdir}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
Name: tesseract
Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google.
URL: https://github.com/tesseract-ocr/tesseract
Version: ${TESSERACT_VERSION}
Requires: lept, libjpeg, libpng, giflib, zlib, libwebp, libtiff-4
Libs: -L\${libdir} -ltesseract
Cflags: -I\${includedir}
EOF
}
create_uuid_package_config() {
local UUID_VERSION="$1"
@@ -780,15 +812,15 @@ download_gpl_library_source() {
GPL_LIB_DEST_DIR="libvidstab"
;;
x264)
GPL_LIB_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20180829-2245-stable.tar.bz2"
GPL_LIB_FILE="x264-snapshot-20180829-2245-stable.tar.bz2"
GPL_LIB_ORIG_DIR="x264-snapshot-20180829-2245-stable"
GPL_LIB_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20181015-2245-stable.tar.bz2"
GPL_LIB_FILE="x264-snapshot-20181015-2245-stable.tar.bz2"
GPL_LIB_ORIG_DIR="x264-snapshot-20181015-2245-stable"
GPL_LIB_DEST_DIR="x264"
;;
x265)
GPL_LIB_URL="https://download.videolan.org/pub/videolan/x265/x265_2.8.tar.gz"
GPL_LIB_FILE="x265-2.8.tar.gz"
GPL_LIB_ORIG_DIR="x265_2.8"
GPL_LIB_URL="https://download.videolan.org/pub/videolan/x265/x265_2.9.tar.gz"
GPL_LIB_FILE="x265-2.9.tar.gz"
GPL_LIB_ORIG_DIR="x265_2.9"
GPL_LIB_DEST_DIR="x265"
;;
xvidcore)
+29 -5
View File
@@ -75,7 +75,7 @@ esac
CONFIGURE_POSTFIX=""
for library in {1..38}
for library in {1..43}
do
if [[ ${!library} -eq 1 ]]; then
ENABLED_LIBRARY=$(get_library_name $((library - 1)))
@@ -192,6 +192,11 @@ do
LDFLAGS+=" $(pkg-config --libs --static shine)"
CONFIGURE_POSTFIX+=" --enable-libshine"
;;
sdl)
CFLAGS+=" $(pkg-config --cflags sdl2)"
LDFLAGS+=" $(pkg-config --libs --static sdl2)"
CONFIGURE_POSTFIX+=" --enable-sdl2"
;;
snappy)
CFLAGS+=" $(pkg-config --cflags snappy)"
LDFLAGS+=" $(pkg-config --libs --static snappy)"
@@ -207,6 +212,18 @@ do
LDFLAGS+=" $(pkg-config --libs --static speex)"
CONFIGURE_POSTFIX+=" --enable-libspeex"
;;
tesseract)
CFLAGS+=" $(pkg-config --cflags tesseract)"
LDFLAGS+=" $(pkg-config --libs --static tesseract)"
CFLAGS+=" $(pkg-config --cflags giflib)"
LDFLAGS+=" $(pkg-config --libs --static giflib)"
CONFIGURE_POSTFIX+=" --enable-libtesseract"
;;
twolame)
CFLAGS+=" $(pkg-config --cflags twolame)"
LDFLAGS+=" $(pkg-config --libs --static twolame)"
CONFIGURE_POSTFIX+=" --enable-libtwolame"
;;
wavpack)
CFLAGS+=" $(pkg-config --cflags wavpack)"
LDFLAGS+=" $(pkg-config --libs --static wavpack)"
@@ -261,7 +278,7 @@ do
else
# THE FOLLOWING LIBRARIES SHOULD BE EXPLICITLY DISABLED TO PREVENT AUTODETECT
if [[ ${library} -eq 37 ]]; then
if [[ ${library} -eq 42 ]]; then
CONFIGURE_POSTFIX+=" --disable-zlib"
fi
fi
@@ -269,6 +286,13 @@ done
LDFLAGS+=" -L${ANDROID_NDK_ROOT}/platforms/android-${API}/arch-${TOOLCHAIN_ARCH}/usr/lib"
# OPTIMIZE FOR SPEED INSTEAD OF SIZE
if [[ -z ${MOBILE_FFMPEG_OPTIMIZED_FOR_SPEED} ]]; then
SIZE_OPTIONS="--enable-small";
else
SIZE_OPTIONS="";
fi
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
echo -n -e "\n${LIB_NAME}: "
@@ -292,9 +316,10 @@ make distclean 2>/dev/null 1>/dev/null
--enable-pic \
--enable-jni \
--enable-optimizations \
--enable-small \
--enable-swscale \
--enable-shared \
--enable-v4l2-m2m \
${SIZE_OPTIONS} \
--disable-openssl \
--disable-xmm-clobber-test \
--disable-debug \
@@ -309,7 +334,6 @@ make distclean 2>/dev/null 1>/dev/null
--disable-static \
--disable-sndio \
--disable-schannel \
--disable-sdl2 \
--disable-securetransport \
--disable-xlib \
--disable-cuda \
@@ -318,6 +342,7 @@ make distclean 2>/dev/null 1>/dev/null
--disable-vaapi \
--disable-vdpau \
--disable-videotoolbox \
--disable-audiotoolbox \
--disable-appkit \
--disable-alsa \
--disable-cuda \
@@ -325,7 +350,6 @@ make distclean 2>/dev/null 1>/dev/null
--disable-nvenc \
--disable-vaapi \
--disable-vdpau \
--disable-videotoolbox \
${CONFIGURE_POSTFIX} 1>>${BASEDIR}/build.log 2>&1
if [ $? -ne 0 ]; then
+1 -1
View File
@@ -60,6 +60,6 @@ fi
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_fontconfig_package_config "2.13.0"
create_fontconfig_package_config "2.13.1"
make install || exit 1
+3 -3
View File
@@ -57,14 +57,14 @@ cmake -Wno-dev \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DENABLE_PIC=1 \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DENABLE_STATIC=1 \
-DENABLE_SHARED=0 \
-DWITH_JPEG8=1 \
-DWITH_SIMD=1 \
-DWITH_TURBOJPEG=0 \
-DWITH_JAVA=0 \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
-DENABLE_SHARED=0 .. || exit 1
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) .. || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
+82
View File
@@ -0,0 +1,82 @@
#!/bin/bash
if [[ -z ${ANDROID_NDK_ROOT} ]]; then
echo -e "(*) ANDROID_NDK_ROOT not defined\n"
exit 1
fi
if [[ -z ${ARCH} ]]; then
echo -e "(*) ARCH not defined\n"
exit 1
fi
if [[ -z ${API} ]]; then
echo -e "(*) API not defined\n"
exit 1
fi
if [[ -z ${BASEDIR} ]]; then
echo -e "(*) BASEDIR not defined\n"
exit 1
fi
# ENABLE COMMON FUNCTIONS
. ${BASEDIR}/build/android-common.sh
# PREPARING PATHS & DEFINING ${INSTALL_PKG_CONFIG_DIR}
LIB_NAME="leptonica"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export CPPFLAGS="-I${BASEDIR}/prebuilt/android-$(get_target_build)/giflib/include"
export LDFLAGS="$(get_ldflags ${LIB_NAME}) -L${BASEDIR}/prebuilt/android-$(get_target_build)/giflib/lib -lgif"
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
export LIBPNG_CFLAGS="$(pkg-config --cflags libpng)"
export LIBPNG_LIBS="$(pkg-config --libs --static libpng)"
export LIBWEBP_CFLAGS="$(pkg-config --cflags libwebp)"
export LIBWEBP_LIBS="$(pkg-config --libs --static libwebp)"
export LIBTIFF_CFLAGS="$(pkg-config --cflags libtiff-4)"
export LIBTIFF_LIBS="$(pkg-config --libs --static libtiff-4)"
export ZLIB_CFLAGS="$(pkg-config --cflags zlib)"
export ZLIB_LIBS="$(pkg-config --libs --static zlib)"
export JPEG_CFLAGS="$(pkg-config --cflags libjpeg)"
export JPEG_LIBS="$(pkg-config --libs --static libjpeg)"
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
# RECONFIGURING IF REQUESTED
if [[ ${RECONF_leptonica} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-zlib \
--with-libpng \
--with-jpeg \
--with-giflib \
--with-libtiff \
--with-libwebp \
--enable-static \
--disable-shared \
--disable-fast-install \
--disable-programs \
--host=${TARGET_HOST} || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp lept.pc ${INSTALL_PKG_CONFIG_DIR}
make install || exit 1
+2 -1
View File
@@ -77,6 +77,7 @@ cmake -Wno-dev \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
${ARCH_OPTIONS} \
-DENABLE_TESTS=0 \
-DENABLE_EXAMPLES=0 \
@@ -88,6 +89,6 @@ cmake -Wno-dev \
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libaom_package_config "0.1.0"
create_libaom_package_config "1.0.0"
make install || exit 1
+63
View File
@@ -0,0 +1,63 @@
#!/bin/bash
if [[ -z ${ANDROID_NDK_ROOT} ]]; then
echo -e "(*) ANDROID_NDK_ROOT not defined\n"
exit 1
fi
if [[ -z ${ARCH} ]]; then
echo -e "(*) ARCH not defined\n"
exit 1
fi
if [[ -z ${API} ]]; then
echo -e "(*) API not defined\n"
exit 1
fi
if [[ -z ${BASEDIR} ]]; then
echo -e "(*) BASEDIR not defined\n"
exit 1
fi
# ENABLE COMMON FUNCTIONS
. ${BASEDIR}/build/android-common.sh
# PREPARING PATHS & DEFINING ${INSTALL_PKG_CONFIG_DIR}
LIB_NAME="libsndfile"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
if [[ ! -f ${BASEDIR}/src/${LIB_NAME}/configure ]] || [[ ${RECONF_libsndfile} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--disable-sqlite \
--disable-alsa \
--disable-full-suite \
--disable-external-libs \
--host=${TARGET_HOST} || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
make install || exit 1
+1
View File
@@ -66,6 +66,7 @@ cmake -Wno-dev \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DUSE_OMP=0 \
${ASM_FLAGS} \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
+1
View File
@@ -66,6 +66,7 @@ cmake -Wno-dev \
-DTIFF_LIBRARY="${BASEDIR}/prebuilt/android-$(get_target_build)/tiff/lib" \
-DZLIB_INCLUDE_DIR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot/usr/include" \
-DZLIB_LIBRARY="${ANDROID_NDK_ROOT}/platform/android-${API}/arch-$(get_target_build)/usr/lib" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
-DBUILD_SHARED_LIBS=0 .. || exit 1
+61
View File
@@ -0,0 +1,61 @@
#!/bin/bash
if [[ -z ${ANDROID_NDK_ROOT} ]]; then
echo -e "(*) ANDROID_NDK_ROOT not defined\n"
exit 1
fi
if [[ -z ${ARCH} ]]; then
echo -e "(*) ARCH not defined\n"
exit 1
fi
if [[ -z ${API} ]]; then
echo -e "(*) API not defined\n"
exit 1
fi
if [[ -z ${BASEDIR} ]]; then
echo -e "(*) BASEDIR not defined\n"
exit 1
fi
# ENABLE COMMON FUNCTIONS
. ${BASEDIR}/build/android-common.sh
# PREPARING PATHS & DEFINING ${INSTALL_PKG_CONFIG_DIR}
LIB_NAME="sdl"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
# RECONFIGURING IF REQUESTED
if [[ ${RECONF_sdl} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--without-x \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
make install || exit 1
+1
View File
@@ -57,6 +57,7 @@ cmake -Wno-dev \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DSNAPPY_BUILD_TESTS=0 \
-DHAVE_LIBLZO2=0 \
-DHAVE_LIBZ=1 \
+1
View File
@@ -57,6 +57,7 @@ cmake -Wno-dev \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DBUILD_TESTS=0 \
-DWITH_DEV_TRACE=0 \
-DWITH_LSR_BINDINGS=0 \
+72
View File
@@ -0,0 +1,72 @@
#!/bin/bash
if [[ -z ${ANDROID_NDK_ROOT} ]]; then
echo -e "(*) ANDROID_NDK_ROOT not defined\n"
exit 1
fi
if [[ -z ${ARCH} ]]; then
echo -e "(*) ARCH not defined\n"
exit 1
fi
if [[ -z ${API} ]]; then
echo -e "(*) API not defined\n"
exit 1
fi
if [[ -z ${BASEDIR} ]]; then
echo -e "(*) BASEDIR not defined\n"
exit 1
fi
# ENABLE COMMON FUNCTIONS
. ${BASEDIR}/build/android-common.sh
# PREPARING PATHS & DEFINING ${INSTALL_PKG_CONFIG_DIR}
LIB_NAME="tesseract"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
# RECONFIGURING IF REQUESTED
if [[ ! -f ${BASEDIR}/src/${LIB_NAME}/configure ]] || [[ ${RECONF_tesseract} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
export LEPTONICA_CFLAGS="-I${BASEDIR}/prebuilt/android-$(get_target_build)/leptonica/include/leptonica"
export LEPTONICA_LIBS="-L${BASEDIR}/prebuilt/android-$(get_target_build)/leptonica/lib -llept"
# MANUALLY SET ENDIANNESS
export ac_cv_c_bigendian=no
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--disable-debug \
--disable-graphics \
--disable-cube \
--disable-tessdata-prefix \
--disable-largefile \
--host=${TARGET_HOST} || exit 1
${SED_INLINE} 's/\-lrt//g' ${BASEDIR}/src/${LIB_NAME}/api/Makefile
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_tesseract_package_config "3.05.02"
make install || exit 1
+63
View File
@@ -0,0 +1,63 @@
#!/bin/bash
if [[ -z ${ANDROID_NDK_ROOT} ]]; then
echo -e "(*) ANDROID_NDK_ROOT not defined\n"
exit 1
fi
if [[ -z ${ARCH} ]]; then
echo -e "(*) ARCH not defined\n"
exit 1
fi
if [[ -z ${API} ]]; then
echo -e "(*) API not defined\n"
exit 1
fi
if [[ -z ${BASEDIR} ]]; then
echo -e "(*) BASEDIR not defined\n"
exit 1
fi
# ENABLE COMMON FUNCTIONS
. ${BASEDIR}/build/android-common.sh
# PREPARING PATHS & DEFINING ${INSTALL_PKG_CONFIG_DIR}
LIB_NAME="twolame"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
# RECONFIGURING IF REQUESTED
if [[ ${RECONF_twolame} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
export SNDFILE_CFLAGS="$(pkg-config --cflags sndfile)"
export SNDFILE_LIBS="$(pkg-config --libs --static sndfile)"
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
make install || exit 1
+12 -14
View File
@@ -43,20 +43,18 @@ fi
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
ASM_OPTIONS=""
X265_SYSTEM_PROCESSOR="${ARCH}"
case ${ARCH} in
arm-v7a | arm-v7a-neon)
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=1 -DSSE2_FOUND=0 -DSSE3_FOUND=0"
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=1"
;;
arm64-v8a)
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=1 -DSSE2_FOUND=0 -DSSE3_FOUND=0"
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=1"
;;
x86)
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=0 -DSSE2_FOUND=1 -DSSE3_FOUND=1"
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=0"
;;
x86-64)
ASM_OPTIONS="-DENABLE_ASSEMBLY=1 -DCROSS_COMPILE_ARM=0 -DSSE2_FOUND=1 -DSSE3_FOUND=1"
X265_SYSTEM_PROCESSOR="x86_64"
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=0"
;;
esac
@@ -67,12 +65,11 @@ fi
mkdir cmake-build || exit 1
cd cmake-build || exit 1
# fix x86 and x86_64 assembly
${SED_INLINE} 's/\-DPREFIX//g' ${BASEDIR}/src/x265/source/cmake/CMakeASM_NASMInformation.cmake
${SED_INLINE} 's/win/elf/g' ${BASEDIR}/src/x265/source/cmake/CMakeASM_NASMInformation.cmake
# fix pointer array assignments
${SED_INLINE} 's/parseCpuName(value, bError)/parseCpuName(value, bError, 0)/g' ${BASEDIR}/src/x265/source/common/param.cpp
# apply detect512 patch
rc=$(download "https://bitbucket.org/multicoreware/x265/issues/attachments/442/multicoreware/x265/1539002893.24/442/enable512.diff" "enable512.diff")
cd ${BASEDIR}/src/${LIB_NAME}/source/common
patch -p3 < ${MOBILE_FFMPEG_TMPDIR}/enable512.diff
cd ${BASEDIR}/src/${LIB_NAME}/cmake-build
cmake -Wno-dev \
-DCMAKE_VERBOSE_MAKEFILE=0 \
@@ -89,16 +86,17 @@ cmake -Wno-dev \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DSTATIC_LINK_CRT=1 \
-DENABLE_PIC=1 \
-DENABLE_CLI=0 \
${ASM_OPTIONS} \
-DCMAKE_SYSTEM_PROCESSOR="${X265_SYSTEM_PROCESSOR}" \
-DCMAKE_SYSTEM_PROCESSOR="${ARCH}" \
-DENABLE_SHARED=0 ../source || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_x265_package_config "2.8"
create_x265_package_config "2.9"
make install || exit 1
+115 -35
View File
@@ -46,18 +46,47 @@ get_library_name() {
25) echo "soxr" ;;
26) echo "libaom" ;;
27) echo "chromaprint" ;;
28) echo "giflib" ;;
29) echo "jpeg" ;;
30) echo "libogg" ;;
31) echo "libpng" ;;
32) echo "libuuid" ;;
33) echo "nettle" ;;
34) echo "tiff" ;;
35) echo "expat" ;;
36) echo "ios-zlib" ;;
37) echo "ios-audiotoolbox" ;;
38) echo "ios-coreimage" ;;
39) echo "ios-bzip2" ;;
28) echo "twolame" ;;
29) echo "sdl" ;;
30) echo "tesseract" ;;
31) echo "giflib" ;;
32) echo "jpeg" ;;
33) echo "libogg" ;;
34) echo "libpng" ;;
35) echo "libuuid" ;;
36) echo "nettle" ;;
37) echo "tiff" ;;
38) echo "expat" ;;
39) echo "libsndfile" ;;
40) echo "leptonica" ;;
41) echo "ios-zlib" ;;
42) echo "ios-audiotoolbox" ;;
43) echo "ios-coreimage" ;;
44) echo "ios-bzip2" ;;
45) echo "ios-videotoolbox" ;;
46) echo "ios-avfoundation" ;;
esac
}
get_static_archive_name() {
case $1 in
5) echo "libmp3lame.a" ;;
6) echo "libass.a" ;;
10) echo "libvpx.a" ;;
12) echo "libxml2.a" ;;
21) echo "libvidstab.a" ;;
22) echo "libilbc.a" ;;
26) echo "libaom.a" ;;
28) echo "libtwolame.a" ;;
29) echo "libSDL2.a" ;;
30) echo "libtesseract.a" ;;
31) echo "libgif.a" ;;
33) echo "libogg.a" ;;
34) echo "libpng.a" ;;
35) echo "libuuid.a" ;;
39) echo "libsndfile.a" ;;
40) echo "liblept.a" ;;
*) echo lib$(get_library_name $1).a
esac
}
@@ -72,7 +101,7 @@ get_arch_name() {
}
get_target_host() {
echo "$(get_target_arch)-apple-darwin"
echo "$(get_target_arch)-ios-darwin"
}
get_target_arch() {
@@ -188,24 +217,37 @@ get_app_specific_cflags() {
APP_FLAGS=""
case $1 in
libwebp | xvidcore)
APP_FLAGS="-fno-common -DPIC"
;;
shine)
APP_FLAGS="-Wno-unused-function"
fontconfig)
case ${ARCH} in
armv7 | armv7s | arm64)
APP_FLAGS="-std=c99 -Wno-unused-function -D__IPHONE_OS_MIN_REQUIRED -D__IPHONE_VERSION_MIN_REQUIRED=30000"
;;
*)
APP_FLAGS="-std=c99 -Wno-unused-function"
;;
esac
;;
ffmpeg)
APP_FLAGS="-Wno-unused-function -DPIC"
;;
soxr | snappy)
APP_FLAGS="-std=gnu99 -Wno-unused-function -DPIC"
;;
kvazaar)
APP_FLAGS="-std=gnu99 -Wno-unused-function"
;;
leptonica)
APP_FLAGS="-std=c99 -Wno-unused-function -DOS_IOS"
;;
libwebp | xvidcore)
APP_FLAGS="-fno-common -DPIC"
;;
mobile-ffmpeg)
APP_FLAGS="-std=c99 -Wno-unused-function -Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable -DPIC -fobjc-arc"
;;
shine)
APP_FLAGS="-Wno-unused-function"
;;
soxr | snappy)
APP_FLAGS="-std=gnu99 -Wno-unused-function -DPIC"
;;
x265)
APP_FLAGS="-Wno-unused-function"
;;
@@ -221,7 +263,11 @@ get_cflags() {
ARCH_FLAGS=$(get_arch_specific_cflags)
APP_FLAGS=$(get_app_specific_cflags $1)
COMMON_FLAGS=$(get_common_cflags)
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
else
OPTIMIZATION_FLAGS=""
fi
MIN_VERSION_FLAGS=$(get_min_version_cflags $1)
COMMON_INCLUDES=$(get_common_includes)
@@ -232,7 +278,11 @@ get_asmflags() {
ARCH_FLAGS=$(get_arch_specific_cflags)
APP_FLAGS=$(get_app_specific_cflags $1)
COMMON_FLAGS=$(get_common_cflags)
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
else
OPTIMIZATION_FLAGS=""
fi
MIN_VERSION_FLAGS=$(get_min_version_cflags $1)
COMMON_INCLUDES=$(get_common_includes)
@@ -242,24 +292,31 @@ get_asmflags() {
get_cxxflags() {
local COMMON_CFLAGS="$(get_common_cflags $1) $(get_common_includes $1) $(get_arch_specific_cflags) $(get_min_version_cflags $1)"
local BITCODE_FLAGS=""
case ${ARCH} in
armv7 | armv7s | arm64)
BITCODE_FLAGS="-fembed-bitcode"
;;
esac
case $1 in
x265)
echo "-std=c++11 -fno-exceptions -fembed-bitcode ${COMMON_CFLAGS}"
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
;;
gnutls)
echo "-std=c++11 -fno-rtti -fembed-bitcode ${COMMON_CFLAGS}"
echo "-std=c++11 -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
;;
opencore-amr)
echo "-fno-rtti -fembed-bitcode ${COMMON_CFLAGS}"
echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
;;
libwebp | xvidcore)
echo "-std=c++11 -fno-exceptions -fno-rtti -fembed-bitcode -fno-common -DPIC ${COMMON_CFLAGS}"
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} -fno-common -DPIC ${COMMON_CFLAGS}"
;;
libaom)
echo "-std=c++11 -fno-exceptions -fembed-bitcode ${COMMON_CFLAGS}"
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
;;
*)
echo "-std=c++11 -fno-exceptions -fno-rtti -fembed-bitcode ${COMMON_CFLAGS}"
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
;;
esac
}
@@ -602,6 +659,29 @@ Cflags: -I\${includedir}
EOF
}
create_tesseract_package_config() {
local TESSERACT_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/tesseract.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/tesseract
exec_prefix=\${prefix}
bindir=\${exec_prefix}/bin
datarootdir=\${prefix}/share
datadir=\${datarootdir}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
Name: tesseract
Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google.
URL: https://github.com/tesseract-ocr/tesseract
Version: ${TESSERACT_VERSION}
Requires: lept
Libs: -L\${libdir} -ltesseract
Cflags: -I\${includedir}
EOF
}
create_uuid_package_config() {
local UUID_VERSION="$1"
@@ -723,15 +803,15 @@ download_gpl_library_source() {
GPL_LIB_DEST_DIR="libvidstab"
;;
x264)
GPL_LIB_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20180829-2245-stable.tar.bz2"
GPL_LIB_FILE="x264-snapshot-20180829-2245-stable.tar.bz2"
GPL_LIB_ORIG_DIR="x264-snapshot-20180829-2245-stable"
GPL_LIB_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20181015-2245-stable.tar.bz2"
GPL_LIB_FILE="x264-snapshot-20181015-2245-stable.tar.bz2"
GPL_LIB_ORIG_DIR="x264-snapshot-20181015-2245-stable"
GPL_LIB_DEST_DIR="x264"
;;
x265)
GPL_LIB_URL="https://download.videolan.org/pub/videolan/x265/x265_2.8.tar.gz"
GPL_LIB_FILE="x265-2.8.tar.gz"
GPL_LIB_ORIG_DIR="x265_2.8"
GPL_LIB_URL="https://download.videolan.org/pub/videolan/x265/x265_2.9.tar.gz"
GPL_LIB_FILE="x265-2.9.tar.gz"
GPL_LIB_ORIG_DIR="x265_2.9"
GPL_LIB_DEST_DIR="x265"
;;
xvidcore)
+53 -17
View File
@@ -82,7 +82,7 @@ esac
CONFIGURE_POSTFIX=""
for library in {1..40}
for library in {1..47}
do
if [[ ${!library} -eq 1 ]]; then
ENABLED_LIBRARY=$(get_library_name $((library - 1)))
@@ -193,6 +193,11 @@ do
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static opus)"
CONFIGURE_POSTFIX+=" --enable-libopus"
;;
sdl)
FFMPEG_CFLAGS+=" $(pkg-config --cflags sdl2)"
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static sdl2)"
CONFIGURE_POSTFIX+=" --enable-sdl2"
;;
shine)
FFMPEG_CFLAGS+=" $(pkg-config --cflags shine)"
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static shine)"
@@ -213,6 +218,18 @@ do
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static speex)"
CONFIGURE_POSTFIX+=" --enable-libspeex"
;;
tesseract)
FFMPEG_CFLAGS+=" $(pkg-config --cflags tesseract)"
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static tesseract)"
FFMPEG_CFLAGS+=" $(pkg-config --cflags giflib)"
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static giflib)"
CONFIGURE_POSTFIX+=" --enable-libtesseract"
;;
twolame)
FFMPEG_CFLAGS+=" $(pkg-config --cflags twolame)"
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static twolame)"
CONFIGURE_POSTFIX+=" --enable-libtwolame"
;;
wavpack)
FFMPEG_CFLAGS+=" $(pkg-config --cflags wavpack)"
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static wavpack)"
@@ -263,17 +280,23 @@ do
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static zlib)"
case ${ENABLED_LIBRARY} in
ios-zlib)
CONFIGURE_POSTFIX+=" --enable-zlib"
;;
ios-audiotoolbox)
CONFIGURE_POSTFIX+=" --enable-audiotoolbox"
;;
ios-avfoundation)
CONFIGURE_POSTFIX+=" --enable-avfoundation"
;;
ios-bzip2)
CONFIGURE_POSTFIX+=" --enable-bzlib"
;;
ios-coreimage)
CONFIGURE_POSTFIX+=" --enable-coreimage"
;;
ios-bzip2)
CONFIGURE_POSTFIX+=" --enable-bzlib"
ios-videotoolbox)
CONFIGURE_POSTFIX+=" --enable-videotoolbox"
;;
ios-zlib)
CONFIGURE_POSTFIX+=" --enable-zlib"
;;
esac
;;
@@ -283,18 +306,36 @@ do
# THE FOLLOWING LIBRARIES SHOULD BE EXPLICITLY DISABLED TO PREVENT AUTODETECT
if [[ ${library} -eq 8 ]]; then
CONFIGURE_POSTFIX+=" --disable-iconv"
elif [[ ${library} -eq 37 ]]; then
elif [[ ${library} -eq 42 ]]; then
CONFIGURE_POSTFIX+=" --disable-zlib"
elif [[ ${library} -eq 38 ]]; then
elif [[ ${library} -eq 43 ]]; then
CONFIGURE_POSTFIX+=" --disable-audiotoolbox"
elif [[ ${library} -eq 39 ]]; then
elif [[ ${library} -eq 44 ]]; then
CONFIGURE_POSTFIX+=" --disable-coreimage"
elif [[ ${library} -eq 40 ]]; then
elif [[ ${library} -eq 45 ]]; then
CONFIGURE_POSTFIX+=" --disable-bzlib"
elif [[ ${library} -eq 46 ]]; then
CONFIGURE_POSTFIX+=" --disable-videotoolbox"
elif [[ ${library} -eq 47 ]]; then
CONFIGURE_POSTFIX+=" --disable-avfoundation"
fi
fi
done
# BUILD SHARED (DEFAULT) OR STATIC LIBRARIES
if [[ -z ${MOBILE_FFMPEG_STATIC} ]]; then
BUILD_LIBRARY_OPTIONS="--enable-shared --disable-static";
else
BUILD_LIBRARY_OPTIONS="--enable-static --disable-shared";
fi
# OPTIMIZE FOR SPEED INSTEAD OF SIZE
if [[ -z ${MOBILE_FFMPEG_OPTIMIZED_FOR_SPEED} ]]; then
SIZE_OPTIONS="--enable-small";
else
SIZE_OPTIONS="";
fi
# CFLAGS PARTS
ARCH_CFLAGS=$(get_arch_specific_cflags);
APP_CFLAGS=$(get_app_specific_cflags ${LIB_NAME});
@@ -341,9 +382,9 @@ make distclean 2>/dev/null 1>/dev/null
--enable-asm \
--enable-inline-asm \
--enable-optimizations \
--enable-small \
--enable-swscale \
--enable-shared \
${BUILD_LIBRARY_OPTIONS} \
${SIZE_OPTIONS} \
--disable-openssl \
--disable-xmm-clobber-test \
--disable-debug \
@@ -355,10 +396,8 @@ make distclean 2>/dev/null 1>/dev/null
--disable-manpages \
--disable-podpages \
--disable-txtpages \
--disable-static \
--disable-sndio \
--disable-schannel \
--disable-sdl2 \
--disable-securetransport \
--disable-xlib \
--disable-cuda \
@@ -366,7 +405,6 @@ make distclean 2>/dev/null 1>/dev/null
--disable-nvenc \
--disable-vaapi \
--disable-vdpau \
--disable-videotoolbox \
--disable-appkit \
--disable-alsa \
--disable-cuda \
@@ -374,7 +412,6 @@ make distclean 2>/dev/null 1>/dev/null
--disable-nvenc \
--disable-vaapi \
--disable-vdpau \
--disable-videotoolbox \
${CONFIGURE_POSTFIX} 1>>${BASEDIR}/build.log 2>&1
if [ $? -ne 0 ]; then
@@ -420,7 +457,6 @@ cp -f ${BASEDIR}/src/ffmpeg/libavutil/arm/timer.h ${BASEDIR}/prebuilt/ios-$(get_
cp -f ${BASEDIR}/src/ffmpeg/libavutil/aarch64/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/aarch64
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/emms.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/x86
if [ $? -eq 0 ]; then
echo "ok"
else
+1 -1
View File
@@ -65,6 +65,6 @@ fi
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_fontconfig_package_config "2.13.0"
create_fontconfig_package_config "2.13.1"
make install || exit 1
+1
View File
@@ -64,6 +64,7 @@ cmake -Wno-dev \
-DCMAKE_AS="$AS" \
-DENABLE_PIC=1 \
-DENABLE_STATIC=1 \
-DENABLE_SHARED=0 \
-DWITH_JPEG8=1 \
-DWITH_SIMD=1 \
-DWITH_TURBOJPEG=0 \
+87
View File
@@ -0,0 +1,87 @@
#!/bin/bash
if [[ -z ${ARCH} ]]; then
echo -e "(*) ARCH not defined\n"
exit 1
fi
if [[ -z ${IOS_MIN_VERSION} ]]; then
echo -e "(*) IOS_MIN_VERSION not defined\n"
exit 1
fi
if [[ -z ${TARGET_SDK} ]]; then
echo -e "(*) TARGET_SDK not defined\n"
exit 1
fi
if [[ -z ${SDK_PATH} ]]; then
echo -e "(*) SDK_PATH not defined\n"
exit 1
fi
if [[ -z ${BASEDIR} ]]; then
echo -e "(*) BASEDIR not defined\n"
exit 1
fi
# ENABLE COMMON FUNCTIONS
. ${BASEDIR}/build/ios-common.sh
# PREPARING PATHS & DEFINING ${INSTALL_PKG_CONFIG_DIR}
LIB_NAME="leptonica"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
export CFLAGS="$(get_cflags ${LIB_NAME})"
export CXXFLAGS="$(get_cxxflags ${LIB_NAME})"
export CPPFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib/include"
export LDFLAGS="$(get_ldflags ${LIB_NAME}) -L${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib/lib -lgif"
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
export LIBPNG_CFLAGS="$(pkg-config --cflags libpng)"
export LIBPNG_LIBS="$(pkg-config --libs --static libpng)"
export LIBWEBP_CFLAGS="$(pkg-config --cflags libwebp)"
export LIBWEBP_LIBS="$(pkg-config --libs --static libwebp)"
export LIBTIFF_CFLAGS="$(pkg-config --cflags libtiff-4)"
export LIBTIFF_LIBS="$(pkg-config --libs --static libtiff-4)"
export ZLIB_CFLAGS="$(pkg-config --cflags zlib)"
export ZLIB_LIBS="$(pkg-config --libs --static zlib)"
export JPEG_CFLAGS="$(pkg-config --cflags libjpeg)"
export JPEG_LIBS="$(pkg-config --libs --static libjpeg)"
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
# RECONFIGURING IF REQUESTED
if [[ ${RECONF_leptonica} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--with-pic \
--with-zlib \
--with-libpng \
--with-jpeg \
--with-giflib \
--with-libtiff \
--with-libwebp \
--enable-static \
--disable-shared \
--disable-fast-install \
--disable-programs \
--host=${TARGET_HOST} || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp lept.pc ${INSTALL_PKG_CONFIG_DIR}
make install || exit 1
+1
View File
@@ -35,6 +35,7 @@ set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CPPFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
+68
View File
@@ -0,0 +1,68 @@
#!/bin/bash
if [[ -z ${ARCH} ]]; then
echo -e "(*) ARCH not defined\n"
exit 1
fi
if [[ -z ${IOS_MIN_VERSION} ]]; then
echo -e "(*) IOS_MIN_VERSION not defined\n"
exit 1
fi
if [[ -z ${TARGET_SDK} ]]; then
echo -e "(*) TARGET_SDK not defined\n"
exit 1
fi
if [[ -z ${SDK_PATH} ]]; then
echo -e "(*) SDK_PATH not defined\n"
exit 1
fi
if [[ -z ${BASEDIR} ]]; then
echo -e "(*) BASEDIR not defined\n"
exit 1
fi
# ENABLE COMMON FUNCTIONS
. ${BASEDIR}/build/ios-common.sh
# PREPARING PATHS & DEFINING ${INSTALL_PKG_CONFIG_DIR}
LIB_NAME="libsndfile"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
if [[ ! -f ${BASEDIR}/src/${LIB_NAME}/configure ]] || [[ ${RECONF_libsndfile} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
--disable-shared \
--disable-fast-install \
--disable-sqlite \
--disable-alsa \
--disable-full-suite \
--disable-external-libs \
--host=${TARGET_HOST} || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
make install || exit 1
+2 -2
View File
@@ -58,11 +58,11 @@ case ${ARCH} in
;;
i386)
TARGET="x86-iphonesimulator-gcc"
ASM_FLAGS="--enable-runtime-cpu-detect"
ASM_FLAGS="--enable-runtime-cpu-detect --disable-avx512"
;;
x86-64)
TARGET="x86_64-iphonesimulator-gcc"
ASM_FLAGS="--enable-runtime-cpu-detect"
ASM_FLAGS="--enable-runtime-cpu-detect --disable-avx512"
;;
esac
+15 -3
View File
@@ -39,9 +39,16 @@ COMMON_LDFLAGS=$(get_ldflags ${LIB_NAME})
export CFLAGS="${COMMON_CFLAGS} -I${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include"
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS="${COMMON_LDFLAGS} -L${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/lib -framework Foundation -lavdevice"
export LDFLAGS="${COMMON_LDFLAGS} -L${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/lib -framework Foundation -framework CoreVideo -lavdevice"
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
# BUILD SHARED (DEFAULT) OR STATIC LIBRARIES
if [[ -z ${MOBILE_FFMPEG_STATIC} ]]; then
BUILD_LIBRARY_OPTIONS="--enable-shared --disable-static";
else
BUILD_LIBRARY_OPTIONS="--enable-static --disable-shared";
fi
cd ${BASEDIR}/ios || exit 1
echo -n -e "\n${LIB_NAME}: "
@@ -53,6 +60,11 @@ if [[ ${RECONF_mobile_ffmpeg} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
VIDEOTOOLBOX_SUPPORT_FLAG=""
if [[ ${46} -eq 1 ]]; then
VIDEOTOOLBOX_SUPPORT_FLAG="--enable-videotoolbox"
fi
# REMOVING OPTIONS FROM CONFIGURE TO FIX THE FOLLOWING ERROR
# ld: -flat_namespace and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
${SED_INLINE} 's/$wl-flat_namespace //g' configure
@@ -63,8 +75,8 @@ ${SED_INLINE} 's/${wl}suppress//g' configure
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-shared \
--disable-static \
${BUILD_LIBRARY_OPTIONS} \
${VIDEOTOOLBOX_SUPPORT_FLAG} \
--disable-fast-install \
--disable-maintainer-mode \
--host=${TARGET_HOST} 1>>${BASEDIR}/build.log 2>&1
+66
View File
@@ -0,0 +1,66 @@
#!/bin/bash
if [[ -z ${ARCH} ]]; then
echo -e "(*) ARCH not defined\n"
exit 1
fi
if [[ -z ${IOS_MIN_VERSION} ]]; then
echo -e "(*) IOS_MIN_VERSION not defined\n"
exit 1
fi
if [[ -z ${TARGET_SDK} ]]; then
echo -e "(*) TARGET_SDK not defined\n"
exit 1
fi
if [[ -z ${SDK_PATH} ]]; then
echo -e "(*) SDK_PATH not defined\n"
exit 1
fi
if [[ -z ${BASEDIR} ]]; then
echo -e "(*) BASEDIR not defined\n"
exit 1
fi
# ENABLE COMMON FUNCTIONS
. ${BASEDIR}/build/ios-common.sh
# PREPARING PATHS & DEFINING ${INSTALL_PKG_CONFIG_DIR}
LIB_NAME="sdl"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
# RECONFIGURING IF REQUESTED
if [[ ${RECONF_sdl} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
export ac_cv_header_libunwind_h=no
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
--disable-shared \
--host=${TARGET_HOST} || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
make install || exit 1
+74
View File
@@ -0,0 +1,74 @@
#!/bin/bash
if [[ -z ${ARCH} ]]; then
echo -e "(*) ARCH not defined\n"
exit 1
fi
if [[ -z ${IOS_MIN_VERSION} ]]; then
echo -e "(*) IOS_MIN_VERSION not defined\n"
exit 1
fi
if [[ -z ${TARGET_SDK} ]]; then
echo -e "(*) TARGET_SDK not defined\n"
exit 1
fi
if [[ -z ${SDK_PATH} ]]; then
echo -e "(*) SDK_PATH not defined\n"
exit 1
fi
if [[ -z ${BASEDIR} ]]; then
echo -e "(*) BASEDIR not defined\n"
exit 1
fi
# ENABLE COMMON FUNCTIONS
. ${BASEDIR}/build/ios-common.sh
# PREPARING PATHS & DEFINING ${INSTALL_PKG_CONFIG_DIR}
LIB_NAME="tesseract"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
# RECONFIGURING IF REQUESTED
if [[ ! -f ${BASEDIR}/src/${LIB_NAME}/configure ]] || [[ ${RECONF_tesseract} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
export LEPTONICA_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/leptonica/include/leptonica"
export LEPTONICA_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/leptonica/lib -llept"
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
--disable-shared \
--disable-fast-install \
--disable-debug \
--disable-graphics \
--disable-cube \
--disable-tessdata-prefix \
--disable-largefile \
--host=${TARGET_HOST} || exit 1
${SED_INLINE} 's/$wl-bind_at_load//g' libtool
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_tesseract_package_config "3.05.02"
make install || exit 1
+68
View File
@@ -0,0 +1,68 @@
#!/bin/bash
if [[ -z ${ARCH} ]]; then
echo -e "(*) ARCH not defined\n"
exit 1
fi
if [[ -z ${IOS_MIN_VERSION} ]]; then
echo -e "(*) IOS_MIN_VERSION not defined\n"
exit 1
fi
if [[ -z ${TARGET_SDK} ]]; then
echo -e "(*) TARGET_SDK not defined\n"
exit 1
fi
if [[ -z ${SDK_PATH} ]]; then
echo -e "(*) SDK_PATH not defined\n"
exit 1
fi
if [[ -z ${BASEDIR} ]]; then
echo -e "(*) BASEDIR not defined\n"
exit 1
fi
# ENABLE COMMON FUNCTIONS
. ${BASEDIR}/build/ios-common.sh
# PREPARING PATHS & DEFINING ${INSTALL_PKG_CONFIG_DIR}
LIB_NAME="twolame"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
# RECONFIGURING IF REQUESTED
if [[ ${RECONF_twolame} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
export SNDFILE_CFLAGS="$(pkg-config --cflags sndfile)"
export SNDFILE_LIBS="$(pkg-config --libs --static sndfile)"
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
make install || exit 1
+9 -4
View File
@@ -50,13 +50,13 @@ cd ${BASEDIR}/src/${LIB_NAME} || exit 1
ASM_OPTIONS=""
case ${ARCH} in
armv7 | armv7s)
ASM_OPTIONS="-DENABLE_ASSEMBLY=1 -DCROSS_COMPILE_ARM=1 -DSSE2_FOUND=0 -DSSE3_FOUND=0"
ASM_OPTIONS="-DENABLE_ASSEMBLY=1 -DCROSS_COMPILE_ARM=1"
;;
arm64)
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=1 -DSSE2_FOUND=0 -DSSE3_FOUND=0"
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=1"
;;
*)
ASM_OPTIONS="-DENABLE_ASSEMBLY=1 -DCROSS_COMPILE_ARM=0 -DSSE2_FOUND=1 -DSSE3_FOUND=1"
ASM_OPTIONS="-DENABLE_ASSEMBLY=1 -DCROSS_COMPILE_ARM=0"
;;
esac
@@ -67,12 +67,17 @@ fi
mkdir cmake-build || exit 1
cd cmake-build || exit 1
# apply detect512 patch
rc=$(download "https://bitbucket.org/multicoreware/x265/issues/attachments/442/multicoreware/x265/1539002893.24/442/enable512.diff" "enable512.diff")
cd ${BASEDIR}/src/${LIB_NAME}/source/common
patch -p3 < ${MOBILE_FFMPEG_TMPDIR}/enable512.diff
cd ${BASEDIR}/src/${LIB_NAME}/cmake-build
# fix x86 and x86_64 assembly
${SED_INLINE} 's/win64/macho64 -DPREFIX/g' ${BASEDIR}/src/x265/source/cmake/CMakeASM_NASMInformation.cmake
${SED_INLINE} 's/win/macho/g' ${BASEDIR}/src/x265/source/cmake/CMakeASM_NASMInformation.cmake
# fix pointer array assignments
${SED_INLINE} 's/parseCpuName(value, bError)/parseCpuName(value, bError, 0)/g' ${BASEDIR}/src/x265/source/common/param.cpp
${SED_INLINE} '/addAvg/s/ p.pu/ *p.pu/g' ${BASEDIR}/src/x265/source/common/arm/asm-primitives.cpp
${SED_INLINE} '/convert_p2s/s/ p.pu/ *p.pu/g' ${BASEDIR}/src/x265/source/common/arm/asm-primitives.cpp
${SED_INLINE} '/pixelavg_pp/s/ p.pu/ *p.pu/g' ${BASEDIR}/src/x265/source/common/arm/asm-primitives.cpp
+34 -1
View File
@@ -38,6 +38,8 @@ check_if_dependency_rebuilt() {
;;
giflib)
set_dependency_rebuilt_flag "libwebp"
set_dependency_rebuilt_flag "leptonica"
set_dependency_rebuilt_flag "tesseract"
;;
gmp)
set_dependency_rebuilt_flag "gnutls"
@@ -46,6 +48,11 @@ check_if_dependency_rebuilt() {
jpeg)
set_dependency_rebuilt_flag "tiff"
set_dependency_rebuilt_flag "libwebp"
set_dependency_rebuilt_flag "leptonica"
set_dependency_rebuilt_flag "tesseract"
;;
leptonica)
set_dependency_rebuilt_flag "tesseract"
;;
libiconv)
set_dependency_rebuilt_flag "fontconfig"
@@ -62,6 +69,11 @@ check_if_dependency_rebuilt() {
set_dependency_rebuilt_flag "freetype"
set_dependency_rebuilt_flag "libwebp"
set_dependency_rebuilt_flag "libass"
set_dependency_rebuilt_flag "leptonica"
set_dependency_rebuilt_flag "tesseract"
;;
libsndfile)
set_dependency_rebuilt_flag "twolame"
;;
libuuid)
set_dependency_rebuilt_flag "fontconfig"
@@ -70,11 +82,17 @@ check_if_dependency_rebuilt() {
libvorbis)
set_dependency_rebuilt_flag "libtheora"
;;
libwebp)
set_dependency_rebuilt_flag "leptonica"
set_dependency_rebuilt_flag "tesseract"
;;
nettle)
set_dependency_rebuilt_flag "gnutls"
;;
tiff)
set_dependency_rebuilt_flag "libwebp"
set_dependency_rebuilt_flag "leptonica"
set_dependency_rebuilt_flag "tesseract"
;;
esac
}
@@ -100,7 +118,7 @@ fi
# FILTERING WHICH EXTERNAL LIBRARIES WILL BE BUILT
# NOTE THAT BUILT-IN LIBRARIES ARE FORWARDED TO FFMPEG SCRIPT WITHOUT ANY PROCESSING
enabled_library_list=()
for library in {1..36}
for library in {1..41}
do
if [[ ${!library} -eq 1 ]]; then
ENABLED_LIBRARY=$(get_library_name $((library - 1)))
@@ -139,6 +157,11 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do
run=1
fi
;;
leptonica)
if [[ ! -z $OK_giflib ]] && [[ ! -z $OK_jpeg ]] && [[ ! -z $OK_libpng ]] && [[ ! -z $OK_tiff ]] && [[ ! -z $OK_libwebp ]]; then
run=1
fi
;;
libass)
if [[ ! -z $OK_libuuid ]] && [[ ! -z $OK_expat ]] && [[ ! -z $OK_libiconv ]] && [[ ! -z $OK_freetype ]] && [[ ! -z $OK_fribidi ]] && [[ ! -z $OK_fontconfig ]] && [[ ! -z $OK_libpng ]]; then
run=1
@@ -169,11 +192,21 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do
run=1
fi
;;
tesseract)
if [[ ! -z $OK_leptonica ]]; then
run=1
fi
;;
tiff)
if [[ ! -z $OK_jpeg ]]; then
run=1
fi
;;
twolame)
if [[ ! -z $OK_libsndfile ]]; then
run=1
fi
;;
*)
run=1
;;
+35 -2
View File
@@ -43,6 +43,8 @@ check_if_dependency_rebuilt() {
;;
giflib)
set_dependency_rebuilt_flag "libwebp"
set_dependency_rebuilt_flag "leptonica"
set_dependency_rebuilt_flag "tesseract"
;;
gmp)
set_dependency_rebuilt_flag "gnutls"
@@ -51,6 +53,11 @@ check_if_dependency_rebuilt() {
jpeg)
set_dependency_rebuilt_flag "tiff"
set_dependency_rebuilt_flag "libwebp"
set_dependency_rebuilt_flag "leptonica"
set_dependency_rebuilt_flag "tesseract"
;;
leptonica)
set_dependency_rebuilt_flag "tesseract"
;;
libiconv)
set_dependency_rebuilt_flag "fontconfig"
@@ -67,6 +74,11 @@ check_if_dependency_rebuilt() {
set_dependency_rebuilt_flag "freetype"
set_dependency_rebuilt_flag "libwebp"
set_dependency_rebuilt_flag "libass"
set_dependency_rebuilt_flag "leptonica"
set_dependency_rebuilt_flag "tesseract"
;;
libsndfile)
set_dependency_rebuilt_flag "twolame"
;;
libuuid)
set_dependency_rebuilt_flag "fontconfig"
@@ -75,11 +87,17 @@ check_if_dependency_rebuilt() {
libvorbis)
set_dependency_rebuilt_flag "libtheora"
;;
libwebp)
set_dependency_rebuilt_flag "leptonica"
set_dependency_rebuilt_flag "tesseract"
;;
nettle)
set_dependency_rebuilt_flag "gnutls"
;;
tiff)
set_dependency_rebuilt_flag "libwebp"
set_dependency_rebuilt_flag "leptonica"
set_dependency_rebuilt_flag "tesseract"
;;
esac
}
@@ -105,7 +123,7 @@ fi
# FILTERING WHICH EXTERNAL LIBRARIES WILL BE BUILT
# NOTE THAT BUILT-IN LIBRARIES ARE FORWARDED TO FFMPEG SCRIPT WITHOUT ANY PROCESSING
enabled_library_list=()
for library in {1..36}
for library in {1..41}
do
if [[ ${!library} -eq 1 ]]; then
ENABLED_LIBRARY=$(get_library_name $((library - 1)))
@@ -141,6 +159,11 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do
run=1
fi
;;
leptonica)
if [[ ! -z $OK_giflib ]] && [[ ! -z $OK_jpeg ]] && [[ ! -z $OK_libpng ]] && [[ ! -z $OK_tiff ]] && [[ ! -z $OK_libwebp ]]; then
run=1
fi
;;
libass)
if [[ ! -z $OK_libuuid ]] && [[ ! -z $OK_expat ]] && [[ ! -z $OK_libiconv ]] && [[ ! -z $OK_freetype ]] && [[ ! -z $OK_fribidi ]] && [[ ! -z $OK_fontconfig ]] && [[ ! -z $OK_libpng ]]; then
run=1
@@ -171,11 +194,21 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do
run=1
fi
;;
tesseract)
if [[ ! -z $OK_leptonica ]]; then
run=1
fi
;;
tiff)
if [[ ! -z $OK_jpeg ]]; then
run=1
fi
;;
twolame)
if [[ ! -z $OK_libsndfile ]]; then
run=1
fi
;;
*)
run=1
;;
@@ -249,7 +282,7 @@ fi
if [[ ${SKIP_mobile_ffmpeg} -ne 1 ]]; then
# BUILDING MOBILE FFMPEG
. ${BASEDIR}/build/ios-mobile-ffmpeg.sh || exit 1
. ${BASEDIR}/build/ios-mobile-ffmpeg.sh "$@" || exit 1
else
echo -e "\nmobile-ffmpeg: skipped"
fi
+23 -22
View File
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -69,32 +69,33 @@ $(function() {
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d2c/struct_audio_channel_map.html" target="_self">AudioChannelMap</a></td><td class="desc"></td></tr>
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/dc3/struct_callback_data.html" target="_self">CallbackData</a></td><td class="desc"></td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/de7/struct_filter_graph.html" target="_self">FilterGraph</a></td><td class="desc"></td></tr>
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="df/d37/struct_h_w_accel.html" target="_self">HWAccel</a></td><td class="desc"></td></tr>
<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="de/dc7/struct_h_w_device.html" target="_self">HWDevice</a></td><td class="desc"></td></tr>
<tr id="row_5_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d99/struct_input_file.html" target="_self">InputFile</a></td><td class="desc"></td></tr>
<tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d0c/struct_input_filter.html" target="_self">InputFilter</a></td><td class="desc"></td></tr>
<tr id="row_7_"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_7_" class="arrow" onclick="toggleFolder('7_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/d6e/struct_input_stream.html" target="_self">InputStream</a></td><td class="desc"></td></tr>
<tr id="row_7_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/dfd/struct_input_stream_1_1sub2video.html" target="_self">sub2video</a></td><td class="desc"></td></tr>
<tr id="row_8_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/d1d/struct_option.html" target="_self">Option</a></td><td class="desc"></td></tr>
<tr id="row_9_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/d1e/struct_option_def.html" target="_self">OptionDef</a></td><td class="desc"></td></tr>
<tr id="row_10_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d69/struct_option_group.html" target="_self">OptionGroup</a></td><td class="desc"></td></tr>
<tr id="row_11_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/dd7/struct_option_group_def.html" target="_self">OptionGroupDef</a></td><td class="desc"></td></tr>
<tr id="row_12_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d4f/struct_option_group_list.html" target="_self">OptionGroupList</a></td><td class="desc"></td></tr>
<tr id="row_13_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/db5/struct_option_parse_context.html" target="_self">OptionParseContext</a></td><td class="desc"></td></tr>
<tr id="row_14_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="df/d77/struct_options_context.html" target="_self">OptionsContext</a></td><td class="desc"></td></tr>
<tr id="row_15_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="de/df2/struct_output_file.html" target="_self">OutputFile</a></td><td class="desc"></td></tr>
<tr id="row_16_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d0/d0f/struct_output_filter.html" target="_self">OutputFilter</a></td><td class="desc"></td></tr>
<tr id="row_17_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/dde/struct_output_stream.html" target="_self">OutputStream</a></td><td class="desc"></td></tr>
<tr id="row_18_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/da5/struct_specifier_opt.html" target="_self">SpecifierOpt</a></td><td class="desc"></td></tr>
<tr id="row_19_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d60/struct_stream_map.html" target="_self">StreamMap</a></td><td class="desc"></td></tr>
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d8e/struct_benchmark_time_stamps.html" target="_self">BenchmarkTimeStamps</a></td><td class="desc"></td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/dc3/struct_callback_data.html" target="_self">CallbackData</a></td><td class="desc"></td></tr>
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/de7/struct_filter_graph.html" target="_self">FilterGraph</a></td><td class="desc"></td></tr>
<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="df/d37/struct_h_w_accel.html" target="_self">HWAccel</a></td><td class="desc"></td></tr>
<tr id="row_5_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="de/dc7/struct_h_w_device.html" target="_self">HWDevice</a></td><td class="desc"></td></tr>
<tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d99/struct_input_file.html" target="_self">InputFile</a></td><td class="desc"></td></tr>
<tr id="row_7_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d0c/struct_input_filter.html" target="_self">InputFilter</a></td><td class="desc"></td></tr>
<tr id="row_8_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_8_" class="arrow" onclick="toggleFolder('8_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/d6e/struct_input_stream.html" target="_self">InputStream</a></td><td class="desc"></td></tr>
<tr id="row_8_0_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/dfd/struct_input_stream_1_1sub2video.html" target="_self">sub2video</a></td><td class="desc"></td></tr>
<tr id="row_9_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/d1d/struct_option.html" target="_self">Option</a></td><td class="desc"></td></tr>
<tr id="row_10_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/d1e/struct_option_def.html" target="_self">OptionDef</a></td><td class="desc"></td></tr>
<tr id="row_11_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d69/struct_option_group.html" target="_self">OptionGroup</a></td><td class="desc"></td></tr>
<tr id="row_12_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/dd7/struct_option_group_def.html" target="_self">OptionGroupDef</a></td><td class="desc"></td></tr>
<tr id="row_13_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d4f/struct_option_group_list.html" target="_self">OptionGroupList</a></td><td class="desc"></td></tr>
<tr id="row_14_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/db5/struct_option_parse_context.html" target="_self">OptionParseContext</a></td><td class="desc"></td></tr>
<tr id="row_15_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="df/d77/struct_options_context.html" target="_self">OptionsContext</a></td><td class="desc"></td></tr>
<tr id="row_16_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="de/df2/struct_output_file.html" target="_self">OutputFile</a></td><td class="desc"></td></tr>
<tr id="row_17_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d0/d0f/struct_output_filter.html" target="_self">OutputFilter</a></td><td class="desc"></td></tr>
<tr id="row_18_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/dde/struct_output_stream.html" target="_self">OutputStream</a></td><td class="desc"></td></tr>
<tr id="row_19_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/da5/struct_specifier_opt.html" target="_self">SpecifierOpt</a></td><td class="desc"></td></tr>
<tr id="row_20_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d60/struct_stream_map.html" target="_self">StreamMap</a></td><td class="desc"></td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
+18 -16
View File
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -66,31 +66,33 @@ $(function() {
<div class="title">Data Structure Index</div> </div>
</div><!--header-->
<div class="contents">
<div class="qindex"><a class="qindex" href="#letter_a">a</a>&#160;|&#160;<a class="qindex" href="#letter_c">c</a>&#160;|&#160;<a class="qindex" href="#letter_f">f</a>&#160;|&#160;<a class="qindex" href="#letter_h">h</a>&#160;|&#160;<a class="qindex" href="#letter_i">i</a>&#160;|&#160;<a class="qindex" href="#letter_o">o</a>&#160;|&#160;<a class="qindex" href="#letter_s">s</a></div>
<div class="qindex"><a class="qindex" href="#letter_a">a</a>&#160;|&#160;<a class="qindex" href="#letter_b">b</a>&#160;|&#160;<a class="qindex" href="#letter_c">c</a>&#160;|&#160;<a class="qindex" href="#letter_f">f</a>&#160;|&#160;<a class="qindex" href="#letter_h">h</a>&#160;|&#160;<a class="qindex" href="#letter_i">i</a>&#160;|&#160;<a class="qindex" href="#letter_o">o</a>&#160;|&#160;<a class="qindex" href="#letter_s">s</a></div>
<table class="classindex">
<tr><td rowspan="2" valign="bottom"><a name="letter_a"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;a&#160;&#160;</div></td></tr></table>
</td><td rowspan="2" valign="bottom"><a name="letter_f"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;f&#160;&#160;</div></td></tr></table>
</td><td valign="top"><a class="el" href="d7/d0c/struct_input_filter.html">InputFilter</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="d7/d4f/struct_option_group_list.html">OptionGroupList</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="db/d60/struct_stream_map.html">StreamMap</a>&#160;&#160;&#160;</td></tr>
<tr><td valign="top"><a class="el" href="d3/d6e/struct_input_stream.html">InputStream</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="db/db5/struct_option_parse_context.html">OptionParseContext</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="d4/dfd/struct_input_stream_1_1sub2video.html">InputStream::sub2video</a>&#160;&#160;&#160;</td></tr>
<tr><td valign="top"><a class="el" href="d6/d2c/struct_audio_channel_map.html">AudioChannelMap</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="d9/de7/struct_filter_graph.html">FilterGraph</a>&#160;&#160;&#160;</td><td rowspan="2" valign="bottom"><a name="letter_o"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;o&#160;&#160;</div></td></tr></table>
</td><td valign="top"><a class="el" href="df/d77/struct_options_context.html">OptionsContext</a>&#160;&#160;&#160;</td><td></td></tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_b"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;b&#160;&#160;</div></td></tr></table>
</td><td rowspan="2" valign="bottom"><a name="letter_h"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;h&#160;&#160;</div></td></tr></table>
</td><td valign="top"><a class="el" href="d7/d0c/struct_input_filter.html">InputFilter</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="db/dd7/struct_option_group_def.html">OptionGroupDef</a>&#160;&#160;&#160;</td><td rowspan="2" valign="bottom"><a name="letter_s"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;s&#160;&#160;</div></td></tr></table>
</td></tr>
<tr><td valign="top"><a class="el" href="d3/d6e/struct_input_stream.html">InputStream</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="d7/d4f/struct_option_group_list.html">OptionGroupList</a>&#160;&#160;&#160;</td></tr>
<tr><td valign="top"><a class="el" href="d6/d2c/struct_audio_channel_map.html">AudioChannelMap</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="df/d37/struct_h_w_accel.html">HWAccel</a>&#160;&#160;&#160;</td><td rowspan="2" valign="bottom"><a name="letter_o"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;o&#160;&#160;</div></td></tr></table>
</td><td valign="top"><a class="el" href="db/db5/struct_option_parse_context.html">OptionParseContext</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="dd/da5/struct_specifier_opt.html">SpecifierOpt</a>&#160;&#160;&#160;</td></tr>
</td><td valign="top"><a class="el" href="de/df2/struct_output_file.html">OutputFile</a>&#160;&#160;&#160;</td><td></td></tr>
<tr><td valign="top"><a class="el" href="d3/d1d/struct_option.html">Option</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="d0/d0f/struct_output_filter.html">OutputFilter</a>&#160;&#160;&#160;</td><td></td></tr>
<tr><td valign="top"><a class="el" href="d5/d8e/struct_benchmark_time_stamps.html">BenchmarkTimeStamps</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="df/d37/struct_h_w_accel.html">HWAccel</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="dc/d1e/struct_option_def.html">OptionDef</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="db/dde/struct_output_stream.html">OutputStream</a>&#160;&#160;&#160;</td><td></td></tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_c"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;c&#160;&#160;</div></td></tr></table>
</td><td valign="top"><a class="el" href="de/dc7/struct_h_w_device.html">HWDevice</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="df/d77/struct_options_context.html">OptionsContext</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="db/d60/struct_stream_map.html">StreamMap</a>&#160;&#160;&#160;</td></tr>
</td><td valign="top"><a class="el" href="de/dc7/struct_h_w_device.html">HWDevice</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="d6/d69/struct_option_group.html">OptionGroup</a>&#160;&#160;&#160;</td><td rowspan="2" valign="bottom"><a name="letter_s"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;s&#160;&#160;</div></td></tr></table>
</td><td></td></tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_i"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;i&#160;&#160;</div></td></tr></table>
</td><td valign="top"><a class="el" href="d3/d1d/struct_option.html">Option</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="de/df2/struct_output_file.html">OutputFile</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="d4/dfd/struct_input_stream_1_1sub2video.html">InputStream::sub2video</a>&#160;&#160;&#160;</td></tr>
<tr><td valign="top"><a class="el" href="d2/dc3/struct_callback_data.html">CallbackData</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="dc/d1e/struct_option_def.html">OptionDef</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="d0/d0f/struct_output_filter.html">OutputFilter</a>&#160;&#160;&#160;</td><td></td></tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_f"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;f&#160;&#160;</div></td></tr></table>
</td><td valign="top"><a class="el" href="d8/d99/struct_input_file.html">InputFile</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="d6/d69/struct_option_group.html">OptionGroup</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="db/dde/struct_output_stream.html">OutputStream</a>&#160;&#160;&#160;</td><td></td></tr>
<tr><td></td><td></td><td></td><td></td></tr>
<tr><td valign="top"><a class="el" href="d9/de7/struct_filter_graph.html">FilterGraph</a>&#160;&#160;&#160;</td><td></td><td></td><td></td><td></td></tr>
</td><td valign="top"><a class="el" href="db/dd7/struct_option_group_def.html">OptionGroupDef</a>&#160;&#160;&#160;</td><td></td></tr>
<tr><td valign="top"><a class="el" href="d2/dc3/struct_callback_data.html">CallbackData</a>&#160;&#160;&#160;</td><td></td><td valign="top"><a class="el" href="dd/da5/struct_specifier_opt.html">SpecifierOpt</a>&#160;&#160;&#160;</td><td></td></tr>
<tr><td></td><td valign="top"><a class="el" href="d8/d99/struct_input_file.html">InputFile</a>&#160;&#160;&#160;</td><td></td><td></td><td></td></tr>
<tr><td></td><td></td><td></td><td></td><td></td></tr>
</table>
<div class="qindex"><a class="qindex" href="#letter_a">a</a>&#160;|&#160;<a class="qindex" href="#letter_c">c</a>&#160;|&#160;<a class="qindex" href="#letter_f">f</a>&#160;|&#160;<a class="qindex" href="#letter_h">h</a>&#160;|&#160;<a class="qindex" href="#letter_i">i</a>&#160;|&#160;<a class="qindex" href="#letter_o">o</a>&#160;|&#160;<a class="qindex" href="#letter_s">s</a></div>
<div class="qindex"><a class="qindex" href="#letter_a">a</a>&#160;|&#160;<a class="qindex" href="#letter_b">b</a>&#160;|&#160;<a class="qindex" href="#letter_c">c</a>&#160;|&#160;<a class="qindex" href="#letter_f">f</a>&#160;|&#160;<a class="qindex" href="#letter_h">h</a>&#160;|&#160;<a class="qindex" href="#letter_i">i</a>&#160;|&#160;<a class="qindex" href="#letter_o">o</a>&#160;|&#160;<a class="qindex" href="#letter_s">s</a></div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -352,7 +352,7 @@ Data Fields</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -483,7 +483,7 @@ Variables</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:07 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -103,7 +103,7 @@ $(function() {
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:07 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -260,10 +260,10 @@ Variables</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keyword">static</span> <span class="keywordtype">char</span> *choose_ ## suffix (<a class="code" href="../../d0/d0f/struct_output_filter.html">OutputFilter</a> *ofilter) \</div><div class="line">{ \</div><div class="line"> if (ofilter-&gt;var != none) { \</div><div class="line"> get_name(ofilter-&gt;var); \</div><div class="line"> return av_strdup(name); \</div><div class="line"> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ofilter-&gt;supported_list) { \</div><div class="line"> const <a class="code" href="../../d2/dc3/struct_callback_data.html#a24877dd94bec8b5bad7a0ed6893f7c28">type</a> *p; \</div><div class="line"> AVIOContext *s = NULL; \</div><div class="line"> uint8_t *ret; \</div><div class="line"> int len; \</div><div class="line"> \</div><div class="line"> if (avio_open_dyn_buf(&amp;s) &lt; 0) \</div><div class="line"> exit_program(1); \</div><div class="line"> \</div><div class="line"> for (p = ofilter-&gt;supported_list; *p != none; p++) { \</div><div class="line"> get_name(*p); \</div><div class="line"> avio_printf(s, <span class="stringliteral">&quot;%s|&quot;</span>, name); \</div><div class="line"> } \</div><div class="line"> len = avio_close_dyn_buf(s, &amp;ret); \</div><div class="line"> ret[len - 1] = 0; \</div><div class="line"> return ret; \</div><div class="line"> } else \</div><div class="line"> return NULL; \</div><div class="line">}</div><div class="ttc" id="struct_callback_data_html_a24877dd94bec8b5bad7a0ed6893f7c28"><div class="ttname"><a href="../../d2/dc3/struct_callback_data.html#a24877dd94bec8b5bad7a0ed6893f7c28">CallbackData::type</a></div><div class="ttdeci">int type</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00034">mobileffmpeg_config.c:34</a></div></div>
<b>Value:</b><div class="fragment"><div class="line"><span class="keyword">static</span> <span class="keywordtype">char</span> *choose_ ## suffix (<a class="code" href="../../d0/d0f/struct_output_filter.html">OutputFilter</a> *ofilter) \</div><div class="line">{ \</div><div class="line"> if (ofilter-&gt;var != none) { \</div><div class="line"> get_name(ofilter-&gt;var); \</div><div class="line"> return av_strdup(name); \</div><div class="line"> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ofilter-&gt;supported_list) { \</div><div class="line"> const <a class="code" href="../../d2/dc3/struct_callback_data.html#a24877dd94bec8b5bad7a0ed6893f7c28">type</a> *p; \</div><div class="line"> AVIOContext *s = NULL; \</div><div class="line"> uint8_t *ret; \</div><div class="line"> int len; \</div><div class="line"> \</div><div class="line"> if (avio_open_dyn_buf(&amp;s) &lt; 0) \</div><div class="line"> exit_program(1); \</div><div class="line"> \</div><div class="line"> for (p = ofilter-&gt;supported_list; *p != none; p++) { \</div><div class="line"> get_name(*p); \</div><div class="line"> avio_printf(s, <span class="stringliteral">&quot;%s|&quot;</span>, name); \</div><div class="line"> } \</div><div class="line"> len = avio_close_dyn_buf(s, &amp;ret); \</div><div class="line"> ret[len - 1] = 0; \</div><div class="line"> return ret; \</div><div class="line"> } else \</div><div class="line"> return NULL; \</div><div class="line">}</div><div class="ttc" id="struct_callback_data_html_a24877dd94bec8b5bad7a0ed6893f7c28"><div class="ttname"><a href="../../d2/dc3/struct_callback_data.html#a24877dd94bec8b5bad7a0ed6893f7c28">CallbackData::type</a></div><div class="ttdeci">int type</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d16/mobileffmpeg_8c_source.html#l00043">mobileffmpeg.c:43</a></div></div>
<div class="ttc" id="struct_output_filter_html"><div class="ttname"><a href="../../d0/d0f/struct_output_filter.html">OutputFilter</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d7/db3/fftools__ffmpeg_8h_source.html#l00271">fftools_ffmpeg.h:271</a></div></div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00166">166</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00167">167</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -284,7 +284,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00690">690</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00691">691</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -312,7 +312,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00122">122</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00123">123</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -384,7 +384,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00100">100</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00101">101</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -412,7 +412,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00994">994</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00995">995</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -432,7 +432,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01004">1004</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01005">1005</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -476,7 +476,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00868">868</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00869">869</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -520,7 +520,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00978">978</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00979">979</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -564,7 +564,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00745">745</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00746">746</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -608,7 +608,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00548">548</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00549">549</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -644,7 +644,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00676">676</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00677">677</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -688,7 +688,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00454">454</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00455">455</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -794,7 +794,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00201">201</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00202">202</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -838,7 +838,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00241">241</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00242">242</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -858,7 +858,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01216">1216</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01217">1217</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -926,7 +926,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01184">1184</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01185">1185</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -946,7 +946,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00340">340</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00341">341</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -984,7 +984,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00260">260</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00261">261</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -1034,7 +1034,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00432">432</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00433">433</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -1090,7 +1090,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00381">381</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00382">382</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -1120,7 +1120,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01207">1207</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01208">1208</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -1158,7 +1158,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00705">705</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00706">706</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -1175,7 +1175,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00198">198</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00199">199</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -1191,7 +1191,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00198">198</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00199">199</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -1207,14 +1207,14 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00198">198</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00199">199</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:07 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
File diff suppressed because one or more lines are too long
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -204,7 +204,7 @@ Variables</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:07 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
File diff suppressed because one or more lines are too long
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -97,7 +97,7 @@ Variables</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -70,7 +70,7 @@ $(function() {
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:07 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -97,7 +97,7 @@ Data Fields</h2></td></tr>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Callback data structure </p>
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00033">33</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00042">42</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="a4b19ae27c39f882eae94d6dcbfd36d01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b19ae27c39f882eae94d6dcbfd36d01">&#9670;&nbsp;</a></span>logData</h2>
@@ -111,7 +111,7 @@ Data Fields</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00037">37</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00046">46</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
@@ -127,7 +127,7 @@ Data Fields</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00036">36</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00045">45</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
@@ -143,7 +143,7 @@ Data Fields</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00047">47</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00056">56</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
@@ -159,7 +159,7 @@ Data Fields</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00044">44</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00053">53</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
@@ -175,7 +175,7 @@ Data Fields</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00040">40</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00049">49</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
@@ -191,7 +191,7 @@ Data Fields</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00039">39</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00048">48</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
@@ -207,7 +207,7 @@ Data Fields</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00041">41</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00050">50</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
@@ -223,7 +223,7 @@ Data Fields</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00042">42</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00051">51</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
@@ -239,7 +239,7 @@ Data Fields</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00045">45</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00054">54</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
@@ -255,7 +255,7 @@ Data Fields</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00043">43</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00052">52</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
@@ -271,17 +271,17 @@ Data Fields</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00034">34</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00043">43</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a></li>
<li><a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -137,7 +137,7 @@ Data Fields</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -1066,7 +1066,7 @@ Data Fields</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -257,7 +257,7 @@ Functions</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -71,7 +71,7 @@ $(function() {
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:07 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -197,7 +197,7 @@ Data Fields</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -0,0 +1,144 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MobileFFmpeg Android API: BenchmarkTimeStamps Struct Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Data Fields</a> </div>
<div class="headertitle">
<div class="title">BenchmarkTimeStamps Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a8639f0bbe9044fc765f4ec5b3968a488"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d8e/struct_benchmark_time_stamps.html#a8639f0bbe9044fc765f4ec5b3968a488">real_usec</a></td></tr>
<tr class="separator:a8639f0bbe9044fc765f4ec5b3968a488"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0f18c644b145f2ef6c7bd37c22d7cd6"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d8e/struct_benchmark_time_stamps.html#ad0f18c644b145f2ef6c7bd37c22d7cd6">user_usec</a></td></tr>
<tr class="separator:ad0f18c644b145f2ef6c7bd37c22d7cd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06a44cae9b837e8481ba86a648cbcc95"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d8e/struct_benchmark_time_stamps.html#a06a44cae9b837e8481ba86a648cbcc95">sys_usec</a></td></tr>
<tr class="separator:a06a44cae9b837e8481ba86a648cbcc95"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00143">143</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="a8639f0bbe9044fc765f4ec5b3968a488"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8639f0bbe9044fc765f4ec5b3968a488">&#9670;&nbsp;</a></span>real_usec</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int64_t BenchmarkTimeStamps::real_usec</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00144">144</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
<a id="a06a44cae9b837e8481ba86a648cbcc95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06a44cae9b837e8481ba86a648cbcc95">&#9670;&nbsp;</a></span>sys_usec</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int64_t BenchmarkTimeStamps::sys_usec</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00146">146</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
<a id="ad0f18c644b145f2ef6c7bd37c22d7cd6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0f18c644b145f2ef6c7bd37c22d7cd6">&#9670;&nbsp;</a></span>user_usec</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int64_t BenchmarkTimeStamps::user_usec</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00145">145</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -172,7 +172,7 @@ Data Fields</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -244,7 +244,7 @@ Data Fields</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -352,7 +352,7 @@ Data Fields</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -137,7 +137,7 @@ Data Fields</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -744,7 +744,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00662">662</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00668">668</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -763,7 +763,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l04932">4932</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l04989">4989</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -783,7 +783,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00690">690</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00691">691</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -855,7 +855,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00100">100</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00101">101</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -875,7 +875,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01004">1004</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01005">1005</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -911,7 +911,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00676">676</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00677">677</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -977,7 +977,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01216">1216</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01217">1217</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -997,7 +997,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l02177">2177</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l02193">2193</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1157,7 +1157,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01184">1184</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01185">1185</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -1177,7 +1177,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00340">340</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l00341">341</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -1235,7 +1235,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01207">1207</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html#l01208">1208</a> of file <a class="el" href="../../d2/d36/fftools__ffmpeg__filter_8c_source.html">fftools_ffmpeg_filter.c</a>.</p>
</div>
</div>
@@ -1311,7 +1311,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00653">653</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00659">659</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1359,7 +1359,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l04927">4927</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l04984">4984</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1379,7 +1379,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../da/d66/fftools__ffmpeg__opt_8c_source.html#l03176">3176</a> of file <a class="el" href="../../da/d66/fftools__ffmpeg__opt_8c_source.html">fftools_ffmpeg_opt.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../da/d66/fftools__ffmpeg__opt_8c_source.html#l03208">3208</a> of file <a class="el" href="../../da/d66/fftools__ffmpeg__opt_8c_source.html">fftools_ffmpeg_opt.c</a>.</p>
</div>
</div>
@@ -1409,7 +1409,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00256">256</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00262">262</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1429,7 +1429,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00344">344</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00350">350</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1449,7 +1449,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00404">404</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00410">410</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1772,7 +1772,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00171">171</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00177">177</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1868,7 +1868,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00163">163</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00169">169</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1884,7 +1884,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00161">161</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00167">167</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1900,7 +1900,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00498">498</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00504">504</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1932,7 +1932,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00172">172</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00178">178</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1948,7 +1948,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00164">164</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00170">170</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1964,7 +1964,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00162">162</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00168">168</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1980,7 +1980,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00169">169</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00175">175</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -1996,7 +1996,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00167">167</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00173">173</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -2026,7 +2026,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00168">168</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00174">174</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -2042,7 +2042,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00166">166</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00172">172</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -2074,7 +2074,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00157">157</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html#l00163">163</a> of file <a class="el" href="../../d7/d48/fftools__ffmpeg_8c_source.html">fftools_ffmpeg.c</a>.</p>
</div>
</div>
@@ -2207,7 +2207,7 @@ Variables</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:07 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
File diff suppressed because one or more lines are too long
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -389,7 +389,7 @@ Variables</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">if</span> (codec-&gt;field) { \</div><div class="line"> const <a class="code" href="../../d2/dc3/struct_callback_data.html#a24877dd94bec8b5bad7a0ed6893f7c28">type</a> *p = codec-&gt;field; \</div><div class="line"> \</div><div class="line"> printf(<span class="stringliteral">&quot; Supported &quot;</span> list_name <span class="stringliteral">&quot;:&quot;</span>); \</div><div class="line"> while (*p != term) { \</div><div class="line"> get_name(*p); \</div><div class="line"> printf(<span class="stringliteral">&quot; %s&quot;</span>, name); \</div><div class="line"> p++; \</div><div class="line"> } \</div><div class="line"> printf(<span class="stringliteral">&quot;\n&quot;</span>); \</div><div class="line"> } \</div><div class="ttc" id="struct_callback_data_html_a24877dd94bec8b5bad7a0ed6893f7c28"><div class="ttname"><a href="../../d2/dc3/struct_callback_data.html#a24877dd94bec8b5bad7a0ed6893f7c28">CallbackData::type</a></div><div class="ttdeci">int type</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00034">mobileffmpeg_config.c:34</a></div></div>
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">if</span> (codec-&gt;field) { \</div><div class="line"> const <a class="code" href="../../d2/dc3/struct_callback_data.html#a24877dd94bec8b5bad7a0ed6893f7c28">type</a> *p = codec-&gt;field; \</div><div class="line"> \</div><div class="line"> printf(<span class="stringliteral">&quot; Supported &quot;</span> list_name <span class="stringliteral">&quot;:&quot;</span>); \</div><div class="line"> while (*p != term) { \</div><div class="line"> get_name(*p); \</div><div class="line"> printf(<span class="stringliteral">&quot; %s&quot;</span>, name); \</div><div class="line"> p++; \</div><div class="line"> } \</div><div class="line"> printf(<span class="stringliteral">&quot;\n&quot;</span>); \</div><div class="line"> } \</div><div class="ttc" id="struct_callback_data_html_a24877dd94bec8b5bad7a0ed6893f7c28"><div class="ttname"><a href="../../d2/dc3/struct_callback_data.html#a24877dd94bec8b5bad7a0ed6893f7c28">CallbackData::type</a></div><div class="ttdeci">int type</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d16/mobileffmpeg_8c_source.html#l00043">mobileffmpeg.c:43</a></div></div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01378">1378</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
@@ -668,7 +668,7 @@ Variables</h2></td></tr>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the stream matches, 0 if it doesn't, &lt;0 on error </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02053">2053</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02077">2077</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -706,7 +706,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01492">1492</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01513">1513</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -860,7 +860,7 @@ Variables</h2></td></tr>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the created dictionary </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02061">2061</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02085">2085</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -970,7 +970,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01501">1501</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01522">1522</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -998,7 +998,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01469">1469</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01490">1490</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -1058,7 +1058,7 @@ Variables</h2></td></tr>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02003">2003</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02027">2027</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -1078,7 +1078,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02157">2157</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02181">2181</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -1131,7 +1131,7 @@ Variables</h2></td></tr>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reallocated array </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02138">2138</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02162">2162</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -1412,7 +1412,7 @@ Variables</h2></td></tr>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html#l00336">336</a> of file <a class="el" href="../../d9/dae/mobileffmpeg__config_8c_source.html">mobileffmpeg_config.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00353">353</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
@@ -1456,7 +1456,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01481">1481</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01502">1502</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2157,7 +2157,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01589">1589</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01610">1610</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2195,7 +2195,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01522">1522</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01543">1543</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2287,7 +2287,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Return a positive value if a line read from standard input starts with [yY], otherwise return 0. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01992">1992</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02016">2016</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2341,7 +2341,7 @@ Variables</h2></td></tr>
<p>Create an array of dictionaries, one dictionary for each stream contained in s. Each dictionary will contain the options from codec_opts which can be applied to the corresponding stream codec context.</p>
<dl class="section return"><dt>Returns</dt><dd>pointer to the created array of dictionaries, NULL if it cannot be created </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02118">2118</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l02142">2142</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2415,7 +2415,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Print a listing containing all the bit stream filters supported by the program. This option processing function does not utilize the arguments. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01639">1639</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01660">1660</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2489,7 +2489,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Print a listing containing all the codecs supported by the program. This option processing function does not utilize the arguments. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01534">1534</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01555">1555</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2526,7 +2526,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Print a listing containing all the color names and values recognized by the program. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01713">1713</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01734">1734</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2563,7 +2563,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Print a listing containing all the decoders supported by the program. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01627">1627</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01648">1648</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2674,7 +2674,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Print a listing containing all the encoders supported by the program. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01633">1633</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01654">1654</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2711,7 +2711,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Print a listing containing all the filters supported by the program. This option processing function does not utilize the arguments. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01666">1666</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01687">1687</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2841,7 +2841,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Generic -h handler common to all fftools. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01956">1956</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01980">1980</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2869,7 +2869,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01940">1940</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01961">1961</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2938,7 +2938,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01798">1798</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01819">1819</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2966,7 +2966,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01833">1833</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01854">1854</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -2994,7 +2994,7 @@ Variables</h2></td></tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01851">1851</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01872">1872</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -3090,7 +3090,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Print a listing containing all the standard channel layouts supported by the program. This option processing function does not utilize the arguments. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01760">1760</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01781">1781</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -3201,7 +3201,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Print a listing containing all the pixel formats supported by the program. This option processing function does not utilize the arguments. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01727">1727</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01748">1748</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -3238,7 +3238,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Print a listing containing all the protocols supported by the program. This option processing function does not utilize the arguments. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01651">1651</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01672">1672</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -3275,7 +3275,7 @@ Variables</h2></td></tr>
</div><div class="memdoc">
<p>Print a listing containing all the sample formats supported by the program. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01789">1789</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html#l01810">1810</a> of file <a class="el" href="../../d7/dcc/fftools__cmdutils_8c_source.html">fftools_cmdutils.c</a>.</p>
</div>
</div>
@@ -3678,7 +3678,7 @@ Variables</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:07 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
File diff suppressed because one or more lines are too long
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">2.2</span>
</div>
</td>
</tr>
@@ -74,8 +74,6 @@ $(function() {
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ab40bb25ef4ec0f35c70e84dbad36cfc2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d0c/mobileffmpeg__config_8h.html#ab40bb25ef4ec0f35c70e84dbad36cfc2">MOBILE_FFMPEG_VERSION</a>&#160;&#160;&#160;&quot;2.1&quot;</td></tr>
<tr class="separator:ab40bb25ef4ec0f35c70e84dbad36cfc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e43beaa714b1bf01ce2271440786e38"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d0c/mobileffmpeg__config_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>&#160;&#160;&#160;&quot;mobile-ffmpeg&quot;</td></tr>
<tr class="separator:a6e43beaa714b1bf01ce2271440786e38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab78bd305488c62caf8515ee765b1ed49"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d0c/mobileffmpeg__config_8h.html#ab78bd305488c62caf8515ee765b1ed49">LOGV</a>(...)&#160;&#160;&#160;__android_log_print(ANDROID_LOG_VERBOSE, <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>, __VA_ARGS__)</td></tr>
@@ -114,7 +112,7 @@ Functions</h2></td></tr>
</div><div class="memdoc">
<p>Defines tag used for Android logging. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00033">33</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00031">31</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
</div>
</div>
@@ -135,7 +133,7 @@ Functions</h2></td></tr>
</div><div class="memdoc">
<p>Debug Android logging macro. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00039">39</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00037">37</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
</div>
</div>
@@ -156,7 +154,7 @@ Functions</h2></td></tr>
</div><div class="memdoc">
<p>Error Android logging macro. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00048">48</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00046">46</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
</div>
</div>
@@ -177,7 +175,7 @@ Functions</h2></td></tr>
</div><div class="memdoc">
<p>Info Android logging macro. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00042">42</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00040">40</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
</div>
</div>
@@ -198,7 +196,7 @@ Functions</h2></td></tr>
</div><div class="memdoc">
<p>Verbose Android logging macro. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00036">36</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00034">34</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
</div>
</div>
@@ -219,24 +217,7 @@ Functions</h2></td></tr>
</div><div class="memdoc">
<p>Warn Android logging macro. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00045">45</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
</div>
</div>
<a id="ab40bb25ef4ec0f35c70e84dbad36cfc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab40bb25ef4ec0f35c70e84dbad36cfc2">&#9670;&nbsp;</a></span>MOBILE_FFMPEG_VERSION</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MOBILE_FFMPEG_VERSION&#160;&#160;&#160;&quot;2.1&quot;</td>
</tr>
</table>
</div><div class="memdoc">
<p>Library version string </p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00030">30</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html#l00043">43</a> of file <a class="el" href="../../d8/d0c/mobileffmpeg__config_8h_source.html">mobileffmpeg_config.h</a>.</p>
</div>
</div>
@@ -403,7 +384,7 @@ Functions</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Tue Sep 11 2018 12:10:36 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -388,7 +388,7 @@ Data Fields</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:08 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
+430 -64
View File
@@ -22,7 +22,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MobileFFmpeg Android API
&#160;<span id="projectnumber">2.1</span>
&#160;<span id="projectnumber">3.0</span>
</div>
</td>
</tr>
@@ -63,6 +63,7 @@ $(function() {
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">mobileffmpeg.h File Reference</div> </div>
@@ -71,26 +72,193 @@ $(function() {
<p><a href="../../d8/da5/mobileffmpeg_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ab40bb25ef4ec0f35c70e84dbad36cfc2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#ab40bb25ef4ec0f35c70e84dbad36cfc2">MOBILE_FFMPEG_VERSION</a>&#160;&#160;&#160;&quot;3.0&quot;</td></tr>
<tr class="separator:ab40bb25ef4ec0f35c70e84dbad36cfc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e43beaa714b1bf01ce2271440786e38"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>&#160;&#160;&#160;&quot;mobile-ffmpeg&quot;</td></tr>
<tr class="separator:a6e43beaa714b1bf01ce2271440786e38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab78bd305488c62caf8515ee765b1ed49"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#ab78bd305488c62caf8515ee765b1ed49">LOGV</a>(...)&#160;&#160;&#160;__android_log_print(ANDROID_LOG_VERBOSE, <a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>, __VA_ARGS__)</td></tr>
<tr class="separator:ab78bd305488c62caf8515ee765b1ed49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa839997a58e14061861cd634fdb7664d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#aa839997a58e14061861cd634fdb7664d">LOGD</a>(...)&#160;&#160;&#160;__android_log_print(ANDROID_LOG_DEBUG, <a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>, __VA_ARGS__)</td></tr>
<tr class="separator:aa839997a58e14061861cd634fdb7664d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5512e59d578a380a441a70256af997d0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a5512e59d578a380a441a70256af997d0">LOGI</a>(...)&#160;&#160;&#160;__android_log_print(ANDROID_LOG_INFO, <a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>, __VA_ARGS__)</td></tr>
<tr class="separator:a5512e59d578a380a441a70256af997d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07f1b0d507acedeb7550353eba4f6e66"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a07f1b0d507acedeb7550353eba4f6e66">LOGW</a>(...)&#160;&#160;&#160;__android_log_print(ANDROID_LOG_WARN, <a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>, __VA_ARGS__)</td></tr>
<tr class="separator:a07f1b0d507acedeb7550353eba4f6e66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae02538a80ad5fc009caec73487d11a8d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#ae02538a80ad5fc009caec73487d11a8d">LOGE</a>(...)&#160;&#160;&#160;__android_log_print(ANDROID_LOG_ERROR, <a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>, __VA_ARGS__)</td></tr>
<tr class="separator:ae02538a80ad5fc009caec73487d11a8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a59646e68c5d2e14938e2165ab3c6b151"><td class="memItemLeft" align="right" valign="top">JNIEXPORT jstring JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a59646e68c5d2e14938e2165ab3c6b151">Java_com_arthenica_mobileffmpeg_FFmpeg_getFFmpegVersion</a> (JNIEnv *, jclass)</td></tr>
<tr class="separator:a59646e68c5d2e14938e2165ab3c6b151"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab25e0b810545b8ec5219ed72a72c9db3"><td class="memItemLeft" align="right" valign="top">JNIEXPORT jstring JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#ab25e0b810545b8ec5219ed72a72c9db3">Java_com_arthenica_mobileffmpeg_FFmpeg_getVersion</a> (JNIEnv *, jclass)</td></tr>
<tr class="separator:ab25e0b810545b8ec5219ed72a72c9db3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac3b08be4d7283e7386378f981dc127c"><td class="memItemLeft" align="right" valign="top">JNIEXPORT jint JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#aac3b08be4d7283e7386378f981dc127c">Java_com_arthenica_mobileffmpeg_FFmpeg_execute</a> (JNIEnv *, jclass, jobjectArray)</td></tr>
<tr class="separator:aac3b08be4d7283e7386378f981dc127c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68cdbe727bd7de847995a93f0c47ddda"><td class="memItemLeft" align="right" valign="top">JNIEXPORT void JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a68cdbe727bd7de847995a93f0c47ddda">Java_com_arthenica_mobileffmpeg_FFmpeg_cancel</a> (JNIEnv *, jclass)</td></tr>
<tr class="separator:a68cdbe727bd7de847995a93f0c47ddda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae50207e607b00d2da3284bfb3073b81d"><td class="memItemLeft" align="right" valign="top">JNIEXPORT void JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#ae50207e607b00d2da3284bfb3073b81d">Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection</a> (JNIEnv *, jclass)</td></tr>
<tr class="separator:ae50207e607b00d2da3284bfb3073b81d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab10bd6b77ae73fe22daa7596a5fd0265"><td class="memItemLeft" align="right" valign="top">JNIEXPORT void JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#ab10bd6b77ae73fe22daa7596a5fd0265">Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection</a> (JNIEnv *, jclass)</td></tr>
<tr class="separator:ab10bd6b77ae73fe22daa7596a5fd0265"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a231daf6b3157f2c276a158c7e4b53d3e"><td class="memItemLeft" align="right" valign="top">JNIEXPORT void JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a231daf6b3157f2c276a158c7e4b53d3e">Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel</a> (JNIEnv *, jclass, jint)</td></tr>
<tr class="separator:a231daf6b3157f2c276a158c7e4b53d3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54e490bc15eb2ad76f6439c2b793ddf0"><td class="memItemLeft" align="right" valign="top">JNIEXPORT jint JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a54e490bc15eb2ad76f6439c2b793ddf0">Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel</a> (JNIEnv *, jclass)</td></tr>
<tr class="separator:a54e490bc15eb2ad76f6439c2b793ddf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0250425604569423e8b3398dec588c87"><td class="memItemLeft" align="right" valign="top">JNIEXPORT jstring JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a0250425604569423e8b3398dec588c87">Java_com_arthenica_mobileffmpeg_Config_getNativeFFmpegVersion</a> (JNIEnv *, jclass)</td></tr>
<tr class="separator:a0250425604569423e8b3398dec588c87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bd5582bfd016c6af95c2cfe8a9f1cec"><td class="memItemLeft" align="right" valign="top">JNIEXPORT jstring JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6bd5582bfd016c6af95c2cfe8a9f1cec">Java_com_arthenica_mobileffmpeg_Config_getNativeVersion</a> (JNIEnv *, jclass)</td></tr>
<tr class="separator:a6bd5582bfd016c6af95c2cfe8a9f1cec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44b5cc5aca302ad683b6a88974157d1f"><td class="memItemLeft" align="right" valign="top">JNIEXPORT jint JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a44b5cc5aca302ad683b6a88974157d1f">Java_com_arthenica_mobileffmpeg_Config_nativeExecute</a> (JNIEnv *, jclass, jobjectArray)</td></tr>
<tr class="separator:a44b5cc5aca302ad683b6a88974157d1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9be298ab41d2b4192bd2caee9e5c7b4f"><td class="memItemLeft" align="right" valign="top">JNIEXPORT void JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a9be298ab41d2b4192bd2caee9e5c7b4f">Java_com_arthenica_mobileffmpeg_Config_nativeCancel</a> (JNIEnv *, jclass)</td></tr>
<tr class="separator:a9be298ab41d2b4192bd2caee9e5c7b4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41cf49b53f4763a2bb095a725e3364d0"><td class="memItemLeft" align="right" valign="top">JNIEXPORT jstring JNICALL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a41cf49b53f4763a2bb095a725e3364d0">Java_com_arthenica_mobileffmpeg_Config_getNativeBuildConf</a> (JNIEnv *, jclass)</td></tr>
<tr class="separator:a41cf49b53f4763a2bb095a725e3364d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a68cdbe727bd7de847995a93f0c47ddda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68cdbe727bd7de847995a93f0c47ddda">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_FFmpeg_cancel()</h2>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a6e43beaa714b1bf01ce2271440786e38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e43beaa714b1bf01ce2271440786e38">&#9670;&nbsp;</a></span>LIB_NAME</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_cancel </td>
<td class="memname">#define LIB_NAME&#160;&#160;&#160;&quot;mobile-ffmpeg&quot;</td>
</tr>
</table>
</div><div class="memdoc">
<p>Defines tag used for Android logging. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html#l00033">33</a> of file <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html">mobileffmpeg.h</a>.</p>
</div>
</div>
<a id="aa839997a58e14061861cd634fdb7664d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa839997a58e14061861cd634fdb7664d">&#9670;&nbsp;</a></span>LOGD</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LOGD</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>...</em></td><td>)</td>
<td>&#160;&#160;&#160;__android_log_print(ANDROID_LOG_DEBUG, <a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>, __VA_ARGS__)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Debug Android logging macro. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html#l00039">39</a> of file <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html">mobileffmpeg.h</a>.</p>
</div>
</div>
<a id="ae02538a80ad5fc009caec73487d11a8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae02538a80ad5fc009caec73487d11a8d">&#9670;&nbsp;</a></span>LOGE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LOGE</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>...</em></td><td>)</td>
<td>&#160;&#160;&#160;__android_log_print(ANDROID_LOG_ERROR, <a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>, __VA_ARGS__)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Error Android logging macro. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html#l00048">48</a> of file <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html">mobileffmpeg.h</a>.</p>
</div>
</div>
<a id="a5512e59d578a380a441a70256af997d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5512e59d578a380a441a70256af997d0">&#9670;&nbsp;</a></span>LOGI</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LOGI</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>...</em></td><td>)</td>
<td>&#160;&#160;&#160;__android_log_print(ANDROID_LOG_INFO, <a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>, __VA_ARGS__)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Info Android logging macro. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html#l00042">42</a> of file <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html">mobileffmpeg.h</a>.</p>
</div>
</div>
<a id="ab78bd305488c62caf8515ee765b1ed49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab78bd305488c62caf8515ee765b1ed49">&#9670;&nbsp;</a></span>LOGV</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LOGV</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>...</em></td><td>)</td>
<td>&#160;&#160;&#160;__android_log_print(ANDROID_LOG_VERBOSE, <a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>, __VA_ARGS__)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Verbose Android logging macro. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html#l00036">36</a> of file <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html">mobileffmpeg.h</a>.</p>
</div>
</div>
<a id="a07f1b0d507acedeb7550353eba4f6e66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07f1b0d507acedeb7550353eba4f6e66">&#9670;&nbsp;</a></span>LOGW</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LOGW</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname"><em>...</em></td><td>)</td>
<td>&#160;&#160;&#160;__android_log_print(ANDROID_LOG_WARN, <a class="el" href="../../d8/da5/mobileffmpeg_8h.html#a6e43beaa714b1bf01ce2271440786e38">LIB_NAME</a>, __VA_ARGS__)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Warn Android logging macro. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html#l00045">45</a> of file <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html">mobileffmpeg.h</a>.</p>
</div>
</div>
<a id="ab40bb25ef4ec0f35c70e84dbad36cfc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab40bb25ef4ec0f35c70e84dbad36cfc2">&#9670;&nbsp;</a></span>MOBILE_FFMPEG_VERSION</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MOBILE_FFMPEG_VERSION&#160;&#160;&#160;&quot;3.0&quot;</td>
</tr>
</table>
</div><div class="memdoc">
<p>Library version string </p>
<p class="definition">Definition at line <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html#l00030">30</a> of file <a class="el" href="../../d8/da5/mobileffmpeg_8h_source.html">mobileffmpeg.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ab10bd6b77ae73fe22daa7596a5fd0265"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab10bd6b77ae73fe22daa7596a5fd0265">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection </td>
<td>(</td>
<td class="paramtype">JNIEnv *&#160;</td>
<td class="paramname"><em>env</em>, </td>
@@ -108,7 +276,238 @@ Functions</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>Cancels an ongoing operation.</p>
<p>Disables log and statistics redirection.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">env</td><td>pointer to native method interface </td></tr>
<tr><td class="paramname">reference</td><td>to the class on which this method is invoked </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00566">566</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
<a id="ae50207e607b00d2da3284bfb3073b81d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae50207e607b00d2da3284bfb3073b81d">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection </td>
<td>(</td>
<td class="paramtype">JNIEnv *&#160;</td>
<td class="paramname"><em>env</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">jclass&#160;</td>
<td class="paramname"><em>object</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables log and statistics redirection.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">env</td><td>pointer to native method interface </td></tr>
<tr><td class="paramname">reference</td><td>to the class on which this method is invoked </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00539">539</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
<a id="a41cf49b53f4763a2bb095a725e3364d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41cf49b53f4763a2bb095a725e3364d0">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_Config_getNativeBuildConf()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeBuildConf </td>
<td>(</td>
<td class="paramtype">JNIEnv *&#160;</td>
<td class="paramname"><em>env</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">jclass&#160;</td>
<td class="paramname"><em>object</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns build configuration for FFmpeg.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">env</td><td>pointer to native method interface </td></tr>
<tr><td class="paramname">object</td><td>reference to the class on which this method is invoked </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>build configuration string </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00678">678</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
<a id="a0250425604569423e8b3398dec588c87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0250425604569423e8b3398dec588c87">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_Config_getNativeFFmpegVersion()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeFFmpegVersion </td>
<td>(</td>
<td class="paramtype">JNIEnv *&#160;</td>
<td class="paramname"><em>env</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">jclass&#160;</td>
<td class="paramname"><em>object</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns FFmpeg version bundled within the library natively.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">env</td><td>pointer to native method interface </td></tr>
<tr><td class="paramname">object</td><td>reference to the class on which this method is invoked </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>FFmpeg version string </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00591">591</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
<a id="a54e490bc15eb2ad76f6439c2b793ddf0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54e490bc15eb2ad76f6439c2b793ddf0">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel </td>
<td>(</td>
<td class="paramtype">JNIEnv *&#160;</td>
<td class="paramname"><em>env</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">jclass&#160;</td>
<td class="paramname"><em>object</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns current log level.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">env</td><td>pointer to native method interface </td></tr>
<tr><td class="paramname">reference</td><td>to the class on which this method is invoked </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00529">529</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
<a id="a6bd5582bfd016c6af95c2cfe8a9f1cec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bd5582bfd016c6af95c2cfe8a9f1cec">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_Config_getNativeVersion()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeVersion </td>
<td>(</td>
<td class="paramtype">JNIEnv *&#160;</td>
<td class="paramname"><em>env</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">jclass&#160;</td>
<td class="paramname"><em>object</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns MobileFFmpeg library version natively.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">env</td><td>pointer to native method interface </td></tr>
<tr><td class="paramname">object</td><td>reference to the class on which this method is invoked </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>MobileFFmpeg version string </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00602">602</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
<a id="a9be298ab41d2b4192bd2caee9e5c7b4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9be298ab41d2b4192bd2caee9e5c7b4f">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_Config_nativeCancel()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_nativeCancel </td>
<td>(</td>
<td class="paramtype">JNIEnv *&#160;</td>
<td class="paramname"><em>env</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">jclass&#160;</td>
<td class="paramname"><em>object</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Cancels an ongoing operation natively.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">env</td><td>pointer to native method interface </td></tr>
@@ -117,18 +516,18 @@ Functions</h2></td></tr>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00150">150</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00667">667</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
<a id="aac3b08be4d7283e7386378f981dc127c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac3b08be4d7283e7386378f981dc127c">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_FFmpeg_execute()</h2>
<a id="a44b5cc5aca302ad683b6a88974157d1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44b5cc5aca302ad683b6a88974157d1f">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_Config_nativeExecute()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_execute </td>
<td class="memname">JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_nativeExecute </td>
<td>(</td>
<td class="paramtype">JNIEnv *&#160;</td>
<td class="paramname"><em>env</em>, </td>
@@ -152,7 +551,7 @@ Functions</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>Synchronously executes FFmpeg command with arguments provided.</p>
<p>Synchronously executes FFmpeg command natively with arguments provided.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">env</td><td>pointer to native method interface </td></tr>
@@ -163,18 +562,18 @@ Functions</h2></td></tr>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on successful execution, non-zero on error </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00097">97</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00614">614</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
<a id="a59646e68c5d2e14938e2165ab3c6b151"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59646e68c5d2e14938e2165ab3c6b151">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_FFmpeg_getFFmpegVersion()</h2>
<a id="a231daf6b3157f2c276a158c7e4b53d3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a231daf6b3157f2c276a158c7e4b53d3e">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_getFFmpegVersion </td>
<td class="memname">JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel </td>
<td>(</td>
<td class="paramtype">JNIEnv *&#160;</td>
<td class="paramname"><em>env</em>, </td>
@@ -183,46 +582,13 @@ Functions</h2></td></tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">jclass&#160;</td>
<td class="paramname"><em>object</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns FFmpeg version bundled within the library.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">env</td><td>pointer to native method interface </td></tr>
<tr><td class="paramname">object</td><td>reference to the class on which this method is invoked </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>FFmpeg version string </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00074">74</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
<a id="ab25e0b810545b8ec5219ed72a72c9db3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab25e0b810545b8ec5219ed72a72c9db3">&#9670;&nbsp;</a></span>Java_com_arthenica_mobileffmpeg_FFmpeg_getVersion()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_FFmpeg_getVersion </td>
<td>(</td>
<td class="paramtype">JNIEnv *&#160;</td>
<td class="paramname"><em>env</em>, </td>
<td class="paramname"><em>object</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">jclass&#160;</td>
<td class="paramname"><em>object</em>&#160;</td>
<td class="paramtype">jint&#160;</td>
<td class="paramname"><em>level</em>&#160;</td>
</tr>
<tr>
<td></td>
@@ -231,24 +597,24 @@ Functions</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>Returns MobileFFmpeg library version.</p>
<p>Sets log level.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">env</td><td>pointer to native method interface </td></tr>
<tr><td class="paramname">object</td><td>reference to the class on which this method is invoked </td></tr>
<tr><td class="paramname">reference</td><td>to the class on which this method is invoked </td></tr>
<tr><td class="paramname">log</td><td>level </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>MobileFFmpeg version string </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00085">85</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html#l00519">519</a> of file <a class="el" href="../../dd/d16/mobileffmpeg_8c_source.html">mobileffmpeg.c</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 5 2018 00:38:07 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Wed Oct 24 2018 21:43:20 for MobileFFmpeg Android API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More