From fae57be699db5d67e595891b85a8704304353aed Mon Sep 17 00:00:00 2001 From: Pikaurd Date: Fri, 17 Jun 2022 21:54:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=B4=A0=E6=9D=90=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E6=98=AF=E7=99=BD=E8=89=B2=E6=97=B6=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E4=BA=AE=E5=BA=A6=E8=BF=87=E9=AB=98=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9Ahttps://github.com/bytedance/AlphaPlayer/issues/44?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BDAlphaPlayer.podspec | 2 +- .../Render/BDAlphaPlayerMetalRenderer.m | 10 +++++----- .../BDAlphaPlayerDemo/Info.plist | 20 +------------------ iOS/Example/BDAlphaPlayerDemo/Podfile.lock | 6 +++--- 4 files changed, 10 insertions(+), 28 deletions(-) diff --git a/BDAlphaPlayer.podspec b/BDAlphaPlayer.podspec index f4d92b5..1f91961 100644 --- a/BDAlphaPlayer.podspec +++ b/BDAlphaPlayer.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |spec| spec.name = "BDAlphaPlayer" - spec.version = "1.2.2" + spec.version = "1.2.3" spec.summary = "A player for MP4 with alpha channel." spec.homepage = "https://github.com/bytedance/AlphaPlayer/blob/master/README.md" diff --git a/iOS/BDAlphaPlayer/Classes/Render/BDAlphaPlayerMetalRenderer.m b/iOS/BDAlphaPlayer/Classes/Render/BDAlphaPlayerMetalRenderer.m index 1d23e4c..c83d3cb 100644 --- a/iOS/BDAlphaPlayer/Classes/Render/BDAlphaPlayerMetalRenderer.m +++ b/iOS/BDAlphaPlayer/Classes/Render/BDAlphaPlayerMetalRenderer.m @@ -132,11 +132,11 @@ -(void)setupPipeline pipelineStateDescriptor.colorAttachments[0].pixelFormat = self.mtkView.colorPixelFormat; pipelineStateDescriptor.colorAttachments[0].blendingEnabled = true; pipelineStateDescriptor.colorAttachments[0].rgbBlendOperation = MTLBlendOperationAdd; - pipelineStateDescriptor.colorAttachments[0].sourceRGBBlendFactor = MTLBlendFactorOne; - pipelineStateDescriptor.colorAttachments[0].destinationRGBBlendFactor = MTLBlendFactorOne; - pipelineStateDescriptor.colorAttachments[0].alphaBlendOperation = MTLBlendOperationMin; - pipelineStateDescriptor.colorAttachments[0].sourceAlphaBlendFactor = MTLBlendFactorOne; - pipelineStateDescriptor.colorAttachments[0].destinationAlphaBlendFactor = MTLBlendFactorOne; + pipelineStateDescriptor.colorAttachments[0].alphaBlendOperation = MTLBlendOperationAdd; + pipelineStateDescriptor.colorAttachments[0].sourceRGBBlendFactor = MTLBlendFactorSourceAlpha; + pipelineStateDescriptor.colorAttachments[0].sourceAlphaBlendFactor = MTLBlendFactorSourceAlpha; + pipelineStateDescriptor.colorAttachments[0].destinationRGBBlendFactor = MTLBlendFactorOneMinusBlendAlpha; + pipelineStateDescriptor.colorAttachments[0].destinationAlphaBlendFactor = MTLBlendFactorZero; self.pipelineState = [self.mtkView.device newRenderPipelineStateWithDescriptor:pipelineStateDescriptor error:NULL]; self.commandQueue = [self.mtkView.device newCommandQueue]; } diff --git a/iOS/Example/BDAlphaPlayerDemo/BDAlphaPlayerDemo/Info.plist b/iOS/Example/BDAlphaPlayerDemo/BDAlphaPlayerDemo/Info.plist index 72bf2c4..26a602c 100644 --- a/iOS/Example/BDAlphaPlayerDemo/BDAlphaPlayerDemo/Info.plist +++ b/iOS/Example/BDAlphaPlayerDemo/BDAlphaPlayerDemo/Info.plist @@ -20,25 +20,7 @@ 1 LSRequiresIPhoneOS - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - SceneDelegate - UISceneStoryboardFile - Main - - - - + UIApplicationSupportsIndirectInputEvents UILaunchStoryboardName diff --git a/iOS/Example/BDAlphaPlayerDemo/Podfile.lock b/iOS/Example/BDAlphaPlayerDemo/Podfile.lock index af61b61..2e68b6b 100644 --- a/iOS/Example/BDAlphaPlayerDemo/Podfile.lock +++ b/iOS/Example/BDAlphaPlayerDemo/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - BDAlphaPlayer (1.1.0) + - BDAlphaPlayer (1.2.3) DEPENDENCIES: - BDAlphaPlayer (from `../../../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../../../" SPEC CHECKSUMS: - BDAlphaPlayer: 6ec0535dbbac6b089e94acb5559dcdf77dd1d5a8 + BDAlphaPlayer: 750f1a2192f171ea8e710d969f993961d875c79d PODFILE CHECKSUM: a2a7c83a00e25dc193359c91e412457a63e7fbad -COCOAPODS: 1.8.4 +COCOAPODS: 1.11.3