Sfoglia il codice sorgente

erge branch 'master' of https://git.i2erp.cn/plugins/dubbing_lib

合并冲突.
gaoyf 6 anni fa
parent
commit
b3624fe160

+ 35 - 48
.idea/workspace.xml

@@ -2,39 +2,6 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="96a4f947-f66a-4efc-b495-ae979b3315bb" name="Default Changelist" comment="">
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/.idea/caches/build_file_checksums.ser" beforeDir="false" afterPath="$PROJECT_DIR$/android/.idea/caches/build_file_checksums.ser" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/android/.idea/misc.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/android/.idea/modules.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/android/build.gradle" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/libs/Msc.jar" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/libs/arm64-v8a/libmsc.so" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/libs/armeabi-v7a/libmsc.so" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/DubbingLibPlugin.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/DubbingLibPlugin.kt" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/FinalResult.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/ReadSentenceResult.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/ReadSyllableResult.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/ReadWordResult.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/Result.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/XmlResultParser.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/entity/Phone.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/entity/Sentence.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/entity/Syll.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/entity/Word.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/util/ResultFormatUtil.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audioEvaluator/resultParse/util/ResultTranslateUtil.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audiotransfer/CommonFunction.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audiotransfer/Constant.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audiotransfer/DecodeEngine.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audiotransfer/DecodeOperateInterface.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audiotransfer/FileFunction.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audiotransfer/LogFunction.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audiotransfer/Variable.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audiotransfer/vavi/sound/pcm/resampling/ssrc/SSRC.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audiotransfer/vavi/util/I0Bessel.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/audioUtils/audiotransfer/vavi/util/SplitRadixFft.java" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/bean/SimpleWord.kt" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/util/AudioEvaluatorUtil.kt" beforeDir="false" />
       <change beforePath="$PROJECT_DIR$/lib/dubbing_lib.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/dubbing_lib.dart" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/.dart_tool/" />
@@ -49,13 +16,17 @@
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
     <option name="LAST_RESOLUTION" value="IGNORE" />
   </component>
+  <component name="DefaultGradleProjectSettings">
+    <option name="testRunner" value="GRADLE" />
+    <option name="delegatedBuild" value="true" />
+  </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/lib/dubbing_lib.dart">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="397">
-              <caret line="66" column="76" lean-forward="true" selection-start-line="66" selection-start-column="76" selection-end-line="66" selection-end-column="76" />
+            <state relative-caret-position="223">
+              <caret line="65" column="42" selection-start-line="65" selection-start-column="42" selection-end-line="65" selection-end-column="42" />
             </state>
           </provider>
         </entry>
@@ -84,6 +55,7 @@
       <list>
         <option value="$PROJECT_DIR$/.gitignore" />
         <option value="$PROJECT_DIR$/android/build.gradle" />
+        <option value="$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/DubbingLibPlugin.kt" />
         <option value="$PROJECT_DIR$/lib/dubbing_lib.dart" />
       </list>
     </option>
@@ -99,7 +71,6 @@
     </navigator>
     <panes>
       <pane id="Scope" />
-      <pane id="PackagesPane" />
       <pane id="ProjectPane">
         <subPane>
           <expand>
@@ -112,6 +83,19 @@
               <item name="dubbing_lib" type="462c0819:PsiDirectoryNode" />
               <item name="android" type="462c0819:PsiDirectoryNode" />
             </path>
+            <path>
+              <item name="dubbing_lib" type="b2602c69:ProjectViewProjectNode" />
+              <item name="dubbing_lib" type="462c0819:PsiDirectoryNode" />
+              <item name="android" type="462c0819:PsiDirectoryNode" />
+              <item name="main" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="dubbing_lib" type="b2602c69:ProjectViewProjectNode" />
+              <item name="dubbing_lib" type="462c0819:PsiDirectoryNode" />
+              <item name="android" type="462c0819:PsiDirectoryNode" />
+              <item name="main" type="462c0819:PsiDirectoryNode" />
+              <item name="dubbing_lib" type="462c0819:PsiDirectoryNode" />
+            </path>
             <path>
               <item name="dubbing_lib" type="b2602c69:ProjectViewProjectNode" />
               <item name="dubbing_lib" type="462c0819:PsiDirectoryNode" />
@@ -121,12 +105,13 @@
           <select />
         </subPane>
       </pane>
+      <pane id="PackagesPane" />
     </panes>
   </component>
   <component name="PropertiesComponent">
     <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
     <property name="dart.analysis.tool.window.force.activate" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/android" />
     <property name="settings.editor.selected.configurable" value="flutter.settings" />
     <property name="show.migrate.to.gradle.popup" value="false" />
   </component>
@@ -157,9 +142,8 @@
   </component>
   <component name="ToolWindowManager">
     <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
-    <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.14498934" />
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.10927505" />
       <window_info id="Captures" order="1" side_tool="true" />
       <window_info id="Structure" order="2" side_tool="true" />
       <window_info id="Image Layers" order="3" />
@@ -174,7 +158,7 @@
       <window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" />
       <window_info anchor="bottom" id="Logcat" order="4" />
       <window_info anchor="bottom" id="Debug" order="5" />
-      <window_info active="true" anchor="bottom" id="Terminal" order="6" visible="true" weight="0.2733189" />
+      <window_info active="true" anchor="bottom" id="Terminal" order="6" visible="true" weight="0.22668113" />
       <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
       <window_info anchor="bottom" id="Flutter Performance" order="8" side_tool="true" />
       <window_info anchor="bottom" id="Version Control" order="9" />
@@ -229,24 +213,27 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/DubbingLibPlugin.kt">
+    <entry file="file://$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/util/DownloadUtil.kt">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="285">
-          <caret line="62" column="64" selection-start-line="62" selection-start-column="64" selection-end-line="62" selection-end-column="64" />
+        <state relative-caret-position="361">
+          <caret line="19" column="98" selection-start-line="19" selection-start-column="92" selection-end-line="19" selection-end-column="98" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/util/DownloadUtil.kt">
+    <entry file="file://$PROJECT_DIR$/android/src/main/kotlin/cn/i2edu/dubbing_lib/DubbingLibPlugin.kt">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="361">
-          <caret line="19" column="98" selection-start-line="19" selection-start-column="92" selection-end-line="19" selection-end-column="98" />
+        <state relative-caret-position="166">
+          <caret line="281" column="16" lean-forward="true" selection-start-line="281" selection-start-column="16" selection-end-line="281" selection-end-column="16" />
+          <folding>
+            <element signature="e#10138#11757#0" />
+          </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/lib/dubbing_lib.dart">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="397">
-          <caret line="66" column="76" lean-forward="true" selection-start-line="66" selection-start-column="76" selection-end-line="66" selection-end-column="76" />
+        <state relative-caret-position="223">
+          <caret line="65" column="42" selection-start-line="65" selection-start-column="42" selection-end-line="65" selection-end-column="42" />
         </state>
       </provider>
     </entry>

BIN
android/.idea/caches/build_file_checksums.ser


+ 2 - 15
android/src/main/kotlin/cn/i2edu/dubbing_lib/DubbingLibPlugin.kt

@@ -120,19 +120,6 @@ class DubbingLibPlugin: MethodCallHandler, MixinHandlerCallback {
           result.error("1003", "clean cache file failed", null)
         }
       }
-      "findIsExistCacheVideo" -> {
-        try {
-          // 取得 video id, 根据前缀进行查找操作
-          val videoId = call.argument<String>("videoId")!!
-          val pathAudio = call.argument<String>("pathAudio")!!
-          val pathAudioDecode = call.argument<String>("pathAudioDecode")!!
-          val map = getExistCache(videoId, pathAudio, pathAudioDecode)
-          result.success(map)
-        } catch (e: Exception){
-          e.printStackTrace()
-          result.error("1004", "find cache file failed", null)
-        }
-      }
       "startMixinAudio" -> {
         try {
           videoData = VideoData(
@@ -301,7 +288,7 @@ class DubbingLibPlugin: MethodCallHandler, MixinHandlerCallback {
     return true
   }
 
-  @Throws(Exception::class)
+/*  @Throws(Exception::class)
   private fun getExistCache(video: String, pathAudio: String, pathAudioDecode: String): Map<Int, String> {
     val map = hashMapOf<Int, String>()
 
@@ -346,7 +333,7 @@ class DubbingLibPlugin: MethodCallHandler, MixinHandlerCallback {
       }
     }
     return map
-  }
+  }*/
 
   // -------------- 合成录音相关
 

+ 1 - 6
lib/dubbing_lib.dart

@@ -44,10 +44,6 @@ class DubbingLib {
     return _channel.invokeMethod("setExtraFullScreen");
   }
 
-  Future<Map<dynamic, dynamic>> findIsExistCacheVideo(String videoId, {String recordPath, String recordDecodePath}) {
-    return _channel.invokeMethod<Map<dynamic, dynamic>>("findIsExistCacheVideo", {"videoId": videoId, "pathAudio": recordPath ?? this.recordPath, "pathAudioDecode": recordDecodePath ?? this.recordDecodePath});
-  }
-
   Future<String> downLoadVideo(String videoUrl) {
     return _channel.invokeMethod("downLoadVideo", {"url": videoUrl});
   }
@@ -67,14 +63,13 @@ class DubbingLib {
     return _channel.invokeMethod("playRecordAudio", {"fileName": filePath});
   }
 
-  /// 返回合成视频文件地址 这里的bgmPath是已经下载的背景音乐文件地址
   Future<String> startMixinAudio(String videoId, String bgmUrl, String bgmPath, List<int> endTimeList,
       List<String> decodeAudioPathList, List<int> durationList, String localVideoPath) {
     return _channel.invokeMethod("startMixinAudio", {"videoId": videoId, "bgmUrl": bgmUrl,
       "endTimeList": endTimeList, "audioDecodePaths": decodeAudioPathList, "durationList": durationList, "videoPath": localVideoPath,
       "bgmPath": bgmPath, "pathBgmDecode": bgmDecodePath, "pathBgmRecordSync": audioSyncPath, "pathBgmRecordDecodeSync": audioSyncDecodePath, "pathVideoMixin": videoMixInPath});
   }
-
+  
   Future<void> cleanAudioData(String videoId) {
     return _channel.invokeMethod("cleanAudioData", {"videoId": videoId, "pathAudio": recordPath, "pathAudioDecode": recordDecodePath});
   }