release v4.5.1 for flutter

This commit is contained in:
Taner Sener 2022-01-02 19:38:57 +00:00
parent 2febafd5e6
commit 043c8adbed
4 changed files with 21 additions and 11 deletions

View File

@ -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
@ -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
@ -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)) {
@ -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();
@ -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
@ -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();
}
});
```

View File

@ -1,6 +1,6 @@
*.iml
.gradle
/local.properties
local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store

View File

@ -19,8 +19,6 @@
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';
@ -28,10 +26,12 @@ 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';

View File

@ -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