From d0270a51a55b7c03b1abf22d77356f82793b1078 Mon Sep 17 00:00:00 2001 From: LUS Date: Mon, 8 Jan 2024 20:52:58 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=9D=B4=EC=9A=B0=EC=84=AD]=200108=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=ED=8E=B8=EC=A7=91=20fadeout=20=ED=9A=A8?= =?UTF-8?q?=EA=B3=BC=20=EB=B9=84=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/vm_sdk/impl/ffmpeg_helper.dart | 3 ++- lib/vm_sdk/vm_sdk.dart | 32 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/vm_sdk/impl/ffmpeg_helper.dart b/lib/vm_sdk/impl/ffmpeg_helper.dart index ff5df09..750d953 100644 --- a/lib/vm_sdk/impl/ffmpeg_helper.dart +++ b/lib/vm_sdk/impl/ffmpeg_helper.dart @@ -17,7 +17,8 @@ ERatio _ratio = ERatio.ratio11; double _scaleFactor = 2 / 3.0; double _minDurationFactor = 1 / _framerate; -const int _fadeDuration = 3; +// const int _fadeDuration = 3; +const int _fadeDuration = 0; class RenderedData { String absolutePath; diff --git a/lib/vm_sdk/vm_sdk.dart b/lib/vm_sdk/vm_sdk.dart index ba19a0d..d8c0251 100644 --- a/lib/vm_sdk/vm_sdk.dart +++ b/lib/vm_sdk/vm_sdk.dart @@ -518,23 +518,23 @@ class VMSDKWidget extends StatelessWidget { } } - if (isAutoEdit && editedMediaList.length > 1 && totalDuration >= 10) { - double curDuration = 0; - List fadeOutClips = []; - for (int i = xfadeAppliedList.length - 1; i >= 0; i--) { - RenderedData lastClip = xfadeAppliedList.removeLast(); - fadeOutClips.add(lastClip); + // if (isAutoEdit && editedMediaList.length > 1 && totalDuration >= 10) { + // double curDuration = 0; + // List fadeOutClips = []; + // for (int i = xfadeAppliedList.length - 1; i >= 0; i--) { + // RenderedData lastClip = xfadeAppliedList.removeLast(); + // fadeOutClips.add(lastClip); - curDuration += lastClip.duration; - if (curDuration >= 2) { - final RenderedData fadeOutApplied = - await applyFadeOut(fadeOutClips.reversed.toList()); - - xfadeAppliedList.add(fadeOutApplied); - break; - } - } - } + // curDuration += lastClip.duration; + // if (curDuration >= 2) { + // final RenderedData fadeOutApplied = + // await applyFadeOut(fadeOutClips.reversed.toList()); + + // xfadeAppliedList.add(fadeOutApplied); + // break; + // } + // } + // } _currentStatus = EGenerateStatus.finishing; _currentRenderedFrame = _allFrame;