Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit 043c8ad

Browse files
committed
release v4.5.1 for flutter
1 parent 2febafd commit 043c8ad

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

flutter/flutter/README.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Add `ffmpeg_kit_flutter` as a dependency in your `pubspec.yaml file`.
3232

3333
```yaml
3434
dependencies:
35-
ffmpeg_kit_flutter: ^4.5.1
35+
ffmpeg_kit_flutter: 4.5.1
3636
```
3737
3838
#### 2.1 Packages
@@ -55,7 +55,7 @@ using the following dependency format.
5555

5656
```yaml
5757
dependencies:
58-
ffmpeg_kit_flutter_<package name>: ^4.5.1
58+
ffmpeg_kit_flutter_<package name>: 4.5.1
5959
```
6060

6161
Note that hyphens in the package name must be replaced with underscores. Additionally, do not forget to use the package
@@ -111,7 +111,7 @@ The following table shows the Android API level and iOS deployment target requir
111111
```dart
112112
import 'package:ffmpeg_kit_flutter/ffmpeg_kit.dart';
113113
114-
FFmpegKit.executeAsync('-i file1.mp4 -c:v mpeg4 file2.mp4', (session) async {
114+
FFmpegKit.execute('-i file1.mp4 -c:v mpeg4 file2.mp4').then((session) async {
115115
final returnCode = await session.getReturnCode();
116116
117117
if (ReturnCode.isSuccess(returnCode)) {
@@ -133,7 +133,7 @@ The following table shows the Android API level and iOS deployment target requir
133133
2. Each `execute` call creates a new session. Access every detail about your execution from the session created.
134134

135135
```dart
136-
FFmpegKit.executeAsync('-i file1.mp4 -c:v mpeg4 file2.mp4', (session) async {
136+
FFmpegKit.execute('-i file1.mp4 -c:v mpeg4 file2.mp4').then((session) async {
137137
138138
// Unique session id created for this execution
139139
final sessionId = session.getSessionId();
@@ -190,7 +190,7 @@ The following table shows the Android API level and iOS deployment target requir
190190
4. Execute `FFprobe` commands.
191191

192192
```dart
193-
FFprobeKit.executeAsync(ffprobeCommand, (session) {
193+
FFprobeKit.execute(ffprobeCommand).then((session) async {
194194
195195
// CALLED WHEN SESSION IS EXECUTED
196196
@@ -200,8 +200,18 @@ The following table shows the Android API level and iOS deployment target requir
200200
5. Get media information for a file/url.
201201

202202
```dart
203-
FFprobeKit.getMediaInformationAsync('<file path or url>', (session) async {
204-
final information = await (session as MediaInformationSession).getMediaInformation();
203+
FFprobeKit.getMediaInformation('<file path or url>').then((session) async {
204+
final information = await session.getMediaInformation();
205+
206+
if (information == null) {
207+
208+
// CHECK THE FOLLOWING ATTRIBUTES ON ERROR
209+
final state = FFmpegKitConfig.sessionStateToString(await session.getState());
210+
final returnCode = await session.getReturnCode();
211+
final failStackTrace = await session.getFailStackTrace();
212+
final duration = await session.getDuration();
213+
final output = await session.getOutput();
214+
}
205215
});
206216
```
207217

flutter/flutter/android/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
*.iml
22
.gradle
3-
/local.properties
3+
local.properties
44
/.idea/workspace.xml
55
/.idea/libraries
66
.DS_Store

flutter/flutter/lib/src/ffmpeg_kit_flutter_initializer.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919

2020
import 'dart:io';
2121

22-
import 'package:ffmpeg_kit_flutter/ffprobe_session.dart';
23-
import 'package:ffmpeg_kit_flutter/media_information_session.dart';
2422
import 'package:ffmpeg_kit_flutter_platform_interface/ffmpeg_kit_flutter_platform_interface.dart';
2523
import 'package:flutter/services.dart';
2624

2725
import '../arch_detect.dart';
2826
import '../ffmpeg_kit_config.dart';
2927
import '../ffmpeg_session.dart';
3028
import '../ffmpeg_session_complete_callback.dart';
29+
import '../ffprobe_session.dart';
3130
import '../ffprobe_session_complete_callback.dart';
3231
import '../level.dart';
3332
import '../log_callback.dart';
3433
import '../log_redirection_strategy.dart';
34+
import '../media_information_session.dart';
3535
import '../media_information_session_complete_callback.dart';
3636
import '../packages.dart';
3737
import '../session.dart';

flutter/flutter/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ flutter:
2121
pluginClass: FFmpegKitFlutterPlugin
2222

2323
dependencies:
24-
ffmpeg_kit_flutter_platform_interface: ^0.2.0
24+
ffmpeg_kit_flutter_platform_interface: ^0.2.1
2525
flutter:
2626
sdk: flutter
2727

0 commit comments

Comments
 (0)