diff --git a/flutter/flutter/.gitignore b/flutter/flutter/.gitignore index 16f71de..44408ea 100644 --- a/flutter/flutter/.gitignore +++ b/flutter/flutter/.gitignore @@ -3,3 +3,4 @@ .packages .pub/ build/ +pubspec.lock diff --git a/flutter/flutter/.pubignore b/flutter/flutter/.pubignore new file mode 100644 index 0000000..e85b428 --- /dev/null +++ b/flutter/flutter/.pubignore @@ -0,0 +1,5 @@ +.DS_Store +.idea +.pub +.dart_tool +pubspec.lock diff --git a/flutter/flutter/CHANGELOG.md b/flutter/flutter/CHANGELOG.md index 38e6d3f..1879bf0 100644 --- a/flutter/flutter/CHANGELOG.md +++ b/flutter/flutter/CHANGELOG.md @@ -1,3 +1,13 @@ +## 6.0.0 +- Feature release based on native v6.0 +- Renames StreamInformation.getFullCodec() method to getCodecLong() +- Improves Statistics.getTime() method to return milliseconds as double + +## 6.0.0-LTS +- Feature release based on native v6.0.LTS +- Renames StreamInformation.getFullCodec() method to getCodecLong() +- Improves Statistics.getTime() method to return milliseconds as double + ## 5.1.0 - Feature release based on native v5.1 - Implements AbstractSession.cancel() method diff --git a/flutter/flutter/README.md b/flutter/flutter/README.md index b5623bd..63f2602 100644 --- a/flutter/flutter/README.md +++ b/flutter/flutter/README.md @@ -5,7 +5,7 @@ - Includes both `FFmpeg` and `FFprobe` - Supports - `Android`, `iOS` and `macOS` - - FFmpeg `v5.1.2` + - FFmpeg `v6.0` - `arm-v7a`, `arm-v7a-neon`, `arm64-v8a`, `x86` and `x86_64` architectures on Android - `Android API Level 24` or later - `API Level 16` on LTS releases @@ -35,7 +35,7 @@ Add `ffmpeg_kit_flutter` as a dependency in your `pubspec.yaml file`. ```yaml dependencies: - ffmpeg_kit_flutter: 5.1.0 + ffmpeg_kit_flutter: 6.0.0 ``` #### 2.1 Packages @@ -58,7 +58,7 @@ using the following dependency format. ```yaml dependencies: - ffmpeg_kit_flutter_: 5.1.0 + ffmpeg_kit_flutter_: 6.0.0 ``` Note that hyphens in the package name must be replaced with underscores. Additionally, do not forget to use the package @@ -70,7 +70,7 @@ In order to install the `LTS` variant, append `-LTS` to the version you have for ```yaml dependencies: - ffmpeg_kit_flutter: 5.1.0-LTS + ffmpeg_kit_flutter: 6.0.0-LTS ``` #### 2.4 LTS Releases diff --git a/flutter/flutter/android/build.gradle b/flutter/flutter/android/build.gradle index 5e80b5a..3f04b74 100644 --- a/flutter/flutter/android/build.gradle +++ b/flutter/flutter/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:8.1.0' } } @@ -24,13 +24,13 @@ android { namespace 'com.arthenica.ffmpegkit.flutter' } - compileSdkVersion 31 + compileSdkVersion 33 defaultConfig { minSdkVersion 24 - targetSdkVersion 31 - versionCode 510 - versionName "5.1.0" + targetSdkVersion 33 + versionCode 600 + versionName "6.0.0" } buildTypes { @@ -48,6 +48,6 @@ android { } dependencies { - implementation 'androidx.annotation:annotation:1.2.0' - implementation 'com.arthenica:ffmpeg-kit-https:5.1' + implementation 'androidx.annotation:annotation:1.5.0' + implementation 'com.arthenica:ffmpeg-kit-https:6.0' } diff --git a/flutter/flutter/ios/Classes/FFmpegKitFlutterPlugin.m b/flutter/flutter/ios/Classes/FFmpegKitFlutterPlugin.m index a2dac73..3ac9d64 100644 --- a/flutter/flutter/ios/Classes/FFmpegKitFlutterPlugin.m +++ b/flutter/flutter/ios/Classes/FFmpegKitFlutterPlugin.m @@ -1128,7 +1128,7 @@ extern int const AbstractSessionDefaultTimeoutForAsynchronousMessagesInTransmit; dictionary[KEY_STATISTICS_VIDEO_FPS] = [NSNumber numberWithFloat: [statistics getVideoFps]]; dictionary[KEY_STATISTICS_VIDEO_QUALITY] = [NSNumber numberWithFloat: [statistics getVideoQuality]]; dictionary[KEY_STATISTICS_SIZE] = [NSNumber numberWithLong: [statistics getSize]]; - dictionary[KEY_STATISTICS_TIME] = [NSNumber numberWithInt: [statistics getTime]]; + dictionary[KEY_STATISTICS_TIME] = [NSNumber numberWithDouble: [statistics getTime]]; dictionary[KEY_STATISTICS_BITRATE] = [NSNumber numberWithDouble: [statistics getBitrate]]; dictionary[KEY_STATISTICS_SPEED] = [NSNumber numberWithDouble: [statistics getSpeed]]; diff --git a/flutter/flutter/ios/ffmpeg_kit_flutter.podspec b/flutter/flutter/ios/ffmpeg_kit_flutter.podspec index afd9360..0d6b034 100644 --- a/flutter/flutter/ios/ffmpeg_kit_flutter.podspec +++ b/flutter/flutter/ios/ffmpeg_kit_flutter.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'ffmpeg_kit_flutter' - s.version = '5.1.0' + s.version = '6.0.0' s.summary = 'FFmpeg Kit for Flutter' s.description = 'A Flutter plugin for running FFmpeg and FFprobe commands.' s.homepage = 'https://github.com/arthenica/ffmpeg-kit' @@ -23,112 +23,112 @@ Pod::Spec.new do |s| s.subspec 'min' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-min', "5.1" + ss.dependency 'ffmpeg-kit-ios-min', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'min-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-min', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-min', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'min-gpl' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-min-gpl', "5.1" + ss.dependency 'ffmpeg-kit-ios-min-gpl', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'min-gpl-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-min-gpl', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-min-gpl', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'https' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-https', "5.1" + ss.dependency 'ffmpeg-kit-ios-https', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'https-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-https', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-https', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'https-gpl' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-https-gpl', "5.1" + ss.dependency 'ffmpeg-kit-ios-https-gpl', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'https-gpl-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-https-gpl', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-https-gpl', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'audio' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-audio', "5.1" + ss.dependency 'ffmpeg-kit-ios-audio', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'audio-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-audio', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-audio', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'video' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-video', "5.1" + ss.dependency 'ffmpeg-kit-ios-video', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'video-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-video', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-video', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'full' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-full', "5.1" + ss.dependency 'ffmpeg-kit-ios-full', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'full-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-full', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-full', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'full-gpl' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-full-gpl', "5.1" + ss.dependency 'ffmpeg-kit-ios-full-gpl', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'full-gpl-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-ios-full-gpl', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-full-gpl', "6.0.LTS" ss.ios.deployment_target = '10' end diff --git a/flutter/flutter/lib/src/ffmpeg_kit_factory.dart b/flutter/flutter/lib/src/ffmpeg_kit_factory.dart index d72fca1..d2c55c3 100644 --- a/flutter/flutter/lib/src/ffmpeg_kit_factory.dart +++ b/flutter/flutter/lib/src/ffmpeg_kit_factory.dart @@ -99,7 +99,7 @@ class FFmpegKitFactory { } } - static String getVersion() => "5.1.0"; + static String getVersion() => "6.0.0"; static LogRedirectionStrategy? getLogRedirectionStrategy(int? sessionId) => logRedirectionStrategyMap[sessionId]; diff --git a/flutter/flutter/lib/statistics.dart b/flutter/flutter/lib/statistics.dart index 9fbdcd2..513a3f4 100644 --- a/flutter/flutter/lib/statistics.dart +++ b/flutter/flutter/lib/statistics.dart @@ -24,7 +24,7 @@ class Statistics { double _videoFps; double _videoQuality; int _size; - int _time; + double _time; double _bitrate; double _speed; @@ -61,9 +61,9 @@ class Statistics { this._size = size; } - int getTime() => this._time; + double getTime() => this._time; - void setTime(int time) { + void setTime(double time) { this._time = time; } diff --git a/flutter/flutter/macos/Classes/FFmpegKitFlutterPlugin.m b/flutter/flutter/macos/Classes/FFmpegKitFlutterPlugin.m index b616988..da72fdc 100644 --- a/flutter/flutter/macos/Classes/FFmpegKitFlutterPlugin.m +++ b/flutter/flutter/macos/Classes/FFmpegKitFlutterPlugin.m @@ -1128,7 +1128,7 @@ extern int const AbstractSessionDefaultTimeoutForAsynchronousMessagesInTransmit; dictionary[KEY_STATISTICS_VIDEO_FPS] = [NSNumber numberWithFloat: [statistics getVideoFps]]; dictionary[KEY_STATISTICS_VIDEO_QUALITY] = [NSNumber numberWithFloat: [statistics getVideoQuality]]; dictionary[KEY_STATISTICS_SIZE] = [NSNumber numberWithLong: [statistics getSize]]; - dictionary[KEY_STATISTICS_TIME] = [NSNumber numberWithInt: [statistics getTime]]; + dictionary[KEY_STATISTICS_TIME] = [NSNumber numberWithDouble: [statistics getTime]]; dictionary[KEY_STATISTICS_BITRATE] = [NSNumber numberWithDouble: [statistics getBitrate]]; dictionary[KEY_STATISTICS_SPEED] = [NSNumber numberWithDouble: [statistics getSpeed]]; diff --git a/flutter/flutter/macos/ffmpeg_kit_flutter.podspec b/flutter/flutter/macos/ffmpeg_kit_flutter.podspec index ee93a39..ae29e06 100644 --- a/flutter/flutter/macos/ffmpeg_kit_flutter.podspec +++ b/flutter/flutter/macos/ffmpeg_kit_flutter.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'ffmpeg_kit_flutter' - s.version = '5.1.0' + s.version = '6.0.0' s.summary = 'FFmpeg Kit for Flutter' s.description = 'A Flutter plugin for running FFmpeg and FFprobe commands.' s.homepage = 'https://github.com/arthenica/ffmpeg-kit' @@ -23,112 +23,112 @@ Pod::Spec.new do |s| s.subspec 'min' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-min', "5.1" + ss.dependency 'ffmpeg-kit-macos-min', "6.0" ss.osx.deployment_target = '10.15' end s.subspec 'min-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-min', "5.1.LTS" + ss.dependency 'ffmpeg-kit-macos-min', "6.0.LTS" ss.osx.deployment_target = '10.12' end s.subspec 'min-gpl' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-min-gpl', "5.1" + ss.dependency 'ffmpeg-kit-macos-min-gpl', "6.0" ss.osx.deployment_target = '10.15' end s.subspec 'min-gpl-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-min-gpl', "5.1.LTS" + ss.dependency 'ffmpeg-kit-macos-min-gpl', "6.0.LTS" ss.osx.deployment_target = '10.12' end s.subspec 'https' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-https', "5.1" + ss.dependency 'ffmpeg-kit-macos-https', "6.0" ss.osx.deployment_target = '10.15' end s.subspec 'https-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-https', "5.1.LTS" + ss.dependency 'ffmpeg-kit-macos-https', "6.0.LTS" ss.osx.deployment_target = '10.12' end s.subspec 'https-gpl' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-https-gpl', "5.1" + ss.dependency 'ffmpeg-kit-macos-https-gpl', "6.0" ss.osx.deployment_target = '10.15' end s.subspec 'https-gpl-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-https-gpl', "5.1.LTS" + ss.dependency 'ffmpeg-kit-macos-https-gpl', "6.0.LTS" ss.osx.deployment_target = '10.12' end s.subspec 'audio' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-audio', "5.1" + ss.dependency 'ffmpeg-kit-macos-audio', "6.0" ss.osx.deployment_target = '10.15' end s.subspec 'audio-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-audio', "5.1.LTS" + ss.dependency 'ffmpeg-kit-macos-audio', "6.0.LTS" ss.osx.deployment_target = '10.12' end s.subspec 'video' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-video', "5.1" + ss.dependency 'ffmpeg-kit-macos-video', "6.0" ss.osx.deployment_target = '10.15' end s.subspec 'video-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-video', "5.1.LTS" + ss.dependency 'ffmpeg-kit-macos-video', "6.0.LTS" ss.osx.deployment_target = '10.12' end s.subspec 'full' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-full', "5.1" + ss.dependency 'ffmpeg-kit-macos-full', "6.0" ss.osx.deployment_target = '10.15' end s.subspec 'full-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-full', "5.1.LTS" + ss.dependency 'ffmpeg-kit-macos-full', "6.0.LTS" ss.osx.deployment_target = '10.12' end s.subspec 'full-gpl' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-full-gpl', "5.1" + ss.dependency 'ffmpeg-kit-macos-full-gpl', "6.0" ss.osx.deployment_target = '10.15' end s.subspec 'full-gpl-lts' do |ss| ss.source_files = 'Classes/**/*' ss.public_header_files = 'Classes/**/*.h' - ss.dependency 'ffmpeg-kit-macos-full-gpl', "5.1.LTS" + ss.dependency 'ffmpeg-kit-macos-full-gpl', "6.0.LTS" ss.osx.deployment_target = '10.12' end diff --git a/flutter/flutter/pubspec.yaml b/flutter/flutter/pubspec.yaml index c592e26..08421ae 100644 --- a/flutter/flutter/pubspec.yaml +++ b/flutter/flutter/pubspec.yaml @@ -3,10 +3,10 @@ description: FFmpeg Kit for Flutter. Supports Android, iOS and macOS platforms. repository: https://github.com/arthenica/ffmpeg-kit issue_tracker: https://github.com/arthenica/ffmpeg-kit/issues homepage: https://github.com/arthenica/ffmpeg-kit -version: 5.1.0 +version: 6.0.0 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.12.0 <4.0.0" flutter: ">=2.0.0" flutter: @@ -28,4 +28,4 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - plugin_platform_interface: ^2.1.3 + plugin_platform_interface: ^2.1.5