Merge pull request #231 from tanersener/improve-documentation

Improve documentation
This commit is contained in:
Taner Şener 2021-11-09 19:46:24 +00:00 committed by GitHub
commit dcabec5f65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 674 additions and 206 deletions

View File

@ -10,8 +10,29 @@ on:
- main
jobs:
build-main-on-macos:
name: ios main
build-main-on-macos-bigsur:
name: ios main on big sur
runs-on: macos-11
strategy:
matrix:
xcode: [ '12.5.1', '13.0' ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script
run: ./ios.sh --xcframework --enable-ios-audiotoolbox --enable-ios-avfoundation --enable-ios-bzip2 --enable-ios-libiconv --enable-ios-videotoolbox --enable-ios-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print ffbuild logs
if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-main-on-macos-catalina:
name: ios main on catalina
runs-on: macos-10.15
strategy:
matrix:

View File

@ -10,8 +10,29 @@ on:
- main
jobs:
build-main-on-macos:
name: macos main
build-main-on-macos-bigsur:
name: macos main on big sur
runs-on: macos-11
strategy:
matrix:
xcode: [ '12.5.1', '13.0' ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script
run: ./macos.sh --xcframework --enable-macos-audiotoolbox --enable-macos-avfoundation --enable-macos-bzip2 --enable-macos-coreimage --enable-macos-libiconv --enable-macos-opencl --enable-macos-opengl --enable-macos-videotoolbox --enable-macos-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print ffbuild logs
if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-main-on-macos-catalina:
name: macos main on catalina
runs-on: macos-10.15
strategy:
matrix:

View File

@ -10,8 +10,29 @@ on:
- main
jobs:
build-main-on-macos:
name: tvos main
build-main-on-macos-bigsur:
name: tvos main on big sur
runs-on: macos-11
strategy:
matrix:
xcode: [ '12.5.1', '13.0' ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script
run: ./tvos.sh --xcframework --enable-tvos-bzip2 --enable-tvos-audiotoolbox --enable-tvos-libiconv --enable-tvos-videotoolbox --enable-tvos-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print ffbuild logs
if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-main-on-macos-catalina:
name: tvos main on catalina
runs-on: macos-10.15
strategy:
matrix:

View File

@ -19,23 +19,19 @@ It includes scripts to build `FFmpeg` native libraries, a wrapper library to run
### 2. Android
See [Android](https://github.com/tanersener/ffmpeg-kit/tree/main/android) to learn more about `FFmpegKit` for
`Android`.
See [Android](android) to learn more about `FFmpegKit` for `Android`.
### 3. iOS, macOS, tvOS
See [Apple](https://github.com/tanersener/ffmpeg-kit/tree/main/apple) to use `FFmpegKit` on `Apple` platforms
(`iOS`, `macOS`, `tvOS`).
See [Apple](apple) to use `FFmpegKit` on `Apple` platforms (`iOS`, `macOS`, `tvOS`).
### 4. Flutter
See [Flutter](https://github.com/tanersener/ffmpeg-kit/tree/main/flutter/flutter) to learn more about `FFmpegKit` for
`Flutter`.
See [Flutter](flutter/flutter) to learn more about `FFmpegKit` for `Flutter`.
### 5. React Native
See [React Native](https://github.com/tanersener/ffmpeg-kit/tree/main/react-native) to learn more about `FFmpegKit` for
`React Native`.
See [React Native](react-native) to learn more about `FFmpegKit` for `React Native`.
### 6. Build Scripts

View File

@ -296,7 +296,11 @@ if [[ -n ${ANDROID_ARCHITECTURES} ]]; then
# BUILD NATIVE LIBRARY
if [[ ${SKIP_ffmpeg_kit} -ne 1 ]]; then
if [ "$(is_darwin_arm64)" == "1" ]; then
arch -x86_64 "${ANDROID_NDK_ROOT}"/ndk-build -B 1>>"${BASEDIR}"/build.log 2>&1
else
"${ANDROID_NDK_ROOT}"/ndk-build -B 1>>"${BASEDIR}"/build.log 2>&1
fi
if [ $? -eq 0 ]; then
echo "ok"

View File

@ -71,7 +71,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
`ffmpeg-kit-<package name>` pattern. Use one of the `FFmpegKit` package names given in the
project [README](https://github.com/tanersener/ffmpeg-kit).
```
```yaml
repositories {
mavenCentral()
}
@ -83,9 +83,8 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
2. Execute synchronous `FFmpeg` commands.
```
```java
import com.arthenica.ffmpegkit.FFmpegKit;
import com.arthenica.ffmpegkit.ReturnCode;
FFmpegSession session = FFmpegKit.execute("-i file1.mp4 -c:v mpeg4 file2.mp4");
if (ReturnCode.isSuccess(session.getReturnCode())) {
@ -107,7 +106,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
3. Each `execute` call (sync or async) creates a new session. Access every detail about your execution from the
session created.
```
```java
FFmpegSession session = FFmpegKit.execute("-i file1.mp4 -c:v mpeg4 file2.mp4");
// Unique session id created for this execution
@ -144,7 +143,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
4. Execute asynchronous `FFmpeg` commands by providing session specific `execute`/`log`/`session` callbacks.
```
```java
FFmpegKit.executeAsync("-i file1.mp4 -c:v mpeg4 file2.mp4", new ExecuteCallback() {
@Override
@ -179,7 +178,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
- Synchronous
```
```java
FFprobeSession session = FFprobeKit.execute(ffprobeCommand);
if (!ReturnCode.isSuccess(session.getReturnCode())) {
@ -189,7 +188,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
- Asynchronous
```
```java
FFprobeKit.executeAsync(ffprobeCommand, new ExecuteCallback() {
@Override
@ -203,7 +202,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
6. Get media information for a file.
```
```java
MediaInformationSession mediaInformation = FFprobeKit.getMediaInformation("<file path or uri>");
mediaInformation.getMediaInformation();
```
@ -211,18 +210,18 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
7. Stop ongoing `FFmpeg` operations.
- Stop all executions
```
```java
FFmpegKit.cancel();
```
- Stop a specific session
```
```java
FFmpegKit.cancel(sessionId);
```
8. Convert Storage Access Framework (SAF) Uris into paths that can be read or written by `FFmpegKit`.
- Reading a file:
```
```java
Uri safUri = intent.getData();
String inputVideoPath = FFmpegKitConfig.getSafParameterForRead(requireContext(), safUri);
FFmpegKit.execute("-i " + inputVideoPath + " -c:v mpeg4 file2.mp4");
@ -230,7 +229,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
- Writing to a file:
```
```java
Uri safUri = intent.getData();
String outputVideoPath = FFmpegKitConfig.getSafParameterForWrite(requireContext(), safUri);
FFmpegKit.execute("-i file1.mp4 -c:v mpeg4 " + outputVideoPath);
@ -238,7 +237,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
9. Get previous `FFmpeg` and `FFprobe` sessions from session history.
```
```java
List<Session> sessions = FFmpegKitConfig.getSessions();
for (int i = 0; i < sessions.size(); i++) {
Session session = sessions.get(i);
@ -256,7 +255,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
- Execute Callback, called when an async execution is ended
```
```java
FFmpegKitConfig.enableExecuteCallback(new ExecuteCallback() {
@Override
@ -268,7 +267,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
- Log Callback, called when a session generates logs
```
```java
FFmpegKitConfig.enableLogCallback(new LogCallback() {
@Override
@ -280,7 +279,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
- Statistics Callback, called when a session generates statistics
```
```java
FFmpegKitConfig.enableStatisticsCallback(new StatisticsCallback() {
@Override
@ -292,13 +291,13 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
11. Ignore the handling of a signal. Required by `Mono` and frameworks that use `Mono`, e.g. `Unity` and `Xamarin`.
```
```java
FFmpegKitConfig.ignoreSignal(Signal.SIGXCPU);
```
12. Register system fonts and custom font directories.
```
```java
FFmpegKitConfig.setFontDirectoryList(context, Arrays.asList("/system/fonts", "<folder with fonts>"), Collections.EMPTY_MAP);
```

View File

@ -24,8 +24,8 @@ import java.util.List;
import java.util.concurrent.ExecutorService;
/**
* <p>Main class to run <code>FFmpeg</code> commands. Supports executing commands both
* synchronously and asynchronously.
* <p>Main class to run <code>FFmpeg</code> commands. Supports executing commands both synchronously and
* asynchronously.
* <pre>
* FFmpegSession session = FFmpegKit.execute("-i file1.mp4 -c:v libxvid file1.avi");
*
@ -64,7 +64,10 @@ public class FFmpegKit {
}
/**
* <p>Asynchronously executes FFmpeg with arguments provided.
* <p>Starts an asynchronous FFmpeg execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param arguments FFmpeg command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -80,7 +83,10 @@ public class FFmpegKit {
}
/**
* <p>Asynchronously executes FFmpeg with arguments provided.
* <p>Starts an asynchronous FFmpeg execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param arguments FFmpeg command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -100,7 +106,10 @@ public class FFmpegKit {
}
/**
* <p>Asynchronously executes FFmpeg with arguments provided.
* <p>Starts an asynchronous FFmpeg execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param arguments FFmpeg command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -118,7 +127,10 @@ public class FFmpegKit {
}
/**
* <p>Asynchronously executes FFmpeg with arguments provided.
* <p>Starts an asynchronous FFmpeg execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param arguments FFmpeg command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -152,9 +164,11 @@ public class FFmpegKit {
}
/**
* <p>Asynchronously executes FFmpeg command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param command FFmpeg command
* @param executeCallback callback that will be called when the execution is completed
@ -166,9 +180,11 @@ public class FFmpegKit {
}
/**
* <p>Asynchronously executes FFmpeg command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param command FFmpeg command
* @param executeCallback callback that will be called when the execution is completed
@ -184,9 +200,11 @@ public class FFmpegKit {
}
/**
* <p>Asynchronously executes FFmpeg command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param command FFmpeg command
* @param executeCallback callback that will be called when the execution is completed
@ -204,9 +222,11 @@ public class FFmpegKit {
}
/**
* <p>Asynchronously executes FFmpeg command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param command FFmpeg command
* @param executeCallback callback that will be called when the execution is completed

View File

@ -656,7 +656,10 @@ public class FFmpegKitConfig {
}
/**
* <p>Asynchronously executes the FFmpeg session provided.
* <p>Starts an asynchronous FFmpeg execution for the given session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param ffmpegSession FFmpeg session which includes command options/arguments
*/
@ -667,7 +670,10 @@ public class FFmpegKitConfig {
}
/**
* <p>Asynchronously executes the FFmpeg session provided.
* <p>Starts an asynchronous FFmpeg execution for the given session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param ffmpegSession FFmpeg session which includes command options/arguments
* @param executorService executor service that will be used to run this asynchronous operation
@ -679,7 +685,10 @@ public class FFmpegKitConfig {
}
/**
* <p>Asynchronously executes the FFprobe session provided.
* <p>Starts an asynchronous FFprobe execution for the given session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param ffprobeSession FFprobe session which includes command options/arguments
*/
@ -690,7 +699,10 @@ public class FFmpegKitConfig {
}
/**
* <p>Asynchronously executes the FFprobe session provided.
* <p>Starts an asynchronous FFprobe execution for the given session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param ffprobeSession FFprobe session which includes command options/arguments
* @param executorService executor service that will be used to run this asynchronous operation
@ -702,7 +714,10 @@ public class FFmpegKitConfig {
}
/**
* <p>Asynchronously executes the media information session provided.
* <p>Starts an asynchronous FFprobe execution for the given media information session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param mediaInformationSession media information session which includes command options/arguments
* @param waitTimeout max time to wait until media information is transmitted
@ -714,7 +729,10 @@ public class FFmpegKitConfig {
}
/**
* <p>Asynchronously executes the media information session provided.
* <p>Starts an asynchronous FFprobe execution for the given media information session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param mediaInformationSession media information session which includes command options/arguments
* @param executorService executor service that will be used to run this asynchronous operation

View File

@ -23,8 +23,8 @@ import java.util.List;
import java.util.concurrent.ExecutorService;
/**
* <p>Main class to run <code>FFprobe</code> commands. Supports executing commands both
* synchronously and asynchronously.
* <p>Main class to run <code>FFprobe</code> commands. Supports executing commands both synchronously and
* asynchronously.
* <pre>
* FFprobeSession session = FFprobeKit.execute("-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4");
*
@ -67,7 +67,10 @@ public class FFprobeKit {
}
/**
* <p>Asynchronously executes FFprobe with arguments provided.
* <p>Starts an asynchronous FFprobe execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param arguments FFprobe command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -83,7 +86,10 @@ public class FFprobeKit {
}
/**
* <p>Asynchronously executes FFprobe with arguments provided.
* <p>Starts an asynchronous FFprobe execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param arguments FFprobe command options/arguments as string array
* @param executeCallback callback that will be notified when execution is completed
@ -101,7 +107,10 @@ public class FFprobeKit {
}
/**
* <p>Asynchronously executes FFprobe with arguments provided.
* <p>Starts an asynchronous FFprobe execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param arguments FFprobe command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -119,7 +128,10 @@ public class FFprobeKit {
}
/**
* <p>Asynchronously executes FFprobe with arguments provided.
* <p>Starts an asynchronous FFprobe execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param arguments FFprobe command options/arguments as string array
* @param executeCallback callback that will be notified when execution is completed
@ -151,9 +163,11 @@ public class FFprobeKit {
}
/**
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param command FFprobe command
* @param executeCallback callback that will be called when the execution is completed
@ -165,9 +179,11 @@ public class FFprobeKit {
}
/**
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param command FFprobe command
* @param executeCallback callback that will be notified when execution is completed
@ -181,9 +197,11 @@ public class FFprobeKit {
}
/**
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param command FFprobe command
* @param executeCallback callback that will be called when the execution is completed
@ -201,9 +219,11 @@ public class FFprobeKit {
}
/**
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param command FFprobe command
* @param executeCallback callback that will be called when the execution is completed
@ -253,7 +273,10 @@ public class FFprobeKit {
}
/**
* <p>Extracts media information for the file specified with path asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param path path or uri of a media file
* @param executeCallback callback that will be called when the execution is completed
@ -269,7 +292,10 @@ public class FFprobeKit {
}
/**
* <p>Extracts media information for the file specified with path asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param path path or uri of a media file
* @param executeCallback callback that will be notified when execution is completed
@ -289,7 +315,10 @@ public class FFprobeKit {
}
/**
* <p>Extracts media information for the file specified with path asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param path path or uri of a media file
* @param executeCallback callback that will be called when the execution is completed
@ -307,7 +336,10 @@ public class FFprobeKit {
}
/**
* <p>Extracts media information for the file specified with path asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param path path or uri of a media file
* @param executeCallback callback that will be notified when execution is completed
@ -343,7 +375,11 @@ public class FFprobeKit {
}
/**
* <p>Extracts media information using the command provided asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract media information using a command. The command passed to
* this method must generate the output in JSON format in order to successfully extract media information from it.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param command FFprobe command that prints media information for a file in JSON format
* @param executeCallback callback that will be notified when execution is completed
@ -359,7 +395,12 @@ public class FFprobeKit {
}
/**
* Extracts media information using the command arguments provided asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract media information using command arguments. The command
* passed to this method must generate the output in JSON format in order to successfully extract media information
* from it.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* {@jlink ExecuteCallback} if you want to be notified about the result.
*
* @param arguments FFprobe command arguments that print media information for a file in JSON format
* @param executeCallback callback that will be notified when execution is completed

View File

@ -113,23 +113,23 @@ All libraries created can be found under the `prebuilt` directory.
`FFmpegKit` package names given in the project [README](https://github.com/tanersener/ffmpeg-kit).
- iOS
```
```yaml
pod 'ffmpeg-kit-ios-full', '~> 4.5'
```
- macOS
```
```yaml
pod 'ffmpeg-kit-macos-full', '~> 4.5'
```
- tvOS
```
```yaml
pod 'ffmpeg-kit-tvos-full', '~> 4.5'
```
2. Execute synchronous `FFmpeg` commands.
```
```objectivec
#include <ffmpegkit/FFmpegKit.h>
FFmpegSession *session = [FFmpegKit execute:@"-i file1.mp4 -c:v mpeg4 file2.mp4"];
@ -153,7 +153,7 @@ All libraries created can be found under the `prebuilt` directory.
3. Each `execute` call (sync or async) creates a new session. Access every detail about your execution from the
session created.
```
```objectivec
FFmpegSession *session = [FFmpegKit execute:@"-i file1.mp4 -c:v mpeg4 file2.mp4"];
// Unique session id created for this execution
@ -190,7 +190,7 @@ All libraries created can be found under the `prebuilt` directory.
4. Execute asynchronous `FFmpeg` commands by providing session specific `execute`/`log`/`session` callbacks.
```
```objectivec
id<Session> session = [FFmpegKit executeAsync:@"-i file1.mp4 -c:v mpeg4 file2.mp4" withExecuteCallback:^(id<Session> session){
SessionState state = [session getState];
ReturnCode *returnCode = [session getReturnCode];
@ -214,7 +214,7 @@ All libraries created can be found under the `prebuilt` directory.
- Synchronous
```
```objectivec
FFprobeSession *session = [FFprobeKit execute:ffprobeCommand];
if ([ReturnCode isSuccess:[session getReturnCode]]) {
@ -224,7 +224,7 @@ All libraries created can be found under the `prebuilt` directory.
- Asynchronous
```
```objectivec
[FFprobeKit executeAsync:ffmpegCommand withExecuteCallback:^(id<Session> session) {
CALLED WHEN SESSION IS EXECUTED
@ -234,7 +234,7 @@ All libraries created can be found under the `prebuilt` directory.
6. Get media information for a file.
```
```objectivec
MediaInformationSession *mediaInformation = [FFprobeKit getMediaInformation:"<file path or uri>"];
MediaInformation *mediaInformation =[mediaInformation getMediaInformation];
```
@ -242,17 +242,17 @@ All libraries created can be found under the `prebuilt` directory.
7. Stop ongoing `FFmpeg` operations.
- Stop all executions
```
```objectivec
[FFmpegKit cancel];
```
- Stop a specific session
```
```objectivec
[FFmpegKit cancel:sessionId];
```
8. Get previous `FFmpeg` and `FFprobe` sessions from session history.
```
```objectivec
NSArray* sessions = [FFmpegKitConfig getSessions];
for (int i = 0; i < [sessions count]; i++) {
id<Session> session = [sessions objectAtIndex:i];
@ -270,7 +270,7 @@ All libraries created can be found under the `prebuilt` directory.
- Execute Callback, called when an async execution is ended
```
```objectivec
[FFmpegKitConfig enableExecuteCallback:^(id<Session> session) {
...
}];
@ -278,7 +278,7 @@ All libraries created can be found under the `prebuilt` directory.
- Log Callback, called when a session generates logs
```
```objectivec
[FFmpegKitConfig enableLogCallback:^(Log *log) {
...
}];
@ -286,7 +286,7 @@ All libraries created can be found under the `prebuilt` directory.
- Statistics Callback, called when a session generates statistics
```
```objectivec
[FFmpegKitConfig enableStatisticsCallback:^(Statistics *statistics) {
...
}];
@ -294,13 +294,13 @@ All libraries created can be found under the `prebuilt` directory.
10. Ignore the handling of a signal. Required by `Mono` and frameworks that use `Mono`, e.g. `Unity` and `Xamarin`.
```
```objectivec
[FFmpegKitConfig ignoreSignal:SIGXCPU];
```
11. Register system fonts and custom font directories.
```
```objectivec
[FFmpegKitConfig setFontDirectoryList:[NSArray arrayWithObjects:@"/System/Library/Fonts", @"<folder with fonts>", nil] with:nil];
```

View File

@ -29,8 +29,8 @@
#import "StatisticsCallback.h"
/**
* <p>Main class to run <code>FFmpeg</code> commands. Supports executing commands both
* synchronously and asynchronously.
* <p>Main class to run <code>FFmpeg</code> commands. Supports executing commands both synchronously and
* asynchronously.
* <pre>
* FFmpegSession *session = [FFmpegKit execute:@"-i file1.mp4 -c:v libxvid file1.avi"];
*
@ -52,7 +52,10 @@
+ (FFmpegSession*)executeWithArguments:(NSArray*)arguments;
/**
* <p>Asynchronously executes FFmpeg with arguments provided.
* <p>Starts an asynchronous FFmpeg execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param arguments FFmpeg command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -61,7 +64,10 @@
+ (FFmpegSession*)executeWithArgumentsAsync:(NSArray*)arguments withExecuteCallback:(ExecuteCallback)executeCallback;
/**
* <p>Asynchronously executes FFmpeg with arguments provided.
* <p>Starts an asynchronous FFmpeg execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param arguments FFmpeg command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -72,7 +78,10 @@
+ (FFmpegSession*)executeWithArgumentsAsync:(NSArray*)arguments withExecuteCallback:(ExecuteCallback)executeCallback withLogCallback:(LogCallback)logCallback withStatisticsCallback:(StatisticsCallback)statisticsCallback;
/**
* <p>Asynchronously executes FFmpeg with arguments provided.
* <p>Starts an asynchronous FFmpeg execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param arguments FFmpeg command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -82,7 +91,10 @@
+ (FFmpegSession*)executeWithArgumentsAsync:(NSArray*)arguments withExecuteCallback:(ExecuteCallback)executeCallback onDispatchQueue:(dispatch_queue_t)queue;
/**
* <p>Asynchronously executes FFmpeg with arguments provided.
* <p>Starts an asynchronous FFmpeg execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param arguments FFmpeg command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -104,9 +116,11 @@
+ (FFmpegSession*)execute:(NSString*)command;
/**
* <p>Asynchronously executes FFmpeg command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFmpeg command
* @param executeCallback callback that will be called when the execution is completed
@ -115,9 +129,11 @@
+ (FFmpegSession*)executeAsync:(NSString*)command withExecuteCallback:(ExecuteCallback)executeCallback;
/**
* <p>Asynchronously executes FFmpeg command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFmpeg command
* @param executeCallback callback that will be called when the execution is completed
@ -128,9 +144,11 @@
+ (FFmpegSession*)executeAsync:(NSString*)command withExecuteCallback:(ExecuteCallback)executeCallback withLogCallback:(LogCallback)logCallback withStatisticsCallback:(StatisticsCallback)statisticsCallback;
/**
* <p>Asynchronously executes FFmpeg command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFmpeg command
* @param executeCallback callback that will be called when the execution is completed
@ -140,9 +158,11 @@
+ (FFmpegSession*)executeAsync:(NSString*)command withExecuteCallback:(ExecuteCallback)executeCallback onDispatchQueue:(dispatch_queue_t)queue;
/**
* <p>Asynchronously executes FFmpeg command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFmpeg command
* @param executeCallback callback that will be called when the execution is completed

View File

@ -189,14 +189,20 @@ typedef NS_ENUM(NSUInteger, Signal) {
+ (void)getMediaInformationExecute:(MediaInformationSession*)mediaInformationSession withTimeout:(int)waitTimeout;
/**
* <p>Asynchronously executes the FFmpeg session provided.
* <p>Starts an asynchronous FFmpeg execution for the given session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param ffmpegSession FFmpeg session which includes command options/arguments
*/
+ (void)asyncFFmpegExecute:(FFmpegSession*)ffmpegSession;
/**
* <p>Asynchronously executes the FFmpeg session provided.
* <p>Starts an asynchronous FFmpeg execution for the given session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param ffmpegSession FFmpeg session which includes command options/arguments
* @param queue dispatch queue that will be used to run this asynchronous operation
@ -204,14 +210,20 @@ typedef NS_ENUM(NSUInteger, Signal) {
+ (void)asyncFFmpegExecute:(FFmpegSession*)ffmpegSession onDispatchQueue:(dispatch_queue_t)queue;
/**
* <p>Asynchronously executes the FFprobe session provided.
* <p>Starts an asynchronous FFprobe execution for the given session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param ffprobeSession FFprobe session which includes command options/arguments
*/
+ (void)asyncFFprobeExecute:(FFprobeSession*)ffprobeSession;
/**
* <p>Asynchronously executes the FFprobe session provided.
* <p>Starts an asynchronous FFprobe execution for the given session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param ffprobeSession FFprobe session which includes command options/arguments
* @param queue dispatch queue that will be used to run this asynchronous operation
@ -219,7 +231,10 @@ typedef NS_ENUM(NSUInteger, Signal) {
+ (void)asyncFFprobeExecute:(FFprobeSession*)ffprobeSession onDispatchQueue:(dispatch_queue_t)queue;
/**
* <p>Asynchronously executes the media information session provided.
* <p>Starts an asynchronous FFprobe execution for the given media information session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param mediaInformationSession media information session which includes command options/arguments
* @param waitTimeout max time to wait until media information is transmitted
@ -227,7 +242,10 @@ typedef NS_ENUM(NSUInteger, Signal) {
+ (void)asyncGetMediaInformationExecute:(MediaInformationSession*)mediaInformationSession withTimeout:(int)waitTimeout;
/**
* <p>Asynchronously executes the media information session provided.
* <p>Starts an asynchronous FFprobe execution for the given media information session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param mediaInformationSession media information session which includes command options/arguments
* @param queue dispatch queue that will be used to run this asynchronous operation

View File

@ -27,8 +27,8 @@
#import "MediaInformationJsonParser.h"
/**
* <p>Main class to run <code>FFprobe</code> commands. Supports executing commands both
* synchronously and asynchronously.
* <p>Main class to run <code>FFprobe</code> commands. Supports executing commands both synchronously and
* asynchronously.
* <pre>
* FFprobeSession *session = [FFprobeKit execute:@"-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4"];
*
@ -54,7 +54,10 @@
+ (FFprobeSession*)executeWithArguments:(NSArray*)arguments;
/**
* <p>Asynchronously executes FFprobe with arguments provided.
* <p>Starts an asynchronous FFprobe execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param arguments FFprobe command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -63,7 +66,10 @@
+ (FFprobeSession*)executeWithArgumentsAsync:(NSArray*)arguments withExecuteCallback:(ExecuteCallback)executeCallback;
/**
* <p>Asynchronously executes FFprobe with arguments provided.
* <p>Starts an asynchronous FFprobe execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param arguments FFprobe command options/arguments as string array
* @param executeCallback callback that will be notified when execution is completed
@ -73,7 +79,10 @@
+ (FFprobeSession*)executeWithArgumentsAsync:(NSArray*)arguments withExecuteCallback:(ExecuteCallback)executeCallback withLogCallback:(LogCallback)logCallback;
/**
* <p>Asynchronously executes FFprobe with arguments provided.
* <p>Starts an asynchronous FFprobe execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param arguments FFprobe command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -83,7 +92,10 @@
+ (FFprobeSession*)executeWithArgumentsAsync:(NSArray*)arguments withExecuteCallback:(ExecuteCallback)executeCallback onDispatchQueue:(dispatch_queue_t)queue;
/**
* <p>Asynchronously executes FFprobe with arguments provided.
* <p>Starts an asynchronous FFprobe execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param arguments FFprobe command options/arguments as string array
* @param executeCallback callback that will be notified when execution is completed
@ -104,9 +116,11 @@
+ (FFprobeSession*)execute:(NSString*)command;
/**
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFprobe command
* @param executeCallback callback that will be called when the execution is completed
@ -115,9 +129,11 @@
+ (FFprobeSession*)executeAsync:(NSString*)command withExecuteCallback:(ExecuteCallback)executeCallback;
/**
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFprobe command
* @param executeCallback callback that will be notified when execution is completed
@ -127,9 +143,11 @@
+ (FFprobeSession*)executeAsync:(NSString*)command withExecuteCallback:(ExecuteCallback)executeCallback withLogCallback:(LogCallback)logCallback;
/**
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFprobe command
* @param executeCallback callback that will be called when the execution is completed
@ -139,9 +157,11 @@
+ (FFprobeSession*)executeAsync:(NSString*)command withExecuteCallback:(ExecuteCallback)executeCallback onDispatchQueue:(dispatch_queue_t)queue;
/**
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
* <p>Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFprobe command
* @param executeCallback callback that will be called when the execution is completed
@ -169,7 +189,10 @@
+ (MediaInformationSession*)getMediaInformation:(NSString*)path withTimeout:(int)waitTimeout;
/**
* <p>Extracts media information for the file specified with path asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param path path or uri of a media file
* @param executeCallback callback that will be called when the execution is completed
@ -178,7 +201,10 @@
+ (MediaInformationSession*)getMediaInformationAsync:(NSString*)path withExecuteCallback:(ExecuteCallback)executeCallback;
/**
* <p>Extracts media information for the file specified with path asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param path path or uri of a media file
* @param executeCallback callback that will be notified when execution is completed
@ -189,7 +215,10 @@
+ (MediaInformationSession*)getMediaInformationAsync:(NSString*)path withExecuteCallback:(ExecuteCallback)executeCallback withLogCallback:(LogCallback)logCallback withTimeout:(int)waitTimeout;
/**
* <p>Extracts media information for the file specified with path asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param path path or uri of a media file
* @param executeCallback callback that will be called when the execution is completed
@ -199,7 +228,10 @@
+ (MediaInformationSession*)getMediaInformationAsync:(NSString*)path withExecuteCallback:(ExecuteCallback)executeCallback onDispatchQueue:(dispatch_queue_t)queue;
/**
* <p>Extracts media information for the file specified with path asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param path path or uri of a media file
* @param executeCallback callback that will be notified when execution is completed
@ -219,7 +251,11 @@
+ (MediaInformationSession*)getMediaInformationFromCommand:(NSString*)command;
/**
* <p>Extracts media information using the command provided asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract media information using a command. The command passed to
* this method must generate the output in JSON format in order to successfully extract media information from it.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFprobe command that prints media information for a file in JSON format
* @param executeCallback callback that will be notified when execution is completed

View File

@ -77,6 +77,33 @@ same source code but is built with different settings (Architectures, API Level,
[LTS Releases](https://github.com/tanersener/ffmpeg-kit#10-lts-releases) section of the project README to see how they
compare to each other.
#### 2.5 Android and iOS Support
The following table shows the Android API level and iOS deployment target required in `ffmpeg_kit_flutter` releases.
<table>
<thead>
<tr>
<th align="center" colspan="2">Main Release</th>
<th align="center" colspan="2">LTS Release</th>
</tr>
<tr>
<th align="center">Android<br>API Level</th>
<th align="center">iOS Minimum<br>Deployment Target</th>
<th align="center">Android<br>API Level</th>
<th align="center">iOS Minimum<br>Deployment Target</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">24</td>
<td align="center">12.1</td>
<td align="center">16</td>
<td align="center">9.3</td>
</tr>
</tbody>
</table>
### 3. Using
1. Execute FFmpeg commands.

View File

@ -31,7 +31,11 @@ import 'statistics_callback.dart';
class FFmpegKit {
static FFmpegKitPlatform _platform = FFmpegKitPlatform.instance;
/// Asynchronously executes FFmpeg with command provided.
/// Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
/// into arguments. You can use single or double quote characters to specify arguments inside your command.
///
/// Note that this method returns immediately and does not wait the execution to complete. You must use an
/// [ExecuteCallback] if you want to be notified about the result.
static Future<FFmpegSession> executeAsync(String command,
[ExecuteCallback? executeCallback = null,
LogCallback? logCallback = null,
@ -42,7 +46,10 @@ class FFmpegKit {
logCallback,
statisticsCallback);
/// Asynchronously executes FFmpeg with arguments provided.
/// Starts an asynchronous FFmpeg execution with arguments provided.
///
/// Note that this method returns immediately and does not wait the execution to complete. You must use an
/// [ExecuteCallback] if you want to be notified about the result.
static Future<FFmpegSession> executeWithArgumentsAsync(
List<String> commandArguments,
[ExecuteCallback? executeCallback = null,

View File

@ -215,7 +215,10 @@ class FFmpegKitConfig {
}
}
/// Asynchronously executes the [ffmpegSession] provided.
/// Starts an asynchronous FFmpeg execution for the given session.
///
/// Note that this method returns immediately and does not wait the execution to complete. You must use an
/// [ExecuteCallback] if you want to be notified about the result.
static Future<void> asyncFFmpegExecute(FFmpegSession ffmpegSession) async {
try {
await init();
@ -227,7 +230,10 @@ class FFmpegKitConfig {
}
}
/// Asynchronously executes the [ffprobeSession] provided.
/// Starts an asynchronous FFprobe execution for the given session.
///
/// Note that this method returns immediately and does not wait the execution to complete. You must use an
/// [ExecuteCallback] if you want to be notified about the result.
static Future<void> asyncFFprobeExecute(FFprobeSession ffprobeSession) async {
try {
await init();
@ -239,7 +245,10 @@ class FFmpegKitConfig {
}
}
/// Asynchronously executes the [mediaInformationSession] provided.
/// Starts an asynchronous FFprobe execution for the given media information session.
///
/// Note that this method returns immediately and does not wait the execution to complete. You must use an
/// [ExecuteCallback] if you want to be notified about the result.
static Future<void> asyncGetMediaInformationExecute(
MediaInformationSession mediaInformationSession,
[int? waitTimeout = null]) async {

View File

@ -31,7 +31,11 @@ import 'src/ffmpeg_kit_factory.dart';
class FFprobeKit {
static FFmpegKitPlatform _platform = FFmpegKitPlatform.instance;
/// Asynchronously executes FFprobe with [command] provided.
/// Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command
/// into arguments. You can use single or double quote characters to specify arguments inside your command.
///
/// Note that this method returns immediately and does not wait the execution to complete. You must use an
/// [ExecuteCallback] if you want to be notified about the result.
static Future<FFprobeSession> executeAsync(String command,
[ExecuteCallback? executeCallback = null,
LogCallback? logCallback = null]) async =>
@ -40,7 +44,10 @@ class FFprobeKit {
executeCallback,
logCallback);
/// Asynchronously executes FFprobe with [commandArguments] provided.
/// Starts an asynchronous FFprobe execution with arguments provided.
///
/// Note that this method returns immediately and does not wait the execution to complete. You must use an
/// [ExecuteCallback] if you want to be notified about the result.
static Future<FFprobeSession> executeWithArgumentsAsync(
List<String> commandArguments,
[ExecuteCallback? executeCallback = null,
@ -53,7 +60,10 @@ class FFprobeKit {
return session;
}
/// Extracts the media information for the file at [path] asynchronously.
/// Starts an asynchronous FFprobe execution to extract the media information for the specified file.
///
/// Note that this method returns immediately and does not wait the execution to complete. You must use an
/// [ExecuteCallback] if you want to be notified about the result.
static Future<MediaInformationSession> getMediaInformationAsync(String path,
[ExecuteCallback? executeCallback = null,
LogCallback? logCallback = null,
@ -73,7 +83,11 @@ class FFprobeKit {
commandArguments, executeCallback, logCallback, waitTimeout);
}
/// Extracts media information using the [command] provided asynchronously.
/// Starts an asynchronous FFprobe execution to extract media information using a command. The command passed to
/// this method must generate the output in JSON format in order to successfully extract media information from it.
///
/// Note that this method returns immediately and does not wait the execution to complete. You must use an
/// [ExecuteCallback] if you want to be notified about the result.
static Future<MediaInformationSession> getMediaInformationFromCommandAsync(
String command,
[ExecuteCallback? executeCallback = null,
@ -85,8 +99,12 @@ class FFprobeKit {
logCallback,
waitTimeout);
/// Extracts media information using the [commandArguments] provided
/// asynchronously.
/// Starts an asynchronous FFprobe execution to extract media information using command arguments. The command
/// passed to this method must generate the output in JSON format in order to successfully extract media information
/// from it.
///
/// Note that this method returns immediately and does not wait the execution to complete. You must use an
/// [ExecuteCallback] if you want to be notified about the result.
static Future<MediaInformationSession>
getMediaInformationFromCommandArgumentsAsync(
List<String> commandArguments,

10
ios.sh
View File

@ -123,6 +123,16 @@ while [ ! $# -eq 0 ]; do
disable_arch "${DISABLED_ARCH}"
;;
--target=*)
TARGET=$(echo $1 | sed -e 's/^--[A-Za-z]*=//g')
export IOS_MIN_VERSION=${TARGET}
;;
--mac-catalyst-target=*)
TARGET=$(echo $1 | sed -e 's/^--[A-Za-z]*-[A-Za-z]*-[A-Za-z]*=//g')
export MAC_CATALYST_MIN_VERSION=${TARGET}
;;
*)
print_unknown_option "$1"
;;

View File

@ -123,6 +123,11 @@ while [ ! $# -eq 0 ]; do
disable_arch "${DISABLED_ARCH}"
;;
--target=*)
TARGET=$(echo $1 | sed -e 's/^--[A-Za-z]*=//g')
export MACOS_MIN_VERSION=${TARGET}
;;
*)
print_unknown_option "$1"
;;

View File

@ -45,18 +45,103 @@ of those packages and external libraries included in each of them.
##### 2.1.1 Package Names
The following table shows all package names defined for `ffmpeg-kit-react-native`.
The following table shows all package names and their respective API levels, iOS deployment targets defined in
`ffmpeg-kit-react-native`.
| Package | Main Release | LTS Release |
| :----: | :----: | :----: |
| min | min | min-lts |
| min-gpl | min-gpl | min-gpl-lts |
| https | https | https-lts |
| https-gpl | https-gpl | https-gpl-lts |
| audio | audio | audio-lts |
| video | video | video-lts |
| full | full | full-lts |
| full-gpl | full-gpl | full-gpl-lts |
<table>
<thead>
<tr>
<th align="center">Package</th>
<th align="center" colspan="3">Main Release</th>
<th align="center" colspan="3">LTS Release</th>
</tr>
<tr>
<th align="center"></th>
<th align="center">Name</th>
<th align="center">Android<br>API Level</th>
<th align="center">iOS Minimum<br>Deployment Target</th>
<th align="center">Name</th>
<th align="center">Android<br>API Level</th>
<th align="center">iOS Minimum<br>Deployment Target</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">min</td>
<td align="center">min</td>
<td align="center">24</td>
<td align="center">12.1</td>
<td align="center">min-lts</td>
<td align="center">16</td>
<td align="center">9.3</td>
</tr>
<tr>
<td align="center">min-gpl</td>
<td align="center">min-gpl</td>
<td align="center">24</td>
<td align="center">12.1</td>
<td align="center">min-gpl-lts</td>
<td align="center">16</td>
<td align="center">9.3</td>
</tr>
<tr>
<td align="center">https</td>
<td align="center">(*) https</td>
<td align="center">24</td>
<td align="center">12.1</td>
<td align="center">https-lts</td>
<td align="center">16</td>
<td align="center">9.3</td>
</tr>
<tr>
<td align="center">https-gpl</td>
<td align="center">https-gpl</td>
<td align="center">24</td>
<td align="center">12.1</td>
<td align="center">https-gpl-lts</td>
<td align="center">16</td>
<td align="center">9.3</td>
</tr>
<tr>
<td align="center">audio</td>
<td align="center">audio</td>
<td align="center">24</td>
<td align="center">12.1</td>
<td align="center">audio-lts</td>
<td align="center">16</td>
<td align="center">9.3</td>
</tr>
<tr>
<td align="center">video</td>
<td align="center">video</td>
<td align="center">24</td>
<td align="center">12.1</td>
<td align="center">video-lts</td>
<td align="center">16</td>
<td align="center">9.3</td>
</tr>
<tr>
<td align="center">full</td>
<td align="center">full</td>
<td align="center">24</td>
<td align="center">12.1</td>
<td align="center">full-lts</td>
<td align="center">16</td>
<td align="center">9.3</td>
</tr>
<tr>
<td align="center">full-gpl</td>
<td align="center">full-gpl</td>
<td align="center">24</td>
<td align="center">12.1</td>
<td align="center">full-gpl-lts</td>
<td align="center">16</td>
<td align="center">9.3</td>
</tr>
</tbody>
</table>
(*) - Main `https` package is the default package
#### 2.2 Enabling Packages

View File

@ -710,7 +710,11 @@ export class ArchDetect {
export class FFmpegKit {
/**
* <p>Asynchronously executes FFmpeg with command provided.
* <p>Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFmpeg command
* @param executeCallback callback that will be called when the execution is completed
@ -723,7 +727,10 @@ export class FFmpegKit {
}
/**
* <p>Asynchronously executes FFmpeg with arguments provided.
* <p>Starts an asynchronous FFmpeg execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param commandArguments FFmpeg command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -951,7 +958,10 @@ export class FFmpegKitConfig {
}
/**
* <p>Asynchronously executes the FFmpeg session provided.
* <p>Starts an asynchronous FFmpeg execution for the given session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param ffmpegSession FFmpeg session which includes command options/arguments
*/
@ -962,7 +972,10 @@ export class FFmpegKitConfig {
}
/**
* <p>Asynchronously executes the FFprobe session provided.
* <p>Starts an asynchronous FFprobe execution for the given session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param ffprobeSession FFprobe session which includes command options/arguments
*/
@ -973,7 +986,10 @@ export class FFmpegKitConfig {
}
/**
* <p>Asynchronously executes the media information session provided.
* <p>Starts an asynchronous FFprobe execution for the given media information session.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param mediaInformationSession media information session which includes command options/arguments
* @param waitTimeout max time to wait until media information is transmitted
@ -1812,7 +1828,11 @@ export class FFmpegSession extends AbstractSession {
export class FFprobeKit {
/**
* <p>Asynchronously executes FFprobe with arguments provided.
* <p>Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFprobe command
* @param executeCallback callback that will be called when the execution is completed
@ -1824,7 +1844,10 @@ export class FFprobeKit {
}
/**
* <p>Asynchronously executes FFprobe with arguments provided.
* <p>Starts an asynchronous FFprobe execution with arguments provided.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param commandArguments FFprobe command options/arguments as string array
* @param executeCallback callback that will be called when the execution is completed
@ -1840,7 +1863,10 @@ export class FFprobeKit {
}
/**
* <p>Extracts the media information for the specified file asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param path path or uri of a media file
* @param executeCallback callback that will be notified when execution is completed
@ -1854,7 +1880,11 @@ export class FFprobeKit {
}
/**
* <p>Extracts media information using the command provided asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract media information using a command. The command passed to
* this method must generate the output in JSON format in order to successfully extract media information from it.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param command FFprobe command that prints media information for a file in JSON format
* @param executeCallback callback that will be notified when execution is completed
@ -1867,7 +1897,12 @@ export class FFprobeKit {
}
/**
* <p>Extracts media information using the command arguments provided asynchronously.
* <p>Starts an asynchronous FFprobe execution to extract media information using command arguments. The command
* passed to this method must generate the output in JSON format in order to successfully extract media information
* from it.
*
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an
* ExecuteCallback if you want to be notified about the result.
*
* @param commandArguments FFprobe command arguments that prints media information for a file in JSON format
* @param executeCallback callback that will be notified when execution is completed

View File

@ -109,6 +109,17 @@ get_clang_host() {
esac
}
is_darwin_arm64() {
HOST_OS=$(uname -s)
HOST_ARCH=$(uname -m)
if [ "${HOST_OS}" == "Darwin" ] && [ "${HOST_ARCH}" == "arm64" ]; then
echo "1"
else
echo "0"
fi
}
get_toolchain() {
HOST_OS=$(uname -s)
case ${HOST_OS} in
@ -124,6 +135,12 @@ get_toolchain() {
x86_64 | amd64) HOST_ARCH=x86_64 ;;
esac
if [ "$(is_darwin_arm64)" == "1" ]; then
# NDK DOESNT HAVE AN ARM64 TOOLCHAIN ON DARWIN
# WE USE x86-64 WITH ROSETTA INSTEAD
HOST_ARCH=x86_64
fi
echo "${HOST_OS}-${HOST_ARCH}"
}

View File

@ -30,17 +30,17 @@ disable_ios_architecture_not_supported_on_detected_sdk_version() {
case ${ARCH_NAME} in
armv7 | armv7s | i386)
# SUPPORTED UNTIL IOS SDK 10
if [[ $2 == 11* ]] || [[ $2 == 12* ]] || [[ $2 == 13* ]] || [[ $2 == 14* ]]; then
local SUPPORTED=0
else
# SUPPORTED UNTIL IOS SDK 10.3.1
if [[ $(compare_versions "$2" "10.3.1") -le 0 ]]; then
local SUPPORTED=1
else
local SUPPORTED=0
fi
;;
arm64e)
# INTRODUCED IN IOS SDK 10
if [[ $2 == 10* ]] || [[ $2 == 11* ]] || [[ $2 == 12* ]] || [[ $2 == 13* ]] || [[ $2 == 14* ]]; then
# INTRODUCED IN IOS SDK 10.1
if [[ $(compare_versions "$2" "10.1") -ge 1 ]]; then
local SUPPORTED=1
else
local SUPPORTED=0
@ -48,8 +48,8 @@ disable_ios_architecture_not_supported_on_detected_sdk_version() {
;;
x86-64-mac-catalyst)
# INTRODUCED IN IOS SDK 13
if [[ $2 == 13* ]] || [[ $2 == 14* ]]; then
# INTRODUCED IN IOS SDK 13.0
if [[ $(compare_versions "$2" "13") -ge 1 ]]; then
local SUPPORTED=1
else
local SUPPORTED=0
@ -57,8 +57,8 @@ disable_ios_architecture_not_supported_on_detected_sdk_version() {
;;
arm64-*)
# INTRODUCED IN IOS SDK 14
if [[ $2 == 14* ]]; then
# INTRODUCED IN IOS SDK 14.0
if [[ $(compare_versions "$2" "14") -ge 1 ]]; then
local SUPPORTED=1
else
local SUPPORTED=0
@ -87,8 +87,8 @@ disable_tvos_architecture_not_supported_on_detected_sdk_version() {
case ${ARCH_NAME} in
arm64-simulator)
# INTRODUCED IN TVOS SDK 14
if [[ $2 == 14* ]]; then
# INTRODUCED IN TVOS SDK 14.0
if [[ $(compare_versions "$2" "14") -ge 1 ]]; then
local SUPPORTED=1
else
local SUPPORTED=0
@ -117,8 +117,8 @@ disable_macos_architecture_not_supported_on_detected_sdk_version() {
case ${ARCH_NAME} in
arm64)
# INTRODUCED IN MACOS SDK 11
if [[ $2 == 11* ]]; then
# INTRODUCED IN MACOS SDK 11.0
if [[ $(compare_versions "$2" "11") -ge 1 ]]; then
local SUPPORTED=1
else
local SUPPORTED=0
@ -1235,7 +1235,7 @@ get_min_version_cflags() {
get_min_sdk_version() {
case ${ARCH} in
*-mac-catalyst)
echo "13.0"
echo "${MAC_CATALYST_MIN_VERSION}"
;;
*)
case ${FFMPEG_KIT_BUILD_TYPE} in

View File

@ -25,7 +25,7 @@ libraries are created under the prebuilt folder.\n"
echo -e "Usage: ./$COMMAND [OPTION]...\n"
echo -e "Specify environment variables as VARIABLE=VALUE to override default build options.\n"
display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 9.3+ devices"
display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 9.3+ devices" " --target=ios sdk version\t\t\toverride minimum deployment target" " --mac-catalyst-target=ios sdk version\toverride minimum deployment target for mac catalyst"
display_help_licensing
echo -e "Architectures:"
@ -60,6 +60,7 @@ libraries are created under the prebuilt folder.\n"
enable_main_build() {
export IOS_MIN_VERSION=12.1
export MAC_CATALYST_MIN_VERSION=14.0
}
enable_lts_build() {
@ -68,6 +69,9 @@ enable_lts_build() {
# XCODE 7.3 HAS IOS SDK 9.3
export IOS_MIN_VERSION=9.3
# MAC CATALYST IS INTRODUCED IN 13.0
export MAC_CATALYST_MIN_VERSION=13.0
# IOS SDK 9.3 SUPPORTS VIDEOTOOLBOX
# HOWEVER, THE LATEST FFMPEG VERSION USES SDK 11.0 APIS
# THEREFORE, VIDEOTOOLBOX IS DISABLED IN LTS RELEASES
@ -119,13 +123,13 @@ get_arch_specific_cflags() {
echo "-arch arm64e -target $(get_target) -march=armv8.3-a+crc+crypto -mcpu=generic -DFFMPEG_KIT_ARM64E"
;;
i386)
echo "-arch i386 -target $(get_target) -march=i386 -mtune=intel -mssse3 -mfpmath=sse -m32 -DFFMPEG_KIT_I386"
echo "-arch i386 -target $(get_target) -march=i386 -mssse3 -mfpmath=sse -m32 -DFFMPEG_KIT_I386"
;;
x86-64)
echo "-arch x86_64 -target $(get_target) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DFFMPEG_KIT_X86_64"
echo "-arch x86_64 -target $(get_target) -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64"
;;
x86-64-mac-catalyst)
echo "-arch x86_64 -target $(get_target) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DFFMPEG_KIT_X86_64_MAC_CATALYST -isysroot ${SDK_PATH} -isystem ${SDK_PATH}/System/iOSSupport/usr/include -iframework ${SDK_PATH}/System/iOSSupport/System/Library/Frameworks"
echo "-arch x86_64 -target $(get_target) -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64_MAC_CATALYST -isysroot ${SDK_PATH} -isystem ${SDK_PATH}/System/iOSSupport/usr/include -iframework ${SDK_PATH}/System/iOSSupport/System/Library/Frameworks"
;;
esac
}

View File

@ -17,7 +17,7 @@ When compilation ends, libraries are created under the prebuilt folder.\n"
echo -e "Usage: ./$COMMAND [OPTION]...\n"
echo -e "Specify environment variables as VARIABLE=VALUE to override default build options.\n"
display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 10.11+ devices"
display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 10.11+ devices" " --target=macos sdk version\toverride minimum deployment target"
display_help_licensing
echo -e "Architectures:"
@ -84,7 +84,7 @@ get_arch_specific_cflags() {
echo "-arch arm64 -target $(get_target) -march=armv8-a+crc+crypto -mcpu=generic -DFFMPEG_KIT_ARM64"
;;
x86-64)
echo "-arch x86_64 -target $(get_target) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DFFMPEG_KIT_X86_64"
echo "-arch x86_64 -target $(get_target) -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64"
;;
esac
}

View File

@ -18,7 +18,7 @@ set explicitly. When compilation ends, libraries are created under the prebuilt
echo -e "Usage: ./$COMMAND [OPTION]...\n"
echo -e "Specify environment variables as VARIABLE=VALUE to override default build options.\n"
display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 9.2+ devices"
display_help_options " -x, --xcframework\t\tbuild xcframework bundles instead of framework bundles and universal libraries" " -l, --lts build lts packages to support sdk 9.2+ devices" " --target=tvos sdk version\toverride minimum deployment target"
display_help_licensing
echo -e "Architectures:"
@ -90,7 +90,7 @@ get_arch_specific_cflags() {
echo "-arch arm64 -target $(get_target) -march=armv8-a+crc+crypto -mcpu=generic -DFFMPEG_KIT_ARM64_SIMULATOR"
;;
x86-64)
echo "-arch x86_64 -target $(get_target) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DFFMPEG_KIT_X86_64"
echo "-arch x86_64 -target $(get_target) -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64"
;;
esac
}

View File

@ -587,6 +587,9 @@ display_help_options() {
if [ -n "$3" ]; then
echo -e "$3"
fi
if [ -n "$4" ]; then
echo -e "$4"
fi
echo -e ""
}
@ -1814,3 +1817,31 @@ create_file() {
rm -f "$1"
echo "" > "$1" 1>>"${BASEDIR}"/build.log 2>&1
}
compare_versions() {
VERSION_PARTS_1=($(echo $1 | tr "." " "))
VERSION_PARTS_2=($(echo $2 | tr "." " "))
for((i=0;(i<${#VERSION_PARTS_1[@]})&&(i<${#VERSION_PARTS_2[@]});i++))
do
if [[ ${VERSION_PARTS_1[$i]} -gt ${VERSION_PARTS_2[$i]} ]]; then
echo "1"
return;
elif [[ ${VERSION_PARTS_1[$i]} -lt ${VERSION_PARTS_2[$i]} ]]; then
echo "-1"
return;
fi
done
if [[ ${#VERSION_PARTS_1[@]} -gt ${#VERSION_PARTS_2[@]} ]]; then
echo "1"
return;
elif [[ ${#VERSION_PARTS_1[@]} -lt ${#VERSION_PARTS_2[@]} ]]; then
echo "-1"
return;
else
echo "0"
return;
fi
}

View File

@ -23,8 +23,8 @@ fi
# ENABLE COMMON FUNCTIONS
source "${BASEDIR}"/scripts/function-"${FFMPEG_KIT_BUILD_TYPE}".sh 1>>"${BASEDIR}"/build.log 2>&1 || exit 1
echo -e "\nBuilding ${ARCH} platform\n"
echo -e "\nINFO: Starting new build for ${ARCH} at $(date)\n" 1>>"${BASEDIR}"/build.log 2>&1
echo -e "\nBuilding ${ARCH} platform targeting iOS SDK ${IOS_MIN_VERSION} and Mac Catalyst ${MAC_CATALYST_MIN_VERSION}\n"
echo -e "\nINFO: Starting new build for ${ARCH} targeting iOS SDK ${IOS_MIN_VERSION} and Mac Catalyst ${MAC_CATALYST_MIN_VERSION} at $(date)\n" 1>>"${BASEDIR}"/build.log 2>&1
# SET BASE INSTALLATION DIRECTORY FOR THIS ARCHITECTURE
export LIB_INSTALL_BASE="${BASEDIR}/prebuilt/$(get_build_directory)"

View File

@ -23,8 +23,8 @@ fi
# ENABLE COMMON FUNCTIONS
source "${BASEDIR}"/scripts/function-"${FFMPEG_KIT_BUILD_TYPE}".sh 1>>"${BASEDIR}"/build.log 2>&1 || exit 1
echo -e "\nBuilding ${ARCH} platform\n"
echo -e "\nINFO: Starting new build for ${ARCH} at $(date)\n" 1>>"${BASEDIR}"/build.log 2>&1
echo -e "\nBuilding ${ARCH} platform targeting macOS SDK ${MACOS_MIN_VERSION}\n"
echo -e "\nINFO: Starting new build for ${ARCH} targeting macOS SDK ${MACOS_MIN_VERSION} at $(date)\n" 1>>"${BASEDIR}"/build.log 2>&1
# SET BASE INSTALLATION DIRECTORY FOR THIS ARCHITECTURE
export LIB_INSTALL_BASE="${BASEDIR}/prebuilt/$(get_build_directory)"

View File

@ -23,8 +23,8 @@ fi
# ENABLE COMMON FUNCTIONS
source "${BASEDIR}"/scripts/function-"${FFMPEG_KIT_BUILD_TYPE}".sh 1>>"${BASEDIR}"/build.log 2>&1 || exit 1
echo -e "\nBuilding ${ARCH} platform\n"
echo -e "\nINFO: Starting new build for ${ARCH} at $(date)\n" 1>>"${BASEDIR}"/build.log 2>&1
echo -e "\nBuilding ${ARCH} platform targeting tvOS SDK ${TVOS_MIN_VERSION}\n"
echo -e "\nINFO: Starting new build for ${ARCH} targeting tvOS SDK ${TVOS_MIN_VERSION} at $(date)\n" 1>>"${BASEDIR}"/build.log 2>&1
# SET BASE INSTALLATION DIRECTORY FOR THIS ARCHITECTURE
export LIB_INSTALL_BASE="${BASEDIR}/prebuilt/$(get_build_directory)"

View File

@ -123,6 +123,11 @@ while [ ! $# -eq 0 ]; do
disable_arch "${DISABLED_ARCH}"
;;
--target=*)
TARGET=$(echo $1 | sed -e 's/^--[A-Za-z]*=//g')
export TVOS_MIN_VERSION=${TARGET}
;;
*)
print_unknown_option "$1"
;;