Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
test flutter v6.0.0 applications
Browse files Browse the repository at this point in the history
  • Loading branch information
suencooper committed Aug 26, 2023
1 parent 39394f2 commit 803f1a2
Show file tree
Hide file tree
Showing 39 changed files with 457 additions and 368 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Test applications are tagged with `ffmpeg-kit` release they depend on.

| Platform | FFmpegKit Version | Tag |
| :----: |:-----------------:|:---------------------------------------------------------------------------------:|
| Flutter | 6.0.0 | [6.0.0](https://github.com/arthenica/ffmpeg-kit-test/tree/flutter.v6.0.0) |
| Flutter | 6.0.0-LTS | [6.0.0-LTS](https://github.com/arthenica/ffmpeg-kit-test/tree/flutter.v6.0.0.lts) |
| Android | 6.0 | [6.0](https://github.com/arthenica/ffmpeg-kit-test/tree/android.v6.0) |
| Android | 6.0.LTS | [6.0.LTS](https://github.com/arthenica/ffmpeg-kit-test/tree/android.v6.0.lts) |
| iOS | 6.0 | [6.0](https://github.com/arthenica/ffmpeg-kit-test/tree/ios.v6.0) |
Expand Down
10 changes: 7 additions & 3 deletions flutter/test-app-local-dependency/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31
if (project.android.hasProperty("namespace")) {
namespace 'com.arthenica.ffmpegkit.flutter.android'
}

compileSdkVersion 33

lintOptions {
disable 'InvalidPackage'
Expand All @@ -34,7 +38,7 @@ android {
defaultConfig {
applicationId "com.arthenica.ffmpegkit.flutter.android"
minSdkVersion 24
targetSdkVersion 31
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand All @@ -57,5 +61,5 @@ flutter {
}

dependencies {
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13.2'
}
4 changes: 2 additions & 2 deletions flutter/test-app-local-dependency/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.android.tools.build:gradle:8.1.0'
}
}

Expand All @@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
31 changes: 16 additions & 15 deletions flutter/test-app-local-dependency/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
PODS:
- ffmpeg-kit-ios-https (5.1)
- ffmpeg_kit_flutter (5.1.0):
- ffmpeg_kit_flutter/https (= 5.1.0)
- ffmpeg-kit-ios-https (6.0)
- ffmpeg_kit_flutter (6.0.0):
- ffmpeg_kit_flutter/https (= 6.0.0)
- Flutter
- ffmpeg_kit_flutter/https (5.1.0):
- ffmpeg-kit-ios-https (= 5.1)
- ffmpeg_kit_flutter/https (6.0.0):
- ffmpeg-kit-ios-https (= 6.0)
- Flutter
- Flutter (1.0.0)
- fluttertoast (0.0.2):
- Flutter
- Toast
- path_provider_ios (0.0.1):
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- Toast (4.0.0)
- video_player_avfoundation (0.0.1):
- Flutter
Expand All @@ -20,7 +21,7 @@ DEPENDENCIES:
- ffmpeg_kit_flutter (from `.symlinks/plugins/ffmpeg_kit_flutter/ios`)
- Flutter (from `Flutter`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`)

SPEC REPOS:
Expand All @@ -35,20 +36,20 @@ EXTERNAL SOURCES:
:path: Flutter
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
video_player_avfoundation:
:path: ".symlinks/plugins/video_player_avfoundation/ios"

SPEC CHECKSUMS:
ffmpeg-kit-ios-https: 8dffbe1623a2f227be98fc314294847a97f818e4
ffmpeg_kit_flutter: 17e9f35a4ec996ac55051c20be05240f2a0b53e8
ffmpeg-kit-ios-https: f9c838aa5400a6c5ba12324c6b798f52197ba354
ffmpeg_kit_flutter: 7b6a64db3b13e8961abe132f7ff63c9b9240027b
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
fluttertoast: 16fbe6039d06a763f3533670197d01fc73459037
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
video_player_avfoundation: e489aac24ef5cf7af82702979ed16f2a5ef84cff
video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126

PODFILE CHECKSUM: ccd901b1465efa56fa30557fdc5ae4eddcc3f504

COCOAPODS: 1.11.3
COCOAPODS: 1.12.1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -167,7 +167,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -232,10 +232,12 @@
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down Expand Up @@ -263,6 +265,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions flutter/test-app-local-dependency/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion flutter/test-app-local-dependency/lib/pipe_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class PipeTab implements PlayerTab {
return;
}

int timeInMilliseconds = this._statistics!.getTime();
double timeInMilliseconds = this._statistics!.getTime();
int totalVideoDuration = 9000;

int completePercentage = (timeInMilliseconds * 100) ~/ totalVideoDuration;
Expand Down
2 changes: 1 addition & 1 deletion flutter/test-app-local-dependency/lib/saf_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class SafTab {
return;
}

int timeInMilliseconds = statistics.getTime();
double timeInMilliseconds = statistics.getTime();
int totalVideoDuration = 9000;

int completePercentage = (timeInMilliseconds * 100) ~/ totalVideoDuration;
Expand Down
2 changes: 1 addition & 1 deletion flutter/test-app-local-dependency/lib/subtitle_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class SubtitleTab implements PlayerTab {
return;
}

int timeInMilliseconds = this._statistics!.getTime();
double timeInMilliseconds = this._statistics!.getTime();
int totalVideoDuration = 9000;

int completePercentage = (timeInMilliseconds * 100) ~/ totalVideoDuration;
Expand Down
12 changes: 5 additions & 7 deletions flutter/test-app-local-dependency/lib/test_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ class Test {

static void _testParseSimpleCommand() {
var argumentArray = FFmpegKitConfig.parseArguments(
"-hide_banner -loop 1 -i file.jpg -filter_complex [0:v]setpts=PTS-STARTPTS[video] -map [video] -vsync 2 -async 1 video.mp4");
"-hide_banner -loop 1 -i file.jpg -filter_complex [0:v]setpts=PTS-STARTPTS[video] -map [video] -fps_mode cfr video.mp4");

assert(argumentArray.length == 14);
assert(argumentArray.length == 12);

assert("-hide_banner" == argumentArray[0]);
assert("-loop" == argumentArray[1]);
Expand All @@ -73,11 +73,9 @@ class Test {
assert("[0:v]setpts=PTS-STARTPTS[video]" == argumentArray[6]);
assert("-map" == argumentArray[7]);
assert("[video]" == argumentArray[8]);
assert("-vsync" == argumentArray[9]);
assert("2" == argumentArray[10]);
assert("-async" == argumentArray[11]);
assert("1" == argumentArray[12]);
assert("video.mp4" == argumentArray[13]);
assert("-fps_mode" == argumentArray[9]);
assert("cfr" == argumentArray[10]);
assert("video.mp4" == argumentArray[11]);
}

static void _testParseSingleQuotesInCommand() {
Expand Down
40 changes: 26 additions & 14 deletions flutter/test-app-local-dependency/lib/video_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ class VideoTab implements PlayerTab {
case "x264":
videoCodec = "libx264";
break;
case "h264_mediacodec":
videoCodec = "h264_mediacodec";
break;
case "hevc_mediacodec":
videoCodec = "hevc_mediacodec";
break;
case "openh264":
videoCodec = "libopenh264";
break;
Expand Down Expand Up @@ -216,7 +222,7 @@ class VideoTab implements PlayerTab {
extension = "mov";
break;
default:
// mpeg4, x264, x265, xvid, kvazaar
// mpeg4, x264, h264_mediacodec, hevc_mediacodec, x265, xvid, kvazaar
extension = "mp4";
break;
}
Expand All @@ -243,7 +249,7 @@ class VideoTab implements PlayerTab {
case "hap":
return "-format hap_q ";
default:
// kvazaar, mpeg4, x264, xvid
// kvazaar, mpeg4, x264, h264_mediacodec, hevc_mediacodec, xvid
return "";
}
}
Expand All @@ -253,39 +259,45 @@ class VideoTab implements PlayerTab {

list.add(new DropdownMenuItem(
value: "mpeg4",
child: SizedBox(width: 100, child: Center(child: new Text("mpeg4")))));
child: SizedBox(width: 130, child: Center(child: new Text("mpeg4")))));
list.add(new DropdownMenuItem(
value: "x264",
child: SizedBox(width: 100, child: Center(child: new Text("x264")))));
child: SizedBox(width: 130, child: Center(child: new Text("x264")))));
list.add(new DropdownMenuItem(
value: "h264_mediacodec",
child: SizedBox(width: 130, child: Center(child: new Text("h264_mediacodec")))));
list.add(new DropdownMenuItem(
value: "hevc_mediacodec",
child: SizedBox(width: 130, child: Center(child: new Text("hevc_mediacodec")))));
list.add(new DropdownMenuItem(
value: "openh264",
child:
SizedBox(width: 100, child: Center(child: new Text("openh264")))));
SizedBox(width: 130, child: Center(child: new Text("openh264")))));
list.add(new DropdownMenuItem(
value: "x265",
child: SizedBox(width: 100, child: Center(child: new Text("x265")))));
child: SizedBox(width: 130, child: Center(child: new Text("x265")))));
list.add(new DropdownMenuItem(
value: "xvid",
child: SizedBox(width: 100, child: Center(child: new Text("xvid")))));
child: SizedBox(width: 130, child: Center(child: new Text("xvid")))));
list.add(new DropdownMenuItem(
value: "vp8",
child: SizedBox(width: 100, child: Center(child: new Text("vp8")))));
child: SizedBox(width: 130, child: Center(child: new Text("vp8")))));
list.add(new DropdownMenuItem(
value: "vp9",
child: SizedBox(width: 100, child: Center(child: new Text("vp9")))));
child: SizedBox(width: 130, child: Center(child: new Text("vp9")))));
list.add(new DropdownMenuItem(
value: "aom",
child: SizedBox(width: 100, child: Center(child: new Text("aom")))));
child: SizedBox(width: 130, child: Center(child: new Text("aom")))));
list.add(new DropdownMenuItem(
value: "kvazaar",
child:
SizedBox(width: 100, child: Center(child: new Text("kvazaar")))));
SizedBox(width: 130, child: Center(child: new Text("kvazaar")))));
list.add(new DropdownMenuItem(
value: "theora",
child: SizedBox(width: 100, child: Center(child: new Text("theora")))));
child: SizedBox(width: 130, child: Center(child: new Text("theora")))));
list.add(new DropdownMenuItem(
value: "hap",
child: SizedBox(width: 100, child: Center(child: new Text("hap")))));
child: SizedBox(width: 130, child: Center(child: new Text("hap")))));

return list;
}
Expand All @@ -302,7 +314,7 @@ class VideoTab implements PlayerTab {
return;
}

int timeInMilliseconds = statistics.getTime();
double timeInMilliseconds = statistics.getTime();
int totalVideoDuration = 9000;

int completePercentage = (timeInMilliseconds * 100) ~/ totalVideoDuration;
Expand Down
6 changes: 3 additions & 3 deletions flutter/test-app-local-dependency/lib/video_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class VideoUtil {
"[stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=" +
pixelFormat +
"[video]\"" +
" -map [video] -vsync 2 -async 1 " +
" -map [video] -fps_mode cfr " +
customOptions +
"-c:v " +
videoCodec +
Expand Down Expand Up @@ -174,7 +174,7 @@ class VideoUtil {
"[3:v][stream2overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream2shaking];" +
"[3:v][stream3overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream3shaking];" +
"[stream1shaking][stream2shaking][stream3shaking]concat=n=3:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\"" +
" -map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 " +
" -map [video] -fps_mode cfr -c:v mpeg4 -r 30 " +
videoFilePath;
}

Expand Down Expand Up @@ -205,7 +205,7 @@ class VideoUtil {
"[stream2starting][stream1ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream2blended];" +
"[stream3starting][stream2ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream3blended];" +
"[stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\"" +
" -map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 " +
" -map [video] -fps_mode cfr -c:v mpeg4 -r 30 " +
videoFilePath;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import FlutterMacOS
import Foundation

import ffmpeg_kit_flutter
import path_provider_macos
import path_provider_foundation

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FFmpegKitFlutterPlugin.register(with: registry.registrar(forPlugin: "FFmpegKitFlutterPlugin"))
Expand Down
Loading

0 comments on commit 803f1a2

Please sign in to comment.