|
@@ -6,6 +6,7 @@
|
|
// Copyright © 2019 duowan. All rights reserved.
|
|
// Copyright © 2019 duowan. All rights reserved.
|
|
//
|
|
//
|
|
|
|
|
|
|
|
+import DeviceKit
|
|
import OJASwiftKit
|
|
import OJASwiftKit
|
|
import UIKit
|
|
import UIKit
|
|
|
|
|
|
@@ -1047,7 +1048,10 @@ fileprivate extension WSSCoolVoiceSubtitleController {
|
|
self?.movieWriter?.finishRecording(completionHandler: { [weak self] in
|
|
self?.movieWriter?.finishRecording(completionHandler: { [weak self] in
|
|
let mixOutputPath: String = kOJSUserCacheDirectory + "/" + "tmp_export_mix_audio_subtitle_video" + ".mp4"
|
|
let mixOutputPath: String = kOJSUserCacheDirectory + "/" + "tmp_export_mix_audio_subtitle_video" + ".mp4"
|
|
let combineVideo = AVURLAsset(url: outputUrl)
|
|
let combineVideo = AVURLAsset(url: outputUrl)
|
|
- let presentName = kOJSIsNotchiPhone ? AVAssetExportPresetHighestQuality : WSSMediaOperationTool.resolvePresentName(forVideoAsset: resultVideoAsset)
|
|
|
|
|
|
+ let presentName = WSSMediaOperationTool.resolvePresentName(forVideoAsset: resultVideoAsset)
|
|
|
|
+
|
|
|
|
+ WSSSimpleLog("🥞: \(presentName)")
|
|
|
|
+
|
|
self?.setupMixAudioExportDisplayLink()
|
|
self?.setupMixAudioExportDisplayLink()
|
|
self?.mixAudioExportSeesion = try? WSSMediaOperationTool.mixAudio(withAudioAsset: audioAsset,
|
|
self?.mixAudioExportSeesion = try? WSSMediaOperationTool.mixAudio(withAudioAsset: audioAsset,
|
|
forVideo: combineVideo,
|
|
forVideo: combineVideo,
|
|
@@ -1058,6 +1062,8 @@ fileprivate extension WSSCoolVoiceSubtitleController {
|
|
exportPath: mixOutputPath,
|
|
exportPath: mixOutputPath,
|
|
finish: { [weak self] mixResult in
|
|
finish: { [weak self] mixResult in
|
|
|
|
|
|
|
|
+ WSSSimpleLog("#字幕合成#: \(mixOutputPath)")
|
|
|
|
+
|
|
// WSSHub.dismissHub()
|
|
// WSSHub.dismissHub()
|
|
DispatchQueue.main.async {
|
|
DispatchQueue.main.async {
|
|
hideHud()
|
|
hideHud()
|
|
@@ -1128,7 +1134,7 @@ fileprivate extension WSSCoolVoiceSubtitleController {
|
|
|
|
|
|
func createTextPasterInput() {
|
|
func createTextPasterInput() {
|
|
let rect = AVMakeRect(aspectRatio: videoSize, insideRect: kOJSScreenBounds)
|
|
let rect = AVMakeRect(aspectRatio: videoSize, insideRect: kOJSScreenBounds)
|
|
- let placeholer: UIView = UIView(frame: rect)
|
|
|
|
|
|
+ let placeholer: UIView = UIView(frame: CGRect(origin: CGPoint.zero, size: rect.size))
|
|
|
|
|
|
/// 初始化文字Text
|
|
/// 初始化文字Text
|
|
textPasterInfoData.removeAll()
|
|
textPasterInfoData.removeAll()
|