From a1f363dc3d7d41088d706dde7eef94e9fe189890 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Mon, 8 Feb 2021 01:54:23 +0000 Subject: [PATCH] release v0.3.1 --- CHANGELOG.md | 4 ++++ README.md | 31 +++++++++++++++++++++--- android/build.gradle | 3 ++- example/android/build.gradle | 1 + example/ios/Podfile.lock | 6 ++--- example/pubspec.lock | 46 ++++++++++++++++++------------------ example/pubspec.yaml | 5 ++-- ios/flutter_ffmpeg.podspec | 2 +- lib/flutter_ffmpeg.dart | 4 ++-- lib/media_information.dart | 4 ++-- pubspec.yaml | 2 +- 11 files changed, 69 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91b1523..421dffb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.1 +- Adds mavenCentral() repository for Android +- Minor updates in the test application + ## 0.3.0 - Uses thread pool executor to process Android executions - Adds listExecutions API method diff --git a/README.md b/README.md index 6c15d23..ba52566 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # flutter_ffmpeg -![GitHub release](https://img.shields.io/badge/release-v0.3.0-blue.svg) +![GitHub release](https://img.shields.io/badge/release-v0.3.1-blue.svg) ![](https://img.shields.io/pub/v/flutter_ffmpeg.svg) FFmpeg plugin for Flutter. Supports iOS and Android. @@ -35,7 +35,7 @@ FFmpeg plugin for Flutter. Supports iOS and Android. Add `flutter_ffmpeg` as a dependency in your `pubspec.yaml file`. ``` dependencies: - flutter_ffmpeg: ^0.3.0 + flutter_ffmpeg: ^0.3.1 ``` #### 2.1 Packages @@ -451,7 +451,32 @@ can't use resources on those folders directly, you need to provide full paths of ``` platform :ios, '9.3' ``` - + +- If `flutter_ffmpeg` release builds on Android fail with the following exception, make sure that `mavenCentral()` is + defined as a repository in your `build.gradle` and it is listed before `jcenter()`. + + ``` + E/flutter (14793): [ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(43)] java.lang.UnsatisfiedLinkError: Bad JNI version returned from JNI_OnLoad in "/data/app/com.arthenica.flutter.ffmpeg.FlutterFFmpegExample-DV2qVHHlZArnXoQYMowxVQ==/base.apk!/lib/arm64-v8a/libmobileffmpeg.so": 0 + E/flutter (14793): at java.lang.Runtime.loadLibrary0(Runtime.java:1071) + E/flutter (14793): at java.lang.Runtime.loadLibrary0(Runtime.java:1007) + E/flutter (14793): at java.lang.System.loadLibrary(System.java:1668) + E/flutter (14793): at com.arthenica.mobileffmpeg.Config.(Unknown Source:148) + E/flutter (14793): at com.arthenica.mobileffmpeg.Config.c(Unknown Source:0) + E/flutter (14793): at b.a.a.a.d.onMethodCall(Unknown Source:323) + E/flutter (14793): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17) + E/flutter (14793): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(Unknown Source:57) + E/flutter (14793): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:4) + E/flutter (14793): at android.os.MessageQueue.nativePollOnce(Native Method) + E/flutter (14793): at android.os.MessageQueue.next(MessageQueue.java:363) + E/flutter (14793): at android.os.Looper.loop(Looper.java:173) + E/flutter (14793): at android.app.ActivityThread.main(ActivityThread.java:8178) + E/flutter (14793): at java.lang.reflect.Method.invoke(Native Method) + E/flutter (14793): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) + E/flutter (14793): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101) + E/flutter (14793): + F/flutter (14793): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] Check failed: CheckException(env). + ``` + - `flutter_ffmpeg` includes native libraries that require ios deployment target to be at least `9.3`. If a deployment target is not set or a value smaller than `9.3` is used then your build will fail with the following error. diff --git a/android/build.gradle b/android/build.gradle index 52b606c..f22bce8 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -11,7 +11,7 @@ String safeExtGet(String prop, String fallback) { } group 'com.arthenica.flutter.ffmpeg' -version '0.3.0' +version '0.3.1' buildscript { repositories { @@ -26,6 +26,7 @@ buildscript { rootProject.allprojects { repositories { + mavenCentral() google() jcenter() } diff --git a/example/android/build.gradle b/example/android/build.gradle index d9d6580..e1d3ab7 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -11,6 +11,7 @@ buildscript { allprojects { repositories { + mavenCentral() google() jcenter() } diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 91b377a..928dde7 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,6 +1,6 @@ PODS: - Flutter (1.0.0) - - flutter_ffmpeg/audio-lts (0.3.0): + - flutter_ffmpeg/audio-lts (0.3.1): - Flutter - mobile-ffmpeg-audio (= 4.4.LTS) - fluttertoast (0.0.2): @@ -39,7 +39,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: 0e3d915762c693b495b44d77113d4970485de6ec - flutter_ffmpeg: 657ce8a1502c3d25bf34efc58b380b248836f772 + flutter_ffmpeg: 582ed04161233e3955540e32e79fd30bcbec272d fluttertoast: 6122fa75143e992b1d3470f61000f591a798cc58 mobile-ffmpeg-audio: 1e0a053f8a6de57114e50ff48b3a85ff1c60f902 path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c @@ -48,4 +48,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 45c71b51796b78cb6a09bb97eb9786d4c7aa085f -COCOAPODS: 1.9.2 +COCOAPODS: 1.10.1 diff --git a/example/pubspec.lock b/example/pubspec.lock index b09d61a..92b76cb 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,42 +7,42 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.2" + version: "2.5.0-nullsafety.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety.1" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0-nullsafety.3" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.2.0-nullsafety.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.1.0-nullsafety.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.13" + version: "1.15.0-nullsafety.3" cupertino_icons: dependency: "direct main" description: @@ -56,7 +56,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0-nullsafety.1" ffi: dependency: transitive description: @@ -79,10 +79,10 @@ packages: flutter_ffmpeg: dependency: "direct main" description: - path: ".." - relative: true - source: path - version: "0.3.0" + name: flutter_ffmpeg + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.1" flutter_test: dependency: "direct dev" description: flutter @@ -113,21 +113,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.8" + version: "0.12.10-nullsafety.1" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.8" + version: "1.3.0-nullsafety.3" path: dependency: "direct main" description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0-nullsafety.1" path_provider: dependency: "direct main" description: @@ -195,56 +195,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0-nullsafety.2" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.5" + version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety.1" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0-nullsafety.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0-nullsafety.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.17" + version: "0.2.19-nullsafety.2" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0-nullsafety.3" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.1.0-nullsafety.3" video_player: dependency: "direct main" description: @@ -281,5 +281,5 @@ packages: source: hosted version: "0.1.0" sdks: - dart: ">=2.9.0-14.0.dev <3.0.0" + dart: ">=2.10.0-110 <2.11.0" flutter: ">=1.12.13+hotfix.5 <2.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 62a6254..73287e9 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_ffmpeg_example description: Demonstrates how to use the flutter_ffmpeg plugin. -version: 0.3.0 +version: 0.3.1 publish_to: 'none' environment: @@ -15,8 +15,7 @@ dependencies: path: ^1.7.0 fluttertoast: ^7.1.1 video_player: ^0.10.12+3 - flutter_ffmpeg: - path: ../ + flutter_ffmpeg: ^0.3.1 dev_dependencies: flutter_test: diff --git a/ios/flutter_ffmpeg.podspec b/ios/flutter_ffmpeg.podspec index c1e4ccc..e710eb3 100644 --- a/ios/flutter_ffmpeg.podspec +++ b/ios/flutter_ffmpeg.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'flutter_ffmpeg' - s.version = '0.3.0' + s.version = '0.3.1' s.summary = 'FFmpeg plugin for Flutter.' s.description = 'FFmpeg plugin based on mobile-ffmpeg for Flutter.' s.homepage = 'https://github.com/tanersener/flutter-ffmpeg' diff --git a/lib/flutter_ffmpeg.dart b/lib/flutter_ffmpeg.dart index 10f442c..d06b2e9 100644 --- a/lib/flutter_ffmpeg.dart +++ b/lib/flutter_ffmpeg.dart @@ -496,7 +496,7 @@ class FlutterFFmpeg { try { return await _methodChannel.invokeMethod('listExecutions').then((value) { var mapList = value as List; - List executions = new List(); + List executions = List.empty(growable: true); for (int i = 0; i < mapList.length; i++) { var execution = new FFmpegExecution(); @@ -517,7 +517,7 @@ class FlutterFFmpeg { /// Parses the given [command] into arguments. static List parseArguments(String command) { - List argumentList = new List(); + List argumentList = List.empty(growable: true); StringBuffer currentArgument = new StringBuffer(); bool singleQuoteStarted = false; diff --git a/lib/media_information.dart b/lib/media_information.dart index 7408f9d..03cd54d 100644 --- a/lib/media_information.dart +++ b/lib/media_information.dart @@ -27,11 +27,11 @@ class MediaInformation { /// Returns all streams List getStreams() { - List list = new List(); + List list = List.empty(growable: true); var streamList; if (_allProperties == null) { - streamList = List(); + streamList = List.empty(growable: true); } else { streamList = _allProperties["streams"]; } diff --git a/pubspec.yaml b/pubspec.yaml index b0e6574..e4f44e9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_ffmpeg description: Flutter plugin to run FFmpeg on mobile platforms. Supports iOS and Android. -version: 0.3.0 +version: 0.3.1 homepage: https://github.com/tanersener/flutter-ffmpeg environment: