Skip to content

Commit

Permalink
release v4.5.1 for flutter
Browse files Browse the repository at this point in the history
  • Loading branch information
tanersener committed Jan 2, 2022
1 parent 2febafd commit 043c8ad
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
24 changes: 17 additions & 7 deletions flutter/flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Add `ffmpeg_kit_flutter` as a dependency in your `pubspec.yaml file`.

```yaml
dependencies:
ffmpeg_kit_flutter: ^4.5.1
ffmpeg_kit_flutter: 4.5.1
```

#### 2.1 Packages
Expand All @@ -55,7 +55,7 @@ using the following dependency format.

```yaml
dependencies:
ffmpeg_kit_flutter_<package name>: ^4.5.1
ffmpeg_kit_flutter_<package name>: 4.5.1
```

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

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

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

```dart
FFprobeKit.getMediaInformationAsync('<file path or url>', (session) async {
final information = await (session as MediaInformationSession).getMediaInformation();
FFprobeKit.getMediaInformation('<file path or url>').then((session) async {
final information = await session.getMediaInformation();
if (information == null) {
// CHECK THE FOLLOWING ATTRIBUTES ON ERROR
final state = FFmpegKitConfig.sessionStateToString(await session.getState());
final returnCode = await session.getReturnCode();
final failStackTrace = await session.getFailStackTrace();
final duration = await session.getDuration();
final output = await session.getOutput();
}
});
```

Expand Down
2 changes: 1 addition & 1 deletion flutter/flutter/android/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*.iml
.gradle
/local.properties
local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
Expand Down
4 changes: 2 additions & 2 deletions flutter/flutter/lib/src/ffmpeg_kit_flutter_initializer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@

import 'dart:io';

import 'package:ffmpeg_kit_flutter/ffprobe_session.dart';
import 'package:ffmpeg_kit_flutter/media_information_session.dart';
import 'package:ffmpeg_kit_flutter_platform_interface/ffmpeg_kit_flutter_platform_interface.dart';
import 'package:flutter/services.dart';

import '../arch_detect.dart';
import '../ffmpeg_kit_config.dart';
import '../ffmpeg_session.dart';
import '../ffmpeg_session_complete_callback.dart';
import '../ffprobe_session.dart';
import '../ffprobe_session_complete_callback.dart';
import '../level.dart';
import '../log_callback.dart';
import '../log_redirection_strategy.dart';
import '../media_information_session.dart';
import '../media_information_session_complete_callback.dart';
import '../packages.dart';
import '../session.dart';
Expand Down
2 changes: 1 addition & 1 deletion flutter/flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ flutter:
pluginClass: FFmpegKitFlutterPlugin

dependencies:
ffmpeg_kit_flutter_platform_interface: ^0.2.0
ffmpeg_kit_flutter_platform_interface: ^0.2.1
flutter:
sdk: flutter

Expand Down

0 comments on commit 043c8ad

Please sign in to comment.