release flutter plugin v5.1.0

This commit is contained in:
Taner Sener 2022-10-02 15:54:42 +01:00
parent 99e9624fe5
commit c2a44c0b97
11 changed files with 114 additions and 97 deletions

View File

@ -15,7 +15,7 @@ It includes scripts to build `FFmpeg` native libraries, a wrapper library to run
- Supports hybrid platforms: Flutter, React Native - Supports hybrid platforms: Flutter, React Native
- Based on FFmpeg `v4.5-dev` or later with optional system and external libraries - Based on FFmpeg `v4.5-dev` or later with optional system and external libraries
- 8 prebuilt binary packages available at [Github](https://github.com/arthenica/ffmpeg-kit/releases), [Maven Central](https://search.maven.org), [CocoaPods](https://cocoapods.org), [pub](https://pub.dev) and [npm](https://www.npmjs.com) - 8 prebuilt binary packages available at [Github](https://github.com/arthenica/ffmpeg-kit/releases), [Maven Central](https://search.maven.org), [CocoaPods](https://cocoapods.org), [pub](https://pub.dev) and [npm](https://www.npmjs.com)
- Licensed under `LGPL 3.0`, or `GPL v3.0` if GPL licensed libraries are enabled - Licensed under `LGPL 3.0` by default, `GPL v3.0` if GPL licensed libraries are enabled
### 2. Android ### 2. Android
@ -126,6 +126,7 @@ the exact version number of `FFmpeg` is obtained using the `git describe --tags`
| Platforms | FFmpegKit Version | FFmpeg Version | Release Date | | Platforms | FFmpegKit Version | FFmpeg Version | Release Date |
|:----------------:|:----------------------------------------------------------------------------------:|:--------------:|:------------:| |:----------------:|:----------------------------------------------------------------------------------:|:--------------:|:------------:|
| Flutter | [5.1.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v5.1.0) | 5.1.2 | Oct 02, 2022 |
| Android | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 | | Android | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 |
| Apple | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 | | Apple | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 |
| React Native | [4.5.2](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v4.5.2) | 4.5-dev-3393 | May 25, 2022 | | React Native | [4.5.2](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v4.5.2) | 4.5-dev-3393 | May 25, 2022 |

View File

@ -15,7 +15,7 @@ applications and 8 prebuilt binary packages available at [Github](https://github
- Supports hybrid platforms: Flutter, React Native - Supports hybrid platforms: Flutter, React Native
- Based on FFmpeg `v4.5-dev` or later with optional system and external libraries - Based on FFmpeg `v4.5-dev` or later with optional system and external libraries
- 8 prebuilt binary packages available at [Github](https://github.com/arthenica/ffmpeg-kit/releases), [Maven Central](https://search.maven.org), [CocoaPods](https://cocoapods.org), [pub](https://pub.dev) and [npm](https://www.npmjs.com) - 8 prebuilt binary packages available at [Github](https://github.com/arthenica/ffmpeg-kit/releases), [Maven Central](https://search.maven.org), [CocoaPods](https://cocoapods.org), [pub](https://pub.dev) and [npm](https://www.npmjs.com)
- Licensed under `LGPL 3.0`, or `GPL v3.0` if GPL licensed libraries are enabled - Licensed under `LGPL 3.0` by default, some packages licensed by `GPL v3.0` effectively
### 2. Android ### 2. Android
@ -112,10 +112,11 @@ the same `FFmpeg` release branch.
`dev` part in the version string indicates that `FFmpeg` source code is cloned from the `FFmpeg` `master` branch and `dev` part in the version string indicates that `FFmpeg` source code is cloned from the `FFmpeg` `master` branch and
the exact version number of `FFmpeg` is obtained using the `git describe --tags` command. the exact version number of `FFmpeg` is obtained using the `git describe --tags` command.
| Platforms | FFmpegKit Version | FFmpeg Version | Release Date | | Platforms | FFmpegKit Version | FFmpeg Version | Release Date |
|:----------------:|:----------------------------------------------------------------------------------:|:--------------:|:------------:| |:----------------:|:---------------------------------------------------------------------------------:|:--------------:|:------------:|
| Flutter | [5.1.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v5.1.0) | 5.1.2 | Oct 02, 2022 |
| Android | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 | | Android | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 |
| Apple | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 | | Apple | [5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/v5.1) | 5.1.2 | Sep 29, 2022 |
| React Native | [4.5.2](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v4.5.2) | 4.5-dev-3393 | May 25, 2022 | | React Native | [4.5.2](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v4.5.2) | 4.5-dev-3393 | May 25, 2022 |
| Flutter | [4.5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v4.5.1) | 4.5-dev-3393 | Jan 02, 2022 | | Flutter | [4.5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v4.5.1) | 4.5-dev-3393 | Jan 02, 2022 |
| React Native | [4.5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v4.5.1) | 4.5-dev-3393 | Jan 02, 2022 | | React Native | [4.5.1](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v4.5.1) | 4.5-dev-3393 | Jan 02, 2022 |

View File

@ -1,3 +1,13 @@
## 5.1.0
- Feature release based on native v5.1
- Implements AbstractSession.cancel() method
- Runs iOS and macOS callbacks on main queue
## 5.1.0-LTS
- Feature release based on native v5.1.LTS
- Implements AbstractSession.cancel() method
- Runs iOS and macOS callbacks on main queue
## 4.5.1 ## 4.5.1
- Feature release based on native v4.5.1 - Feature release based on native v4.5.1

View File

@ -5,14 +5,17 @@
- Includes both `FFmpeg` and `FFprobe` - Includes both `FFmpeg` and `FFprobe`
- Supports - Supports
- `Android`, `iOS` and `macOS` - `Android`, `iOS` and `macOS`
- FFmpeg `v4.5-dev` releases - FFmpeg `v5.1.2`
- `arm-v7a`, `arm-v7a-neon`, `arm64-v8a`, `x86` and `x86_64` architectures on Android - `arm-v7a`, `arm-v7a-neon`, `arm64-v8a`, `x86` and `x86_64` architectures on Android
- `Android API Level 16` or later - `Android API Level 24` or later
- `API Level 16` on LTS releases
- `armv7`, `armv7s`, `arm64`, `arm64-simulator`, `i386`, `x86_64`, `x86_64-mac-catalyst` and `arm64-mac-catalyst` - `armv7`, `armv7s`, `arm64`, `arm64-simulator`, `i386`, `x86_64`, `x86_64-mac-catalyst` and `arm64-mac-catalyst`
architectures on iOS architectures on iOS
- `iOS SDK 10` or later - `iOS SDK 12.1` or later
- `iOS SDK 10` on LTS releases
- `arm64` and `x86_64` architectures on macOS - `arm64` and `x86_64` architectures on macOS
- `macOS SDK 10.12+` or later - `macOS SDK 10.15` or later
- `macOS SDK 10.12` on LTS releases
- Can process Storage Access Framework (SAF) Uris on Android - Can process Storage Access Framework (SAF) Uris on Android
- 25 external libraries - 25 external libraries
@ -24,7 +27,7 @@
`vid.stab`, `x264`, `x265`, `xvidcore` `vid.stab`, `x264`, `x265`, `xvidcore`
- Licensed under LGPL 3.0, can be customized to support GPL v3.0 - Licensed under `LGPL 3.0` by default, some packages licensed by `GPL v3.0` effectively
### 2. Installation ### 2. Installation
@ -32,21 +35,21 @@ Add `ffmpeg_kit_flutter` as a dependency in your `pubspec.yaml file`.
```yaml ```yaml
dependencies: dependencies:
ffmpeg_kit_flutter: 4.5.1 ffmpeg_kit_flutter: 5.1.0
``` ```
#### 2.1 Packages #### 2.1 Packages
`ffmpeg` includes built-in encoders for some popular formats. However, there are certain external libraries that needs `FFmpeg` includes built-in encoders for some popular formats. However, there are certain external libraries that needs
to be enabled in order to encode specific formats/codecs. For example, to encode an `mp3` file you need `lame` or to be enabled in order to encode specific formats/codecs. For example, to encode an `mp3` file you need `lame` or
`shine` library enabled. You have to install a `ffmpeg_kit_flutter` package that has at least one of them inside. To `shine` library enabled. You have to install a `ffmpeg_kit_flutter` package that has at least one of them inside. To
encode an `h264` video, you need to install a package with `x264` inside. To encode `vp8` or `vp9` videos, you need encode an `h264` video, you need to install a package with `x264` inside. To encode `vp8` or `vp9` videos, you need
a `ffmpeg_kit_flutter` package with `libvpx` inside. a `ffmpeg_kit_flutter` package with `libvpx` inside.
`ffmpeg-kit` provides eight packages that include different sets of external libraries. These packages are named `ffmpeg-kit` provides eight packages that include different sets of external libraries. These packages are named
according to the external libraries included in them. Refer to according to the external libraries included. Refer to the
[Packages](https://github.com/arthenica/ffmpeg-kit#8-packages) section of the project README to see the names of those [Packages](https://github.com/arthenica/ffmpeg-kit/wiki/Packages) wiki page to see the names of those
packages and external libraries included in each of them. packages and external libraries included in each one of them.
#### 2.2 Installing Packages #### 2.2 Installing Packages
@ -55,7 +58,7 @@ using the following dependency format.
```yaml ```yaml
dependencies: dependencies:
ffmpeg_kit_flutter_<package name>: 4.5.1 ffmpeg_kit_flutter_<package name>: 5.1.0
``` ```
Note that hyphens in the package name must be replaced with underscores. Additionally, do not forget to use the package Note that hyphens in the package name must be replaced with underscores. Additionally, do not forget to use the package
@ -67,39 +70,44 @@ In order to install the `LTS` variant, append `-LTS` to the version you have for
```yaml ```yaml
dependencies: dependencies:
ffmpeg_kit_flutter: 4.5.1-LTS ffmpeg_kit_flutter: 5.1.0-LTS
``` ```
#### 2.4 LTS Releases #### 2.4 LTS Releases
`ffmpeg_kit_flutter` is published in two different variants: `Main Release` and `LTS Release`. Both releases share the `ffmpeg_kit_flutter` is published in two variants: `Main Release` and `LTS Release`. Both releases share the
same source code but is built with different settings (Architectures, API Level, iOS Min SDK, etc.). Refer to same source code but is built with different settings (Architectures, API Level, iOS Min SDK, etc.). Refer to the
[LTS Releases](https://github.com/arthenica/ffmpeg-kit#10-lts-releases) section of the project README to see how they [LTS Releases](https://github.com/arthenica/ffmpeg-kit/wiki/LTS-Releases) wiki page to see how they differ from each
compare to each other. other.
#### 2.5 Android and iOS Support #### 2.5 Platform Support
The following table shows the Android API level and iOS deployment target required in `ffmpeg_kit_flutter` releases. The following table shows Android API level, iOS deployment target and macOS deployment target requirements in
`ffmpeg_kit_flutter` releases.
<table> <table>
<thead> <thead>
<tr> <tr>
<th align="center" colspan="2">Main Release</th> <th align="center" colspan="3">Main Release</th>
<th align="center" colspan="2">LTS Release</th> <th align="center" colspan="3">LTS Release</th>
</tr> </tr>
<tr> <tr>
<th align="center">Android<br>API Level</th> <th align="center">Android<br>API Level</th>
<th align="center">iOS Minimum<br>Deployment Target</th> <th align="center">iOS Minimum<br>Deployment Target</th>
<th align="center">macOS Minimum<br>Deployment Target</th>
<th align="center">Android<br>API Level</th> <th align="center">Android<br>API Level</th>
<th align="center">iOS Minimum<br>Deployment Target</th> <th align="center">iOS Minimum<br>Deployment Target</th>
<th align="center">macOS Minimum<br>Deployment Target</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td align="center">24</td> <td align="center">24</td>
<td align="center">12.1</td> <td align="center">12.1</td>
<td align="center">10.15</td>
<td align="center">16</td> <td align="center">16</td>
<td align="center">10</td> <td align="center">10</td>
<td align="center">10.12</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -1,24 +1,31 @@
buildscript { buildscript {
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.2.2' classpath 'com.android.tools.build:gradle:7.1.2'
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
} }
} }
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
compileSdkVersion 30 compileSdkVersion 31
defaultConfig { defaultConfig {
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 30 targetSdkVersion 31
versionCode 451 versionCode 510
versionName "4.5.1" versionName "5.1.0"
} }
buildTypes { buildTypes {
@ -35,14 +42,7 @@ android {
} }
} }
repositories {
mavenCentral()
jcenter()
google()
}
dependencies { dependencies {
implementation 'androidx.annotation:annotation:1.2.0' implementation 'androidx.annotation:annotation:1.2.0'
implementation 'com.arthenica:ffmpeg-kit-https:4.5.1-1' implementation 'com.arthenica:ffmpeg-kit-https:5.1'
} }

View File

@ -642,23 +642,21 @@ extern int const AbstractSessionDefaultTimeoutForAsynchronousMessagesInTransmit;
// MediaInformationJsonParser // MediaInformationJsonParser
- (void)mediaInformationJsonParserFrom:(NSString*)ffprobeJsonOutput result:(FlutterResult)result { - (void)mediaInformationJsonParserFrom:(NSString*)ffprobeJsonOutput result:(FlutterResult)result {
NSError *error; @try {
MediaInformation* mediaInformation = [MediaInformationJsonParser from:ffprobeJsonOutput with:error]; MediaInformation* mediaInformation = [MediaInformationJsonParser fromWithError:ffprobeJsonOutput];
if (error == nil) {
result([FFmpegKitFlutterPlugin toMediaInformationDictionary:mediaInformation]); result([FFmpegKitFlutterPlugin toMediaInformationDictionary:mediaInformation]);
} else { } @catch (NSException *exception) {
NSLog(@"Parsing MediaInformation failed: %@.\n", error); NSLog(@"Parsing MediaInformation failed: %@.\n", [NSString stringWithFormat:@"%@\n%@", [exception userInfo], [exception callStackSymbols]]);
result(nil); result(nil);
} }
} }
- (void)mediaInformationJsonParserFromWithError:(NSString*)ffprobeJsonOutput result:(FlutterResult)result { - (void)mediaInformationJsonParserFromWithError:(NSString*)ffprobeJsonOutput result:(FlutterResult)result {
NSError *error; @try {
MediaInformation* mediaInformation = [MediaInformationJsonParser from:ffprobeJsonOutput with:error]; MediaInformation* mediaInformation = [MediaInformationJsonParser fromWithError:ffprobeJsonOutput];
if (error == nil) {
result([FFmpegKitFlutterPlugin toMediaInformationDictionary:mediaInformation]); result([FFmpegKitFlutterPlugin toMediaInformationDictionary:mediaInformation]);
} else { } @catch (NSException *exception) {
NSLog(@"Parsing MediaInformation failed: %@.\n", error); NSLog(@"Parsing MediaInformation failed: %@.\n", [NSString stringWithFormat:@"%@\n%@", [exception userInfo], [exception callStackSymbols]]);
result([FlutterError errorWithCode:@"PARSE_FAILED" message:@"Parsing MediaInformation failed with JSON error." details:nil]); result([FlutterError errorWithCode:@"PARSE_FAILED" message:@"Parsing MediaInformation failed with JSON error." details:nil]);
} }
} }

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'ffmpeg_kit_flutter' s.name = 'ffmpeg_kit_flutter'
s.version = '4.5.1' s.version = '5.1.0'
s.summary = 'FFmpeg Kit for Flutter' s.summary = 'FFmpeg Kit for Flutter'
s.description = 'A Flutter plugin for running FFmpeg and FFprobe commands.' s.description = 'A Flutter plugin for running FFmpeg and FFprobe commands.'
s.homepage = 'https://github.com/arthenica/ffmpeg-kit' s.homepage = 'https://github.com/arthenica/ffmpeg-kit'
@ -23,112 +23,112 @@ Pod::Spec.new do |s|
s.subspec 'min' do |ss| s.subspec 'min' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-min', "4.5.1" ss.dependency 'ffmpeg-kit-ios-min', "5.1"
ss.ios.deployment_target = '12.1' ss.ios.deployment_target = '12.1'
end end
s.subspec 'min-lts' do |ss| s.subspec 'min-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-min', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-ios-min', "5.1.LTS"
ss.ios.deployment_target = '10' ss.ios.deployment_target = '10'
end end
s.subspec 'min-gpl' do |ss| s.subspec 'min-gpl' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-min-gpl', "4.5.1" ss.dependency 'ffmpeg-kit-ios-min-gpl', "5.1"
ss.ios.deployment_target = '12.1' ss.ios.deployment_target = '12.1'
end end
s.subspec 'min-gpl-lts' do |ss| s.subspec 'min-gpl-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-min-gpl', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-ios-min-gpl', "5.1.LTS"
ss.ios.deployment_target = '10' ss.ios.deployment_target = '10'
end end
s.subspec 'https' do |ss| s.subspec 'https' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-https', "4.5.1" ss.dependency 'ffmpeg-kit-ios-https', "5.1"
ss.ios.deployment_target = '12.1' ss.ios.deployment_target = '12.1'
end end
s.subspec 'https-lts' do |ss| s.subspec 'https-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-https', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-ios-https', "5.1.LTS"
ss.ios.deployment_target = '10' ss.ios.deployment_target = '10'
end end
s.subspec 'https-gpl' do |ss| s.subspec 'https-gpl' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-https-gpl', "4.5.1" ss.dependency 'ffmpeg-kit-ios-https-gpl', "5.1"
ss.ios.deployment_target = '12.1' ss.ios.deployment_target = '12.1'
end end
s.subspec 'https-gpl-lts' do |ss| s.subspec 'https-gpl-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-https-gpl', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-ios-https-gpl', "5.1.LTS"
ss.ios.deployment_target = '10' ss.ios.deployment_target = '10'
end end
s.subspec 'audio' do |ss| s.subspec 'audio' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-audio', "4.5.1" ss.dependency 'ffmpeg-kit-ios-audio', "5.1"
ss.ios.deployment_target = '12.1' ss.ios.deployment_target = '12.1'
end end
s.subspec 'audio-lts' do |ss| s.subspec 'audio-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-audio', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-ios-audio', "5.1.LTS"
ss.ios.deployment_target = '10' ss.ios.deployment_target = '10'
end end
s.subspec 'video' do |ss| s.subspec 'video' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-video', "4.5.1" ss.dependency 'ffmpeg-kit-ios-video', "5.1"
ss.ios.deployment_target = '12.1' ss.ios.deployment_target = '12.1'
end end
s.subspec 'video-lts' do |ss| s.subspec 'video-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-video', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-ios-video', "5.1.LTS"
ss.ios.deployment_target = '10' ss.ios.deployment_target = '10'
end end
s.subspec 'full' do |ss| s.subspec 'full' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-full', "4.5.1" ss.dependency 'ffmpeg-kit-ios-full', "5.1"
ss.ios.deployment_target = '12.1' ss.ios.deployment_target = '12.1'
end end
s.subspec 'full-lts' do |ss| s.subspec 'full-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-full', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-ios-full', "5.1.LTS"
ss.ios.deployment_target = '10' ss.ios.deployment_target = '10'
end end
s.subspec 'full-gpl' do |ss| s.subspec 'full-gpl' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-full-gpl', "4.5.1" ss.dependency 'ffmpeg-kit-ios-full-gpl', "5.1"
ss.ios.deployment_target = '12.1' ss.ios.deployment_target = '12.1'
end end
s.subspec 'full-gpl-lts' do |ss| s.subspec 'full-gpl-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-ios-full-gpl', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-ios-full-gpl', "5.1.LTS"
ss.ios.deployment_target = '10' ss.ios.deployment_target = '10'
end end

View File

@ -79,7 +79,8 @@ class FFmpegKitFactory {
case 2: case 2:
return AbstractSession.createFFprobeSessionFromMap(sessionMap); return AbstractSession.createFFprobeSessionFromMap(sessionMap);
case 3: case 3:
return AbstractSession.createMediaInformationSessionFromMap(sessionMap); return AbstractSession.createMediaInformationSessionFromMap(
sessionMap);
case 1: case 1:
default: default:
return AbstractSession.createFFmpegSessionFromMap(sessionMap); return AbstractSession.createFFmpegSessionFromMap(sessionMap);
@ -98,7 +99,7 @@ class FFmpegKitFactory {
} }
} }
static String getVersion() => "4.5.1"; static String getVersion() => "5.1.0";
static LogRedirectionStrategy? getLogRedirectionStrategy(int? sessionId) => static LogRedirectionStrategy? getLogRedirectionStrategy(int? sessionId) =>
logRedirectionStrategyMap[sessionId]; logRedirectionStrategyMap[sessionId];

View File

@ -642,23 +642,21 @@ extern int const AbstractSessionDefaultTimeoutForAsynchronousMessagesInTransmit;
// MediaInformationJsonParser // MediaInformationJsonParser
- (void)mediaInformationJsonParserFrom:(NSString*)ffprobeJsonOutput result:(FlutterResult)result { - (void)mediaInformationJsonParserFrom:(NSString*)ffprobeJsonOutput result:(FlutterResult)result {
NSError *error; @try {
MediaInformation* mediaInformation = [MediaInformationJsonParser from:ffprobeJsonOutput with:error]; MediaInformation* mediaInformation = [MediaInformationJsonParser fromWithError:ffprobeJsonOutput];
if (error == nil) {
result([FFmpegKitFlutterPlugin toMediaInformationDictionary:mediaInformation]); result([FFmpegKitFlutterPlugin toMediaInformationDictionary:mediaInformation]);
} else { } @catch (NSException *exception) {
NSLog(@"Parsing MediaInformation failed: %@.\n", error); NSLog(@"Parsing MediaInformation failed: %@.\n", [NSString stringWithFormat:@"%@\n%@", [exception userInfo], [exception callStackSymbols]]);
result(nil); result(nil);
} }
} }
- (void)mediaInformationJsonParserFromWithError:(NSString*)ffprobeJsonOutput result:(FlutterResult)result { - (void)mediaInformationJsonParserFromWithError:(NSString*)ffprobeJsonOutput result:(FlutterResult)result {
NSError *error; @try {
MediaInformation* mediaInformation = [MediaInformationJsonParser from:ffprobeJsonOutput with:error]; MediaInformation* mediaInformation = [MediaInformationJsonParser fromWithError:ffprobeJsonOutput];
if (error == nil) {
result([FFmpegKitFlutterPlugin toMediaInformationDictionary:mediaInformation]); result([FFmpegKitFlutterPlugin toMediaInformationDictionary:mediaInformation]);
} else { } @catch (NSException *exception) {
NSLog(@"Parsing MediaInformation failed: %@.\n", error); NSLog(@"Parsing MediaInformation failed: %@.\n", [NSString stringWithFormat:@"%@\n%@", [exception userInfo], [exception callStackSymbols]]);
result([FlutterError errorWithCode:@"PARSE_FAILED" message:@"Parsing MediaInformation failed with JSON error." details:nil]); result([FlutterError errorWithCode:@"PARSE_FAILED" message:@"Parsing MediaInformation failed with JSON error." details:nil]);
} }
} }

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'ffmpeg_kit_flutter' s.name = 'ffmpeg_kit_flutter'
s.version = '4.5.1' s.version = '5.1.0'
s.summary = 'FFmpeg Kit for Flutter' s.summary = 'FFmpeg Kit for Flutter'
s.description = 'A Flutter plugin for running FFmpeg and FFprobe commands.' s.description = 'A Flutter plugin for running FFmpeg and FFprobe commands.'
s.homepage = 'https://github.com/arthenica/ffmpeg-kit' s.homepage = 'https://github.com/arthenica/ffmpeg-kit'
@ -23,112 +23,112 @@ Pod::Spec.new do |s|
s.subspec 'min' do |ss| s.subspec 'min' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-min', "4.5.1" ss.dependency 'ffmpeg-kit-macos-min', "5.1"
ss.osx.deployment_target = '10.15' ss.osx.deployment_target = '10.15'
end end
s.subspec 'min-lts' do |ss| s.subspec 'min-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-min', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-macos-min', "5.1.LTS"
ss.osx.deployment_target = '10.12' ss.osx.deployment_target = '10.12'
end end
s.subspec 'min-gpl' do |ss| s.subspec 'min-gpl' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-min-gpl', "4.5.1" ss.dependency 'ffmpeg-kit-macos-min-gpl', "5.1"
ss.osx.deployment_target = '10.15' ss.osx.deployment_target = '10.15'
end end
s.subspec 'min-gpl-lts' do |ss| s.subspec 'min-gpl-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-min-gpl', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-macos-min-gpl', "5.1.LTS"
ss.osx.deployment_target = '10.12' ss.osx.deployment_target = '10.12'
end end
s.subspec 'https' do |ss| s.subspec 'https' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-https', "4.5.1" ss.dependency 'ffmpeg-kit-macos-https', "5.1"
ss.osx.deployment_target = '10.15' ss.osx.deployment_target = '10.15'
end end
s.subspec 'https-lts' do |ss| s.subspec 'https-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-https', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-macos-https', "5.1.LTS"
ss.osx.deployment_target = '10.12' ss.osx.deployment_target = '10.12'
end end
s.subspec 'https-gpl' do |ss| s.subspec 'https-gpl' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-https-gpl', "4.5.1" ss.dependency 'ffmpeg-kit-macos-https-gpl', "5.1"
ss.osx.deployment_target = '10.15' ss.osx.deployment_target = '10.15'
end end
s.subspec 'https-gpl-lts' do |ss| s.subspec 'https-gpl-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-https-gpl', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-macos-https-gpl', "5.1.LTS"
ss.osx.deployment_target = '10.12' ss.osx.deployment_target = '10.12'
end end
s.subspec 'audio' do |ss| s.subspec 'audio' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-audio', "4.5.1" ss.dependency 'ffmpeg-kit-macos-audio', "5.1"
ss.osx.deployment_target = '10.15' ss.osx.deployment_target = '10.15'
end end
s.subspec 'audio-lts' do |ss| s.subspec 'audio-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-audio', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-macos-audio', "5.1.LTS"
ss.osx.deployment_target = '10.12' ss.osx.deployment_target = '10.12'
end end
s.subspec 'video' do |ss| s.subspec 'video' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-video', "4.5.1" ss.dependency 'ffmpeg-kit-macos-video', "5.1"
ss.osx.deployment_target = '10.15' ss.osx.deployment_target = '10.15'
end end
s.subspec 'video-lts' do |ss| s.subspec 'video-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-video', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-macos-video', "5.1.LTS"
ss.osx.deployment_target = '10.12' ss.osx.deployment_target = '10.12'
end end
s.subspec 'full' do |ss| s.subspec 'full' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-full', "4.5.1" ss.dependency 'ffmpeg-kit-macos-full', "5.1"
ss.osx.deployment_target = '10.15' ss.osx.deployment_target = '10.15'
end end
s.subspec 'full-lts' do |ss| s.subspec 'full-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-full', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-macos-full', "5.1.LTS"
ss.osx.deployment_target = '10.12' ss.osx.deployment_target = '10.12'
end end
s.subspec 'full-gpl' do |ss| s.subspec 'full-gpl' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-full-gpl', "4.5.1" ss.dependency 'ffmpeg-kit-macos-full-gpl', "5.1"
ss.osx.deployment_target = '10.15' ss.osx.deployment_target = '10.15'
end end
s.subspec 'full-gpl-lts' do |ss| s.subspec 'full-gpl-lts' do |ss|
ss.source_files = 'Classes/**/*' ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h' ss.public_header_files = 'Classes/**/*.h'
ss.dependency 'ffmpeg-kit-macos-full-gpl', "4.5.1.LTS" ss.dependency 'ffmpeg-kit-macos-full-gpl', "5.1.LTS"
ss.osx.deployment_target = '10.12' ss.osx.deployment_target = '10.12'
end end

View File

@ -3,7 +3,7 @@ description: FFmpeg Kit for Flutter. Supports Android, iOS and macOS platforms.
repository: https://github.com/arthenica/ffmpeg-kit repository: https://github.com/arthenica/ffmpeg-kit
issue_tracker: https://github.com/arthenica/ffmpeg-kit/issues issue_tracker: https://github.com/arthenica/ffmpeg-kit/issues
homepage: https://github.com/arthenica/ffmpeg-kit homepage: https://github.com/arthenica/ffmpeg-kit
version: 4.5.1 version: 5.1.0
environment: environment:
sdk: ">=2.12.0 <3.0.0" sdk: ">=2.12.0 <3.0.0"
@ -28,4 +28,4 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
plugin_platform_interface: ^2.0.2 plugin_platform_interface: ^2.1.3