Jelajahi Sumber

fix warning

huzhiqiang 3 tahun lalu
induk
melakukan
ef2ac7817b

+ 1 - 1
BFFramework/Classes/Base/ViewModel/PQBaseViewModel.swift

@@ -395,7 +395,7 @@ public class PQBaseViewModel: NSObject {
             if response != nil, !(response is NSNull) {
  
                 let responseDic = response as! [String: Any]
-                BFLog(message: "推荐的标题为\(responseDic["rhythmVideoTitles"])")
+                BFLog(message: "推荐的标题为\(String(describing: responseDic["rhythmVideoTitles"]))")
                 completeHander(responseDic["rhythmVideoTitles"] as? Array<String>)
             } else {
                 completeHander(nil)

+ 1 - 1
BFFramework/Classes/PModels/editDarftModels/PQEditBaseModel.swift

@@ -23,7 +23,7 @@ public let timeTransform = TransformOf<Float64, Float64>(fromJSON: { (value: Flo
 
 // 自定义音量转换协议,服务器单位0.0-1.0,我们使用 0-100
 public let volumeGainTransform = TransformOf<Float64, Float64>(fromJSON: { (value: Float64?) -> Float64? in
-    BFLog(message: "value is \(value)")
+    BFLog(message: "value is \(String(describing: value))")
     return (value ?? 0.0) * 100.0
 }, toJSON: { (value: Float64?) -> Float64? in
     if let value = value {

+ 1 - 1
BFFramework/Classes/PQGPUImage/akfilters/PQGPUImageFilterGroup.swift

@@ -47,7 +47,7 @@ open class PQGPUImageFilterGroup: PQBaseFilter{
     override public func newFramebufferAvailable(_ framebuffer: Framebuffer, fromSourceIndex: UInt) {
         super.newFramebufferAvailable(framebuffer, fromSourceIndex: fromSourceIndex)
 
-        let currTime = CMTimeGetSeconds(CMTime(value: framebuffer.timingStyle.timestamp!.value, timescale: framebuffer.timingStyle.timestamp!.timescale))
+//        let currTime = CMTimeGetSeconds(CMTime(value: framebuffer.timingStyle.timestamp!.value, timescale: framebuffer.timingStyle.timestamp!.timescale))
         
 //        var showFilter = findShowStikcer(currTime: currTime)
 //        if(showFilter){

+ 3 - 3
BFFramework/Classes/PQGPUImage/akfilters/PQGPUImageTools.swift

@@ -55,7 +55,7 @@ open class PQGPUImageTools: NSObject {
         let heightOfImage = GLint(image.height)
 
         let smoothlyScaleOutput: Bool = true
-        let orientation: ImageOrientation = .portrait
+//        let orientation: ImageOrientation = .portrait
         var textureID: GLuint = 0
         autoreleasepool {
             // If passed an empty image reference, CGContextDrawImage will fail in future versions of the SDK.
@@ -319,8 +319,8 @@ open class PQGPUImageTools: NSObject {
                     oldTextureCoordinates[2], oldTextureCoordinates[3], // 2
                     oldTextureCoordinates[4], oldTextureCoordinates[5], // 3
                     oldTextureCoordinates[0], oldTextureCoordinates[1]] // 1
-        default:
-            return oldTextureCoordinates
+//        default:
+//            return oldTextureCoordinates
         }
     }
 

+ 1 - 1
BFFramework/Classes/PQGPUImage/akfilters/PQMovieInput.swift

@@ -517,7 +517,7 @@ public class PQMovieInput: ImageSource {
         autoreleasepool {
             guard let sampleBuffer = audioTrackOutput.copyNextSampleBuffer(),CMSampleBufferIsValid(sampleBuffer) else {
                 if(assetReader.status == .completed){
-                    FilterLog(message: "提前结束的了!!!!\(assetReader.error)")
+                    FilterLog(message: "提前结束的了!!!!\(String(describing: assetReader.error))")
                 }
                 if let movieOutput = synchronizedMovieOutput {
                     FilterLog(message: "this is runing assetWriterAudioInput  markAsFinished \(String(describing: assetReader.error)) \(assetReader)")

+ 1 - 1
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -1139,7 +1139,7 @@ extension PQStuckPointEditerController {
             if section.sectionType == "normal" {
                 // 第一种情况:全是图片,三种模式都进行图片回环播放
                 if section.sectionTimeline!.visionTrack!.getEnableVisionTrackMaterials(type: "video").count == 0, section.sectionTimeline!.visionTrack!.getEnableVisionTrackMaterials(type: "image").count > 0 {
-                    for (index, point) in finallyStuckPoints.enumerated() {
+                    for (index, _) in finallyStuckPoints.enumerated() {
                         let sticker: PQEditVisionTrackMaterialsModel = section.sectionTimeline!.visionTrack!.getEnableVisionTrackMaterials()[index % section.sectionTimeline!.visionTrack!.getEnableVisionTrackMaterials().count]
                         BFLog(message: "stickerlocationPath sticker : \(sticker.locationPath)")
 //

+ 1 - 2
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointPublicController.swift

@@ -1446,14 +1446,13 @@ extension PQStuckPointPublicController {
             let endpoint: String = "\(response?["endPoint"] ?? "")"
             let bucketName: String = "\(response?["bucketName"] ?? "")"
             let objectKey: String = "\(response?["objectKey"] ?? "")"
-            PQAliOssUtil.shared
+            _ = PQAliOssUtil.shared
                 .startClient(
                     accessKeyId: accessKeyId,
                     secretKeyId: secretKeyId,
                     securityToken: securityToken,
                     endpoint: endpoint
                 )
-
                 .uploadObjectAsync(bucketName: bucketName, objectKey: objectKey, data: data!, fileExtensions: "png", imageUploadBlock: { _, code, ossObjectKey, _ in
                     if code == 1 && ossObjectKey == objectKey && ossObjectKey.count > 0 {
                         // add by ak 这里会在服务器生成分享使用的图片到1-2S 时间

+ 1 - 5
BFFramework/Classes/Stuckpoint/View/PQSelecteMusicView.swift

@@ -17,11 +17,7 @@ class PQSelecteMusicView: UIView {
     var pageNum: Int = 0
     
     // 当前视频使用的音乐数据
-    var currentPlayingInVideoData : PQVoiceModel?{
-        willSet{
-            BFLog(1, message: "name:\(currentPlayingInVideoData?.musicName)")
-        }
-    }
+    var currentPlayingInVideoData : PQVoiceModel?
     // 当前试听播放的音乐数据
     var currentPlayData: PQVoiceModel?
     // 当前播放的音频

+ 5 - 7
BFFramework/Classes/Stuckpoint/ViewModel/PQGPUImagePlayerView.swift

@@ -549,7 +549,7 @@ public class PQGPUImagePlayerView: UIView {
     /// 按时间从缓存中取出要显示的filter
     /// - Parameter currTime: 当前播放时间
     func changeFilter(currTime: Float64) {
-        let  starts:CFTimeInterval = CFAbsoluteTimeGetCurrent()
+//        let  starts:CFTimeInterval = CFAbsoluteTimeGetCurrent()
         BFLog(message: " 要查找的 currTime is \(currTime)")
         //1,删除已经显示过的 filter
         self.cacheFilters.removeAll(where: {(filter) -> Bool in
@@ -564,17 +564,15 @@ public class PQGPUImagePlayerView: UIView {
 
         })
   
-        if(showIndex == nil){
-          
+        guard let showIndex = showIndex else {
             FilterLog(message: "缓存没有查找到?出现数据错误!!!!")
-            for (index,bsFilter )in cacheFilters.enumerated() {
+//            for (index,bsFilter )in cacheFilters.enumerated() {
 //                BFLog(1, message: "22222缓存操作   没要查找到要查找的显示是为:\(currTime) 缓存数据timeline in :\(bsFilter.stickerInfo?.timelineIn ?? 0.0)) timelineOut:\(bsFilter.stickerInfo?.timelineOut ?? 0.0) 缓存数 \(cacheFilters.count) index: \(index)")
-            }
-            
+//            }
             return
         }
     
-        let showFilter: PQBaseFilter = cacheFilters[showIndex ?? 0]
+        let showFilter: PQBaseFilter = cacheFilters[showIndex]
         
         FilterLog(message: "缓存操作   查找到命中的显示是为:\(currTime) 缓存数据timeline in :\(showFilter.stickerInfo?.timelineIn ?? 0.0)) timelineOut:\(showFilter.stickerInfo?.timelineOut ?? 0.0) in:\(showFilter.stickerInfo?.model_in ?? 0.0) out:\(showFilter.stickerInfo?.out ?? 0.0) 缓存数 \(cacheFilters.count) index: \(String(describing: showIndex))")
         

+ 1 - 8
BFFramework/Classes/Utils/PQCommonMethodUtil.swift

@@ -136,14 +136,7 @@ public func kf_imageCacheImage(originUrl: String, completeHandle: @escaping (_ i
 public func BFLog<T>( _ type : Int = 9, _ file:String = #file, _ line:Int = #line, message: T) {
 #if DEBUG
     if type == 0 {
-        let logger = NXLogger.shared
-        
-        logger.level = .info
-        logger.ouput = .deviceConsoleAndFile
-        
-        logger.d(message as? String ?? "")
-        
-        BuglyLog.level(.warn, logs: message as? String)
+        print(message)
     }else if type == 3 {
         let file = (file as NSString).lastPathComponent;
         let dateFmt = DateFormatter()