From ed71c4de327f492cdc622445e92702b84e619140 Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Fri, 16 Jun 2023 16:48:22 +0300 Subject: [PATCH 01/14] Update VFCabbage.podspec --- VFCabbage.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VFCabbage.podspec b/VFCabbage.podspec index 20dad59..bcbff85 100644 --- a/VFCabbage.podspec +++ b/VFCabbage.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| - s.name = 'VFCabbage' - s.version = '0.5.1' + s.name = 'SCCabbage' + s.version = '0.5.2' s.summary = 'A high-level video composition framework build on top of AVFoundation. It\'s simple to use and easy to extend.' s.description = <<-DESC From 73b3910a786428c69bfba4f29141e2c308fd3fd5 Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Fri, 16 Jun 2023 16:59:46 +0300 Subject: [PATCH 02/14] Update VFCabbage.podspec --- VFCabbage.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VFCabbage.podspec b/VFCabbage.podspec index bcbff85..b591134 100644 --- a/VFCabbage.podspec +++ b/VFCabbage.podspec @@ -15,14 +15,14 @@ Pod::Spec.new do |s| s.license = { :type => "MIT", :file => "LICENSE" } - s.homepage = 'https://github.com/VideoFlint/Cabbage' + s.homepage = 'https://github.com/kre8tv/SCCabbage' s.author = { 'Vito' => 'vvitozhang@gmail.com' } s.platform = :ios, '9.0' s.swift_version = "4.2" - s.source = { :git => 'https://github.com/VideoFlint/Cabbage.git', :tag => s.version.to_s } + s.source = { :git => 'https://github.com/kre8tv/SCCabbage.git', :tag => s.version.to_s } s.source_files = ['Cabbage/Sources/core/**/*.swift', 'Cabbage/Sources/**/*.swift'] s.resource_bundles = { 'Cabbage' => 'Cabbage/Sources/Resource/*.mp4' } From 600f2f195c50612aaa2a3be00b484bbaa9b80458 Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Fri, 16 Jun 2023 17:16:38 +0300 Subject: [PATCH 03/14] change name of .podspec --- VFCabbage.podspec => SCCabbage.podspec | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename VFCabbage.podspec => SCCabbage.podspec (100%) diff --git a/VFCabbage.podspec b/SCCabbage.podspec similarity index 100% rename from VFCabbage.podspec rename to SCCabbage.podspec From 9dd55036517aaa06f8c2ce63453442753f1a33df Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Fri, 16 Jun 2023 17:26:22 +0300 Subject: [PATCH 04/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 239810b..4238b0d 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ use_frameworks! target 'MyApp' do # your other pod # ... - pod 'VFCabbage' + pod 'SCCabbage', :git => 'https://github.com/kre8tv/SCCabbage' end ``` From 59b3b9148fa0bb23cd69f762106c746bd4c11bc9 Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Fri, 16 Jun 2023 17:27:03 +0300 Subject: [PATCH 05/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4238b0d..8322d7f 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ You can - Or add Cabbage as a submodule. ``` -$ git submodule add https://github.com/VideoFlint/Cabbage.git +$ git submodule add https://github.com/kre8tv/SCCabbage ``` ## Requirements From 77db51a8bd564437ef40f5eacea43d0aa1a22d20 Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Fri, 16 Jun 2023 18:17:03 +0300 Subject: [PATCH 06/14] change Package.swift --- Package.swift | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Package.swift b/Package.swift index 14d0e28..df96b8c 100644 --- a/Package.swift +++ b/Package.swift @@ -4,7 +4,7 @@ import PackageDescription let package = Package( - name: "Cabbage", + name: "SCCabbage", products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( @@ -20,17 +20,7 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "Cabbage", - dependencies: [], - linkerSettings: [ - .linkedFramework( - "AVFoundation", - .when(platforms: [.iOS, .macOS]) - ), - .linkedFramework( - "Foundation", - .when(platforms: [.iOS, .macOS]) - ) - ] + dependencies: []) ) ] ) From 88c17cb14ceb6befb7269a61c3d04c1c8336c7f2 Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Fri, 16 Jun 2023 18:19:55 +0300 Subject: [PATCH 07/14] fix Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index df96b8c..eb2e8ec 100644 --- a/Package.swift +++ b/Package.swift @@ -20,7 +20,7 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "Cabbage", - dependencies: []) + dependencies: [] ) ] ) From 659b5d1ed390621270c7be822fdb99fa5fd3a1a4 Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Fri, 16 Jun 2023 18:28:09 +0300 Subject: [PATCH 08/14] Update Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index eb2e8ec..588a55e 100644 --- a/Package.swift +++ b/Package.swift @@ -8,7 +8,7 @@ let package = Package( products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( - name: "Cabbage", + name: "SCCabbage", targets: ["Cabbage"]), ], dependencies: [ From 06d1b9d37595cf936f39182aaedf6efd24784a24 Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Mon, 19 Jun 2023 12:42:28 +0300 Subject: [PATCH 09/14] Add SPM support --- Package.swift | 4 ++-- .../{Cabbage => SCCabbage}/AVAssetReaderImageResource.swift | 0 .../{Cabbage => SCCabbage}/AVAssetReverseImageResource.swift | 0 Sources/{Cabbage => SCCabbage}/AVAssetTrackResource.swift | 0 Sources/{Cabbage => SCCabbage}/AudioMixer.swift | 0 Sources/{Cabbage => SCCabbage}/AudioProcessingChain.swift | 0 Sources/{Cabbage => SCCabbage}/AudioProcessingTapHolder.swift | 0 Sources/{Cabbage => SCCabbage}/AudioTransition.swift | 0 Sources/{Cabbage => SCCabbage}/CGMathFunctions.swift | 0 Sources/{Cabbage => SCCabbage}/CMTimeExtensition.swift | 0 Sources/{Cabbage => SCCabbage}/CompositionGenerator.swift | 0 Sources/{Cabbage => SCCabbage}/CompositionProvider.swift | 0 Sources/{Cabbage => SCCabbage}/CoreImageExtension.swift | 0 .../ImageCompositionGroupProvider.swift | 0 Sources/{Cabbage => SCCabbage}/ImageGeneratorExtension.swift | 0 Sources/{Cabbage => SCCabbage}/ImageOverlayItem.swift | 0 Sources/{Cabbage => SCCabbage}/ImageResource.swift | 0 .../{Cabbage => SCCabbage}/KeyframeVideoConfiguration.swift | 0 Sources/{Cabbage => SCCabbage}/Log.swift | 0 Sources/{Cabbage => SCCabbage}/PHAssetImageResource.swift | 0 Sources/{Cabbage => SCCabbage}/PHAssetLivePhotoResource.swift | 0 Sources/{Cabbage => SCCabbage}/PHAssetTrackResource.swift | 0 Sources/{Cabbage => SCCabbage}/Resource.swift | 0 Sources/{Cabbage => SCCabbage}/TimeRangeExtension.swift | 0 Sources/{Cabbage => SCCabbage}/Timeline.swift | 0 Sources/{Cabbage => SCCabbage}/TimingFunctionFactory.swift | 0 Sources/{Cabbage => SCCabbage}/TrackConfiguration.swift | 0 Sources/{Cabbage => SCCabbage}/TrackItem.swift | 0 .../{Cabbage => SCCabbage}/VideoCompositionInstruction.swift | 0 Sources/{Cabbage => SCCabbage}/VideoCompositor.swift | 0 Sources/{Cabbage => SCCabbage}/VideoTransition.swift | 0 31 files changed, 2 insertions(+), 2 deletions(-) rename Sources/{Cabbage => SCCabbage}/AVAssetReaderImageResource.swift (100%) rename Sources/{Cabbage => SCCabbage}/AVAssetReverseImageResource.swift (100%) rename Sources/{Cabbage => SCCabbage}/AVAssetTrackResource.swift (100%) rename Sources/{Cabbage => SCCabbage}/AudioMixer.swift (100%) rename Sources/{Cabbage => SCCabbage}/AudioProcessingChain.swift (100%) rename Sources/{Cabbage => SCCabbage}/AudioProcessingTapHolder.swift (100%) rename Sources/{Cabbage => SCCabbage}/AudioTransition.swift (100%) rename Sources/{Cabbage => SCCabbage}/CGMathFunctions.swift (100%) rename Sources/{Cabbage => SCCabbage}/CMTimeExtensition.swift (100%) rename Sources/{Cabbage => SCCabbage}/CompositionGenerator.swift (100%) rename Sources/{Cabbage => SCCabbage}/CompositionProvider.swift (100%) rename Sources/{Cabbage => SCCabbage}/CoreImageExtension.swift (100%) rename Sources/{Cabbage => SCCabbage}/ImageCompositionGroupProvider.swift (100%) rename Sources/{Cabbage => SCCabbage}/ImageGeneratorExtension.swift (100%) rename Sources/{Cabbage => SCCabbage}/ImageOverlayItem.swift (100%) rename Sources/{Cabbage => SCCabbage}/ImageResource.swift (100%) rename Sources/{Cabbage => SCCabbage}/KeyframeVideoConfiguration.swift (100%) rename Sources/{Cabbage => SCCabbage}/Log.swift (100%) rename Sources/{Cabbage => SCCabbage}/PHAssetImageResource.swift (100%) rename Sources/{Cabbage => SCCabbage}/PHAssetLivePhotoResource.swift (100%) rename Sources/{Cabbage => SCCabbage}/PHAssetTrackResource.swift (100%) rename Sources/{Cabbage => SCCabbage}/Resource.swift (100%) rename Sources/{Cabbage => SCCabbage}/TimeRangeExtension.swift (100%) rename Sources/{Cabbage => SCCabbage}/Timeline.swift (100%) rename Sources/{Cabbage => SCCabbage}/TimingFunctionFactory.swift (100%) rename Sources/{Cabbage => SCCabbage}/TrackConfiguration.swift (100%) rename Sources/{Cabbage => SCCabbage}/TrackItem.swift (100%) rename Sources/{Cabbage => SCCabbage}/VideoCompositionInstruction.swift (100%) rename Sources/{Cabbage => SCCabbage}/VideoCompositor.swift (100%) rename Sources/{Cabbage => SCCabbage}/VideoTransition.swift (100%) diff --git a/Package.swift b/Package.swift index 588a55e..a351f51 100644 --- a/Package.swift +++ b/Package.swift @@ -9,7 +9,7 @@ let package = Package( // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "SCCabbage", - targets: ["Cabbage"]), + targets: ["SCCabbage"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -19,7 +19,7 @@ let package = Package( // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( - name: "Cabbage", + name: "SCCabbage", dependencies: [] ) ] diff --git a/Sources/Cabbage/AVAssetReaderImageResource.swift b/Sources/SCCabbage/AVAssetReaderImageResource.swift similarity index 100% rename from Sources/Cabbage/AVAssetReaderImageResource.swift rename to Sources/SCCabbage/AVAssetReaderImageResource.swift diff --git a/Sources/Cabbage/AVAssetReverseImageResource.swift b/Sources/SCCabbage/AVAssetReverseImageResource.swift similarity index 100% rename from Sources/Cabbage/AVAssetReverseImageResource.swift rename to Sources/SCCabbage/AVAssetReverseImageResource.swift diff --git a/Sources/Cabbage/AVAssetTrackResource.swift b/Sources/SCCabbage/AVAssetTrackResource.swift similarity index 100% rename from Sources/Cabbage/AVAssetTrackResource.swift rename to Sources/SCCabbage/AVAssetTrackResource.swift diff --git a/Sources/Cabbage/AudioMixer.swift b/Sources/SCCabbage/AudioMixer.swift similarity index 100% rename from Sources/Cabbage/AudioMixer.swift rename to Sources/SCCabbage/AudioMixer.swift diff --git a/Sources/Cabbage/AudioProcessingChain.swift b/Sources/SCCabbage/AudioProcessingChain.swift similarity index 100% rename from Sources/Cabbage/AudioProcessingChain.swift rename to Sources/SCCabbage/AudioProcessingChain.swift diff --git a/Sources/Cabbage/AudioProcessingTapHolder.swift b/Sources/SCCabbage/AudioProcessingTapHolder.swift similarity index 100% rename from Sources/Cabbage/AudioProcessingTapHolder.swift rename to Sources/SCCabbage/AudioProcessingTapHolder.swift diff --git a/Sources/Cabbage/AudioTransition.swift b/Sources/SCCabbage/AudioTransition.swift similarity index 100% rename from Sources/Cabbage/AudioTransition.swift rename to Sources/SCCabbage/AudioTransition.swift diff --git a/Sources/Cabbage/CGMathFunctions.swift b/Sources/SCCabbage/CGMathFunctions.swift similarity index 100% rename from Sources/Cabbage/CGMathFunctions.swift rename to Sources/SCCabbage/CGMathFunctions.swift diff --git a/Sources/Cabbage/CMTimeExtensition.swift b/Sources/SCCabbage/CMTimeExtensition.swift similarity index 100% rename from Sources/Cabbage/CMTimeExtensition.swift rename to Sources/SCCabbage/CMTimeExtensition.swift diff --git a/Sources/Cabbage/CompositionGenerator.swift b/Sources/SCCabbage/CompositionGenerator.swift similarity index 100% rename from Sources/Cabbage/CompositionGenerator.swift rename to Sources/SCCabbage/CompositionGenerator.swift diff --git a/Sources/Cabbage/CompositionProvider.swift b/Sources/SCCabbage/CompositionProvider.swift similarity index 100% rename from Sources/Cabbage/CompositionProvider.swift rename to Sources/SCCabbage/CompositionProvider.swift diff --git a/Sources/Cabbage/CoreImageExtension.swift b/Sources/SCCabbage/CoreImageExtension.swift similarity index 100% rename from Sources/Cabbage/CoreImageExtension.swift rename to Sources/SCCabbage/CoreImageExtension.swift diff --git a/Sources/Cabbage/ImageCompositionGroupProvider.swift b/Sources/SCCabbage/ImageCompositionGroupProvider.swift similarity index 100% rename from Sources/Cabbage/ImageCompositionGroupProvider.swift rename to Sources/SCCabbage/ImageCompositionGroupProvider.swift diff --git a/Sources/Cabbage/ImageGeneratorExtension.swift b/Sources/SCCabbage/ImageGeneratorExtension.swift similarity index 100% rename from Sources/Cabbage/ImageGeneratorExtension.swift rename to Sources/SCCabbage/ImageGeneratorExtension.swift diff --git a/Sources/Cabbage/ImageOverlayItem.swift b/Sources/SCCabbage/ImageOverlayItem.swift similarity index 100% rename from Sources/Cabbage/ImageOverlayItem.swift rename to Sources/SCCabbage/ImageOverlayItem.swift diff --git a/Sources/Cabbage/ImageResource.swift b/Sources/SCCabbage/ImageResource.swift similarity index 100% rename from Sources/Cabbage/ImageResource.swift rename to Sources/SCCabbage/ImageResource.swift diff --git a/Sources/Cabbage/KeyframeVideoConfiguration.swift b/Sources/SCCabbage/KeyframeVideoConfiguration.swift similarity index 100% rename from Sources/Cabbage/KeyframeVideoConfiguration.swift rename to Sources/SCCabbage/KeyframeVideoConfiguration.swift diff --git a/Sources/Cabbage/Log.swift b/Sources/SCCabbage/Log.swift similarity index 100% rename from Sources/Cabbage/Log.swift rename to Sources/SCCabbage/Log.swift diff --git a/Sources/Cabbage/PHAssetImageResource.swift b/Sources/SCCabbage/PHAssetImageResource.swift similarity index 100% rename from Sources/Cabbage/PHAssetImageResource.swift rename to Sources/SCCabbage/PHAssetImageResource.swift diff --git a/Sources/Cabbage/PHAssetLivePhotoResource.swift b/Sources/SCCabbage/PHAssetLivePhotoResource.swift similarity index 100% rename from Sources/Cabbage/PHAssetLivePhotoResource.swift rename to Sources/SCCabbage/PHAssetLivePhotoResource.swift diff --git a/Sources/Cabbage/PHAssetTrackResource.swift b/Sources/SCCabbage/PHAssetTrackResource.swift similarity index 100% rename from Sources/Cabbage/PHAssetTrackResource.swift rename to Sources/SCCabbage/PHAssetTrackResource.swift diff --git a/Sources/Cabbage/Resource.swift b/Sources/SCCabbage/Resource.swift similarity index 100% rename from Sources/Cabbage/Resource.swift rename to Sources/SCCabbage/Resource.swift diff --git a/Sources/Cabbage/TimeRangeExtension.swift b/Sources/SCCabbage/TimeRangeExtension.swift similarity index 100% rename from Sources/Cabbage/TimeRangeExtension.swift rename to Sources/SCCabbage/TimeRangeExtension.swift diff --git a/Sources/Cabbage/Timeline.swift b/Sources/SCCabbage/Timeline.swift similarity index 100% rename from Sources/Cabbage/Timeline.swift rename to Sources/SCCabbage/Timeline.swift diff --git a/Sources/Cabbage/TimingFunctionFactory.swift b/Sources/SCCabbage/TimingFunctionFactory.swift similarity index 100% rename from Sources/Cabbage/TimingFunctionFactory.swift rename to Sources/SCCabbage/TimingFunctionFactory.swift diff --git a/Sources/Cabbage/TrackConfiguration.swift b/Sources/SCCabbage/TrackConfiguration.swift similarity index 100% rename from Sources/Cabbage/TrackConfiguration.swift rename to Sources/SCCabbage/TrackConfiguration.swift diff --git a/Sources/Cabbage/TrackItem.swift b/Sources/SCCabbage/TrackItem.swift similarity index 100% rename from Sources/Cabbage/TrackItem.swift rename to Sources/SCCabbage/TrackItem.swift diff --git a/Sources/Cabbage/VideoCompositionInstruction.swift b/Sources/SCCabbage/VideoCompositionInstruction.swift similarity index 100% rename from Sources/Cabbage/VideoCompositionInstruction.swift rename to Sources/SCCabbage/VideoCompositionInstruction.swift diff --git a/Sources/Cabbage/VideoCompositor.swift b/Sources/SCCabbage/VideoCompositor.swift similarity index 100% rename from Sources/Cabbage/VideoCompositor.swift rename to Sources/SCCabbage/VideoCompositor.swift diff --git a/Sources/Cabbage/VideoTransition.swift b/Sources/SCCabbage/VideoTransition.swift similarity index 100% rename from Sources/Cabbage/VideoTransition.swift rename to Sources/SCCabbage/VideoTransition.swift From a043e0cd7239cb8c28039c043e9a1626d81f3f1d Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Thu, 9 Nov 2023 13:34:23 +0200 Subject: [PATCH 10/14] add param animationTool in buildVideoComposition method --- Cabbage/Sources/Core/CompositionGenerator.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cabbage/Sources/Core/CompositionGenerator.swift b/Cabbage/Sources/Core/CompositionGenerator.swift index c5dd944..aee9246 100644 --- a/Cabbage/Sources/Core/CompositionGenerator.swift +++ b/Cabbage/Sources/Core/CompositionGenerator.swift @@ -47,7 +47,7 @@ public class CompositionGenerator { return imageGenerator } - public func buildExportSession(presetName: String) -> AVAssetExportSession? { + public func buildExportSession(presetName: String, animationTool: AVVideoCompositionCoreAnimationTool? = nil) -> AVAssetExportSession? { let composition = buildComposition() let exportSession = AVAssetExportSession.init(asset: composition, presetName: presetName) exportSession?.videoComposition = buildVideoComposition() @@ -192,7 +192,7 @@ public class CompositionGenerator { return composition } - public func buildVideoComposition() -> AVVideoComposition? { + public func buildVideoComposition(animationTool: AVVideoCompositionCoreAnimationTool? = nil) -> AVVideoComposition? { if let videoComposition = self.videoComposition, !needRebuildVideoComposition { return videoComposition } @@ -242,6 +242,7 @@ public class CompositionGenerator { videoComposition.renderSize = self.timeline.renderSize videoComposition.instructions = instructions videoComposition.customVideoCompositorClass = VideoCompositor.self + videoComposition.animationTool = animationTool self.videoComposition = videoComposition self.needRebuildVideoComposition = false return videoComposition From 9aba16dddab97cefbfb647f27e26938d9474d2ed Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Thu, 9 Nov 2023 14:17:43 +0200 Subject: [PATCH 11/14] small fix --- Cabbage/Sources/Core/CompositionGenerator.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cabbage/Sources/Core/CompositionGenerator.swift b/Cabbage/Sources/Core/CompositionGenerator.swift index aee9246..439cb21 100644 --- a/Cabbage/Sources/Core/CompositionGenerator.swift +++ b/Cabbage/Sources/Core/CompositionGenerator.swift @@ -50,7 +50,7 @@ public class CompositionGenerator { public func buildExportSession(presetName: String, animationTool: AVVideoCompositionCoreAnimationTool? = nil) -> AVAssetExportSession? { let composition = buildComposition() let exportSession = AVAssetExportSession.init(asset: composition, presetName: presetName) - exportSession?.videoComposition = buildVideoComposition() + exportSession?.videoComposition = buildVideoComposition(animationTool: animationTool) exportSession?.audioMix = buildAudioMix() exportSession?.outputURL = { let documentDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).last! From 67cca261815cf95934ce7c66f8ba8993f0ab6d6b Mon Sep 17 00:00:00 2001 From: Sergey Zaycev Date: Sun, 28 Jan 2024 16:50:40 +0200 Subject: [PATCH 12/14] fix --- Cabbage/Sources/Track/Resource/Resource.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Cabbage/Sources/Track/Resource/Resource.swift b/Cabbage/Sources/Track/Resource/Resource.swift index 326c25f..c4f29c5 100644 --- a/Cabbage/Sources/Track/Resource/Resource.swift +++ b/Cabbage/Sources/Track/Resource/Resource.swift @@ -13,6 +13,12 @@ public struct ResourceTrackInfo { public var track: AVAssetTrack public var selectedTimeRange: CMTimeRange public var scaleToDuration: CMTime + + public init(track: AVAssetTrack, selectedTimeRange: CMTimeRange, scaleToDuration: CMTime) { + self.track = track + self.selectedTimeRange = selectedTimeRange + self.scaleToDuration = scaleToDuration + } } @@ -99,7 +105,7 @@ open class Resource: NSObject, NSCopying, ResourceTrackInfoProvider { // MARK: - ResourceTrackInfoProvider - public func trackInfo(for type: AVMediaType, at index: Int) -> ResourceTrackInfo { + open func trackInfo(for type: AVMediaType, at index: Int) -> ResourceTrackInfo { let track = tracks(for: type)[index] let emptyDuration = CMTime(value: 1, 30) let emptyTimeRange = CMTimeRangeMake(start: CMTime.zero, duration: emptyDuration) From 5a96b7c3ad17af74b8f1b1b9858ce4c84ed731a4 Mon Sep 17 00:00:00 2001 From: Roy Hermann Date: Mon, 1 Sep 2025 09:48:53 +0700 Subject: [PATCH 13/14] Update AudioProcessingTapHolder.swift --- Cabbage/Sources/Core/Audio/AudioProcessingTapHolder.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cabbage/Sources/Core/Audio/AudioProcessingTapHolder.swift b/Cabbage/Sources/Core/Audio/AudioProcessingTapHolder.swift index ceec1d0..551506d 100644 --- a/Cabbage/Sources/Core/Audio/AudioProcessingTapHolder.swift +++ b/Cabbage/Sources/Core/Audio/AudioProcessingTapHolder.swift @@ -23,13 +23,13 @@ public class AudioProcessingTapHolder: NSObject, NSCopying { prepare: tapPrepare, unprepare: tapUnprepare, process: tapProcess) - var tap: Unmanaged? + // Use the expected type for the Create function: MTAudioProcessingTap? + var tap: MTAudioProcessingTap? let err = MTAudioProcessingTapCreate(kCFAllocatorDefault, &callbacks, kMTAudioProcessingTapCreationFlag_PostEffects, &tap) if err != noErr { Log.error("error: failed to create audioProcessingTap") } - self.tap = tap?.takeRetainedValue() - + self.tap = tap } // MARK: - Handler From 83a2a937af367f1deeea12122951a0559515b38a Mon Sep 17 00:00:00 2001 From: Roy Hermann Date: Mon, 1 Sep 2025 09:59:02 +0700 Subject: [PATCH 14/14] Update AudioProcessingTapHolder.swift