diff --git a/.DS_Store b/.DS_Store index 40b6b88..32e5ee5 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/OrderScheduling.xcodeproj/project.pbxproj b/OrderScheduling.xcodeproj/project.pbxproj index 8282bc1..c9ee13e 100644 --- a/OrderScheduling.xcodeproj/project.pbxproj +++ b/OrderScheduling.xcodeproj/project.pbxproj @@ -43,6 +43,7 @@ 794FBB1F2A92F7C300D57BB8 /* WebViewTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794FBB1E2A92F7C300D57BB8 /* WebViewTool.swift */; }; 794FBB212A934E0A00D57BB8 /* AppUpdateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794FBB202A934E0A00D57BB8 /* AppUpdateView.swift */; }; 794FBB232A93519800D57BB8 /* AppUpdateTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794FBB222A93519800D57BB8 /* AppUpdateTool.swift */; }; + 795FF3E02AA991E70058454C /* appointmentOrder.wav in Resources */ = {isa = PBXBuildFile; fileRef = 795FF3DF2AA991E70058454C /* appointmentOrder.wav */; }; 79CB07CC2AA8465A00154B61 /* UserPermission.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79CB07CB2AA8465A00154B61 /* UserPermission.swift */; }; 79CECC122A89BD1A00B95D8B /* MessageCenterController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79CECC112A89BD1A00B95D8B /* MessageCenterController.swift */; }; 79CECC192A89EE6A00B95D8B /* ReviewFailedController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79CECC182A89EE6A00B95D8B /* ReviewFailedController.swift */; }; @@ -142,6 +143,7 @@ 794FBB1E2A92F7C300D57BB8 /* WebViewTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewTool.swift; sourceTree = ""; }; 794FBB202A934E0A00D57BB8 /* AppUpdateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppUpdateView.swift; sourceTree = ""; }; 794FBB222A93519800D57BB8 /* AppUpdateTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppUpdateTool.swift; sourceTree = ""; }; + 795FF3DF2AA991E70058454C /* appointmentOrder.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = appointmentOrder.wav; sourceTree = ""; }; 79CB07CB2AA8465A00154B61 /* UserPermission.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserPermission.swift; sourceTree = ""; }; 79CECC112A89BD1A00B95D8B /* MessageCenterController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageCenterController.swift; sourceTree = ""; }; 79CECC182A89EE6A00B95D8B /* ReviewFailedController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewFailedController.swift; sourceTree = ""; }; @@ -637,6 +639,7 @@ 79DD0DAB2A94A0EE00768FE7 /* Source */ = { isa = PBXGroup; children = ( + 795FF3DF2AA991E70058454C /* appointmentOrder.wav */, 79FB760E2A9C6CAF00DB00A4 /* newJuheOrderAudio.wav */, 79FB76122A9C6CC100DB00A4 /* newOrderAudio.wav */, ); @@ -863,6 +866,7 @@ files = ( 79FB76102A9C6CAF00DB00A4 /* newJuheOrderAudio.wav in Resources */, 79EAD8172A7B86610036E093 /* LaunchScreen.storyboard in Resources */, + 795FF3E02AA991E70058454C /* appointmentOrder.wav in Resources */, 79EAD8142A7B86610036E093 /* Assets.xcassets in Resources */, 79FB76132A9C6CC100DB00A4 /* newOrderAudio.wav in Resources */, ); diff --git a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate index a9dfdfd..f53a300 100644 Binary files a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate and b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index c347b7f..c180bf1 100644 --- a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -253,8 +253,8 @@ filePath = "OrderScheduling/Main/Initial.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "155" - endingLineNumber = "155" + startingLineNumber = "146" + endingLineNumber = "146" landmarkName = "networkErrorHandler(response:)" landmarkType = "7"> @@ -269,8 +269,8 @@ filePath = "OrderScheduling/Main/Initial.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "156" - endingLineNumber = "156" + startingLineNumber = "147" + endingLineNumber = "147" landmarkName = "Initial" landmarkType = "21"> @@ -333,8 +333,8 @@ filePath = "OrderScheduling/Rescue/ViewController/DispatchOrderController.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "315" - endingLineNumber = "315" + startingLineNumber = "359" + endingLineNumber = "359" landmarkName = "dd_mapView(_:didAnnotationViewTapped:)" landmarkType = "7"> @@ -1252,8 +1252,8 @@ filePath = "OrderScheduling/Main/AppDelegate.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "149" - endingLineNumber = "149" + startingLineNumber = "152" + endingLineNumber = "152" landmarkName = "jpushNotificationAuthorization(_:withInfo:)" landmarkType = "7"> @@ -1428,8 +1428,8 @@ filePath = "OrderScheduling/Main/Initial.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "138" - endingLineNumber = "138" + startingLineNumber = "130" + endingLineNumber = "130" landmarkName = "changeRootViewController(window:)" landmarkType = "7"> @@ -2044,8 +2044,8 @@ filePath = "OrderScheduling/Main/Initial.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "129" - endingLineNumber = "129" + startingLineNumber = "121" + endingLineNumber = "121" landmarkName = "changeRootViewController(window:)" landmarkType = "7"> @@ -2172,8 +2172,8 @@ filePath = "OrderScheduling/Main/Initial.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "147" - endingLineNumber = "147" + startingLineNumber = "138" + endingLineNumber = "138" landmarkName = "Initial" landmarkType = "3"> @@ -3283,8 +3283,8 @@ filePath = "OrderScheduling/Main/AppDelegate.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "148" - endingLineNumber = "148" + startingLineNumber = "151" + endingLineNumber = "151" landmarkName = "jpushNotificationAuthorization(_:withInfo:)" landmarkType = "7"> @@ -3907,8 +3907,8 @@ filePath = "OrderSchedulingNotificationService/NotificationService.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "65" - endingLineNumber = "65" + startingLineNumber = "68" + endingLineNumber = "68" landmarkName = "didReceive(_:withContentHandler:)" landmarkType = "7"> @@ -4019,8 +4019,8 @@ filePath = "OrderScheduling/Main/Initial.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "73" - endingLineNumber = "73" + startingLineNumber = "65" + endingLineNumber = "65" landmarkName = "initCall()" landmarkType = "7"> @@ -4137,5 +4137,53 @@ landmarkType = "7"> + + + + + + + + + + + + diff --git a/OrderScheduling/.DS_Store b/OrderScheduling/.DS_Store index 5e92475..bab66bb 100644 Binary files a/OrderScheduling/.DS_Store and b/OrderScheduling/.DS_Store differ diff --git a/OrderScheduling/Common/WebView/WebViewController.swift b/OrderScheduling/Common/WebView/WebViewController.swift index fb31840..3583d78 100644 --- a/OrderScheduling/Common/WebView/WebViewController.swift +++ b/OrderScheduling/Common/WebView/WebViewController.swift @@ -46,7 +46,7 @@ class WebViewController : ZDViewController { webView.uiDelegate = self view.addSubview(webView) - let request = URLRequest(url: URL(string: url!)!) + let request = URLRequest(url: URL(string: url!)!,cachePolicy: .reloadIgnoringLocalAndRemoteCacheData) webView.load(request) if showNavBar == false { diff --git a/OrderScheduling/Global/GroupData/GroupData.swift b/OrderScheduling/Global/GroupData/GroupData.swift index 521f991..613a9c5 100644 --- a/OrderScheduling/Global/GroupData/GroupData.swift +++ b/OrderScheduling/Global/GroupData/GroupData.swift @@ -44,6 +44,19 @@ open class GroupData { return false } + // 判断新推送是不是预约订单 + func isAppointmentPushNotification(userInfo:[AnyHashable:Any]?) -> Bool { + if let userInfo { + if let dict = parserAlertToDictionary(userInfo: userInfo), dict[pushNoti_title_key] == pushNoti_appointmentOrder_key { + return true + } + if let string = parserAlertToString(userInfo: userInfo), string.contains(pushNoti_appointmentOrder_key) == true { + return true + } + } + return false + } + // 解析需要播放的文字 func parserBroadcastToString(userInfo:[AnyHashable:Any]?) -> String? { if let broadcastKeywords = (userInfo?[pushNoti_broadcastKeywords_key] as? String),broadcastKeywords.isEmpty == false { @@ -86,17 +99,17 @@ open class GroupData { groudUserDefault?.set(newMessageSound, forKey: newMessageSound_key) } - // 不需要记录 - public var newMessageAlert : Bool { - return (groudUserDefault?.object(forKey: newMessageAlert_key) as? Bool) ?? true - } - - func setNewMessageAlert(newMessageAlert:Bool?) { - groudUserDefault?.set(newMessageAlert, forKey: newMessageAlert_key) - } +// // 不需要记录 +// public var newMessageAlert : Bool { +// return (groudUserDefault?.object(forKey: newMessageAlert_key) as? Bool) ?? true +// } +// +// func setNewMessageAlert(newMessageAlert:Bool?) { +// groudUserDefault?.set(newMessageAlert, forKey: newMessageAlert_key) +// } func clear() { - GROUP.setNewMessageAlert(newMessageAlert: nil) +// GROUP.setNewMessageAlert(newMessageAlert: nil) GROUP.setNewMessageSound(newMessageSound: nil) GROUP.setBestAttemptContentUserInfo(bestAttemptContentUserInfo: nil) } diff --git a/OrderScheduling/Global/Tool/Tool.swift b/OrderScheduling/Global/Tool/Tool.swift index 66150c7..0f70f9c 100644 --- a/OrderScheduling/Global/Tool/Tool.swift +++ b/OrderScheduling/Global/Tool/Tool.swift @@ -167,9 +167,9 @@ open class Tool { } func playAlertWith(userInfo:[AnyHashable:Any]?) { - if GROUP.newMessageAlert != true { - return - } +// if GROUP.newMessageAlert != true { +// return +// } if GROUP.isOrderPushNotification(userInfo: userInfo) == true { ACCEPTORDERTOOL.open(userInfo: userInfo) }else{ diff --git a/OrderScheduling/Main/AppDelegate.swift b/OrderScheduling/Main/AppDelegate.swift index b80c06d..7e28feb 100644 --- a/OrderScheduling/Main/AppDelegate.swift +++ b/OrderScheduling/Main/AppDelegate.swift @@ -141,9 +141,12 @@ extension AppDelegate : JPUSHRegisterDelegate { func jpushNotificationAuthorization(_ status: JPAuthorizationStatus, withInfo info: [AnyHashable : Any]?) { DDLog(message:"通知授权状态\(status)") - USER.regId = JPUSHService.registrationID() - DDLog(message:"registrationID:\(JPUSHService.registrationID())") + JPUSHService.registrationIDCompletionHandler { errorCode, registrationID in + USER.regId = registrationID + DDLog(message:"registrationID:\(JPUSHService.registrationID())") + } + if status != .statusAuthorized { NOTIAUTHTOOL.requestNotiAuthRelay.accept(nil) }else{ diff --git a/OrderScheduling/Main/Initial.swift b/OrderScheduling/Main/Initial.swift index 2ca4da1..a4158de 100644 --- a/OrderScheduling/Main/Initial.swift +++ b/OrderScheduling/Main/Initial.swift @@ -14,9 +14,6 @@ import Alamofire import DDToastKit_Private import DDCategoryKit_Private import DDControlsKit_Private -#if DEBUG -import CocoaDebug -#endif import RxSwift class Initial : NSObject { @@ -39,8 +36,9 @@ class Initial : NSObject { // af initAF() - // cocoadebug - initCocoaDebug() + // initCall + initCall() + } func initIQKeyboard(){ @@ -62,12 +60,6 @@ class Initial : NSObject { DDAF.delegate = self } - func initCocoaDebug() { - #if DEBUG - CocoaDebug.hideBubble() - #endif - } - func initCall() { SC.callEvent { (isCallSuccess,callTime,duration) in SC.uploadRelay.accept(nil) @@ -139,7 +131,6 @@ class Initial : NSObject { self?.initRefreshToken() self?.initPermission() self?.initAppUpdate() - self?.initCall() window?.rootViewController = MainTabBarController.init() } diff --git a/OrderScheduling/Mine/ViewController/NotificationSetUpController.swift b/OrderScheduling/Mine/ViewController/NotificationSetUpController.swift index c29cde9..6095952 100644 --- a/OrderScheduling/Mine/ViewController/NotificationSetUpController.swift +++ b/OrderScheduling/Mine/ViewController/NotificationSetUpController.swift @@ -68,7 +68,7 @@ extension NotificationSetUpController : UITableViewDelegate,UITableViewDataSourc if model.type == .sound { GROUP.setNewMessageSound(newMessageSound: isOn) }else if model.type == .alert { - GROUP.setNewMessageAlert(newMessageAlert: isOn) +// GROUP.setNewMessageAlert(newMessageAlert: isOn) } }) .disposed(by: disposeBag) diff --git a/OrderScheduling/Rescue/ViewController/DispatchOrderController.swift b/OrderScheduling/Rescue/ViewController/DispatchOrderController.swift index 2c8dd6f..ae2f058 100644 --- a/OrderScheduling/Rescue/ViewController/DispatchOrderController.swift +++ b/OrderScheduling/Rescue/ViewController/DispatchOrderController.swift @@ -252,6 +252,50 @@ extension DispatchOrderController : UITableViewDelegate,UITableViewDataSource { self?.dispatchOrderRelay.accept(model) }) .disposed(by: cell!.disposeBag) + + if USERP.canDealWith == true { + cell?.dispatchButton.isHidden = false + cell?.stateLabel.snp.updateConstraints({ make in + make.width.equalTo(auto(97)) + }) + + cell?.name.snp.updateConstraints({ make in + make.width.equalTo(auto(40)) + }) + + cell?.phone.snp.updateConstraints({ make in + make.width.equalTo(auto(100)) + }) + + cell?.distance.snp.updateConstraints({ make in + make.width.equalTo(auto(60)) + }) + + cell?.dispatchButton.snp.updateConstraints({ make in + make.width.equalTo(auto(50)) + }) + }else{ + cell?.dispatchButton.isHidden = true + cell?.stateLabel.snp.updateConstraints({ make in + make.width.equalTo(auto(107.5)) + }) + + cell?.name.snp.updateConstraints({ make in + make.width.equalTo(auto(65)) + }) + + cell?.phone.snp.updateConstraints({ make in + make.width.equalTo(auto(112.5)) + }) + + cell?.distance.snp.updateConstraints({ make in + make.width.equalTo(auto(60)) + }) + + cell?.dispatchButton.snp.updateConstraints({ make in + make.width.equalTo(0) + }) + } return cell! } } diff --git a/OrderScheduling/Rescue/ViewController/RescueController.swift b/OrderScheduling/Rescue/ViewController/RescueController.swift index c498b94..1d783f9 100644 --- a/OrderScheduling/Rescue/ViewController/RescueController.swift +++ b/OrderScheduling/Rescue/ViewController/RescueController.swift @@ -753,7 +753,7 @@ extension RescuePendingDispatchController : UITableViewDelegate,UITableViewDataS if USERP.canWaitdispatchBtn == true { cell?.dispatchButton.isHidden = false cell?.dispatchButton.snp.updateConstraints({ make in - make.right.equalTo(auto(10)) + make.right.equalTo(-auto(10)) make.width.equalTo(auto(80)) }) }else{ diff --git a/OrderScheduling/Source/appointmentOrder.wav b/OrderScheduling/Source/appointmentOrder.wav new file mode 100644 index 0000000..269ac56 Binary files /dev/null and b/OrderScheduling/Source/appointmentOrder.wav differ diff --git a/OrderScheduling/Strings/CommonKeyStrings.swift b/OrderScheduling/Strings/CommonKeyStrings.swift index 18d7646..26b61dd 100644 --- a/OrderScheduling/Strings/CommonKeyStrings.swift +++ b/OrderScheduling/Strings/CommonKeyStrings.swift @@ -22,6 +22,8 @@ public let pushNoti_taskCode_key = "taskCode" public let pushNoti_newOrder_key = "新订单" +public let pushNoti_appointmentOrder_key = "预约订单提醒" + public let pushNoti_broadcastKeywords_key = "broadcastKeywords" public let pushNoti_isShowPop_key = "isShowPop" @@ -37,6 +39,7 @@ public let juheNewOrderAudio_key = "juheNewOrderAudio.wav" public let newOrderAudio_key = "newOrderAudio.wav" +public let appointmentOrderAudio_key = "appointmentOrder.wav" // 电话消息的键 public let noti_isCallSuccess_key = "isCallSuccess" diff --git a/OrderSchedulingNotificationService/NotificationService.swift b/OrderSchedulingNotificationService/NotificationService.swift index b79e687..dcf0252 100644 --- a/OrderSchedulingNotificationService/NotificationService.swift +++ b/OrderSchedulingNotificationService/NotificationService.swift @@ -61,7 +61,10 @@ class NotificationService: UNNotificationServiceExtension { } } // 语音播报能力不具备,只播放默认声音 - if let broadcastKeywords = (userInfo[pushNoti_broadcastKeywords_key] as? String),broadcastKeywords.isEmpty == false { + if GROUP.isAppointmentPushNotification(userInfo: userInfo) == true { + bestAttemptContent.sound = UNNotificationSound(named: UNNotificationSoundName(rawValue: appointmentOrderAudio_key)) + contentHandler(bestAttemptContent) + }else if let broadcastKeywords = (userInfo[pushNoti_broadcastKeywords_key] as? String),broadcastKeywords.isEmpty == false { bestAttemptContent.sound = .default contentHandler(bestAttemptContent) }else{ diff --git a/Podfile b/Podfile index 48fc7e3..70e626b 100644 --- a/Podfile +++ b/Podfile @@ -7,7 +7,7 @@ target 'OrderScheduling' do # Comment the next line if you don't want to use dynamic frameworks use_modular_headers! - pod 'CocoaDebug', :configurations => ['Debug'] +# pod 'CocoaDebug', :configurations => ['Debug'] pod 'ESTabBarController-swift' pod 'DDCategoryKit_Private' pod 'DDColorKit_Private' @@ -32,7 +32,7 @@ target 'OrderScheduling' do pod 'DDZFPlayerKit_Private',:subspecs => ['ControlView','ijkplayer'] pod 'JPush',:modular_headers => true pod 'BRPickerView' - pod 'DDAudioPlayerKit_Private' + pod 'DDAudioPlayerKit_Private',:path => "/Users/zd/Desktop/PodRepository/DDAudioPlayerKit_Private" post_install do |installer| installer.pods_project.targets.each do |target| diff --git a/Podfile.lock b/Podfile.lock index fd899e4..4ec906c 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -22,8 +22,8 @@ PODS: - BRPickerView/Base - BRPickerView/StringPickerView (2.8.1): - BRPickerView/Base - - CocoaDebug (1.7.7) - - DDAudioPlayerKit_Private (0.1.3) + - DDAudioPlayerKit_Private (0.1.3): + - DDFFmpegKit_Private - DDAutoUIKit_Private (0.1.3) - DDBasicControlsKit_Private/DDBaseAnimation/DDTransitionAnimation (0.3.2) - DDBasicControlsKit_Private/DDBaseAttributedString (0.3.2): @@ -179,6 +179,12 @@ PODS: - DDBasicControlsKit_Private/DDBaseView - DDControlsKit_Private/DDViewController (0.1.2): - DDBasicControlsKit_Private/DDBaseViewController + - DDFFmpegKit_Private (0.2.0): + - DDFFmpegKit_Private/DDFFmpegBase (= 0.2.0) + - DDFFmpegKit_Private/DDFFmpegManager (= 0.2.0) + - DDFFmpegKit_Private/DDFFmpegBase (0.2.0) + - DDFFmpegKit_Private/DDFFmpegManager (0.2.0): + - DDFFmpegKit_Private/DDFFmpegBase - DDFontKit_Private (0.1.0) - DDLogKit_Private (0.1.4): - DDLogKit_Private/OCLog (= 0.1.4) @@ -296,8 +302,7 @@ PODS: DEPENDENCIES: - BRPickerView - - CocoaDebug - - DDAudioPlayerKit_Private + - DDAudioPlayerKit_Private (from `/Users/zd/Desktop/PodRepository/DDAudioPlayerKit_Private`) - DDAutoUIKit_Private - DDCategoryKit_Private - DDColorKit_Private @@ -326,12 +331,12 @@ DEPENDENCIES: SPEC REPOS: "git@github.com:DDIsFriend/DDSpecs.git": - - DDAudioPlayerKit_Private - DDAutoUIKit_Private - DDBasicControlsKit_Private - DDCategoryKit_Private - DDColorKit_Private - DDControlsKit_Private + - DDFFmpegKit_Private - DDFontKit_Private - DDLogKit_Private - DDMAMapKit_Private @@ -349,7 +354,6 @@ SPEC REPOS: - AMapSearch-NO-IDFA - AMapTrack-NO-IDFA - BRPickerView - - CocoaDebug - ESTabBarController-swift - IQKeyboardManagerSwift - JCore @@ -365,6 +369,10 @@ SPEC REPOS: - SwiftEntryKit - ZLPhotoBrowser +EXTERNAL SOURCES: + DDAudioPlayerKit_Private: + :path: "/Users/zd/Desktop/PodRepository/DDAudioPlayerKit_Private" + SPEC CHECKSUMS: Alamofire: 0123a34370cb170936ae79a8df46cc62b2edeb88 AMapFoundation-NO-IDFA: 6ce0ef596d4eb8d934ff498e56747b6de1247b05 @@ -373,13 +381,13 @@ SPEC CHECKSUMS: AMapSearch-NO-IDFA: 10cbd3ad7d122045a0c1f5760f6d46ff576ca918 AMapTrack-NO-IDFA: 7109cf1867f5d6c407c8191492b1f73101e1682e BRPickerView: 2531a2d4d0fea0b57a1c738de215af0f88863a2f - CocoaDebug: b38d31464b91a9775928f8667d114db07b136565 - DDAudioPlayerKit_Private: b727c241c5cd06f09d64bb2b3d5682b6e9eb8165 + DDAudioPlayerKit_Private: 3870b30ef8c6a19f4d8c6e6d9643ba31fa7018b4 DDAutoUIKit_Private: 188066b4d13c8096676ddd9efa15974238f6dca3 DDBasicControlsKit_Private: d3aebc505eaac273a8f6b85238662ad6e64a1a08 DDCategoryKit_Private: 19d515c43d5e9c4ee80b8ccf3fb8ab40368b8668 DDColorKit_Private: 77fddb62410a2d5e6fb003083d233c0d7ea0a08f DDControlsKit_Private: c3ac79b391cec6ecb26262a0d3b02718f696ab19 + DDFFmpegKit_Private: 6bf928d9107e1cb976473af0d02ae382b3b97800 DDFontKit_Private: 7b8f4ebf0f60622874036202734d8460dc7b3806 DDLogKit_Private: 1ed442cc7be004bd05f27bfda9b525e113df54e0 DDMAMapKit_Private: fda2942ba7a3b7da4d440e59a89db9fd6708d842 @@ -404,6 +412,6 @@ SPEC CHECKSUMS: SwiftEntryKit: 61b5fa36f34a97dd8013e48a7345bc4c4720be9a ZLPhotoBrowser: 0563c2bfc7b247b65d023d646012f46cba94101b -PODFILE CHECKSUM: 8b73e7b8269156e4fa26d46c40f768817fa76230 +PODFILE CHECKSUM: 36cddc5f02f0061051031b17aebeb5e8a2cf4201 COCOAPODS: 1.11.3 diff --git a/Pods/CocoaDebug/README.md b/Pods/CocoaDebug/README.md deleted file mode 100644 index 826afca..0000000 --- a/Pods/CocoaDebug/README.md +++ /dev/null @@ -1,104 +0,0 @@ -| logo | | -| -------------- | -------------- | -| Version | [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/CocoaDebug.svg)](https://img.shields.io/cocoapods/v/CocoaDebug.svg) | -| Platform | ![Platform](https://img.shields.io/badge/platforms-iOS%2012.0+-blue.svg) | -| Languages | ![Languages](https://img.shields.io/badge/languages-Swift%20%7C%20ObjC-blue.svg) | - - - -## Screenshot - - - - - - - - -## Introduction - -- [x] Shake to hide or show the black bubble. (Support iPhone device and simulator) - -- [x] Share network details via email or copy to clipboard when you are in the *Network Details* page. - -- [x] Copy logs. (Long press the text, then select all or select copy) - -- [x] Search logs by keyword. - -- [x] Long press the black bubble to clean all network logs. - -- [x] Detect *UI Blocking*. - -- [x] List crash errors. - -- [x] List application and device informations, including: *version*, *build*, *bundle name*, *bundle id*, *screen resolution*, *device*, *iOS version* - -- [x] List all network requests sent by the application. (Support *JSON* and Google's *Protocol buffers*) - -- [x] List all sandbox folders and files, supporting to preview and edit. - -- [x] List all *WKWebView* consoles. - -- [x] List all *React Native* JavaScript consoles and Native logs. - -- [x] List all *print()* and *NSLog()* messages which have been written by developer in Xcode. - -## Installation - -### *CocoaPods* *(Preferred)* - -```ruby -target 'YourTargetName' do - use_frameworks! - pod 'CocoaDebug', :configurations => ['Debug'] -end -``` - -### *Carthage* - -```ruby -github "CocoaDebug/CocoaDebug" -``` - -### *Framework* - -*[CocoaDebug.framework](https://raw.githubusercontent.com/CocoaDebug/CocoaDebug/master/CocoaDebug.framework.zip) (Version 1.7.2)* - -> WARNING: Never ship a product which has been linked with the CocoaDebug framework. The [Integration Guide](https://github.com/CocoaDebug/CocoaDebug/wiki/Integration-Guide) outline a way to use build configurations to isolate linking the framework to Debug builds. - -## Usage - -- Don't need to do anything. CocoaDebug will start automatically. -- To capture logs from Xcode with codes: (You can also set this in *CocoaDebug->App->Monitor->Applogs* without any codes.) -```swift -CocoaDebugSettings.shared.enableLogMonitoring = true //The default value is false -``` -- Check [AppDelegate.m](https://github.com/CocoaDebug/CocoaDebug/blob/master/Example_Objc/Example_Objc/AppDelegate.m) OR [AppDelegate.swift](https://github.com/CocoaDebug/CocoaDebug/blob/master/Example_Swift/Example_Swift/AppDelegate.swift) for more advanced usage. - -## Parameters - -When you initialize CocoaDebug, you can customize the following parameter values before `CocoaDebug.enable()`. - -- `serverURL` - If the captured URLs contain server URL, CocoaDebug set server URL bold font to be marked. Not mark when this value is nil. Default value is **nil**. - -- `ignoredURLs` - Set the URLs which should not been captured, CocoaDebug capture all URLs when the value is nil. Default value is **nil**. - -- `onlyURLs` - Set the URLs which are only been captured, CocoaDebug capture all URLs when the value is nil. Default value is **nil**. - -- `ignoredPrefixLogs` - Set the prefix Logs which should not been captured, CocoaDebug capture all Logs when the value is nil. Default value is **nil**. - -- `onlyPrefixLogs` - Set the prefix Logs which are only been captured, CocoaDebug capture all Logs when the value is nil. Default value is **nil**. - -- `additionalViewController` - Add an additional UIViewController as child controller of CocoaDebug's main UITabBarController. Default value is **nil**. - -- `emailToRecipients` - Set the initial recipients to include in the email’s “To” field when share via email. Default value is **nil**. - -- `emailCcRecipients` - Set the initial recipients to include in the email’s “Cc” field when share via email. Default value is **nil**. - -- `mainColor` - Set CocoaDebug's main color with hexadecimal format. Default value is **#42d459**. - -- `protobufTransferMap` - Protobuf data transfer to JSON map. Default value is **nil**. - -## Reference - -[https://developer.apple.com/library/archive/samplecode/CustomHTTPProtocol/Introduction/Intro.html](https://developer.apple.com/library/archive/samplecode/CustomHTTPProtocol/Introduction/Intro.html) diff --git a/Pods/CocoaDebug/Sources/App/AboutViewController.swift b/Pods/CocoaDebug/Sources/App/AboutViewController.swift deleted file mode 100644 index 449bdfc..0000000 --- a/Pods/CocoaDebug/Sources/App/AboutViewController.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import Foundation -import UIKit - -class AboutViewController: UITableViewController { - - @IBOutlet weak var versionLabel: UILabel! - @IBOutlet weak var naviItem: UINavigationItem! - - var naviItemTitleLabel: UILabel? - - //MARK: - init - override func viewDidLoad() { - super.viewDidLoad() - - naviItemTitleLabel = UILabel.init(frame: CGRect(x: 0, y: 0, width: 80, height: 40)) - naviItemTitleLabel?.textAlignment = .center - naviItemTitleLabel?.textColor = Color.mainGreen - naviItemTitleLabel?.font = .boldSystemFont(ofSize: 20) - naviItemTitleLabel?.text = "About" - naviItem.titleView = naviItemTitleLabel - - -// let version = "1.7.2" -// -// self.versionLabel.text = "CocoaDebug Version ".appending(version) - - tableView.tableFooterView = UIView() - } -} diff --git a/Pods/CocoaDebug/Sources/App/AppInfoViewController.swift b/Pods/CocoaDebug/Sources/App/AppInfoViewController.swift deleted file mode 100644 index d5f550d..0000000 --- a/Pods/CocoaDebug/Sources/App/AppInfoViewController.swift +++ /dev/null @@ -1,217 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -class AppInfoViewController: UITableViewController { - - @IBOutlet weak var labelVersionNumber: UILabel! - @IBOutlet weak var labelBuildNumber: UILabel! - @IBOutlet weak var labelBundleName: UILabel! - @IBOutlet weak var labelScreenResolution: UILabel! - @IBOutlet weak var labelDeviceModel: UILabel! - @IBOutlet weak var labelCrashCount: UILabel! - @IBOutlet weak var labelBundleID: UILabel! - @IBOutlet weak var labelserverURL: UILabel! - @IBOutlet weak var labelIOSVersion: UILabel! - @IBOutlet weak var labelHtml: UILabel! - @IBOutlet weak var crashSwitch: UISwitch! - @IBOutlet weak var logSwitch: UISwitch! - @IBOutlet weak var networkSwitch: UISwitch! - @IBOutlet weak var webViewSwitch: UISwitch! - @IBOutlet weak var slowAnimationsSwitch: UISwitch! - @IBOutlet weak var naviItem: UINavigationItem! - @IBOutlet weak var rnSwitch: UISwitch! - @IBOutlet weak var uiBlockingSwitch: UISwitch! - - var naviItemTitleLabel: UILabel? - - //MARK: - init - override func viewDidLoad() { - super.viewDidLoad() - - naviItemTitleLabel = UILabel.init(frame: CGRect(x: 0, y: 0, width: 80, height: 40)) - naviItemTitleLabel?.textAlignment = .center - naviItemTitleLabel?.textColor = Color.mainGreen - naviItemTitleLabel?.font = .boldSystemFont(ofSize: 20) - naviItemTitleLabel?.text = "App" - naviItem.titleView = naviItemTitleLabel - - labelCrashCount.frame.size = CGSize(width: 30, height: 20) - - labelVersionNumber.text = CocoaDebugDeviceInfo.sharedInstance().appVersion - labelBuildNumber.text = CocoaDebugDeviceInfo.sharedInstance().appBuiltVersion - labelBundleName.text = CocoaDebugDeviceInfo.sharedInstance().appBundleName - - labelScreenResolution.text = "\(Int(CocoaDebugDeviceInfo.sharedInstance().resolution.width))" + "*" + "\(Int(CocoaDebugDeviceInfo.sharedInstance().resolution.height))" - labelDeviceModel.text = "\(CocoaDebugDeviceInfo.sharedInstance().getPlatformString)" - - labelBundleID.text = CocoaDebugDeviceInfo.sharedInstance().appBundleID - - labelserverURL.text = CocoaDebugSettings.shared.serverURL - labelIOSVersion.text = UIDevice.current.systemVersion - - if UIScreen.main.bounds.size.width == 320 { - labelHtml.font = UIFont.systemFont(ofSize: 15) - } - - logSwitch.isOn = CocoaDebugSettings.shared.enableLogMonitoring - networkSwitch.isOn = !CocoaDebugSettings.shared.disableNetworkMonitoring - rnSwitch.isOn = CocoaDebugSettings.shared.enableRNMonitoring - webViewSwitch.isOn = CocoaDebugSettings.shared.enableWKWebViewMonitoring - slowAnimationsSwitch.isOn = CocoaDebugSettings.shared.slowAnimations - crashSwitch.isOn = CocoaDebugSettings.shared.enableCrashRecording - uiBlockingSwitch.isOn = CocoaDebugSettings.shared.enableUIBlockingMonitoring - - logSwitch.addTarget(self, action: #selector(logSwitchChanged), for: UIControl.Event.valueChanged) - networkSwitch.addTarget(self, action: #selector(networkSwitchChanged), for: UIControl.Event.valueChanged) - rnSwitch.addTarget(self, action: #selector(rnSwitchChanged), for: UIControl.Event.valueChanged) - webViewSwitch.addTarget(self, action: #selector(webViewSwitchChanged), for: UIControl.Event.valueChanged) - slowAnimationsSwitch.addTarget(self, action: #selector(slowAnimationsSwitchChanged), for: UIControl.Event.valueChanged) - crashSwitch.addTarget(self, action: #selector(crashSwitchChanged), for: UIControl.Event.valueChanged) - uiBlockingSwitch.addTarget(self, action: #selector(uiBlockingSwitchChanged), for: UIControl.Event.valueChanged) - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - let count = UserDefaults.standard.integer(forKey: "crashCount_CocoaDebug") - labelCrashCount.text = "\(count)" - labelCrashCount.textColor = count > 0 ? .red : .white - } - - //MARK: - alert - func showAlert() { - let alert = UIAlertController.init(title: nil, message: "You must restart APP to ensure the changes take effect", preferredStyle: .alert) - let cancelAction = UIAlertAction.init(title: "Restart later", style: .cancel, handler: nil) - let okAction = UIAlertAction.init(title: "Restart now", style: .destructive) { _ in - exit(0) - } - - alert.addAction(cancelAction) - alert.addAction(okAction) - - alert.popoverPresentationController?.permittedArrowDirections = .init(rawValue: 0) - alert.popoverPresentationController?.sourceView = self.view - alert.popoverPresentationController?.sourceRect = CGRect(x: self.view.bounds.midX, y: self.view.bounds.midY, width: 0, height: 0) - - self.present(alert, animated: true, completion: nil) - } - - //MARK: - target action - @objc func slowAnimationsSwitchChanged(sender: UISwitch) { - CocoaDebugSettings.shared.slowAnimations = slowAnimationsSwitch.isOn - // self.showAlert() - } - - @objc func uiBlockingSwitchChanged(sender: UISwitch) { - CocoaDebugSettings.shared.enableUIBlockingMonitoring = uiBlockingSwitch.isOn - if uiBlockingSwitch.isOn == true { - WindowHelper.shared.startUIBlockingMonitoring() - } else { - WindowHelper.shared.stopUIBlockingMonitoring() - } - } - - @objc func crashSwitchChanged(sender: UISwitch) { - CocoaDebugSettings.shared.enableCrashRecording = crashSwitch.isOn - self.showAlert() - } - - @objc func networkSwitchChanged(sender: UISwitch) { - CocoaDebugSettings.shared.disableNetworkMonitoring = !networkSwitch.isOn - self.showAlert() - } - - @objc func logSwitchChanged(sender: UISwitch) { - CocoaDebugSettings.shared.enableLogMonitoring = logSwitch.isOn - self.showAlert() - } - - @objc func rnSwitchChanged(sender: UISwitch) { - CocoaDebugSettings.shared.enableRNMonitoring = rnSwitch.isOn - self.showAlert() - } - - @objc func webViewSwitchChanged(sender: UISwitch) { - CocoaDebugSettings.shared.enableWKWebViewMonitoring = webViewSwitch.isOn - self.showAlert() - } -} - - -//MARK: - UITableViewDelegate -extension AppInfoViewController { - - override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat - { - if section == 0 { - return 56 - } - return 38 - } - - override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat - { - if indexPath.section == 1 && indexPath.row == 4 { - if labelserverURL.text == nil || labelserverURL.text == "" { - return 0 - } - } - - return 44 - } - - override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) - { - tableView.deselectRow(at: indexPath, animated: true) - - if indexPath.section == 1 && indexPath.row == 2 { - UIPasteboard.general.string = CocoaDebugDeviceInfo.sharedInstance().appBundleName - - let alert = UIAlertController.init(title: "copied bundle name to clipboard", message: nil, preferredStyle: .alert) - let action = UIAlertAction.init(title: "OK", style: .cancel, handler: nil) - alert.addAction(action) - - alert.popoverPresentationController?.permittedArrowDirections = .init(rawValue: 0) - alert.popoverPresentationController?.sourceView = self.view - alert.popoverPresentationController?.sourceRect = CGRect(x: self.view.bounds.midX, y: self.view.bounds.midY, width: 0, height: 0) - - self.present(alert, animated: true, completion: nil) - } - - if indexPath.section == 1 && indexPath.row == 3 { - UIPasteboard.general.string = CocoaDebugDeviceInfo.sharedInstance().appBundleID - - let alert = UIAlertController.init(title: "copied bundle id to clipboard", message: nil, preferredStyle: .alert) - let action = UIAlertAction.init(title: "OK", style: .cancel, handler: nil) - alert.addAction(action) - - alert.popoverPresentationController?.permittedArrowDirections = .init(rawValue: 0) - alert.popoverPresentationController?.sourceView = self.view - alert.popoverPresentationController?.sourceRect = CGRect(x: self.view.bounds.midX, y: self.view.bounds.midY, width: 0, height: 0) - - self.present(alert, animated: true, completion: nil) - } - - if indexPath.section == 1 && indexPath.row == 4 { - if labelserverURL.text == nil || labelserverURL.text == "" {return} - - UIPasteboard.general.string = CocoaDebugSettings.shared.serverURL - - let alert = UIAlertController.init(title: "copied server to clipboard", message: nil, preferredStyle: .alert) - let action = UIAlertAction.init(title: "OK", style: .cancel, handler: nil) - alert.addAction(action) - - alert.popoverPresentationController?.permittedArrowDirections = .init(rawValue: 0) - alert.popoverPresentationController?.sourceView = self.view - alert.popoverPresentationController?.sourceRect = CGRect(x: self.view.bounds.midX, y: self.view.bounds.midY, width: 0, height: 0) - - self.present(alert, animated: true, completion: nil) - } - } -} diff --git a/Pods/CocoaDebug/Sources/App/CrashCell.swift b/Pods/CocoaDebug/Sources/App/CrashCell.swift deleted file mode 100644 index 7ada038..0000000 --- a/Pods/CocoaDebug/Sources/App/CrashCell.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -class CrashCell: UITableViewCell { - - @IBOutlet weak var textview: CustomTextView! - - override func awakeFromNib() { - super.awakeFromNib() - textview.isUserInteractionEnabled = false - } - - var crash: _CrashModel? { - didSet { - guard let crash = crash else {return} - - if let formatDate = _OCLoggerFormat.formatDate(crash.date) { - let content = "\("\(String(describing: formatDate))\n")\(crash.name ?? "unknown crash")" - - textview.text = content - let attstr = NSMutableAttributedString(string: content) - - attstr.addAttribute(.foregroundColor, - value: UIColor.white, range: NSMakeRange(0, content.count)) - - let range = NSMakeRange(0, formatDate.count) - attstr.addAttribute(.foregroundColor, value: Color.mainGreen, range: range) - attstr.addAttribute(.font, value: UIFont.boldSystemFont(ofSize: 12), range: range) - - textview.attributedText = attstr - } - } - } -} diff --git a/Pods/CocoaDebug/Sources/App/CrashDetailViewController.swift b/Pods/CocoaDebug/Sources/App/CrashDetailViewController.swift deleted file mode 100644 index 88649de..0000000 --- a/Pods/CocoaDebug/Sources/App/CrashDetailViewController.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -class CrashDetailViewController: UITableViewController { - - @IBOutlet weak var textviewName: CustomTextView! - @IBOutlet weak var textviewReason: CustomTextView! - @IBOutlet weak var textviewStackTraces: CustomTextView! - @IBOutlet weak var naviItem: UINavigationItem! - - var naviItemTitleLabel: UILabel? - - var crash: _CrashModel? - - static func instanceFromStoryBoard() -> CrashDetailViewController { - let storyboard = UIStoryboard(name: "App", bundle: Bundle(for: CocoaDebug.self)) - return storyboard.instantiateViewController(withIdentifier: "CrashDetailViewController") as! CrashDetailViewController - } - - //MARK - init - override func viewDidLoad() { - super.viewDidLoad() - - naviItemTitleLabel = UILabel.init(frame: CGRect(x: 0, y: 0, width: 80, height: 40)) - naviItemTitleLabel?.textAlignment = .center - naviItemTitleLabel?.textColor = Color.mainGreen - naviItemTitleLabel?.font = .boldSystemFont(ofSize: 20) - naviItemTitleLabel?.text = "Details" - naviItem.titleView = naviItemTitleLabel - - tableView.rowHeight = UITableView.automaticDimension - tableView.estimatedRowHeight = 50 - tableView.delegate = self - - textviewName.text = "\(crash?.name ?? "N/A")" - textviewReason.text = "\(crash?.reason ?? "N/A")" - - let contentStack = crash?.callStacks?.reduce("", { - $0 == "" ? $1 : $0 + "\n" + $1 - }) - textviewStackTraces.text = contentStack - } -} - -//MARK: - UITableViewDelegate -extension CrashDetailViewController { - - override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - return UITableView.automaticDimension - } - - override func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat { - return 50 - } -} diff --git a/Pods/CocoaDebug/Sources/App/CrashListViewController.swift b/Pods/CocoaDebug/Sources/App/CrashListViewController.swift deleted file mode 100644 index 91dc773..0000000 --- a/Pods/CocoaDebug/Sources/App/CrashListViewController.swift +++ /dev/null @@ -1,115 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -class CrashListViewController: UITableViewController { - - var models: [_CrashModel] = [_CrashModel]() - - @IBOutlet weak var naviItem: UINavigationItem! - - var naviItemTitleLabel: UILabel? - - //MARK: - init - override func viewDidLoad() { - super.viewDidLoad() - - naviItemTitleLabel = UILabel.init(frame: CGRect(x: 0, y: 0, width: 80, height: 40)) - naviItemTitleLabel?.textAlignment = .center - naviItemTitleLabel?.textColor = Color.mainGreen - naviItemTitleLabel?.font = .boldSystemFont(ofSize: 20) - naviItemTitleLabel?.text = "Crash" - naviItem.titleView = naviItemTitleLabel - - - navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .trash, target: self, action:#selector(CrashListViewController.deleteCrashes)) - - tableView.delegate = self - tableView.dataSource = self - tableView.tableFooterView = UIView() - - models = CrashStoreManager.shared.crashArray - tableView.reloadData() - } - - //MARK: - target action - @objc func deleteCrashes() { - models = [] - CrashStoreManager.shared.resetCrashs() - - // dispatch_main_async_safe { [weak self] in - tableView.reloadData() - // } - } -} - -//MARK: - UITableViewDataSource -extension CrashListViewController { - - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return models.count - } - - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: "CrashCell", for: indexPath) - as! CrashCell - cell.crash = models[indexPath.row] - cell.accessoryType = .none - return cell - } -} - -//MARK: - UITableViewDelegate -extension CrashListViewController { - - override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - tableView.deselectRow(at: indexPath, animated: true) - - let vc = CrashDetailViewController.instanceFromStoryBoard() - vc.crash = models[indexPath.row] - - self.navigationController?.pushViewController(vc, animated: true) - } - - @available(iOS 11.0, *) - override func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { - - let delete = UIContextualAction(style: .destructive, title: "Delete") { [weak self] (action, sourceView, completionHandler) in - guard let models = self?.models else {return} - CrashStoreManager.shared.removeCrash(models[indexPath.row]) - self?.models.remove(at: indexPath.row) - // self?.dispatch_main_async_safe { [weak self] in - self?.tableView.deleteRows(at: [indexPath], with: .automatic) - // } - completionHandler(true) - } - - return UISwipeActionsConfiguration(actions: [delete]) - } - - //MARK: - only for ios8/ios9/ios10, not ios11 - override func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCell.EditingStyle { - return .delete - } - override func tableView(_ tableView: UITableView, titleForDeleteConfirmationButtonForRowAt indexPath: IndexPath) -> String? { - return "Delete" - } - override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { - return true - } - override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { - if (editingStyle == .delete) { - CrashStoreManager.shared.removeCrash(models[indexPath.row]) - self.models.remove(at: indexPath.row) - // self.dispatch_main_async_safe { [weak self] in - self.tableView.deleteRows(at: [indexPath], with: .automatic) - // } - } - } -} diff --git a/Pods/CocoaDebug/Sources/App/CrashLogger.swift b/Pods/CocoaDebug/Sources/App/CrashLogger.swift deleted file mode 100644 index 89c9022..0000000 --- a/Pods/CocoaDebug/Sources/App/CrashLogger.swift +++ /dev/null @@ -1,98 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit -import Darwin - -func exceptionHandler(exception: NSException) { - if CrashLogger.shared.crashed { - return - } - CrashLogger.shared.crashed = true - CrashLogger.addCrash(name: exception.name.rawValue, reason: exception.reason) -} - -func handleSignal(signal: Int32) { - if CrashLogger.shared.crashed { - return - } - CrashLogger.shared.crashed = true - switch signal { - case SIGILL: - CrashLogger.addCrash(name: "SIGILL", reason: nil) - case SIGABRT: - CrashLogger.addCrash(name: "SIGABRT", reason: nil) - case SIGFPE: - CrashLogger.addCrash(name: "SIGFPE", reason: nil) - case SIGBUS: - CrashLogger.addCrash(name: "SIGBUS", reason: nil) - case SIGSEGV: - CrashLogger.addCrash(name: "SIGSEGV", reason: nil) - case SIGSYS: - CrashLogger.addCrash(name: "SIGSYS", reason: nil) - case SIGPIPE: - CrashLogger.addCrash(name: "SIGPIPE", reason: nil) - case SIGTRAP: - CrashLogger.addCrash(name: "SIGTRAP", reason: nil) - default: break - } -} - -class CrashLogger { - - static let shared = CrashLogger() - private init() {} - - var hasBeenRegistered = false - var crashed = false - var enable: Bool = false { - didSet { - if enable { - CrashLogger.shared.register() - } - else { - CrashLogger.shared.unregister() - } - } - } - - func register() { - if hasBeenRegistered == false { - hasBeenRegistered = true - NSSetUncaughtExceptionHandler(exceptionHandler) - signal(SIGILL, handleSignal) - signal(SIGABRT, handleSignal) - signal(SIGFPE, handleSignal) - signal(SIGBUS, handleSignal) - signal(SIGSEGV, handleSignal) - signal(SIGSYS, handleSignal) - signal(SIGPIPE, handleSignal) - signal(SIGTRAP, handleSignal) - } - } - - func unregister() { - if hasBeenRegistered == true { - hasBeenRegistered = false - NSSetUncaughtExceptionHandler(nil) - signal(SIGILL, SIG_DFL) - signal(SIGABRT, SIG_DFL) - signal(SIGFPE, SIG_DFL) - signal(SIGBUS, SIG_DFL) - signal(SIGSEGV, SIG_DFL) - signal(SIGSYS, SIG_DFL) - signal(SIGPIPE, SIG_DFL) - signal(SIGTRAP, SIG_DFL) - } - } - - static func addCrash(name: String, reason: String?) { - let newCrash = _CrashModel(name: name, reason: reason) - CrashStoreManager.shared.addCrash(newCrash) - } -} diff --git a/Pods/CocoaDebug/Sources/App/CrashStoreManager.swift b/Pods/CocoaDebug/Sources/App/CrashStoreManager.swift deleted file mode 100644 index f16fce8..0000000 --- a/Pods/CocoaDebug/Sources/App/CrashStoreManager.swift +++ /dev/null @@ -1,79 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import Foundation - -class CrashStoreManager { - - var crashArray: [_CrashModel] = [_CrashModel]() - - static let shared = CrashStoreManager() - private init() { - crashArray = self.getCrashs() - } - - //MARK: - public - func addCrash(_ crash: _CrashModel) { - if self.crashArray.count >= 1000 { - if self.crashArray.count > 0 { - self.crashArray.remove(at: 0) - } - } - self.crashArray.append(crash) - archiveCrashs(self.crashArray) - } - - func removeCrash(_ model: _CrashModel) { - if let index = self.crashArray.firstIndex(where: { (crash) -> Bool in - return crash.id == model.id - }) { - self.crashArray.remove(at: index) - } - archiveCrashs(self.crashArray) - } - - func resetCrashs() { - if self.crashArray.count > 0 { - self.crashArray.removeAll() - UserDefaults.standard.removeObject(forKey: "crashArchive_CocoaDebug") - UserDefaults.standard.removeObject(forKey: "crashCount_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - - //MARK: - private - private func archiveCrashs(_ crashs: [_CrashModel]) { - do { - var dataArchive: Data - if #available(iOS 11.0, *) { - dataArchive = try NSKeyedArchiver.archivedData(withRootObject: crashs, requiringSecureCoding: false) - } else { - // Fallback on earlier versions - dataArchive = NSKeyedArchiver.archivedData(withRootObject: crashs) - } - UserDefaults.standard.set(dataArchive, forKey: "crashArchive_CocoaDebug") - UserDefaults.standard.set(crashs.count, forKey: "crashCount_CocoaDebug") - UserDefaults.standard.synchronize() - } catch {} - } - - private func getCrashs() -> [_CrashModel] { - guard let data = UserDefaults.standard.object(forKey: "crashArchive_CocoaDebug") as? Data else {return []} - do { - if #available(iOS 9.0, *) { - let dataArchive = try NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) - return dataArchive as! [_CrashModel] - } else { - // Fallback on earlier versions - return [] - } - } catch { - return [] - } - } -} diff --git a/Pods/CocoaDebug/Sources/App/IgnoredURLsViewController.swift b/Pods/CocoaDebug/Sources/App/IgnoredURLsViewController.swift deleted file mode 100644 index 6179d0f..0000000 --- a/Pods/CocoaDebug/Sources/App/IgnoredURLsViewController.swift +++ /dev/null @@ -1,119 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import Foundation -import UIKit - -class IgnoredURLsViewController: UITableViewController { - - var ignoredURLs: Array? - var onlyURLs: Array? - - var ignoredPrefixLogs: Array? - var onlyPrefixLogs: Array? - - @IBOutlet weak var naviItem: UINavigationItem! - - var naviItemTitleLabel: UILabel? - - //MARK: - init - override func viewDidLoad() { - super.viewDidLoad() - - naviItemTitleLabel = UILabel.init(frame: CGRect(x: 0, y: 0, width: 80, height: 40)) - naviItemTitleLabel?.textAlignment = .center - naviItemTitleLabel?.textColor = Color.mainGreen - naviItemTitleLabel?.font = .boldSystemFont(ofSize: 20) - naviItemTitleLabel?.text = "Settings" - naviItem.titleView = naviItemTitleLabel - - tableView.tableFooterView = UIView() - - ignoredURLs = CocoaDebugSettings.shared.ignoredURLs - onlyURLs = CocoaDebugSettings.shared.onlyURLs - - ignoredPrefixLogs = CocoaDebugSettings.shared.ignoredPrefixLogs - onlyPrefixLogs = CocoaDebugSettings.shared.onlyPrefixLogs - } -} - -//MARK: - UITableViewDataSource -extension IgnoredURLsViewController { - - override func numberOfSections(in tableView: UITableView) -> Int { - return 4 - } - - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - switch section { - case 0: - return ignoredURLs?.count ?? 0 - case 1: - return onlyURLs?.count ?? 0 - case 2: - return ignoredPrefixLogs?.count ?? 0 - case 3: - return onlyPrefixLogs?.count ?? 0 - default: - break - } - - return 0 - } - - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = UITableViewCell.init(style: .default, reuseIdentifier: "CocoaDebugSettingsCell") - cell.textLabel?.textColor = .white - cell.contentView.backgroundColor = .black - cell.selectionStyle = .none - - switch indexPath.section { - case 0: - cell.textLabel?.text = ignoredURLs?[indexPath.row] - case 1: - cell.textLabel?.text = onlyURLs?[indexPath.row] - case 2: - cell.textLabel?.text = ignoredPrefixLogs?[indexPath.row] - case 3: - cell.textLabel?.text = onlyPrefixLogs?[indexPath.row] - default: - break - } - - return cell - } - - override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { - - switch section { - case 0: - return "ignored URLs" - case 1: - return "only URLs" - case 2: - return "ignored Prefix Logs" - case 3: - return "only Prefix Logs" - default: - break - } - - return "" - } -} - -//MARK: - UITableViewDelegate -extension IgnoredURLsViewController { - override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { - return 60 - } - - override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - return 20 - } -} diff --git a/Pods/CocoaDebug/Sources/App/_CrashModel.swift b/Pods/CocoaDebug/Sources/App/_CrashModel.swift deleted file mode 100644 index dcedb56..0000000 --- a/Pods/CocoaDebug/Sources/App/_CrashModel.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -class _CrashModel: NSObject, NSCoding { - - var id: String - var date: Date - var reason: String? - var name: String? - var callStacks: [String]? - - - init(name: String, reason: String?) { - id = UUID().uuidString - date = Date() - self.reason = reason - self.name = name - callStacks = Thread.callStackSymbols - } - - func encode(with aCoder: NSCoder) { - aCoder.encode(id, forKey: "id") - aCoder.encode(date, forKey: "date") - aCoder.encode(reason, forKey: "reason") - aCoder.encode(name, forKey: "name") - aCoder.encode(callStacks, forKey: "callstacks") - } - - required init?(coder aDecoder: NSCoder) { - id = aDecoder.decodeObject(forKey: "id") as? String ?? "" - date = aDecoder.decodeObject(forKey: "date") as? Date ?? Date() - reason = aDecoder.decodeObject(forKey: "reason") as? String - name = aDecoder.decodeObject(forKey: "name") as? String - callStacks = aDecoder.decodeObject(forKey: "callstacks") as? [String] - } - - func toString() -> String { - let stringContent = NSMutableString() - stringContent.append("Date: \(String(describing: _OCLoggerFormat.formatDate(date)))\n") - stringContent.append("Name: \(name ?? "N/A")\n") - stringContent.append("Reason: \(reason ?? "N/A")\n") - - let stacks = (callStacks ?? []).reduce("", { - return "\($0)\($1)\n" - }) - stringContent.append(stacks) - return stringContent as String - } -} - diff --git a/Pods/CocoaDebug/Sources/Categories/GPBMessage+CocoaDebug.h b/Pods/CocoaDebug/Sources/Categories/GPBMessage+CocoaDebug.h deleted file mode 100644 index 4ecce13..0000000 --- a/Pods/CocoaDebug/Sources/Categories/GPBMessage+CocoaDebug.h +++ /dev/null @@ -1,20 +0,0 @@ -//// -//// Example -//// man.li -//// -//// Created by man 11/11/2018. -//// Copyright © 2020 man. All rights reserved. -//// -// -//#import -// -//@interface GPBMessage (CocoaDebug) -// -//- (id _Nullable)initWithDictionary:(NSDictionary *_Nullable)dict; -// -//- (NSDictionary *_Nullable)containerType; -//- (NSDictionary *_Nullable)nameMap; -//- (NSString *_Nullable)_JSONStringWithIgnoreFields:(NSArray * _Nullable)ignoreFields; -//- (NSDictionary *_Nullable)dictionaryWithIgnoreFields:(NSArray * _Nullable)ignoreFields; -// -//@end diff --git a/Pods/CocoaDebug/Sources/Categories/GPBMessage+CocoaDebug.m b/Pods/CocoaDebug/Sources/Categories/GPBMessage+CocoaDebug.m deleted file mode 100644 index eb3d80b..0000000 --- a/Pods/CocoaDebug/Sources/Categories/GPBMessage+CocoaDebug.m +++ /dev/null @@ -1,411 +0,0 @@ -//// -//// Example -//// man.li -//// -//// Created by man 11/11/2018. -//// Copyright © 2020 man. All rights reserved. -//// -// -//#import "GPBMessage+CocoaDebug.h" -//#import "NSObject+CocoaDebug.h" -//#import -//#import -//#import "GPBArray.h" -// -//@implementation GPBMessage (CocoaDebug) -// -//#pragma mark - Public Methods -//- (id)initWithDictionary:(NSDictionary *)dict { -// self = [self init]; -// if (dict && [dict isKindOfClass:[NSDictionary class]]) { -// NSMutableDictionary *keyMap = [NSMutableDictionary dictionary]; -// NSDictionary *nameMap = [self nameMap]; -// for (NSString *keyName in nameMap) { -// id keyNameObject = [nameMap objectForKey:keyName]; -// if ([keyNameObject isKindOfClass:[NSString class]]) { -// [keyMap setObject:keyName forKey:keyNameObject]; -// } -// if ([keyNameObject isKindOfClass:[NSArray class]]) { -// for (id keyPath in (NSArray *)keyNameObject) { -// [keyMap setObject:keyName forKey:keyPath]; -// } -// } -// } -// for (NSString *keyName in dict) { -// NSString *keyPath = [keyMap _stringForKey:keyName default:keyName]; -// [self setKeyPath:keyPath value:[dict objectForKey:keyName]]; -// } -// } -// return self; -//} -// -//- (NSDictionary *)containerType { -// return @{}; -//} -// -//- (NSDictionary *)nameMap { -// return @{}; -//} -// -//- (NSString *)_JSONStringWithIgnoreFields:(NSArray * _Nullable)ignoreFields { -// NSData *data = [NSJSONSerialization dataWithJSONObject:[self dictionaryWithIgnoreFields:ignoreFields] options:kNilOptions error:nil]; -// return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; -//} -// -//#pragma mark - Private Methods -//- (NSDictionary *)dictionaryWithIgnoreFields:(NSArray * _Nullable)ignoreFields { -// NSMutableDictionary *dict = [NSMutableDictionary dictionary]; -// -// unsigned int count; -// objc_property_t *properties = class_copyPropertyList([self class], &count); -// for (unsigned int i = 0; i < count; i++) { -// const char *propertyName = property_getName(properties[i]); -// NSString *keyPath = [NSString stringWithUTF8String:propertyName]; -// -// id serializeObject = [self serializeValueForKey:keyPath]; -// if (nil == serializeObject) { -// continue; -// } -// id keyNameObject = [[self nameMap] objectForKey:keyPath]; -// -// if (keyNameObject == nil && ![ignoreFields containsObject:keyPath]) { -// [dict setObject:serializeObject forKey:keyPath]; -// } -// if ([keyNameObject isKindOfClass:[NSString class]] && ![ignoreFields containsObject:keyNameObject]) { -// [dict setObject:serializeObject forKey:keyNameObject]; -// } -// if ([keyNameObject isKindOfClass:[NSArray class]] && ![ignoreFields containsObject:keyNameObject]) { -// NSString *keyName = [keyNameObject objectAtIndex:0]; // Serialize only the first value -// [dict setObject:serializeObject forKey:keyName]; -// } -// } -// free(properties); -// return dict; -//} -// -//- (NSDictionary *)dictionary { -// return [self dictionaryWithIgnoreFields:nil]; -//} -// -//- (id)serializeValueForKey:(NSString *)keyPath { -// id item = [self valueForKey:keyPath]; -// if ([item isKindOfClass:[NSNumber class]] || [item isKindOfClass:[NSString class]]) { -// return item; -// } -// if ([item isKindOfClass:[GPBMessage class]]) { -// return [item dictionary]; -// } -// if ([item isKindOfClass:[GPBInt32Array class]]) { -// NSMutableArray *array = [NSMutableArray array]; -// GPBInt32Array *itemArray = (GPBInt32Array *)item; -// [itemArray enumerateValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL * _Nonnull stop) { -// [array addObject:@(value)]; -// }]; -// return array; -// } -// if ([item isKindOfClass:[GPBUInt32Array class]]) { -// NSMutableArray *array = [NSMutableArray array]; -// GPBUInt32Array *itemArray = (GPBUInt32Array *)item; -// [itemArray enumerateValuesWithBlock:^(uint32_t value, NSUInteger idx, BOOL * _Nonnull stop) { -// [array addObject:@(value)]; -// }]; -// return array; -// } -// if ([item isKindOfClass:[GPBInt64Array class]]) { -// NSMutableArray *array = [NSMutableArray array]; -// GPBInt64Array *itemArray = (GPBInt64Array *)item; -// [itemArray enumerateValuesWithBlock:^(int64_t value, NSUInteger idx, BOOL * _Nonnull stop) { -// [array addObject:@(value)]; -// }]; -// return array; -// } -// if ([item isKindOfClass:[GPBUInt64Array class]]) { -// NSMutableArray *array = [NSMutableArray array]; -// GPBUInt64Array *itemArray = (GPBUInt64Array *)item; -// [itemArray enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL * _Nonnull stop) { -// [array addObject:@(value)]; -// }]; -// return array; -// } -// if ([item isKindOfClass:[GPBFloatArray class]]) { -// NSMutableArray *array = [NSMutableArray array]; -// GPBFloatArray *itemArray = (GPBFloatArray *)item; -// [itemArray enumerateValuesWithBlock:^(float value, NSUInteger idx, BOOL * _Nonnull stop) { -// [array addObject:@(value)]; -// }]; -// return array; -// } -// if ([item isKindOfClass:[GPBDoubleArray class]]) { -// NSMutableArray *array = [NSMutableArray array]; -// GPBDoubleArray *itemArray = (GPBDoubleArray *)item; -// [itemArray enumerateValuesWithBlock:^(double value, NSUInteger idx, BOOL * _Nonnull stop) { -// [array addObject:@(value)]; -// }]; -// return array; -// } -// if ([item isKindOfClass:[GPBBoolArray class]]) { -// NSMutableArray *array = [NSMutableArray array]; -// GPBBoolArray *itemArray = (GPBBoolArray *)item; -// [itemArray enumerateValuesWithBlock:^(BOOL value, NSUInteger idx, BOOL * _Nonnull stop) { -// [array addObject:@(value)]; -// }]; -// return array; -// } -// if ([item isKindOfClass:[GPBEnumArray class]]) { -// NSMutableArray *array = [NSMutableArray array]; -// GPBEnumArray *itemArray = (GPBEnumArray *)item; -// [itemArray enumerateValuesWithBlock:^(int32_t value, NSUInteger idx, BOOL * _Nonnull stop) { -// [array addObject:@(value)]; -// }]; -// return array; -// } -// if ([item isKindOfClass:[NSArray class]]) { -// NSMutableArray *array = [NSMutableArray array]; -// for (id arrayItem in item) { -// if ([arrayItem isKindOfClass:[NSNumber class]] || [arrayItem isKindOfClass:[NSString class]]) { -// [array addObject:arrayItem]; -// continue; -// } -// if ([arrayItem isKindOfClass:[GPBMessage class]]) { -// [array addObject:[arrayItem dictionary]]; -// } -// } -// return array; -// } -// return nil; -//} -// -//- (void)setKeyPath:(NSString *)keyPath value:(id)value { -// NSMutableArray *propertiesNameArray = [NSMutableArray array]; -// NSMutableDictionary *propertiesTypeDic = [NSMutableDictionary dictionary]; -// unsigned int count; -// objc_property_t *properties = class_copyPropertyList([self class], &count); -// for (NSUInteger i = 0; i < count; i++) { -// objc_property_t property = properties[i]; -// NSString *propertyName = [NSString stringWithUTF8String:property_getName(property)]; -// [propertiesNameArray addObject:propertyName]; -// -// NSString *attr = [NSString stringWithUTF8String:&(property_getAttributes(property)[1])]; -// NSString *type = [[attr componentsSeparatedByString:@","] objectAtIndex:0]; -// [propertiesTypeDic setObject:type forKey:propertyName]; -// } -// free(properties); -// -// NSString *type = [propertiesTypeDic _stringForKey:keyPath default:@""]; -// SEL setter = NSSelectorFromString([NSString stringWithFormat:@"set%@%@:", [keyPath substringToIndex:1].uppercaseString, [keyPath substringFromIndex:1]]); -// -// if ([value isKindOfClass:[NSString class]] == YES) { -// NSString *str = (NSString *)value; -// if ([type isEqualToString:@"@\"NSString\""]) { -// ((void (*)(id, SEL, id))(void *) objc_msgSend)((id)self, setter, str); -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(bool)]]) { -// NSAssert([value isKindOfClass:[NSString class]], @"%@: property (%@) type mismatch, require bool but string", self, keyPath); -// ((void (*)(id, SEL, bool))(void *) objc_msgSend)(self, setter, str.boolValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(BOOL)]]) { -// NSAssert([value isKindOfClass:[NSString class]], @"%@: property (%@) type mismatch, require BOOL but string", self, keyPath); -// ((void (*)(id, SEL, BOOL))(void *) objc_msgSend)(self, setter, str.boolValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(int32_t)]]) { -// NSAssert([value isKindOfClass:[NSString class]], @"%@: property (%@) type mismatch, require int32_t but string", self, keyPath); -// ((void (*)(id, SEL, int32_t))(void *) objc_msgSend)(self, setter, (int32_t)str.intValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(uint32_t)]]) { -// NSAssert([value isKindOfClass:[NSString class]], @"%@: property (%@) type mismatch, require uint32_t but string", self, keyPath); -// NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; -// [numberFormatter setNumberStyle:NSNumberFormatterNoStyle]; -// NSNumber *num = [numberFormatter numberFromString:str]; -// ((void (*)(id, SEL, uint32_t))(void *) objc_msgSend)(self, setter, (uint32_t)num.unsignedIntValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(int64_t)]]) { -// NSAssert([value isKindOfClass:[NSString class]], @"%@: property (%@) type mismatch, require int64_t but string", self, keyPath); -// ((void (*)(id, SEL, int64_t))(void *) objc_msgSend)(self, setter, (int64_t)str.longLongValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(uint64_t)]]) { -// NSAssert([value isKindOfClass:[NSString class]], @"%@: property (%@) type mismatch, require uint64_t but string", self, keyPath); -// NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; -// [numberFormatter setNumberStyle:NSNumberFormatterNoStyle]; -// NSNumber *num = [numberFormatter numberFromString:str]; -// ((void (*)(id, SEL, uint64_t))(void *) objc_msgSend)(self, setter, (uint64_t)num.unsignedLongLongValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(float)]]) { -// NSAssert([value isKindOfClass:[NSString class]], @"%@: property (%@) type mismatch, require float but string", self, keyPath); -// float f = str.floatValue; -// if (isnan(f) == NO && isinf(f) == NO) { -// ((void (*)(id, SEL, float))(void *) objc_msgSend)(self, setter, f); -// return; -// } -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(double)]]) { -// NSAssert([value isKindOfClass:[NSString class]], @"%@: property (%@) type mismatch, require double but string", self, keyPath); -// double d = str.doubleValue; -// if (isnan(d) == NO && isinf(d) == NO) { -// ((void (*)(id, SEL, double))(void *) objc_msgSend)(self, setter, d); -// return; -// } -// } -// } -// if ([value isKindOfClass:[NSNumber class]] == YES) { -// NSNumber *number = (NSNumber *)value; -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(bool)]]) { -// ((void (*)(id, SEL, bool))(void *) objc_msgSend)(self, setter, number.boolValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(BOOL)]]) { -// ((void (*)(id, SEL, BOOL))(void *) objc_msgSend)(self, setter, number.boolValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(int32_t)]]) { -// ((void (*)(id, SEL, int32_t))(void *) objc_msgSend)(self, setter, (int32_t)number.intValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(uint32_t)]]) { -// ((void (*)(id, SEL, uint32_t))(void *) objc_msgSend)(self, setter, (uint32_t)number.unsignedIntValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(int64_t)]]) { -// ((void (*)(id, SEL, int64_t))(void *) objc_msgSend)(self, setter, (int64_t)number.longLongValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(uint64_t)]]) { -// ((void (*)(id, SEL, uint64_t))(void *) objc_msgSend)(self, setter, (uint64_t)number.longLongValue); -// return; -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(float)]]) { -// float f = number.floatValue; -// if (isnan(f) == NO && isinf(f) == NO) { -// ((void (*)(id, SEL, float))(void *) objc_msgSend)(self, setter, f); -// return; -// } -// } -// if ([type isEqualToString:[NSString stringWithUTF8String:@encode(double)]]) { -// double d = number.doubleValue; -// if (isnan(d) == NO && isinf(d) == NO) { -// ((void (*)(id, SEL, double))(void *) objc_msgSend)(self, setter, d); -// return; -// } -// } -// if ([type isEqualToString:@"@\"NSString\""]) { -// NSAssert([value isKindOfClass:[NSString class]], @"%@: property (%@) type mismatch, require string but number", self, keyPath); -// ((void (*)(id, SEL, id))(void *) objc_msgSend)((id)self, setter, [number stringValue]); -// return; -// } -// } -// if (([type isEqualToString:@"@\"NSMutableArray\""] || [type isEqualToString:@"@\"NSArray\""]) && [value isKindOfClass:[NSArray class]] == YES) { -// NSMutableArray *array = [NSMutableArray array]; -// for (id arrayValue in value) { -// if ([arrayValue isKindOfClass:[NSNumber class]] == YES || [arrayValue isKindOfClass:[NSString class]] == YES) { -// [array addObject:arrayValue]; -// continue; -// } -// if ([arrayValue isKindOfClass:[NSDictionary class]] == YES) { -// NSString *arrayItemType = [[self containerType] _stringForKey:keyPath default:nil]; -// if (arrayItemType == nil) { -// [array addObject:arrayValue]; -// break; -// } -// Class itemClass = NSClassFromString(arrayItemType); -// if (!itemClass) { -// //SSPWarning(@"Can't find class of %@", arrayItemType); -// return; -// } -// Class parentClass = class_getSuperclass(itemClass); -// if ([parentClass isEqual:[GPBMessage class]] == NO) { -// //SSPWarning(@"%@ is not GPBMessage", arrayItemType); -// return; -// } -// [array addObject:[[itemClass alloc] initWithDictionary:arrayValue]]; -// } -// if ([arrayValue isKindOfClass:[NSArray class]] == YES) { -// //SSPError(@"Not support NSArray in NSArray"); -// return; -// } -// } -// ((void (*)(id, SEL, id))(void *) objc_msgSend)(self, setter, array); -// return; -// } -// if ([type hasPrefix:@"@\""] && [value isKindOfClass:[NSDictionary class]] == YES) { -// if ([type isEqualToString:@"@\"NSDictionary\""] || [type isEqualToString:@"@\"NSMutableDictionary\""]) { -// NSMutableDictionary *dictValue = [NSMutableDictionary dictionary]; -// NSArray *dictTypes = [[self containerType] _arrayForKey:keyPath default:nil]; -// if (dictTypes && [dictTypes count] == 2) { -// for (id dictKey in value) { -// Class itemClass = NSClassFromString(dictTypes[1]); -// if (!itemClass) { -// //SSPWarning(@"Can't find class of %@", dictTypes[1]); -// return; -// } -// if ([itemClass isEqual:[NSString class]]||[itemClass isEqual:[NSNumber class]]) { -// [dictValue setObject:value[dictKey] forKey:dictKey]; -// continue; -// } -// Class parentClass = class_getSuperclass(itemClass); -// if ([parentClass isEqual:[GPBMessage class]] == NO) { -// //SSPWarning(@"%@ is not GPBMessage", dictTypes[1]); -// return; -// } -// [dictValue setObject:[[itemClass alloc] initWithDictionary:value[dictKey]] forKey:dictKey]; -// } -// } else if (dictTypes && [dictTypes count] == 3){ -// for (id dictKey in value) { -// Class itemClass = NSClassFromString(dictTypes[1]); -// if (!itemClass || ![itemClass isEqual:[NSArray class]] || ![value[dictKey] isKindOfClass:[NSArray class]]) { -// //SSPWarning(@"Map parse error!"); -// return; -// } -// NSMutableArray *array = [NSMutableArray array]; -// for (id arrayValue in value[dictKey]) { -// if ([arrayValue isKindOfClass:[NSNumber class]] == YES || [arrayValue isKindOfClass:[NSString class]] == YES) { -// [array addObject:arrayValue]; -// continue; -// } -// if ([arrayValue isKindOfClass:[NSDictionary class]] == YES) { -// Class inItemClass = NSClassFromString(dictTypes[2]); -// if (!inItemClass) { -// //SSPWarning(@"Can't find class of %@", dictTypes[2]); -// return; -// } -// Class parentClass = class_getSuperclass(inItemClass); -// if ([parentClass isEqual:[GPBMessage class]] == NO) { -// //SSPWarning(@"%@ is not GPBMessage", dictTypes[2]); -// return; -// } -// [array addObject:[[inItemClass alloc] initWithDictionary:arrayValue]]; -// } -// if ([arrayValue isKindOfClass:[NSArray class]] == YES) { -// //SSPError(@"Not support NSArray in NSArray"); -// return; -// } -// } -// [dictValue setObject:array forKey:dictKey]; -// } -// } -// ((void (*)(id, SEL, id))(void *) objc_msgSend)(self, setter, dictValue); -// return; -// } -// -// NSString *itemType = [type substringWithRange:NSMakeRange(2, [type length]-3)]; -// Class itemClass = NSClassFromString(itemType); -// if (!itemClass) { -// //SSPWarning(@"Can't find class of %@", itemType); -// return; -// } -// Class parentClass = class_getSuperclass(itemClass); -// if ([parentClass isEqual:[GPBMessage class]] == NO) { -// //SSPWarning(@"%@ is not GPBMessage", itemType); -// return; -// } -// id item = [[itemClass alloc] initWithDictionary:value]; -// ((void (*)(id, SEL, id))(void *) objc_msgSend)(self, setter, item); -// return; -// } -//} -// -//@end diff --git a/Pods/CocoaDebug/Sources/Categories/NSObject+CocoaDebug.h b/Pods/CocoaDebug/Sources/Categories/NSObject+CocoaDebug.h deleted file mode 100644 index 8c4e80d..0000000 --- a/Pods/CocoaDebug/Sources/Categories/NSObject+CocoaDebug.h +++ /dev/null @@ -1,84 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import - -/*************************************************/ - -@interface NSData (CocoaDebug) - -+ (NSData *_Nullable)dataWithInputStream:(NSInputStream *_Nullable)stream; - -@end - -/*************************************************/ - -@interface NSString (CocoaDebug) - -- (CGFloat)heightWithFont:(UIFont *_Nullable)font constraintToWidth:(CGFloat)width; - -@end - -/*************************************************/ - -@interface NSURLRequest (CocoaDebug) - -- (NSString *_Nullable)requestId; -- (void)setRequestId:(NSString *_Nullable)requestId; - -- (NSNumber*_Nullable)startTime; -- (void)setStartTime:(NSNumber*_Nullable)startTime; - -@end - -/*************************************************/ - -@interface UIColor (CocoaDebug) - -+ (UIColor *_Nullable)colorFromHexString:(NSString *_Nullable)hexString; - -@end - -/*************************************************/ - -@interface NSDictionary (CocoaDebug) - -- (NSString *_Nullable)_stringForKey:(id_Nullable)key; -- (NSArray *_Nullable)_arrayForKey:(id_Nullable)key; -- (NSDictionary *_Nullable)_dictionaryForKey:(id_Nullable)key; -- (NSInteger)_integerForKey:(id_Nullable)key; -- (int64_t)_int64ForKey:(id_Nullable)key; -- (int32_t)_int32ForKey:(id_Nullable)key; -- (float)_floatForKey:(id_Nullable)key; -- (double)_doubleForKey:(id_Nullable)key; -- (BOOL)_boolForKey:(id_Nullable)key; - -- (NSString *_Nullable)_stringForKey:(id_Nullable)key default:(NSString * _Nullable)defaultValue; -- (bool)_boolForKey:(id_Nullable)key default:(bool)defaultValue; -- (NSInteger)_integerForKey:(id_Nullable)key default:(NSInteger)defaultValue; -- (float)_floatForKey:(id_Nullable)key default:(float)defaultValue; -- (NSArray *_Nullable)_arrayForKey:(id_Nullable)key default:(NSArray * _Nullable)defaultValue; -- (NSDictionary *_Nullable)_dictionaryForKey:(id_Nullable)key default:(NSDictionary * _Nullable)defaultValue; - -@end - -/*************************************************/ - -@interface UIImage (CocoaDebug) - -//Obtain the GIF image object according to the data data of a GIF image -+ (UIImage *_Nullable)imageWithGIFData:(NSData *_Nullable)data; - -//Obtain the GIF image object according to the name of the local GIF image -+ (UIImage *_Nullable)imageWithGIFNamed:(NSString *_Nullable)name; - -//Obtain the GIF image object according to the URL of a GIF image -+ (void)imageWithGIFUrl:(NSString *_Nullable)url gifImageBlock:(void(^_Nullable)(UIImage *_Nullable gifImage))gifImageBlock; - -@end diff --git a/Pods/CocoaDebug/Sources/Categories/NSObject+CocoaDebug.m b/Pods/CocoaDebug/Sources/Categories/NSObject+CocoaDebug.m deleted file mode 100644 index 409cf2a..0000000 --- a/Pods/CocoaDebug/Sources/Categories/NSObject+CocoaDebug.m +++ /dev/null @@ -1,367 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "NSObject+CocoaDebug.h" -#import -#import - -/*************************************************/ - -@implementation NSData (CocoaDebug) - -+ (NSData *)dataWithInputStream:(NSInputStream *)stream -{ - NSMutableData * data = [NSMutableData data]; - [stream open]; - NSInteger result; - uint8_t buffer[1024]; // BUFFER_LEN can be any positive integer - - while((result = [stream read:buffer maxLength:1024]) != 0) { - if (result > 0) { - // buffer contains result bytes of data to be handled - [data appendBytes:buffer length:result]; - } else { - // The stream had an error. You can get an NSError object using [iStream streamError] - if (result < 0) { -// [NSException raise:@"STREAM_ERROR" format:@"%@", [stream streamError]]; - return nil;//liman - } - } - } - return data; -} - -@end - -/*************************************************/ - -@implementation NSString (CocoaDebug) - -- (CGFloat)heightWithFont:(UIFont *)font constraintToWidth:(CGFloat)width -{ - CGRect rect = [self boundingRectWithSize:CGSizeMake(width, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:font} context:nil]; - - return rect.size.height; -} - -@end - -/*************************************************/ - -@implementation NSURLRequest (CocoaDebug) - -- (NSString *)requestId { - return objc_getAssociatedObject(self, @"requestId"); -} - -- (void)setRequestId:(NSString *)requestId { - objc_setAssociatedObject(self, @"requestId", requestId, OBJC_ASSOCIATION_COPY_NONATOMIC); -} - -- (NSNumber*)startTime { - return objc_getAssociatedObject(self, @"startTime"); -} - -- (void)setStartTime:(NSNumber*)startTime { - objc_setAssociatedObject(self, @"startTime", startTime, OBJC_ASSOCIATION_RETAIN_NONATOMIC); -} - -@end - -/*************************************************/ - -@implementation UIColor (CocoaDebug) - -+ (UIColor *)colorFromHexString:(NSString *)hexString -{ - unsigned rgbValue = 0; - NSScanner *scanner = [NSScanner scannerWithString:hexString]; - [scanner setScanLocation:1]; - [scanner scanHexInt:&rgbValue]; - return [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16)/255.0 green:((rgbValue & 0xFF00) >> 8)/255.0 blue:(rgbValue & 0xFF)/255.0 alpha:1.0]; -} - -@end - -/*************************************************/ - -@implementation NSDictionary (CocoaDebug) - -- (NSString *)_stringForKey:(id)key { - id obj = [self objectForKey:key]; - if (![obj isKindOfClass:[NSString class]]) { - return nil; - } - return obj; -} - -- (NSArray *)_arrayForKey:(id)key { - id obj = [self objectForKey:key]; - if (![obj isKindOfClass:[NSArray class]]) { - return nil; - } - return obj; -} - -- (NSDictionary *)_dictionaryForKey:(id)key { - id obj = [self objectForKey:key]; - if (![obj isKindOfClass:[NSDictionary class]]) { - return nil; - } - return obj; -} - -- (NSInteger)_integerForKey:(id)key { - id obj = [self objectForKey:key]; - if ([obj isKindOfClass:[NSNumber class]]) { - return [((NSNumber *)obj) integerValue]; - } - if ([obj isKindOfClass:[NSString class]]) { - return [((NSString *)obj) integerValue]; - } - return 0; -} - -- (int64_t)_int64ForKey:(id)key { - id obj = [self objectForKey:key]; - if ([obj isKindOfClass:[NSNumber class]]) { - return [((NSNumber *)obj) longLongValue]; - } - if ([obj isKindOfClass:[NSString class]]) { - return [((NSString *)obj) longLongValue]; - } - return 0; -} - -- (int32_t)_int32ForKey:(id)key { - id obj = [self objectForKey:key]; - if ([obj isKindOfClass:[NSNumber class]]) { - return [((NSNumber *)obj) intValue]; - } - if ([obj isKindOfClass:[NSString class]]) { - return [((NSString *)obj) intValue]; - } - return 0; -} - -- (float)_floatForKey:(id)key { - id obj = [self objectForKey:key]; - if ([obj isKindOfClass:[NSNumber class]]) { - return [((NSNumber *)obj) floatValue]; - } - if ([obj isKindOfClass:[NSString class]]) { - return [((NSString *)obj) floatValue]; - } - return 0; -} - -- (double)_doubleForKey:(id)key { - id obj = [self objectForKey:key]; - if ([obj isKindOfClass:[NSNumber class]]) { - return [((NSNumber *)obj) doubleValue]; - } - if ([obj isKindOfClass:[NSString class]]) { - return [((NSString *)obj) doubleValue]; - } - return 0; -} - -- (BOOL)_boolForKey:(id)key { - id obj = [self objectForKey:key]; - if ([obj isKindOfClass:[NSNumber class]]) { - return [((NSNumber *)obj) boolValue]; - } - if ([obj isKindOfClass:[NSString class]]) { - return [((NSString *)obj) boolValue]; - } - return NO; -} - -- (NSString *)_stringForKey:(id)key default:(NSString * _Nullable)defaultValue { - id obj = [self objectForKey:key]; - - if ([obj isKindOfClass:[NSString class]]) { - return obj; - } - return defaultValue; -} - -- (bool)_boolForKey:(id)key default:(bool)defaultValue { - id obj = [self objectForKey:key]; - - if ([obj isKindOfClass:[NSNumber class]] || [obj isKindOfClass:[NSString class]]) { - return [obj boolValue]; - } - return defaultValue; -} - -- (NSInteger)_integerForKey:(id)key default:(NSInteger)defaultValue { - id obj = [self objectForKey:key]; - - if ([obj isKindOfClass:[NSNumber class]] || [obj isKindOfClass:[NSString class]]) { - return [obj integerValue]; - } - return defaultValue; -} - -- (float)_floatForKey:(id)key default:(float)defaultValue { - id obj = [self objectForKey:key]; - - if ([obj isKindOfClass:[NSNumber class]] || [obj isKindOfClass:[NSString class]]) { - return [obj floatValue]; - } - return defaultValue; -} - -- (NSArray *)_arrayForKey:(id)key default:(NSArray * _Nullable)defaultValue { - id obj = [self objectForKey:key]; - - if ([obj isKindOfClass:[NSArray class]]) { - return obj; - } - return defaultValue; -} - -- (NSDictionary *)_dictionaryForKey:(id)key default:(NSDictionary * _Nullable)defaultValue { - id obj = [self objectForKey:key]; - - if ([obj isKindOfClass:[NSDictionary class]]) { - return obj; - } - return defaultValue; -} - -@end - -/*************************************************/ - -@implementation UIImage (CocoaDebug) - -//Obtain the GIF image object according to the data data of a GIF image -+ (UIImage *_Nullable)imageWithGIFData:(NSData *_Nullable)data { - if (!data) return nil; - - CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL); - size_t count = CGImageSourceGetCount(source); - UIImage *animatedImage; - - if (count <= 1) { - animatedImage = [[UIImage alloc] initWithData:data]; - - } else { - - NSMutableArray *images = [NSMutableArray array]; - NSTimeInterval duration = 0.0f; - - for (size_t i = 0; i < count; i++) { - - CGImageRef image = CGImageSourceCreateImageAtIndex(source, i, NULL); - - NSTimeInterval frameDuration = [UIImage ssz_frameDurationAtIndex:i source:source]; - - duration += frameDuration; - - [images addObject:[UIImage imageWithCGImage:image scale:[UIScreen mainScreen].scale orientation:UIImageOrientationUp]]; - - CFRelease(image); - } - - if (!duration) { - duration = (1.0f / 10.0f) * count; - } - - animatedImage = [UIImage animatedImageWithImages:images duration:duration]; - } - - CFRelease(source); - - return animatedImage; -} - -//Obtain the GIF image object according to the name of the local GIF image -+ (UIImage *_Nullable)imageWithGIFNamed:(NSString *_Nullable)name { - NSUInteger scale = (NSUInteger)[UIScreen mainScreen].scale; - return [self GIFName:name scale:scale]; -} - -+ (UIImage *)GIFName:(NSString *)name scale:(NSUInteger)scale { - NSString *imagePath = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%@@%zdx", name, scale] ofType:@"gif"]; - - if (!imagePath) { - (scale + 1 > 3) ? (scale -= 1) : (scale += 1); - imagePath = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%@@%zdx", name, scale] ofType:@"gif"]; - } - - if (imagePath) { - NSData *imageData = [NSData dataWithContentsOfFile:imagePath]; - return [UIImage imageWithGIFData:imageData]; - - } else { - - imagePath = [[NSBundle mainBundle] pathForResource:name ofType:@"gif"]; - - if (imagePath) { - NSData *imageData = [NSData dataWithContentsOfFile:imagePath]; - return [UIImage imageWithGIFData:imageData]; - - } else { - return [UIImage imageNamed:name]; - } - } -} - -//Obtain the GIF image object according to the URL of a GIF image -+ (void)imageWithGIFUrl:(NSString *_Nullable)url gifImageBlock:(void(^_Nullable)(UIImage *_Nullable gifImage))gifImageBlock { - NSURL *GIFUrl = [NSURL URLWithString:url]; - - if (!GIFUrl) return; - - dispatch_async(dispatch_get_global_queue(0, 0), ^{ - NSData *CIFData = [NSData dataWithContentsOfURL:GIFUrl]; - - dispatch_async(dispatch_get_main_queue(), ^{ - gifImageBlock([UIImage imageWithGIFData:CIFData]); - }); - }); -} - - -+ (float)ssz_frameDurationAtIndex:(NSUInteger)index source:(CGImageSourceRef)source { - float frameDuration = 0.1f; - - CFDictionaryRef cfFrameProperties = CGImageSourceCopyPropertiesAtIndex(source, index, nil); - NSDictionary *frameProperties = (__bridge NSDictionary *)cfFrameProperties; - NSDictionary *gifProperties = frameProperties[(NSString *)kCGImagePropertyGIFDictionary]; - NSNumber *delayTimeUnclampedProp = gifProperties[(NSString *)kCGImagePropertyGIFUnclampedDelayTime]; - - if (delayTimeUnclampedProp) { - frameDuration = [delayTimeUnclampedProp floatValue]; - - } else { - NSNumber *delayTimeProp = gifProperties[(NSString *)kCGImagePropertyGIFDelayTime]; - - if (delayTimeProp) { - frameDuration = [delayTimeProp floatValue]; - } - } - - // Many annoying ads specify a 0 duration to make an image flash as quickly as possible. - // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify - // a duration of <= 10 ms. See and - // for more information. - - if (frameDuration < 0.011f) { - frameDuration = 0.100f; - } - - CFRelease(cfFrameProperties); - - return frameDuration; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Core/CocoaDebug+Extensions.swift b/Pods/CocoaDebug/Sources/Core/CocoaDebug+Extensions.swift deleted file mode 100644 index ec267ff..0000000 --- a/Pods/CocoaDebug/Sources/Core/CocoaDebug+Extensions.swift +++ /dev/null @@ -1,393 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import Foundation - -extension Dictionary { - ///JSON/Form format conversion - func dictionaryToFormString() -> String? { - var array = [String]() - - for (key, value) in self { - array.append(String(describing: key) + "=" + String(describing: value)) - } - if array.count > 0 { - return array.joined(separator: "&") - } - return nil - } -} - -extension String { - ///JSON/Form format conversion - func formStringToDictionary() -> [String: Any]? { - var dictionary = [String: Any]() - let array = self.components(separatedBy: "&") - - for str in array { - let arr = str.components(separatedBy: "=") - if arr.count == 2 { - dictionary.updateValue(arr[1], forKey: arr[0]) - } else { - return nil - } - } - if dictionary.count > 0 { - return dictionary - } - return nil - } -} - -//MARK: - ********************************************************************* - -extension Data { - func dataToDictionary() -> [String: Any]? { - do { - return try JSONSerialization.jsonObject(with: self, options: []) as? [String : Any] - } catch { - } - return nil - } -} - -extension Dictionary { - func dictionaryToData() -> Data? { - do { - return try JSONSerialization.data(withJSONObject: self, options: .prettyPrinted) - } catch { - } - return nil - } -} - -extension Data { - func dataToString() -> String? { - return String(bytes: self, encoding: .utf8) - } -} - -extension String { - func stringToData() -> Data? { - return self.data(using: .utf8) - } -} - -//MARK: - ********************************************************************* - -extension String { - func stringToDictionary() -> [String: Any]? { - return self.stringToData()?.dataToDictionary() - } -} - -extension Dictionary { - func dictionaryToString() -> String? { - return self.dictionaryToData()?.dataToString() - } -} - -extension String { - func jsonStringToPrettyJsonString() -> String? { - return self.stringToDictionary()?.dictionaryToString() - } -} - -extension String { - func isValidURL() -> Bool { - if let url = URL(string: self) { - return UIApplication.shared.canOpenURL(url) - } - return false - } -} - -extension String { - func isValidJsonString() -> Bool { - if let _ = self.stringToDictionary() { - return true - } - return false - } -} - -extension String { - func isValidFormString() -> Bool { - if let _ = self.formStringToDictionary() { - return true - } - return false - } -} - -extension String { - func jsonStringToFormString() -> String? { - return self.stringToDictionary()?.dictionaryToFormString() - } -} - -extension String { - func formStringToJsonString() -> String? { - return self.formStringToDictionary()?.dictionaryToString() - } -} - -extension String { - func formStringToData() -> Data? { - return self.formStringToDictionary()?.dictionaryToData() - } -} - -extension Data { - func formDataToDictionary() -> [String: Any]? { - return self.dataToString()?.formStringToDictionary() - } -} - -extension Data { - func dataToPrettyPrintString() -> String? { - //1.pretty json - if let str = self.dataToDictionary()?.dictionaryToString() { - return str - } else { - //2.protobuf - // if let message = try? GPBMessage.parse(from: self) { - // if message.serializedSize() > 0 { - // return message.description - // } else { - // //3.utf-8 string - // return String(data: self, encoding: .utf8) - // } - // } else { - //3.utf-8 string - return String(data: self, encoding: .utf8) - // } - } - } -} - -//MARK: - ********************************************************************* - -//https://gist.github.com/arshad/de147c42d7b3063ef7bc -///Color -extension String { - var hexColor: UIColor { - let hex = trimmingCharacters(in: CharacterSet.alphanumerics.inverted) - var int = UInt32() - Scanner(string: hex).scanHexInt32(&int) - var a, r, g, b: UInt32 - switch hex.count { - case 3: // RGB (12-bit) - (a, r, g, b) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17) - case 6: // RGB (24-bit) - (a, r, g, b) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF) - case 8: // ARGB (32-bit) - (a, r, g, b) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF) - default: - return .clear - } - return UIColor(red: CGFloat(r) / 255, green: CGFloat(g) / 255, blue: CGFloat(b) / 255, alpha: CGFloat(a) / 255) - } -} - -extension UIView { - func addCorner(roundingCorners: UIRectCorner, cornerSize: CGSize) { - let path = UIBezierPath(roundedRect: self.bounds, byRoundingCorners: roundingCorners, cornerRadii: cornerSize) - let cornerLayer = CAShapeLayer() - cornerLayer.frame = bounds - cornerLayer.path = path.cgPath - self.layer.mask = cornerLayer - } -} - -//extension NSObject { -// func dispatch_main_async_safe(callback: @escaping ()->Void ) { -// if Thread.isMainThread { -// callback() -// } else { -// DispatchQueue.main.async( execute: { -// callback() -// }) -// } -// } -//} - -//https://stackoverflow.com/questions/26244293/scrolltorowatindexpath-with-uitableview-does-not-work -///tableView -extension UITableView { - func tableViewScrollToBottom(animated: Bool) { - DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1)) { - let numberOfSections = self.numberOfSections - let numberOfRows = self.numberOfRows(inSection: numberOfSections-1) - - if numberOfRows > 0 { - let indexPath = IndexPath(row: numberOfRows-1, section: (numberOfSections-1)) - self.scrollToRow(at: indexPath, at: .bottom, animated: animated) - } - } - } - - func tableViewScrollToIndex(index: Int, animated: Bool) { - DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1)) { - self.scrollToRow(at: IndexPath(row: index, section: 0), at: .middle, animated: animated) - } - } - - func tableViewScrollToHeader(animated: Bool) { - self.scrollRectToVisible(CGRect(x: 0, y: 0, width: 1, height: 1), animated: animated) - } - - func reloadData(completion: @escaping () -> ()) { - UIView.animate(withDuration: 0, animations: { self.reloadData()}) - {_ in completion() } - } -} - -///shake -extension UIWindow { - - private static var _cocoadebugShakeProperty = [String:Bool]() - - var cocoadebugShakeProperty:Bool { - get { - let tmpAddress = String(format: "%p", unsafeBitCast(self, to: Int.self)) - return UIWindow._cocoadebugShakeProperty[tmpAddress] ?? false - } - set(newValue) { - let tmpAddress = String(format: "%p", unsafeBitCast(self, to: Int.self)) - UIWindow._cocoadebugShakeProperty[tmpAddress] = newValue - } - } - - - open override var canBecomeFirstResponder: Bool { - return true - } - - open override func motionBegan(_ motion: UIEvent.EventSubtype, with event: UIEvent?) { - super.motionBegan(motion, with: event) - - self.cocoadebugShakeProperty = true - - if CocoaDebugSettings.shared.responseShake == false {return} - if motion == .motionShake { - if CocoaDebugSettings.shared.visible == true { return } - CocoaDebugSettings.shared.showBubbleAndWindow = !CocoaDebugSettings.shared.showBubbleAndWindow - } - } - - open override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) { - super.motionEnded(motion, with: event) - - if self.cocoadebugShakeProperty == true { - self.cocoadebugShakeProperty = false - return - } - - if CocoaDebugSettings.shared.responseShake == false {return} - if motion == .motionShake { - if CocoaDebugSettings.shared.visible == true { return } - CocoaDebugSettings.shared.showBubbleAndWindow = !CocoaDebugSettings.shared.showBubbleAndWindow - } - } -} - - -///CocoaDebug -extension CocoaDebug { - - ///init - static func initializationMethod(serverURL: String? = nil, ignoredURLs: [String]? = nil, onlyURLs: [String]? = nil, ignoredPrefixLogs: [String]? = nil, onlyPrefixLogs: [String]? = nil, additionalViewController: UIViewController? = nil, emailToRecipients: [String]? = nil, emailCcRecipients: [String]? = nil, mainColor: String? = nil, protobufTransferMap: [String: [String]]? = nil) - { - if serverURL == nil { - CocoaDebugSettings.shared.serverURL = "" - } else { - CocoaDebugSettings.shared.serverURL = serverURL - } - - if ignoredURLs == nil { - CocoaDebugSettings.shared.ignoredURLs = [] - } else { - CocoaDebugSettings.shared.ignoredURLs = ignoredURLs - } - if onlyURLs == nil { - CocoaDebugSettings.shared.onlyURLs = [] - } else { - CocoaDebugSettings.shared.onlyURLs = onlyURLs - } - - if ignoredPrefixLogs == nil { - CocoaDebugSettings.shared.ignoredPrefixLogs = [] - } else { - CocoaDebugSettings.shared.ignoredPrefixLogs = ignoredPrefixLogs - } - if onlyPrefixLogs == nil { - CocoaDebugSettings.shared.onlyPrefixLogs = [] - } else { - CocoaDebugSettings.shared.onlyPrefixLogs = onlyPrefixLogs - } - - if CocoaDebugSettings.shared.firstIn == nil {//first launch - CocoaDebugSettings.shared.firstIn = "" - CocoaDebugSettings.shared.showBubbleAndWindow = true - } else {//not first launch - CocoaDebugSettings.shared.showBubbleAndWindow = CocoaDebugSettings.shared.showBubbleAndWindow - } - - CocoaDebugSettings.shared.visible = false - CocoaDebugSettings.shared.logSearchWordNormal = nil - CocoaDebugSettings.shared.logSearchWordRN = nil - CocoaDebugSettings.shared.logSearchWordWeb = nil - CocoaDebugSettings.shared.networkSearchWord = nil - CocoaDebugSettings.shared.protobufTransferMap = protobufTransferMap - CocoaDebugSettings.shared.additionalViewController = additionalViewController - - var _ = _OCLogStoreManager.shared() - CocoaDebugSettings.shared.responseShake = true - - //share via email - CocoaDebugSettings.shared.emailToRecipients = emailToRecipients - CocoaDebugSettings.shared.emailCcRecipients = emailCcRecipients - - //color - CocoaDebugSettings.shared.mainColor = mainColor ?? "#42d459" - - //slow animations - CocoaDebugSettings.shared.slowAnimations = false - - //log - let enableLogMonitoring = UserDefaults.standard.bool(forKey: "enableLogMonitoring_CocoaDebug") - if enableLogMonitoring == false { - _SwiftLogHelper.shared.enable = false -// _OCLogHelper.shared()?.enable = false - } else { - _SwiftLogHelper.shared.enable = true -// _OCLogHelper.shared()?.enable = true - } - - //network - let disableNetworkMonitoring = UserDefaults.standard.bool(forKey: "disableNetworkMonitoring_CocoaDebug") - if disableNetworkMonitoring == true { - _NetworkHelper.shared().disable() - } else { - _NetworkHelper.shared().enable() - } - } - - ///deinit - static func deinitializationMethod() { - WindowHelper.shared.disable() - _NetworkHelper.shared().disable() - _SwiftLogHelper.shared.enable = false -// _OCLogHelper.shared()?.enable = false - CrashLogger.shared.enable = false - CocoaDebugSettings.shared.responseShake = false - } -} - - diff --git a/Pods/CocoaDebug/Sources/Core/CocoaDebug.h b/Pods/CocoaDebug/Sources/Core/CocoaDebug.h deleted file mode 100644 index b47007b..0000000 --- a/Pods/CocoaDebug/Sources/Core/CocoaDebug.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "CocoaDebug.h" -#import "CocoaDebugTool.h" -#import "CocoaDebugDeviceInfo.h" -#import "NSObject+CocoaDebug.h" - -#import "_fishhook.h" -#import "_FileInfo.h" -#import "_Swizzling.h" -#import "_ObjcLog.h" -#import "_Sandboxer.h" -#import "_HttpModel.h" -#import "_OCLogModel.h" -#import "_OCLogHelper.h" -#import "_NetworkHelper.h" -#import "_HttpDatasource.h" -#import "_ImageResources.h" -#import "_OCLoggerFormat.h" -#import "_RunloopMonitor.h" -#import "_BacktraceLogger.h" -#import "_ImageController.h" -#import "_SandboxerHelper.h" -#import "_CanonicalRequest.h" -#import "_Sandboxer-Header.h" -#import "_FileTableViewCell.h" -#import "_OCLogStoreManager.h" -#import "_DebugConsoleLabel.h" -#import "_CustomHTTPProtocol.h" -#import "_CacheStoragePolicy.h" -#import "_QNSURLSessionDemux.h" -#import "GPBMessage+CocoaDebug.h" -#import "_FilePreviewController.h" -#import "_DirectoryContentsTableViewController.h" diff --git a/Pods/CocoaDebug/Sources/Core/CocoaDebug.swift b/Pods/CocoaDebug/Sources/Core/CocoaDebug.swift deleted file mode 100644 index d66dbcf..0000000 --- a/Pods/CocoaDebug/Sources/Core/CocoaDebug.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import Foundation -import UIKit - -@objc public class CocoaDebug : NSObject { - - ///if the captured URLs contain server URL, CocoaDebug set server URL bold font to be marked. Not mark when this value is nil. Default value is `nil`. - @objc public static var serverURL: String? = nil - ///set the URLs which should not been captured, CocoaDebug capture all URLs when the value is nil. Default value is `nil`. - @objc public static var ignoredURLs: [String]? = nil - ///set the URLs which are only been captured, CocoaDebug capture all URLs when the value is nil. Default value is `nil`. - @objc public static var onlyURLs: [String]? = nil - ///set the prefix Logs which should not been captured, CocoaDebug capture all Logs when the value is nil. Default value is `nil`. - @objc public static var ignoredPrefixLogs: [String]? = nil - ///set the prefix Logs which are only been captured, CocoaDebug capture all Logs when the value is nil. Default value is `nil`. - @objc public static var onlyPrefixLogs: [String]? = nil - ///add an additional UIViewController as child controller of CocoaDebug's main UITabBarController. Default value is `nil`. - @objc public static var additionalViewController: UIViewController? = nil - ///set the initial recipients to include in the email’s “To” field when share via email. Default value is `nil`. - @objc public static var emailToRecipients: [String]? = nil - ///set the initial recipients to include in the email’s “Cc” field when share via email. Default value is `nil`. - @objc public static var emailCcRecipients: [String]? = nil - ///set CocoaDebug's main color with hexadecimal format. Default value is `#42d459`. - @objc public static var mainColor: String = "#42d459" - ///protobuf url and response class transfer map. Default value is `nil`. - @objc public static var protobufTransferMap: [String: [String]]? = nil - - //MARK: - CocoaDebug enable - @objc public static func enable() { - initializationMethod(serverURL: serverURL, ignoredURLs: ignoredURLs, onlyURLs: onlyURLs, ignoredPrefixLogs: ignoredPrefixLogs, onlyPrefixLogs: onlyPrefixLogs, additionalViewController: additionalViewController, emailToRecipients: emailToRecipients, emailCcRecipients: emailCcRecipients, mainColor: mainColor, protobufTransferMap: protobufTransferMap) - } - - //MARK: - CocoaDebug disable - @objc public static func disable() { - deinitializationMethod() - } - - //MARK: - hide Bubble - @objc public static func hideBubble() { - CocoaDebugSettings.shared.showBubbleAndWindow = false - } - - //MARK: - show Bubble - @objc public static func showBubble() { - CocoaDebugSettings.shared.showBubbleAndWindow = true - } -} - - - -//MARK: - override Swift `print` method -public func print(file: String = #file, function: String = #function, line: Int = #line, _ message: T, color: UIColor = .white) { - Swift.print(message) - _SwiftLogHelper.shared.handleLog(file: file, function: function, line: line, message: message, color: color) -} - - - diff --git a/Pods/CocoaDebug/Sources/Core/CocoaDebugDeviceInfo.h b/Pods/CocoaDebug/Sources/Core/CocoaDebugDeviceInfo.h deleted file mode 100644 index 3f6e344..0000000 --- a/Pods/CocoaDebug/Sources/Core/CocoaDebugDeviceInfo.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// -// https://github.com/maybeliu/MBDeviceTool_OC - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface CocoaDebugDeviceInfo : NSObject - -@property (nonatomic, assign, readonly) CGSize resolution; - -@property (nonatomic, copy, readonly) NSString *systemType; -@property (nonatomic, copy, readonly) NSString *userName; -@property (nonatomic, copy, readonly) NSString *systemVersion; -@property (nonatomic, copy, readonly) NSString *deviceModel; -@property (nonatomic, copy, readonly) NSString *deviceUUID; -@property (nonatomic, copy, readonly) NSString *userPhoneName; -@property (nonatomic, copy, readonly) NSString *deviceName; -@property (nonatomic, copy, readonly) NSString *getPlatformString; -@property (nonatomic, copy, readonly) NSString *localizedModel; -@property (nonatomic, copy, readonly) NSString *appVersion; -@property (nonatomic, copy, readonly) NSString *appBuiltVersion; -@property (nonatomic, copy, readonly) NSString *appBundleID ; -@property (nonatomic, copy, readonly) NSString *appBundleName ; - -+ (instancetype)sharedInstance; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Pods/CocoaDebug/Sources/Core/CocoaDebugDeviceInfo.m b/Pods/CocoaDebug/Sources/Core/CocoaDebugDeviceInfo.m deleted file mode 100644 index 250a2ae..0000000 --- a/Pods/CocoaDebug/Sources/Core/CocoaDebugDeviceInfo.m +++ /dev/null @@ -1,89 +0,0 @@ -// -// CocoaDebug -// liman -// -// Created by liman 02/02/2023. -// Copyright © 2023 liman. All rights reserved. -// - -#import "CocoaDebugDeviceInfo.h" -#import "sys/utsname.h" -#import "_DeviceUtil.h" - -@implementation CocoaDebugDeviceInfo - -+ (instancetype)sharedInstance { - - static CocoaDebugDeviceInfo *sharedInstance; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedInstance = [[CocoaDebugDeviceInfo alloc] init]; - }); - return sharedInstance; -} - -- (NSString *)systemType { - - return [[UIDevice currentDevice] systemName]; -} - -- (NSString *)userName { - - return [[UIDevice currentDevice] name]; -} - -- (NSString *)systemVersion { - - return [[UIDevice currentDevice] systemVersion]; -} - -- (NSString *)deviceModel { - - return [[UIDevice currentDevice] model]; -} - -- (NSString *)deviceUUID { - - return [[[UIDevice currentDevice] identifierForVendor] UUIDString]; -} - -- (NSString *)deviceName { - struct utsname systemInfo; - uname(&systemInfo); - NSString *code = [NSString stringWithCString:systemInfo.machine - encoding:NSUTF8StringEncoding]; - return code; -} - - -- (NSString *)getPlatformString { - return [[_DeviceUtil new] hardwareSimpleDescription]; -} - -- (NSString *)localizedModel { - return [[UIDevice currentDevice] localizedModel]; -} - -- (NSString *)appVersion { - return [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"]; -} - -- (NSString *)appBuiltVersion { - return [[NSBundle mainBundle] infoDictionary][@"CFBundleVersion"]; -} - -- (NSString *)appBundleID { - NSString *bundleID = [[NSBundle mainBundle] bundleIdentifier]; - return bundleID; -} - -- (NSString *)appBundleName { - NSString *bundleName = [[NSBundle mainBundle] objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleNameKey]; - return bundleName; -} - -- (CGSize)resolution { - return CGSizeMake([UIScreen mainScreen].bounds.size.width * [[UIScreen mainScreen] scale], [UIScreen mainScreen].bounds.size.height * [[UIScreen mainScreen] scale]); -} - -@end diff --git a/Pods/CocoaDebug/Sources/Core/CocoaDebugSettings.swift b/Pods/CocoaDebug/Sources/Core/CocoaDebugSettings.swift deleted file mode 100644 index 787fc44..0000000 --- a/Pods/CocoaDebug/Sources/Core/CocoaDebugSettings.swift +++ /dev/null @@ -1,277 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import Foundation - -@objc public class CocoaDebugSettings: NSObject { - - @objc public static let shared = CocoaDebugSettings() - - @objc public var slowAnimations: Bool = false { - didSet { - if slowAnimations == false { - UIApplication.shared.windows.first?.layer.speed = 1; - } else { - UIApplication.shared.windows.first?.layer.speed = 0.1; - } - } - } - - @objc public var responseShake: Bool = false { - didSet { - UserDefaults.standard.set(responseShake, forKey: "responseShake_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - - @objc public var firstIn: String? = nil { - didSet { - UserDefaults.standard.set(firstIn, forKey: "firstIn_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var enableCrashRecording: Bool = false { - didSet { - UserDefaults.standard.set(enableCrashRecording, forKey: "enableCrashRecording_CocoaDebug") - UserDefaults.standard.synchronize() - - if enableCrashRecording == true { - CrashLogger.shared.enable = true - } else { - CrashLogger.shared.enable = false - CrashStoreManager.shared.resetCrashs() - } - } - } - @objc public var enableUIBlockingMonitoring: Bool = false { - didSet { - UserDefaults.standard.set(enableUIBlockingMonitoring, forKey: "enableUIBlockingMonitoring_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var enableWKWebViewMonitoring: Bool = false { - didSet { - UserDefaults.standard.set(enableWKWebViewMonitoring, forKey: "enableWKWebViewMonitoring_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var enableLogMonitoring: Bool = false { - didSet { - UserDefaults.standard.set(enableLogMonitoring, forKey: "enableLogMonitoring_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var disableNetworkMonitoring: Bool = false { - didSet { - UserDefaults.standard.set(disableNetworkMonitoring, forKey: "disableNetworkMonitoring_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var enableRNMonitoring: Bool = false { - didSet { - UserDefaults.standard.set(enableRNMonitoring, forKey: "enableRNMonitoring_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var enableMemoryLeaksMonitoring_ViewController: Bool = false { - didSet { - UserDefaults.standard.set(enableMemoryLeaksMonitoring_ViewController, forKey: "enableMemoryLeaksMonitoring_UIViewController_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var enableMemoryLeaksMonitoring_View: Bool = false { - didSet { - UserDefaults.standard.set(enableMemoryLeaksMonitoring_View, forKey: "enableMemoryLeaksMonitoring_UIView_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var enableMemoryLeaksMonitoring_MemberVariables: Bool = false { - didSet { - UserDefaults.standard.set(enableMemoryLeaksMonitoring_MemberVariables, forKey: "enableMemoryLeaksMonitoring_MemberVariables_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var visible: Bool = false { - didSet { - UserDefaults.standard.set(visible, forKey: "visible_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var showBubbleAndWindow: Bool = false { - didSet { - UserDefaults.standard.set(showBubbleAndWindow, forKey: "showBubbleAndWindow_CocoaDebug") - UserDefaults.standard.synchronize() - - let x = WindowHelper.shared.vc.bubble.frame.origin.x - let width = WindowHelper.shared.vc.bubble.frame.size.width - - if showBubbleAndWindow == true - { - if x > UIScreen.main.bounds.size.width/2 { - WindowHelper.shared.vc.bubble.frame.origin.x = UIScreen.main.bounds.size.width - width/8*8.25 - } else { - WindowHelper.shared.vc.bubble.frame.origin.x = -width + width/8*8.25 - } - WindowHelper.shared.enable() - } - else - { - if x > UIScreen.main.bounds.size.width/2 { - WindowHelper.shared.vc.bubble.frame.origin.x = UIScreen.main.bounds.size.width - } else { - WindowHelper.shared.vc.bubble.frame.origin.x = -width - } - WindowHelper.shared.disable() - } - } - } - @objc public var serverURL: String? = nil { - didSet { - UserDefaults.standard.set(serverURL, forKey: "serverURL_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var tabBarSelectItem: Int { - didSet { - UserDefaults.standard.set(tabBarSelectItem, forKey: "tabBarSelectItem_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var logSelectIndex: Int { - didSet { - UserDefaults.standard.set(logSelectIndex, forKey: "logSelectIndex_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var networkLastIndex: Int { - didSet { - UserDefaults.standard.set(networkLastIndex, forKey: "networkLastIndex_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var bubbleFrameX: Float { - didSet { - UserDefaults.standard.set(bubbleFrameX, forKey: "bubbleFrameX_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var bubbleFrameY: Float { - didSet { - UserDefaults.standard.set(bubbleFrameY, forKey: "bubbleFrameY_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var logSearchWordNormal: String? = nil { - didSet { - UserDefaults.standard.set(logSearchWordNormal, forKey: "logSearchWordNormal_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var logSearchWordRN: String? = nil { - didSet { - UserDefaults.standard.set(logSearchWordRN, forKey: "logSearchWordRN_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var logSearchWordWeb: String? = nil { - didSet { - UserDefaults.standard.set(logSearchWordWeb, forKey: "logSearchWordWeb_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var networkSearchWord: String? = nil { - didSet { - UserDefaults.standard.set(networkSearchWord, forKey: "networkSearchWord_CocoaDebug") - UserDefaults.standard.synchronize() - } - } - @objc public var mainColor: String { - didSet { - UserDefaults.standard.set(mainColor, forKey: "mainColor_CocoaDebug") - UserDefaults.standard.synchronize() - _NetworkHelper.shared().mainColor = mainColor.hexColor - } - } - @objc public var additionalViewController: UIViewController? = nil - - //share via email - @objc public var emailToRecipients: [String]? = nil - @objc public var emailCcRecipients: [String]? = nil - - //objc - - @objc public var ignoredURLs: [String]? = nil { - didSet { - _NetworkHelper.shared().ignoredURLs = ignoredURLs - } - } - @objc public var onlyURLs: [String]? = nil { - didSet { - _NetworkHelper.shared().onlyURLs = onlyURLs - } - } - - @objc public var ignoredPrefixLogs: [String]? = nil { - didSet { - _NetworkHelper.shared().ignoredPrefixLogs = ignoredPrefixLogs - } - } - @objc public var onlyPrefixLogs: [String]? = nil { - didSet { - _NetworkHelper.shared().onlyPrefixLogs = onlyPrefixLogs - } - } - - //protobuf - @objc public var protobufTransferMap: [String: [String]]? = nil { - didSet { - _NetworkHelper.shared().protobufTransferMap = protobufTransferMap - } - } - - private override init() { - responseShake = UserDefaults.standard.bool(forKey: "responseShake_CocoaDebug") - firstIn = UserDefaults.standard.string(forKey: "firstIn_CocoaDebug") - serverURL = UserDefaults.standard.string(forKey: "serverURL_CocoaDebug") - visible = UserDefaults.standard.bool(forKey: "visible_CocoaDebug") - showBubbleAndWindow = UserDefaults.standard.bool(forKey: "showBubbleAndWindow_CocoaDebug") - enableCrashRecording = UserDefaults.standard.bool(forKey: "enableCrashRecording_CocoaDebug") - enableUIBlockingMonitoring = UserDefaults.standard.bool(forKey: "enableUIBlockingMonitoring_CocoaDebug") - enableWKWebViewMonitoring = UserDefaults.standard.bool(forKey: "enableWKWebViewMonitoring_CocoaDebug") - enableLogMonitoring = UserDefaults.standard.bool(forKey: "enableLogMonitoring_CocoaDebug") - disableNetworkMonitoring = UserDefaults.standard.bool(forKey: "disableNetworkMonitoring_CocoaDebug") - enableRNMonitoring = UserDefaults.standard.bool(forKey: "enableRNMonitoring_CocoaDebug") - tabBarSelectItem = UserDefaults.standard.integer(forKey: "tabBarSelectItem_CocoaDebug") - logSelectIndex = UserDefaults.standard.integer(forKey: "logSelectIndex_CocoaDebug") - networkLastIndex = UserDefaults.standard.integer(forKey: "networkLastIndex_CocoaDebug") - bubbleFrameX = UserDefaults.standard.float(forKey: "bubbleFrameX_CocoaDebug") - bubbleFrameY = UserDefaults.standard.float(forKey: "bubbleFrameY_CocoaDebug") - logSearchWordNormal = UserDefaults.standard.string(forKey: "logSearchWordNormal_CocoaDebug") - logSearchWordRN = UserDefaults.standard.string(forKey: "logSearchWordRN_CocoaDebug") - logSearchWordWeb = UserDefaults.standard.string(forKey: "logSearchWordWeb_CocoaDebug") - networkSearchWord = UserDefaults.standard.string(forKey: "networkSearchWord_CocoaDebug") - mainColor = UserDefaults.standard.string(forKey: "mainColor_CocoaDebug") ?? "#42d459" - - - //objc - - ignoredURLs = _NetworkHelper.shared().ignoredURLs - onlyURLs = _NetworkHelper.shared().onlyURLs - - ignoredPrefixLogs = _NetworkHelper.shared().ignoredPrefixLogs - onlyPrefixLogs = _NetworkHelper.shared().onlyPrefixLogs - - //protobuf - protobufTransferMap = _NetworkHelper.shared().protobufTransferMap - - //Memory - enableMemoryLeaksMonitoring_ViewController = UserDefaults.standard.bool(forKey: "enableMemoryLeaksMonitoring_UIViewController_CocoaDebug") - enableMemoryLeaksMonitoring_View = UserDefaults.standard.bool(forKey: "enableMemoryLeaksMonitoring_UIView_CocoaDebug") - enableMemoryLeaksMonitoring_MemberVariables = UserDefaults.standard.bool(forKey: "enableMemoryLeaksMonitoring_MemberVariables_CocoaDebug") - } -} diff --git a/Pods/CocoaDebug/Sources/Core/_AutoLaunch.m b/Pods/CocoaDebug/Sources/Core/_AutoLaunch.m deleted file mode 100644 index 5500795..0000000 --- a/Pods/CocoaDebug/Sources/Core/_AutoLaunch.m +++ /dev/null @@ -1,51 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -static const char *kPropertyKey = "kApplicationDidFinishLaunching_CocoaDebug_Key"; - -#import -#import -#import -#import "_NetworkHelper.h" - -@interface NSObject (CocoaDebugAutoLaunch) - -@property (nonatomic, assign) BOOL cocoadebug_applicationDidFinishLaunching; - -@end - -@implementation NSObject (CocoaDebugAutoLaunch) - -#pragma mark - load -+ (void)load { - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(cocoadebug_applicationDidFinishLaunchingNotification:) name:UIApplicationDidFinishLaunchingNotification object:nil]; -} - -#pragma mark - notification -- (void)cocoadebug_applicationDidFinishLaunchingNotification:(NSNotification *)notification { - if (self.cocoadebug_applicationDidFinishLaunching) {return;} - self.cocoadebug_applicationDidFinishLaunching = YES; - - Class CocoaDebug = NSClassFromString(@"_TtC10CocoaDebug10CocoaDebug"); - if (CocoaDebug) { - [[CocoaDebug class] performSelector:@selector(enable)]; - } -} - -#pragma mark - getter setter -- (BOOL)cocoadebug_applicationDidFinishLaunching { - NSNumber *number = objc_getAssociatedObject(self, kPropertyKey); - return [number boolValue]; -} - -- (void)setCocoadebug_applicationDidFinishLaunching:(BOOL)applicationDidFinishLaunching { - NSNumber *number = [NSNumber numberWithBool:applicationDidFinishLaunching]; - objc_setAssociatedObject(self, kPropertyKey, number, OBJC_ASSOCIATION_RETAIN); -} - -@end diff --git a/Pods/CocoaDebug/Sources/Core/_DeviceUtil+Constant.h b/Pods/CocoaDebug/Sources/Core/_DeviceUtil+Constant.h deleted file mode 100644 index 3ab9c6e..0000000 --- a/Pods/CocoaDebug/Sources/Core/_DeviceUtil+Constant.h +++ /dev/null @@ -1,325 +0,0 @@ -// -// CocoaDebug -// liman -// -// Created by liman 02/02/2023. -// Copyright © 2023 liman. All rights reserved. -// - -typedef NS_ENUM(NSUInteger, Hardware) { - - - IPHONE_2G, - IPHONE_3G, - IPHONE_3GS, - IPHONE_4, - IPHONE_4_CDMA, - IPHONE_4S, - IPHONE_5, - IPHONE_5_CDMA_GSM, - IPHONE_5C, - IPHONE_5C_CDMA_GSM, - IPHONE_5S, - IPHONE_5S_CDMA_GSM, - IPHONE_6_PLUS, - IPHONE_6, - IPHONE_6S, - IPHONE_6S_PLUS, - IPHONE_SE, - IPHONE_7, - IPHONE_7_PLUS, - IPHONE_7_GSM, - IPHONE_7_PLUS_GSM, - IPHONE_8_CN, - IPHONE_8_PLUS_CN, - IPHONE_X_CN, - IPHONE_8, - IPHONE_8_PLUS, - IPHONE_X, - IPHONE_XS, - IPHONE_XS_MAX, - IPHONE_XS_MAX_CN, - IPHONE_XR, - IPHONE_11, - IPHONE_11_PRO, - IPHONE_11_PRO_MAX, - IPHONE_SE_2G, - IPHONE_12_MINI, - IPHONE_12, - IPHONE_12_PRO, - IPHONE_12_PRO_MAX, - IPHONE_13_PRO, - IPHONE_13_PRO_MAX, - IPHONE_13_MINI, - IPHONE_13, - IPHONE_SE_3G, - IPHONE_14, - IPHONE_14_PLUS, - IPHONE_14_PRO, - IPHONE_14_PRO_MAX, - - IPOD_TOUCH_1G, - IPOD_TOUCH_2G, - IPOD_TOUCH_3G, - IPOD_TOUCH_4G, - IPOD_TOUCH_5G, - IPOD_TOUCH_6G, - IPOD_TOUCH_7G, - - IPAD, - IPAD_3G, - IPAD_2_WIFI, - IPAD_2, - IPAD_2_CDMA, - IPAD_MINI_WIFI, - IPAD_MINI, - IPAD_MINI_WIFI_CDMA, - IPAD_3_WIFI, - IPAD_3_WIFI_CDMA, - IPAD_3, - IPAD_4_WIFI, - IPAD_4, - IPAD_4_GSM_CDMA, - IPAD_AIR_WIFI, - IPAD_AIR_WIFI_GSM, - IPAD_AIR_WIFI_CDMA, - IPAD_MINI_RETINA_WIFI, - IPAD_MINI_RETINA_WIFI_CDMA, - IPAD_MINI_RETINA_WIFI_CELLULAR_CN, - IPAD_MINI_3_WIFI, - IPAD_MINI_3_WIFI_CELLULAR, - IPAD_MINI_3_WIFI_CELLULAR_CN, - IPAD_MINI_4_WIFI, - IPAD_MINI_4_WIFI_CELLULAR, - IPAD_AIR_2_WIFI, - IPAD_AIR_2_WIFI_CELLULAR, - IPAD_5_WIFI, - IPAD_5_WIFI_CELLULAR, - IPAD_PRO_97_WIFI, - IPAD_PRO_97_WIFI_CELLULAR, - IPAD_PRO_WIFI, - IPAD_PRO_WIFI_CELLULAR, - IPAD_PRO_2G_WIFI, - IPAD_7_WIFI, - IPAD_7_WIFI_CELLULAR, - IPAD_PRO_2G_WIFI_CELLULAR, - IPAD_PRO_105_WIFI, - IPAD_PRO_105_WIFI_CELLULAR, - IPAD_6_WIFI, - IPAD_6_WIFI_CELLULAR, - IPAD_PRO_11_2G_WIFI_CELLULAR, - IPAD_PRO_11_WIFI, - IPAD_PRO_4G_WIFI, - IPAD_PRO_11_1TB_WIFI, - IPAD_PRO_11_WIFI_CELLULAR, - IPAD_PRO_11_1TB_WIFI_CELLULAR, - IPAD_PRO_3G_WIFI, - IPAD_PRO_3G_1TB_WIFI, - IPAD_PRO_3G_WIFI_CELLULAR, - IPAD_PRO_4G_WIFI_CELLULAR, - IPAD_PRO_3G_1TB_WIFI_CELLULAR, - IPAD_PRO_11_2G_WIFI, - IPAD_MINI_5_WIFI, - IPAD_MINI_5_WIFI_CELLULAR, - IPAD_AIR_3_WIFI, - IPAD_AIR_3_WIFI_CELLULAR, - IPAD_9_WIFI, - IPAD_9_WIFI_CELLULAR, - IPAD_PRO_5_WIFI_CELLULAR, - IPAD_AIR_4_WIFI, - IPAD_AIR_5_WIFI, - IPAD_AIR_5_WIFI_CELLULAR, - IPAD_AIR_4_WIFI_CELLULAR, - IPAD_PRO_11_3_WIFI, - IPAD_PRO_11_3_WIFI_CELLULAR, - IPAD_PRO_5_WIFI, - IPAD_MINI_6_WIFI, - IPAD_MINI_6_WIFI_CELLULAR, - - APPLE_WATCH_38, - APPLE_WATCH_42, - APPLE_WATCH_SERIES_2_38, - APPLE_WATCH_SERIES_2_42, - APPLE_WATCH_SERIES_1_38, - APPLE_WATCH_SERIES_1_42, - APPLE_WATCH_SERIES_3_38_CELLULAR, - APPLE_WATCH_SERIES_3_42_CELLULAR, - APPLE_WATCH_SERIES_3_38, - APPLE_WATCH_SERIES_3_42, - APPLE_WATCH_SERIES_4_40, - APPLE_WATCH_SERIES_4_44, - APPLE_WATCH_SERIES_4_40_CELLULAR, - APPLE_WATCH_SERIES_4_44_CELLULAR, - APPLE_WATCH_SERIES_5_40, - APPLE_WATCH_SERIES_5_44, - APPLE_WATCH_SERIES_5_40_CELLULAR, - APPLE_WATCH_SERIES_5_44_CELLULAR, - - APPLE_TV_1G, - APPLE_TV_2G, - APPLE_TV_3G, - APPLE_TV_3_2G, - APPLE_TV_4G, - APPLE_TV_4K, - - SIMULATOR, - UNKNOWN -}; - -extern NSString* const AppleTV1_1; -extern NSString* const AppleTV2_1; -extern NSString* const AppleTV3_1; -extern NSString* const AppleTV3_2; -extern NSString* const AppleTV5_3; -extern NSString* const AppleTV6_2; -extern NSString* const Watch1_1; -extern NSString* const Watch1_2; -extern NSString* const Watch2_3; -extern NSString* const Watch2_4; -extern NSString* const Watch2_6; -extern NSString* const Watch2_7; -extern NSString* const Watch3_1; -extern NSString* const Watch3_2; -extern NSString* const Watch3_3; -extern NSString* const Watch3_4; -extern NSString* const Watch4_1; -extern NSString* const Watch4_2; -extern NSString* const Watch4_3; -extern NSString* const Watch4_4; -extern NSString* const Watch5_1; -extern NSString* const Watch5_2; -extern NSString* const Watch5_3; -extern NSString* const Watch5_4; -extern NSString* const i386_Simulator; -extern NSString* const iPad1_1; -extern NSString* const iPad1_2; -extern NSString* const iPad11_1; -extern NSString* const iPad11_2; -extern NSString* const iPad11_3; -extern NSString* const iPad11_4; -extern NSString* const iPad12_1; -extern NSString* const iPad12_2; -extern NSString* const iPad13_1; -extern NSString* const iPad13_10; -extern NSString* const iPad13_11; -extern NSString* const iPad13_16; -extern NSString* const iPad13_17; -extern NSString* const iPad13_2; -extern NSString* const iPad13_4; -extern NSString* const iPad13_5; -extern NSString* const iPad13_6; -extern NSString* const iPad13_7; -extern NSString* const iPad13_8; -extern NSString* const iPad13_9; -extern NSString* const iPad14_1; -extern NSString* const iPad14_2; -extern NSString* const iPad2_1; -extern NSString* const iPad2_2; -extern NSString* const iPad2_3; -extern NSString* const iPad2_4; -extern NSString* const iPad2_5; -extern NSString* const iPad2_6; -extern NSString* const iPad2_7; -extern NSString* const iPad3_1; -extern NSString* const iPad3_2; -extern NSString* const iPad3_3; -extern NSString* const iPad3_4; -extern NSString* const iPad3_5; -extern NSString* const iPad3_6; -extern NSString* const iPad4_1; -extern NSString* const iPad4_2; -extern NSString* const iPad4_3; -extern NSString* const iPad4_4; -extern NSString* const iPad4_5; -extern NSString* const iPad4_6; -extern NSString* const iPad4_7; -extern NSString* const iPad4_8; -extern NSString* const iPad4_9; -extern NSString* const iPad5_1; -extern NSString* const iPad5_2; -extern NSString* const iPad5_3; -extern NSString* const iPad5_4; -extern NSString* const iPad6_11; -extern NSString* const iPad6_12; -extern NSString* const iPad6_3; -extern NSString* const iPad6_4; -extern NSString* const iPad6_7; -extern NSString* const iPad6_8; -extern NSString* const iPad7_1; -extern NSString* const iPad7_11; -extern NSString* const iPad7_12; -extern NSString* const iPad7_2; -extern NSString* const iPad7_3; -extern NSString* const iPad7_4; -extern NSString* const iPad7_5; -extern NSString* const iPad7_6; -extern NSString* const iPad8_1; -extern NSString* const iPad8_10; -extern NSString* const iPad8_11; -extern NSString* const iPad8_12; -extern NSString* const iPad8_2; -extern NSString* const iPad8_3; -extern NSString* const iPad8_4; -extern NSString* const iPad8_5; -extern NSString* const iPad8_6; -extern NSString* const iPad8_7; -extern NSString* const iPad8_8; -extern NSString* const iPad8_9; -extern NSString* const iPhone1_1; -extern NSString* const iPhone1_2; -extern NSString* const iPhone10_1; -extern NSString* const iPhone10_2; -extern NSString* const iPhone10_3; -extern NSString* const iPhone10_4; -extern NSString* const iPhone10_5; -extern NSString* const iPhone10_6; -extern NSString* const iPhone11_2; -extern NSString* const iPhone11_4; -extern NSString* const iPhone11_6; -extern NSString* const iPhone11_8; -extern NSString* const iPhone12_1; -extern NSString* const iPhone12_3; -extern NSString* const iPhone12_5; -extern NSString* const iPhone12_8; -extern NSString* const iPhone13_1; -extern NSString* const iPhone13_2; -extern NSString* const iPhone13_3; -extern NSString* const iPhone13_4; -extern NSString* const iPhone14_2; -extern NSString* const iPhone14_3; -extern NSString* const iPhone14_4; -extern NSString* const iPhone14_5; -extern NSString* const iPhone14_6; -extern NSString* const iPhone14_7; -extern NSString* const iPhone14_8; -extern NSString* const iPhone15_2; -extern NSString* const iPhone15_3; -extern NSString* const iPhone2_1; -extern NSString* const iPhone3_1; -extern NSString* const iPhone3_2; -extern NSString* const iPhone3_3; -extern NSString* const iPhone4_1; -extern NSString* const iPhone5_1; -extern NSString* const iPhone5_2; -extern NSString* const iPhone5_3; -extern NSString* const iPhone5_4; -extern NSString* const iPhone6_1; -extern NSString* const iPhone6_2; -extern NSString* const iPhone7_1; -extern NSString* const iPhone7_2; -extern NSString* const iPhone8_1; -extern NSString* const iPhone8_2; -extern NSString* const iPhone8_4; -extern NSString* const iPhone9_1; -extern NSString* const iPhone9_2; -extern NSString* const iPhone9_3; -extern NSString* const iPhone9_4; -extern NSString* const iPod1_1; -extern NSString* const iPod2_1; -extern NSString* const iPod3_1; -extern NSString* const iPod4_1; -extern NSString* const iPod5_1; -extern NSString* const iPod7_1; -extern NSString* const iPod9_1; -extern NSString* const x86_64_Simulator; - diff --git a/Pods/CocoaDebug/Sources/Core/_DeviceUtil+Constant.m b/Pods/CocoaDebug/Sources/Core/_DeviceUtil+Constant.m deleted file mode 100644 index 84ed379..0000000 --- a/Pods/CocoaDebug/Sources/Core/_DeviceUtil+Constant.m +++ /dev/null @@ -1,334 +0,0 @@ -// -// CocoaDebug -// liman -// -// Created by liman 02/02/2023. -// Copyright © 2023 liman. All rights reserved. -// - -#import "_DeviceUtil.h" - -NSString* const AppleTV1_1 = @"AppleTV1,1"; -NSString* const AppleTV2_1 = @"AppleTV2,1"; -NSString* const AppleTV3_1 = @"AppleTV3,1"; -NSString* const AppleTV3_2 = @"AppleTV3,2"; -NSString* const AppleTV5_3 = @"AppleTV5,3"; -NSString* const AppleTV6_2 = @"AppleTV6,2"; -NSString* const Watch1_1 = @"Watch1,1"; -NSString* const Watch1_2 = @"Watch1,2"; -NSString* const Watch2_3 = @"Watch2,3"; -NSString* const Watch2_4 = @"Watch2,4"; -NSString* const Watch2_6 = @"Watch2,6"; -NSString* const Watch2_7 = @"Watch2,7"; -NSString* const Watch3_1 = @"Watch3,1"; -NSString* const Watch3_2 = @"Watch3,2"; -NSString* const Watch3_3 = @"Watch3,3"; -NSString* const Watch3_4 = @"Watch3,4"; -NSString* const Watch4_1 = @"Watch4,1"; -NSString* const Watch4_2 = @"Watch4,2"; -NSString* const Watch4_3 = @"Watch4,3"; -NSString* const Watch4_4 = @"Watch4,4"; -NSString* const Watch5_1 = @"Watch5,1"; -NSString* const Watch5_2 = @"Watch5,2"; -NSString* const Watch5_3 = @"Watch5,3"; -NSString* const Watch5_4 = @"Watch5,4"; -NSString* const i386_Simulator = @"i386"; -NSString* const iPad1_1 = @"iPad1,1"; -NSString* const iPad1_2 = @"iPad1,2"; -NSString* const iPad11_1 = @"iPad11,1"; -NSString* const iPad11_2 = @"iPad11,2"; -NSString* const iPad11_3 = @"iPad11,3"; -NSString* const iPad11_4 = @"iPad11,4"; -NSString* const iPad12_1 = @"iPad12,1"; -NSString* const iPad12_2 = @"iPad12,2"; -NSString* const iPad13_1 = @"iPad13,1"; -NSString* const iPad13_10 = @"iPad13,10"; -NSString* const iPad13_11 = @"iPad13,11"; -NSString* const iPad13_16 = @"iPad13,16"; -NSString* const iPad13_17 = @"iPad13,17"; -NSString* const iPad13_2 = @"iPad13,2"; -NSString* const iPad13_4 = @"iPad13,4"; -NSString* const iPad13_5 = @"iPad13,5"; -NSString* const iPad13_6 = @"iPad13,6"; -NSString* const iPad13_7 = @"iPad13,7"; -NSString* const iPad13_8 = @"iPad13,8"; -NSString* const iPad13_9 = @"iPad13,9"; -NSString* const iPad14_1 = @"iPad14,1"; -NSString* const iPad14_2 = @"iPad14,2"; -NSString* const iPad2_1 = @"iPad2,1"; -NSString* const iPad2_2 = @"iPad2,2"; -NSString* const iPad2_3 = @"iPad2,3"; -NSString* const iPad2_4 = @"iPad2,4"; -NSString* const iPad2_5 = @"iPad2,5"; -NSString* const iPad2_6 = @"iPad2,6"; -NSString* const iPad2_7 = @"iPad2,7"; -NSString* const iPad3_1 = @"iPad3,1"; -NSString* const iPad3_2 = @"iPad3,2"; -NSString* const iPad3_3 = @"iPad3,3"; -NSString* const iPad3_4 = @"iPad3,4"; -NSString* const iPad3_5 = @"iPad3,5"; -NSString* const iPad3_6 = @"iPad3,6"; -NSString* const iPad4_1 = @"iPad4,1"; -NSString* const iPad4_2 = @"iPad4,2"; -NSString* const iPad4_3 = @"iPad4,3"; -NSString* const iPad4_4 = @"iPad4,4"; -NSString* const iPad4_5 = @"iPad4,5"; -NSString* const iPad4_6 = @"iPad4,6"; -NSString* const iPad4_7 = @"iPad4,7"; -NSString* const iPad4_8 = @"iPad4,8"; -NSString* const iPad4_9 = @"iPad4,9"; -NSString* const iPad5_1 = @"iPad5,1"; -NSString* const iPad5_2 = @"iPad5,2"; -NSString* const iPad5_3 = @"iPad5,3"; -NSString* const iPad5_4 = @"iPad5,4"; -NSString* const iPad6_11 = @"iPad6,11"; -NSString* const iPad6_12 = @"iPad6,12"; -NSString* const iPad6_3 = @"iPad6,3"; -NSString* const iPad6_4 = @"iPad6,4"; -NSString* const iPad6_7 = @"iPad6,7"; -NSString* const iPad6_8 = @"iPad6,8"; -NSString* const iPad7_1 = @"iPad7,1"; -NSString* const iPad7_11 = @"iPad7,11"; -NSString* const iPad7_12 = @"iPad7,12"; -NSString* const iPad7_2 = @"iPad7,2"; -NSString* const iPad7_3 = @"iPad7,3"; -NSString* const iPad7_4 = @"iPad7,4"; -NSString* const iPad7_5 = @"iPad7,5"; -NSString* const iPad7_6 = @"iPad7,6"; -NSString* const iPad8_1 = @"iPad8,1"; -NSString* const iPad8_10 = @"iPad8,10"; -NSString* const iPad8_11 = @"iPad8,11"; -NSString* const iPad8_12 = @"iPad8,12"; -NSString* const iPad8_2 = @"iPad8,2"; -NSString* const iPad8_3 = @"iPad8,3"; -NSString* const iPad8_4 = @"iPad8,4"; -NSString* const iPad8_5 = @"iPad8,5"; -NSString* const iPad8_6 = @"iPad8,6"; -NSString* const iPad8_7 = @"iPad8,7"; -NSString* const iPad8_8 = @"iPad8,8"; -NSString* const iPad8_9 = @"iPad8,9"; -NSString* const iPhone1_1 = @"iPhone1,1"; -NSString* const iPhone1_2 = @"iPhone1,2"; -NSString* const iPhone10_1 = @"iPhone10,1"; -NSString* const iPhone10_2 = @"iPhone10,2"; -NSString* const iPhone10_3 = @"iPhone10,3"; -NSString* const iPhone10_4 = @"iPhone10,4"; -NSString* const iPhone10_5 = @"iPhone10,5"; -NSString* const iPhone10_6 = @"iPhone10,6"; -NSString* const iPhone11_2 = @"iPhone11,2"; -NSString* const iPhone11_4 = @"iPhone11,4"; -NSString* const iPhone11_6 = @"iPhone11,6"; -NSString* const iPhone11_8 = @"iPhone11,8"; -NSString* const iPhone12_1 = @"iPhone12,1"; -NSString* const iPhone12_3 = @"iPhone12,3"; -NSString* const iPhone12_5 = @"iPhone12,5"; -NSString* const iPhone12_8 = @"iPhone12,8"; -NSString* const iPhone13_1 = @"iPhone13,1"; -NSString* const iPhone13_2 = @"iPhone13,2"; -NSString* const iPhone13_3 = @"iPhone13,3"; -NSString* const iPhone13_4 = @"iPhone13,4"; -NSString* const iPhone14_2 = @"iPhone14,2"; -NSString* const iPhone14_3 = @"iPhone14,3"; -NSString* const iPhone14_4 = @"iPhone14,4"; -NSString* const iPhone14_5 = @"iPhone14,5"; -NSString* const iPhone14_6 = @"iPhone14,6"; -NSString* const iPhone14_7 = @"iPhone14,7"; -NSString* const iPhone14_8 = @"iPhone14,8"; -NSString* const iPhone15_2 = @"iPhone15,2"; -NSString* const iPhone15_3 = @"iPhone15,3"; -NSString* const iPhone2_1 = @"iPhone2,1"; -NSString* const iPhone3_1 = @"iPhone3,1"; -NSString* const iPhone3_2 = @"iPhone3,2"; -NSString* const iPhone3_3 = @"iPhone3,3"; -NSString* const iPhone4_1 = @"iPhone4,1"; -NSString* const iPhone5_1 = @"iPhone5,1"; -NSString* const iPhone5_2 = @"iPhone5,2"; -NSString* const iPhone5_3 = @"iPhone5,3"; -NSString* const iPhone5_4 = @"iPhone5,4"; -NSString* const iPhone6_1 = @"iPhone6,1"; -NSString* const iPhone6_2 = @"iPhone6,2"; -NSString* const iPhone7_1 = @"iPhone7,1"; -NSString* const iPhone7_2 = @"iPhone7,2"; -NSString* const iPhone8_1 = @"iPhone8,1"; -NSString* const iPhone8_2 = @"iPhone8,2"; -NSString* const iPhone8_4 = @"iPhone8,4"; -NSString* const iPhone9_1 = @"iPhone9,1"; -NSString* const iPhone9_2 = @"iPhone9,2"; -NSString* const iPhone9_3 = @"iPhone9,3"; -NSString* const iPhone9_4 = @"iPhone9,4"; -NSString* const iPod1_1 = @"iPod1,1"; -NSString* const iPod2_1 = @"iPod2,1"; -NSString* const iPod3_1 = @"iPod3,1"; -NSString* const iPod4_1 = @"iPod4,1"; -NSString* const iPod5_1 = @"iPod5,1"; -NSString* const iPod7_1 = @"iPod7,1"; -NSString* const iPod9_1 = @"iPod9,1"; -NSString* const x86_64_Simulator = @"x86_64"; - - - @implementation _DeviceUtil (Constant) - -- (Hardware)hardware { - NSString *hardware = [self hardwareString]; - if ([hardware isEqualToString:AppleTV1_1]) return APPLE_TV_1G; - if ([hardware isEqualToString:AppleTV2_1]) return APPLE_TV_2G; - if ([hardware isEqualToString:AppleTV3_1]) return APPLE_TV_3G; - if ([hardware isEqualToString:AppleTV3_2]) return APPLE_TV_3_2G; - if ([hardware isEqualToString:AppleTV5_3]) return APPLE_TV_4G; - if ([hardware isEqualToString:AppleTV6_2]) return APPLE_TV_4K; - if ([hardware isEqualToString:Watch1_1]) return APPLE_WATCH_38; - if ([hardware isEqualToString:Watch1_2]) return APPLE_WATCH_42; - if ([hardware isEqualToString:Watch2_3]) return APPLE_WATCH_SERIES_2_38; - if ([hardware isEqualToString:Watch2_4]) return APPLE_WATCH_SERIES_2_42; - if ([hardware isEqualToString:Watch2_6]) return APPLE_WATCH_SERIES_1_38; - if ([hardware isEqualToString:Watch2_7]) return APPLE_WATCH_SERIES_1_42; - if ([hardware isEqualToString:Watch3_1]) return APPLE_WATCH_SERIES_3_38_CELLULAR; - if ([hardware isEqualToString:Watch3_2]) return APPLE_WATCH_SERIES_3_42_CELLULAR; - if ([hardware isEqualToString:Watch3_3]) return APPLE_WATCH_SERIES_3_38; - if ([hardware isEqualToString:Watch3_4]) return APPLE_WATCH_SERIES_3_42; - if ([hardware isEqualToString:Watch4_1]) return APPLE_WATCH_SERIES_4_40; - if ([hardware isEqualToString:Watch4_2]) return APPLE_WATCH_SERIES_4_44; - if ([hardware isEqualToString:Watch4_3]) return APPLE_WATCH_SERIES_4_40_CELLULAR; - if ([hardware isEqualToString:Watch4_4]) return APPLE_WATCH_SERIES_4_44_CELLULAR; - if ([hardware isEqualToString:Watch5_1]) return APPLE_WATCH_SERIES_5_40; - if ([hardware isEqualToString:Watch5_2]) return APPLE_WATCH_SERIES_5_44; - if ([hardware isEqualToString:Watch5_3]) return APPLE_WATCH_SERIES_5_40_CELLULAR; - if ([hardware isEqualToString:Watch5_4]) return APPLE_WATCH_SERIES_5_44_CELLULAR; - if ([hardware isEqualToString:i386_Simulator]) return SIMULATOR; - if ([hardware isEqualToString:iPad1_1]) return IPAD; - if ([hardware isEqualToString:iPad1_2]) return IPAD_3G; - if ([hardware isEqualToString:iPad11_1]) return IPAD_MINI_5_WIFI; - if ([hardware isEqualToString:iPad11_2]) return IPAD_MINI_5_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad11_3]) return IPAD_AIR_3_WIFI; - if ([hardware isEqualToString:iPad11_4]) return IPAD_AIR_3_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad12_1]) return IPAD_9_WIFI; - if ([hardware isEqualToString:iPad12_2]) return IPAD_9_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad13_1]) return IPAD_AIR_4_WIFI; - if ([hardware isEqualToString:iPad13_10]) return IPAD_PRO_5_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad13_11]) return IPAD_PRO_5_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad13_16]) return IPAD_AIR_5_WIFI; - if ([hardware isEqualToString:iPad13_17]) return IPAD_AIR_5_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad13_2]) return IPAD_AIR_4_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad13_4]) return IPAD_PRO_11_3_WIFI; - if ([hardware isEqualToString:iPad13_5]) return IPAD_AIR_4_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad13_6]) return IPAD_PRO_11_3_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad13_7]) return IPAD_PRO_11_3_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad13_8]) return IPAD_PRO_5_WIFI; - if ([hardware isEqualToString:iPad13_9]) return IPAD_PRO_5_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad14_1]) return IPAD_MINI_6_WIFI; - if ([hardware isEqualToString:iPad14_2]) return IPAD_MINI_6_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad2_1]) return IPAD_2_WIFI; - if ([hardware isEqualToString:iPad2_2]) return IPAD_2; - if ([hardware isEqualToString:iPad2_3]) return IPAD_2_CDMA; - if ([hardware isEqualToString:iPad2_4]) return IPAD_2; - if ([hardware isEqualToString:iPad2_5]) return IPAD_MINI_WIFI; - if ([hardware isEqualToString:iPad2_6]) return IPAD_MINI; - if ([hardware isEqualToString:iPad2_7]) return IPAD_MINI_WIFI_CDMA; - if ([hardware isEqualToString:iPad3_1]) return IPAD_3_WIFI; - if ([hardware isEqualToString:iPad3_2]) return IPAD_3_WIFI_CDMA; - if ([hardware isEqualToString:iPad3_3]) return IPAD_3; - if ([hardware isEqualToString:iPad3_4]) return IPAD_4_WIFI; - if ([hardware isEqualToString:iPad3_5]) return IPAD_4; - if ([hardware isEqualToString:iPad3_6]) return IPAD_4_GSM_CDMA; - if ([hardware isEqualToString:iPad4_1]) return IPAD_AIR_WIFI; - if ([hardware isEqualToString:iPad4_2]) return IPAD_AIR_WIFI_GSM; - if ([hardware isEqualToString:iPad4_3]) return IPAD_AIR_WIFI_CDMA; - if ([hardware isEqualToString:iPad4_4]) return IPAD_MINI_RETINA_WIFI; - if ([hardware isEqualToString:iPad4_5]) return IPAD_MINI_RETINA_WIFI_CDMA; - if ([hardware isEqualToString:iPad4_6]) return IPAD_MINI_RETINA_WIFI_CELLULAR_CN; - if ([hardware isEqualToString:iPad4_7]) return IPAD_MINI_3_WIFI; - if ([hardware isEqualToString:iPad4_8]) return IPAD_MINI_3_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad4_9]) return IPAD_MINI_3_WIFI_CELLULAR_CN; - if ([hardware isEqualToString:iPad5_1]) return IPAD_MINI_4_WIFI; - if ([hardware isEqualToString:iPad5_2]) return IPAD_MINI_4_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad5_3]) return IPAD_AIR_2_WIFI; - if ([hardware isEqualToString:iPad5_4]) return IPAD_AIR_2_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad6_11]) return IPAD_5_WIFI; - if ([hardware isEqualToString:iPad6_12]) return IPAD_5_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad6_3]) return IPAD_PRO_97_WIFI; - if ([hardware isEqualToString:iPad6_4]) return IPAD_PRO_97_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad6_7]) return IPAD_PRO_WIFI; - if ([hardware isEqualToString:iPad6_8]) return IPAD_PRO_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad7_1]) return IPAD_PRO_2G_WIFI; - if ([hardware isEqualToString:iPad7_11]) return IPAD_7_WIFI; - if ([hardware isEqualToString:iPad7_12]) return IPAD_7_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad7_2]) return IPAD_PRO_2G_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad7_3]) return IPAD_PRO_105_WIFI; - if ([hardware isEqualToString:iPad7_4]) return IPAD_PRO_105_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad7_5]) return IPAD_6_WIFI; - if ([hardware isEqualToString:iPad7_6]) return IPAD_6_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad8_1]) return IPAD_PRO_11_WIFI; - if ([hardware isEqualToString:iPad8_10]) return IPAD_PRO_11_2G_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad8_11]) return IPAD_PRO_4G_WIFI; - if ([hardware isEqualToString:iPad8_12]) return IPAD_PRO_4G_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad8_2]) return IPAD_PRO_11_1TB_WIFI; - if ([hardware isEqualToString:iPad8_3]) return IPAD_PRO_11_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad8_4]) return IPAD_PRO_11_1TB_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad8_5]) return IPAD_PRO_3G_WIFI; - if ([hardware isEqualToString:iPad8_6]) return IPAD_PRO_3G_1TB_WIFI; - if ([hardware isEqualToString:iPad8_7]) return IPAD_PRO_3G_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad8_8]) return IPAD_PRO_3G_1TB_WIFI_CELLULAR; - if ([hardware isEqualToString:iPad8_9]) return IPAD_PRO_11_2G_WIFI; - if ([hardware isEqualToString:iPhone1_1]) return IPHONE_2G; - if ([hardware isEqualToString:iPhone1_2]) return IPHONE_3G; - if ([hardware isEqualToString:iPhone10_1]) return IPHONE_8_CN; - if ([hardware isEqualToString:iPhone10_2]) return IPHONE_8_PLUS_CN; - if ([hardware isEqualToString:iPhone10_3]) return IPHONE_X_CN; - if ([hardware isEqualToString:iPhone10_4]) return IPHONE_8; - if ([hardware isEqualToString:iPhone10_5]) return IPHONE_8_PLUS; - if ([hardware isEqualToString:iPhone10_6]) return IPHONE_X; - if ([hardware isEqualToString:iPhone11_2]) return IPHONE_XS; - if ([hardware isEqualToString:iPhone11_4]) return IPHONE_XS_MAX; - if ([hardware isEqualToString:iPhone11_6]) return IPHONE_XS_MAX_CN; - if ([hardware isEqualToString:iPhone11_8]) return IPHONE_XR; - if ([hardware isEqualToString:iPhone12_1]) return IPHONE_11; - if ([hardware isEqualToString:iPhone12_3]) return IPHONE_11_PRO; - if ([hardware isEqualToString:iPhone12_5]) return IPHONE_11_PRO_MAX; - if ([hardware isEqualToString:iPhone12_8]) return IPHONE_SE_2G; - if ([hardware isEqualToString:iPhone13_1]) return IPHONE_12_MINI; - if ([hardware isEqualToString:iPhone13_2]) return IPHONE_12; - if ([hardware isEqualToString:iPhone13_3]) return IPHONE_12_PRO; - if ([hardware isEqualToString:iPhone13_4]) return IPHONE_12_PRO_MAX; - if ([hardware isEqualToString:iPhone14_2]) return IPHONE_13_PRO; - if ([hardware isEqualToString:iPhone14_3]) return IPHONE_13_PRO_MAX; - if ([hardware isEqualToString:iPhone14_4]) return IPHONE_13_MINI; - if ([hardware isEqualToString:iPhone14_5]) return IPHONE_13; - if ([hardware isEqualToString:iPhone14_6]) return IPHONE_SE_3G; - if ([hardware isEqualToString:iPhone14_7]) return IPHONE_14; - if ([hardware isEqualToString:iPhone14_8]) return IPHONE_14_PLUS; - if ([hardware isEqualToString:iPhone15_2]) return IPHONE_14_PRO; - if ([hardware isEqualToString:iPhone15_3]) return IPHONE_14_PRO_MAX; - if ([hardware isEqualToString:iPhone2_1]) return IPHONE_3GS; - if ([hardware isEqualToString:iPhone3_1]) return IPHONE_4; - if ([hardware isEqualToString:iPhone3_2]) return IPHONE_4; - if ([hardware isEqualToString:iPhone3_3]) return IPHONE_4_CDMA; - if ([hardware isEqualToString:iPhone4_1]) return IPHONE_4S; - if ([hardware isEqualToString:iPhone5_1]) return IPHONE_5; - if ([hardware isEqualToString:iPhone5_2]) return IPHONE_5_CDMA_GSM; - if ([hardware isEqualToString:iPhone5_3]) return IPHONE_5C; - if ([hardware isEqualToString:iPhone5_4]) return IPHONE_5C_CDMA_GSM; - if ([hardware isEqualToString:iPhone6_1]) return IPHONE_5S; - if ([hardware isEqualToString:iPhone6_2]) return IPHONE_5S_CDMA_GSM; - if ([hardware isEqualToString:iPhone7_1]) return IPHONE_6_PLUS; - if ([hardware isEqualToString:iPhone7_2]) return IPHONE_6; - if ([hardware isEqualToString:iPhone8_1]) return IPHONE_6S; - if ([hardware isEqualToString:iPhone8_2]) return IPHONE_6S_PLUS; - if ([hardware isEqualToString:iPhone8_4]) return IPHONE_SE; - if ([hardware isEqualToString:iPhone9_1]) return IPHONE_7; - if ([hardware isEqualToString:iPhone9_2]) return IPHONE_7_PLUS; - if ([hardware isEqualToString:iPhone9_3]) return IPHONE_7_GSM; - if ([hardware isEqualToString:iPhone9_4]) return IPHONE_7_PLUS_GSM; - if ([hardware isEqualToString:iPod1_1]) return IPOD_TOUCH_1G; - if ([hardware isEqualToString:iPod2_1]) return IPOD_TOUCH_2G; - if ([hardware isEqualToString:iPod3_1]) return IPOD_TOUCH_3G; - if ([hardware isEqualToString:iPod4_1]) return IPOD_TOUCH_4G; - if ([hardware isEqualToString:iPod5_1]) return IPOD_TOUCH_5G; - if ([hardware isEqualToString:iPod7_1]) return IPOD_TOUCH_6G; - if ([hardware isEqualToString:iPod9_1]) return IPOD_TOUCH_7G; - if ([hardware isEqualToString:x86_64_Simulator]) return SIMULATOR; - - NSLog(@"This is a device which is not listed in this category. Please visit https://github.com/InderKumarRathore/DeviceUtil and add a comment there."); - NSLog(@"Your device hardware string is: %@", hardware); - return UNKNOWN; -} -@end diff --git a/Pods/CocoaDebug/Sources/Core/_DeviceUtil.h b/Pods/CocoaDebug/Sources/Core/_DeviceUtil.h deleted file mode 100644 index deb5f1c..0000000 --- a/Pods/CocoaDebug/Sources/Core/_DeviceUtil.h +++ /dev/null @@ -1,55 +0,0 @@ -// -// CocoaDebug -// liman -// -// Created by liman 02/02/2023. -// Copyright © 2023 liman. All rights reserved. -// - -#import -#import "_DeviceUtil+Constant.h" - -/// Enum of the different Apple's device platforms -typedef NS_ENUM(NSUInteger, Platform) { - iPhone, - iPodTouch, - iPad, - AppleTV, - AppleWatch, - Unknown -}; - - -@interface _DeviceUtil : NSObject - -/// This method returns the hardware type -- (NSString*)hardwareString; - -/// This method returns the Platform enum depending upon hardware string -- (Platform)platform; - - - -/// This method returns the readable description of hardware string -- (NSString*)hardwareDescription; - -/// This method returns the readable simple description of hardware string -- (NSString*)hardwareSimpleDescription; - -/// This method returns the hardware number not actual but logically. e.g. if the hardware string is 5,1 then hardware number would be 5.1 -- (float)hardwareNumber; - -/// This method returns if we are running in the simulator -- (BOOL)isSimulator; - -/// This method returns the resolution for still image that can be received from back camera of the current device. Resolution returned for image oriented landscape right. -- (CGSize)backCameraStillImageResolutionInPixels; - -@end - - -@interface _DeviceUtil (Constant) - -/// This method returns the Hardware enum depending upon hardware string -- (Hardware)hardware; -@end diff --git a/Pods/CocoaDebug/Sources/Core/_DeviceUtil.m b/Pods/CocoaDebug/Sources/Core/_DeviceUtil.m deleted file mode 100644 index 9e0bc81..0000000 --- a/Pods/CocoaDebug/Sources/Core/_DeviceUtil.m +++ /dev/null @@ -1,849 +0,0 @@ -// -// CocoaDebug -// liman -// -// Created by liman 02/02/2023. -// Copyright © 2023 liman. All rights reserved. -// - -#import "_DeviceUtil.h" -#import "_DeviceUtil+Constant.h" -#include - -@implementation _DeviceUtil { - NSDictionary *deviceList; -} - -- (instancetype)init -{ - self = [super init]; - if (self) { - deviceList = @{ - @"AppleTV1,1" : @{ - @"name": @"Apple TV 1G", - @"version": @"1.1", - }, - @"AppleTV2,1" : @{ - @"name": @"Apple TV 2G", - @"version": @"2.1", - }, - @"AppleTV3,1" : @{ - @"name": @"Apple TV 2012", - @"version": @"3.1", - }, - @"AppleTV3,2" : @{ - @"name": @"Apple TV 2013", - @"version": @"3.2", - }, - @"AppleTV5,3" : @{ - @"name": @"Apple TV 4G", - @"version": @"5.3", - }, - @"AppleTV6,2" : @{ - @"name": @"Apple TV 4K", - @"version": @"6.2", - }, - @"Watch1,1" : @{ - @"name": @"Apple Watch (38 mm)", - @"version": @"1.1", - }, - @"Watch1,2" : @{ - @"name": @"Apple Watch (42 mm)", - @"version": @"1.2", - }, - @"Watch2,3" : @{ - @"name": @"Apple Watch Series 2 (38 mm)", - @"version": @"2.3", - }, - @"Watch2,4" : @{ - @"name": @"Apple Watch Series 2 (42 mm)", - @"version": @"2.4", - }, - @"Watch2,6" : @{ - @"name": @"Apple Watch Series 1 (38 mm)", - @"version": @"2.6", - }, - @"Watch2,7" : @{ - @"name": @"Apple Watch Series 1 (42 mm)", - @"version": @"2.7", - }, - @"Watch3,1" : @{ - @"name": @"Apple Watch Series 3 (38 mm/Cellular)", - @"version": @"3.1", - }, - @"Watch3,2" : @{ - @"name": @"Apple Watch Series 3 (42 mm/Cellular)", - @"version": @"3.2", - }, - @"Watch3,3" : @{ - @"name": @"Apple Watch Series 3 (38 mm)", - @"version": @"3.3", - }, - @"Watch3,4" : @{ - @"name": @"Apple Watch Series 3 (42 mm)", - @"version": @"3.4", - }, - @"Watch4,1" : @{ - @"name": @"Apple Watch Series 4 (40 mm)", - @"version": @"4.1", - }, - @"Watch4,2" : @{ - @"name": @"Apple Watch Series 4 (44 mm)", - @"version": @"4.2", - }, - @"Watch4,3" : @{ - @"name": @"Apple Watch Series 4 (40 mm/Cellular)", - @"version": @"4.3", - }, - @"Watch4,4" : @{ - @"name": @"Apple Watch Series 4 (44 mm/Cellular)", - @"version": @"4.4", - }, - @"Watch5,1" : @{ - @"name": @"Apple Watch Series 5 (40 mm)", - @"version": @"5.1", - }, - @"Watch5,2" : @{ - @"name": @"Apple Watch Series 5 (44 mm)", - @"version": @"5.2", - }, - @"Watch5,3" : @{ - @"name": @"Apple Watch Series 5 (40 mm/Cellular)", - @"version": @"5.3", - }, - @"Watch5,4" : @{ - @"name": @"Apple Watch Series 5 (44 mm/Cellular)", - @"version": @"5.4", - }, - @"i386" : @{ - @"name": @"Simulator", - @"version": @"-1", - }, - @"iPad1,1" : @{ - @"name": @"iPad (WiFi)", - @"version": @"1.1", - }, - @"iPad1,2" : @{ - @"name": @"iPad 3G", - @"version": @"1.2", - }, - @"iPad11,1" : @{ - @"name": @"iPad mini 5 (Wi-Fi Only)", - @"version": @"11.1", - }, - @"iPad11,2" : @{ - @"name": @"iPad mini 5 (Wi-Fi/Cellular)", - @"version": @"11.2", - }, - @"iPad11,3" : @{ - @"name": @"iPad Air 3 (Wi-Fi)", - @"version": @"11.3", - }, - @"iPad11,4" : @{ - @"name": @"iPad Air 3 (Wi-Fi + Cellular)", - @"version": @"11.4", - }, - @"iPad12,1" : @{ - @"name": @"iPad 9 (Wi-Fi)", - @"version": @"12.1", - }, - @"iPad12,2" : @{ - @"name": @"iPad 9 (Wi-Fi + Cellular)", - @"version": @"12.2", - }, - @"iPad13,1" : @{ - @"name": @"iPad Air 4 (Wi-Fi)", - @"version": @"13.1", - }, - @"iPad13,10" : @{ - @"name": @"iPad Pro 12.9\" 5th Gen (Wi-Fi + Cellular)", - @"version": @"13.1", - }, - @"iPad13,11" : @{ - @"name": @"iPad Pro 12.9\" 5th Gen (Wi-Fi + Cellular)", - @"version": @"13.11", - }, - @"iPad13,16" : @{ - @"name": @"iPad Air 5th Gen (Wi-Fi)", - @"version": @"13.16", - }, - @"iPad13,17" : @{ - @"name": @"iPad Air 5th Gen (Wi-Fi + Cellular)", - @"version": @"13.17", - }, - @"iPad13,2" : @{ - @"name": @"iPad Air 4 (Wi-Fi + Cellular)", - @"version": @"13.2", - }, - @"iPad13,4" : @{ - @"name": @"iPad Pro 11\" 3rd Gen (Wi-Fi)", - @"version": @"13.4", - }, - @"iPad13,5" : @{ - @"name": @"iPad Pro 11\" 3rd Gen (Wi-Fi + Cellular)", - @"version": @"13.5", - }, - @"iPad13,6" : @{ - @"name": @"iPad Pro 11\" 3rd Gen (Wi-Fi + Cellular)", - @"version": @"13.6", - }, - @"iPad13,7" : @{ - @"name": @"iPad Pro 11\" 3rd Gen (Wi-Fi + Cellular)", - @"version": @"13.7", - }, - @"iPad13,8" : @{ - @"name": @"iPad Pro 12.9\" 5th Gen (Wi-Fi)", - @"version": @"13.8", - }, - @"iPad13,9" : @{ - @"name": @"iPad Pro 12.9\" 5th Gen (Wi-Fi + Cellular)", - @"version": @"13.9", - }, - @"iPad14,1" : @{ - @"name": @"iPad Mini 6 (Wi-Fi)", - @"version": @"14.1", - }, - @"iPad14,2" : @{ - @"name": @"iPad Mini 6 (Wi-Fi + Cellular)", - @"version": @"14.2", - }, - @"iPad2,1" : @{ - @"name": @"iPad 2 (WiFi)", - @"version": @"2.1", - }, - @"iPad2,2" : @{ - @"name": @"iPad 2 (GSM)", - @"version": @"2.2", - }, - @"iPad2,3" : @{ - @"name": @"iPad 2 (CDMA)", - @"version": @"2.3", - }, - @"iPad2,4" : @{ - @"name": @"iPad 2 (WiFi Rev. A)", - @"version": @"2.4", - }, - @"iPad2,5" : @{ - @"name": @"iPad Mini (WiFi)", - @"version": @"2.5", - }, - @"iPad2,6" : @{ - @"name": @"iPad Mini (GSM)", - @"version": @"2.6", - }, - @"iPad2,7" : @{ - @"name": @"iPad Mini (CDMA)", - @"version": @"2.7", - }, - @"iPad3,1" : @{ - @"name": @"iPad 3 (WiFi)", - @"version": @"3.1", - }, - @"iPad3,2" : @{ - @"name": @"iPad 3 (CDMA)", - @"version": @"3.2", - }, - @"iPad3,3" : @{ - @"name": @"iPad 3 (Global)", - @"version": @"3.3", - }, - @"iPad3,4" : @{ - @"name": @"iPad 4 (WiFi)", - @"version": @"3.4", - }, - @"iPad3,5" : @{ - @"name": @"iPad 4 (CDMA)", - @"version": @"3.5", - }, - @"iPad3,6" : @{ - @"name": @"iPad 4 (Global)", - @"version": @"3.6", - }, - @"iPad4,1" : @{ - @"name": @"iPad Air (WiFi)", - @"version": @"4.1", - }, - @"iPad4,2" : @{ - @"name": @"iPad Air (WiFi+GSM)", - @"version": @"4.2", - }, - @"iPad4,3" : @{ - @"name": @"iPad Air (WiFi+CDMA)", - @"version": @"4.3", - }, - @"iPad4,4" : @{ - @"name": @"iPad Mini Retina (WiFi)", - @"version": @"4.4", - }, - @"iPad4,5" : @{ - @"name": @"iPad Mini Retina (WiFi+CDMA)", - @"version": @"4.5", - }, - @"iPad4,6" : @{ - @"name": @"iPad Mini Retina (Wi-Fi + Cellular CN)", - @"version": @"4.6", - }, - @"iPad4,7" : @{ - @"name": @"iPad Mini 3 (Wi-Fi)", - @"version": @"4.7", - }, - @"iPad4,8" : @{ - @"name": @"iPad Mini 3 (Wi-Fi + Cellular)", - @"version": @"4.8", - }, - @"iPad4,9" : @{ - @"name": @"iPad mini 3 (Wi-Fi/Cellular, China)", - @"version": @"4.9", - }, - @"iPad5,1" : @{ - @"name": @"iPad mini 4 (Wi-Fi Only)", - @"version": @"5.1", - }, - @"iPad5,2" : @{ - @"name": @"iPad mini 4 (Wi-Fi/Cellular)", - @"version": @"5.2", - }, - @"iPad5,3" : @{ - @"name": @"iPad Air 2 (Wi-Fi)", - @"version": @"5.3", - }, - @"iPad5,4" : @{ - @"name": @"iPad Air 2 (Wi-Fi + Cellular)", - @"version": @"5.4", - }, - @"iPad6,11" : @{ - @"name": @"9.7-inch iPad (Wi-Fi)", - @"version": @"6.11", - }, - @"iPad6,12" : @{ - @"name": @"9.7-inch iPad (Wi-Fi + Cellular)", - @"version": @"6.12", - }, - @"iPad6,3" : @{ - @"name": @"iPad Pro 9.7-inch (Wi-Fi Only)", - @"version": @"6.3", - }, - @"iPad6,4" : @{ - @"name": @"iPad Pro 9.7-inch (Wi-Fi + Cellular)", - @"version": @"6.4", - }, - @"iPad6,7" : @{ - @"name": @"iPad Pro (Wi-Fi Only)", - @"version": @"6.7", - }, - @"iPad6,8" : @{ - @"name": @"iPad Pro (Wi-Fi/Cellular)", - @"version": @"6.8", - }, - @"iPad7,1" : @{ - @"name": @"iPad Pro 12.9-Inch (Wi-Fi Only - 2nd Gen)", - @"version": @"7.1", - }, - @"iPad7,11" : @{ - @"name": @"iPad 10.2-Inch 7th Gen (Wi-Fi Only)", - @"version": @"7.11", - }, - @"iPad7,12" : @{ - @"name": @"iPad 10.2-Inch 7th Gen (Wi-Fi/Cellular Only)", - @"version": @"7.12", - }, - @"iPad7,2" : @{ - @"name": @"iPad Pro 12.9-Inch (Wi-Fi/Cell - 2nd Gen)", - @"version": @"7.2", - }, - @"iPad7,3" : @{ - @"name": @"iPad Pro 10.5-Inch (Wi-Fi Only)", - @"version": @"7.3", - }, - @"iPad7,4" : @{ - @"name": @"iPad Pro 10.5-Inch (Wi-Fi/Cellular)", - @"version": @"7.4", - }, - @"iPad7,5" : @{ - @"name": @"iPad 9.7-Inch 6th Gen (Wi-Fi Only)", - @"version": @"7.5", - }, - @"iPad7,6" : @{ - @"name": @"iPad 9.7-Inch 6th Gen (Wi-Fi/Cellular)", - @"version": @"7.6", - }, - @"iPad8,1" : @{ - @"name": @"iPad Pro 11-Inch (Wi-Fi Only)", - @"version": @"8.1", - }, - @"iPad8,10" : @{ - @"name": @"iPad Pro 11-Inch (Wi-Fi/Cellular - 2nd Gen)", - @"version": @"8.1", - }, - @"iPad8,11" : @{ - @"name": @"iPad Pro 12.9-Inch 1TB (Wi-Fi Only - 4th Gen)", - @"version": @"8.109999999999999", - }, - @"iPad8,12" : @{ - @"name": @"iPad Pro 12.9-Inch (Wi-Fi/Cell - 4th Gen)", - @"version": @"8.800000000000001", - }, - @"iPad8,2" : @{ - @"name": @"iPad Pro 11-Inch 1TB (Wi-Fi Only)", - @"version": @"8.199999999999999", - }, - @"iPad8,3" : @{ - @"name": @"iPad Pro 11-Inch (Wi-Fi/Cellular)", - @"version": @"8.300000000000001", - }, - @"iPad8,4" : @{ - @"name": @"iPad Pro 11-Inch 1TB (Wi-Fi/Cellular)", - @"version": @"8.4", - }, - @"iPad8,5" : @{ - @"name": @"iPad Pro 12.9-Inch (Wi-Fi Only - 3rd Gen)", - @"version": @"8.5", - }, - @"iPad8,6" : @{ - @"name": @"iPad Pro 12.9-Inch 1TB (Wi-Fi Only - 3rd Gen)", - @"version": @"8.6", - }, - @"iPad8,7" : @{ - @"name": @"iPad Pro 12.9-Inch (Wi-Fi/Cell - 3rd Gen)", - @"version": @"8.699999999999999", - }, - @"iPad8,8" : @{ - @"name": @"iPad Pro 12.9-Inch 1TB (Wi-Fi/Cell - 3rd Gen)", - @"version": @"8.800000000000001", - }, - @"iPad8,9" : @{ - @"name": @"iPad Pro 11-Inch (Wi-Fi Only - 2nd Gen)", - @"version": @"8.9", - }, - @"iPhone1,1" : @{ - @"name": @"iPhone 2G", - @"version": @"1.1", - }, - @"iPhone1,2" : @{ - @"name": @"iPhone 3G", - @"version": @"1.2", - }, - @"iPhone10,1" : @{ - @"name": @"iPhone 8", - @"version": @"10.1", - }, - @"iPhone10,2" : @{ - @"name": @"iPhone 8 Plus", - @"version": @"10.2", - }, - @"iPhone10,3" : @{ - @"name": @"iPhone X", - @"version": @"10.3", - }, - @"iPhone10,4" : @{ - @"name": @"iPhone 8", - @"version": @"10.4", - }, - @"iPhone10,5" : @{ - @"name": @"iPhone 8 Plus", - @"version": @"10.5", - }, - @"iPhone10,6" : @{ - @"name": @"iPhone X", - @"version": @"10.6", - }, - @"iPhone11,2" : @{ - @"name": @"iPhone XS", - @"version": @"11.2", - }, - @"iPhone11,4" : @{ - @"name": @"iPhone XS Max", - @"version": @"11.4", - }, - @"iPhone11,6" : @{ - @"name": @"iPhone XS Max China", - @"version": @"11.6", - }, - @"iPhone11,8" : @{ - @"name": @"iPhone XR", - @"version": @"11.8", - }, - @"iPhone12,1" : @{ - @"name": @"iPhone 11", - @"version": @"12.1", - }, - @"iPhone12,3" : @{ - @"name": @"iPhone 11 Pro", - @"version": @"12.3", - }, - @"iPhone12,5" : @{ - @"name": @"iPhone 11 Pro Max", - @"version": @"12.5", - }, - @"iPhone12,8" : @{ - @"name": @"iPhone SE (2 Gen)", - @"version": @"12.8", - }, - @"iPhone13,1" : @{ - @"name": @"iPhone 12 mini", - @"version": @"13.1", - }, - @"iPhone13,2" : @{ - @"name": @"iPhone 12", - @"version": @"13.2", - }, - @"iPhone13,3" : @{ - @"name": @"iPhone 12 Pro", - @"version": @"13.3", - }, - @"iPhone13,4" : @{ - @"name": @"iPhone 12 Pro Max", - @"version": @"13.4", - }, - @"iPhone14,2" : @{ - @"name": @"iPhone 13 Pro", - @"version": @"14.2", - }, - @"iPhone14,3" : @{ - @"name": @"iPhone 13 Pro Max", - @"version": @"14.3", - }, - @"iPhone14,4" : @{ - @"name": @"iPhone 13 mini", - @"version": @"14.4", - }, - @"iPhone14,5" : @{ - @"name": @"iPhone 13", - @"version": @"14.5", - }, - @"iPhone14,6" : @{ - @"name": @"iPhone SE (3 Gen)", - @"version": @"14.6", - }, - @"iPhone14,7" : @{ - @"name": @"iPhone 14", - @"version": @"14.7", - }, - @"iPhone14,8" : @{ - @"name": @"iPhone 14 Plus", - @"version": @"14.8", - }, - @"iPhone15,2" : @{ - @"name": @"iPhone 14 Pro", - @"version": @"15.2", - }, - @"iPhone15,3" : @{ - @"name": @"iPhone 14 Pro Max", - @"version": @"15.3", - }, - @"iPhone2,1" : @{ - @"name": @"iPhone 3GS", - @"version": @"2.1", - }, - @"iPhone3,1" : @{ - @"name": @"iPhone 4 (GSM)", - @"version": @"3.1", - }, - @"iPhone3,2" : @{ - @"name": @"iPhone 4 (GSM Rev. A)", - @"version": @"3.2", - }, - @"iPhone3,3" : @{ - @"name": @"iPhone 4 (CDMA)", - @"version": @"3.3", - }, - @"iPhone4,1" : @{ - @"name": @"iPhone 4S", - @"version": @"4.1", - }, - @"iPhone5,1" : @{ - @"name": @"iPhone 5 (GSM)", - @"version": @"5.1", - }, - @"iPhone5,2" : @{ - @"name": @"iPhone 5 (Global)", - @"version": @"5.2", - }, - @"iPhone5,3" : @{ - @"name": @"iPhone 5c (GSM)", - @"version": @"5.3", - }, - @"iPhone5,4" : @{ - @"name": @"iPhone 5c (Global)", - @"version": @"5.4", - }, - @"iPhone6,1" : @{ - @"name": @"iPhone 5s (GSM)", - @"version": @"6.1", - }, - @"iPhone6,2" : @{ - @"name": @"iPhone 5s (Global)", - @"version": @"6.2", - }, - @"iPhone7,1" : @{ - @"name": @"iPhone 6 Plus", - @"version": @"7.1", - }, - @"iPhone7,2" : @{ - @"name": @"iPhone 6", - @"version": @"7.2", - }, - @"iPhone8,1" : @{ - @"name": @"iPhone 6s", - @"version": @"8.1", - }, - @"iPhone8,2" : @{ - @"name": @"iPhone 6s Plus", - @"version": @"8.199999999999999", - }, - @"iPhone8,4" : @{ - @"name": @"iPhone SE", - @"version": @"8.4", - }, - @"iPhone9,1" : @{ - @"name": @"iPhone 7", - @"version": @"9.1", - }, - @"iPhone9,2" : @{ - @"name": @"iPhone 7 Plus", - @"version": @"9.199999999999999", - }, - @"iPhone9,3" : @{ - @"name": @"iPhone 7", - @"version": @"9.300000000000001", - }, - @"iPhone9,4" : @{ - @"name": @"iPhone 7 Plus", - @"version": @"9.4", - }, - @"iPod1,1" : @{ - @"name": @"iPod Touch (1 Gen)", - @"version": @"1.1", - }, - @"iPod2,1" : @{ - @"name": @"iPod Touch (2 Gen)", - @"version": @"2.1", - }, - @"iPod3,1" : @{ - @"name": @"iPod Touch (3 Gen)", - @"version": @"3.1", - }, - @"iPod4,1" : @{ - @"name": @"iPod Touch (4 Gen)", - @"version": @"4.1", - }, - @"iPod5,1" : @{ - @"name": @"iPod Touch (5 Gen)", - @"version": @"5.1", - }, - @"iPod7,1" : @{ - @"name": @"iPod Touch (6 Gen)", - @"version": @"7.1", - }, - @"iPod9,1" : @{ - @"name": @"iPod Touch (7 Gen)", - @"version": @"9.1", - }, - @"x86_64" : @{ - @"name": @"Simulator", - @"version": @"-1", - }, - }; - } - return self; -} - -- (NSString*)nativeHardwareString { - int name[] = {CTL_HW,HW_MACHINE}; - size_t size = 100; - sysctl(name, 2, NULL, &size, NULL, 0); // getting size of answer - char *hw_machine = malloc(size); - - sysctl(name, 2, hw_machine, &size, NULL, 0); - NSString *hardware = [NSString stringWithUTF8String:hw_machine]; - free(hw_machine); - - return hardware; -} - -- (NSString*)hardwareString { - NSString *hardware = [self nativeHardwareString]; - - // Check if the hardware is simulator - if ([hardware isEqualToString:i386_Simulator] || [hardware isEqualToString:x86_64_Simulator]) { - NSString *deviceID = [[[NSProcessInfo processInfo] environment] objectForKey:@"SIMULATOR_MODEL_IDENTIFIER"]; - if (deviceID != nil) { - hardware = deviceID; - } - } - return hardware; -} - -/* This is another way of gtting the system info - * For this you have to #import - */ - -/* - NSString* machineName - { - struct utsname systemInfo; - uname(&systemInfo); - return [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; - } - */ - - - -/// This method returns the Platform enum depending upon hardware string -/// -/// -/// - returns: `Platform` type of the device -/// -- (Platform)platform { - - NSString *hardware = [self hardwareString]; - - if ([hardware hasPrefix:@"iPhone"]) return iPhone; - if ([hardware hasPrefix:@"iPod"]) return iPodTouch; - if ([hardware hasPrefix:@"iPad"]) return iPad; - if ([hardware hasPrefix:@"Watch"]) return AppleWatch; - if ([hardware hasPrefix:@"AppleTV"]) return AppleTV; - - return Unknown; -} - -- (Hardware)nativeHardware { - NSString *hardware = [self nativeHardwareString]; - if ([hardware isEqualToString:i386_Simulator]) return SIMULATOR; - if ([hardware isEqualToString:x86_64_Simulator]) return SIMULATOR; - return [self hardware]; -} - -- (NSString*)hardwareDescription { - NSString *hardware = [self hardwareString]; - NSString *hardwareDescription = [[deviceList objectForKey:hardware] objectForKey:@"name"]; - if (hardwareDescription) { - return hardwareDescription; - } - else { - //log message that your device is not present in the list - [self logMessage:hardware]; - - return nil; - } -} - -- (NSString*)hardwareSimpleDescription { - NSString *hardwareDescription = [self hardwareDescription]; - if (hardwareDescription == nil) { - return nil; - } - NSError *error = nil; - // this expression matches all strings between round brackets (e.g (Wifi), (GSM)) except the pattern "[0-9]+ Gen" - NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"\\((?![0-9]+ Gen).*\\)" options:NSRegularExpressionCaseInsensitive error:&error]; - NSString *hardwareSimpleDescription = [regex stringByReplacingMatchesInString:hardwareDescription options:0 range:NSMakeRange(0, [hardwareDescription length]) withTemplate:@""]; - if (error) { - return nil; - } else { - return hardwareSimpleDescription; - } -} - -- (float)hardwareNumber { - NSString *hardware = [self hardwareString]; - float version = [[[deviceList objectForKey:hardware] objectForKey:@"version"] floatValue]; - if (version != 0.0f) { - return version; - } - else { - //log message that your device is not present in the list - [self logMessage:hardware]; - - return 200.0f; //device might be new one of missing one so returning 200.0f - } -} - -- (BOOL)isSimulator { - return [self nativeHardware] == SIMULATOR; -} - -- (CGSize)backCameraStillImageResolutionInPixels { - switch ([self hardware]) { - case IPHONE_2G: - case IPHONE_3G: - return CGSizeMake(1600, 1200); - - case IPHONE_3GS: - return CGSizeMake(2048, 1536); - - case IPHONE_4: - case IPHONE_4_CDMA: - case IPAD_3_WIFI: - case IPAD_3_WIFI_CDMA: - case IPAD_3: - case IPAD_4_WIFI: - case IPAD_4: - case IPAD_4_GSM_CDMA: - return CGSizeMake(2592, 1936); - - case IPHONE_4S: - case IPHONE_5: - case IPHONE_5_CDMA_GSM: - case IPHONE_5C: - case IPHONE_5C_CDMA_GSM: - case IPHONE_6: - case IPHONE_6_PLUS: - case IPOD_TOUCH_6G: - case IPAD_AIR_2_WIFI: - case IPAD_AIR_2_WIFI_CELLULAR: - case IPHONE_6S: - case IPHONE_6S_PLUS: - case IPAD_MINI_4_WIFI: - case IPAD_MINI_4_WIFI_CELLULAR: - case IPAD_MINI_5_WIFI: - case IPAD_MINI_5_WIFI_CELLULAR: - case IPAD_AIR_3_WIFI: - case IPAD_AIR_3_WIFI_CELLULAR: - return CGSizeMake(3264, 2448); - - case IPHONE_7: - case IPHONE_7_GSM: - case IPHONE_7_PLUS: - case IPHONE_7_PLUS_GSM: - case IPHONE_8: - case IPHONE_8_CN: - case IPHONE_8_PLUS: - case IPHONE_8_PLUS_CN: - case IPHONE_X: - case IPHONE_X_CN: - return CGSizeMake(4032, 3024); - - case IPOD_TOUCH_4G: - return CGSizeMake(960, 720); - - case IPOD_TOUCH_5G: - return CGSizeMake(2440, 1605); - - case IPAD_2_WIFI: - case IPAD_2: - case IPAD_2_CDMA: - return CGSizeMake(872, 720); - - case IPAD_MINI_WIFI: - case IPAD_MINI: - case IPAD_MINI_WIFI_CDMA: - return CGSizeMake(1820, 1304); - - case IPAD_PRO_97_WIFI: - case IPAD_PRO_97_WIFI_CELLULAR: - return CGSizeMake(4032, 3024); - - default: - NSLog(@"We have no resolution for your device's camera listed in this category. Please, make photo with back camera of your device, get its resolution in pixels (via Preview Cmd+I for example) and add a comment to this repository (https://github.com/InderKumarRathore/DeviceUtil) on GitHub.com in format Device = Hpx x Wpx."); - NSLog(@"Your device is: %@", [self hardwareDescription]); - break; - } - return CGSizeZero; -} - -- (void)logMessage:(NSString *)hardware { - NSLog(@"This is a device which is not listed in this category. Please visit https://github.com/InderKumarRathore/DeviceUtil and add a comment there."); - NSLog(@"Your device hardware string is: %@", hardware); -} - -@end diff --git a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CacheStoragePolicy.h b/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CacheStoragePolicy.h deleted file mode 100644 index 2c29acd..0000000 --- a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CacheStoragePolicy.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -@import Foundation; - -/*! Determines the cache storage policy for a response. - * \details When we provide a response up to the client we need to tell the client whether - * the response is cacheable or not. The default HTTP/HTTPS protocol has a reasonable - * complex chunk of code to determine this, but we can't get at it. Thus, we have to - * reimplement it ourselves. This is split off into a separate file to emphasise that - * this is standard boilerplate that you probably don't need to look at. - * \param request The request that generated the response; must not be nil. - * \param response The response itself; must not be nil. - * \returns A cache storage policy to use. - */ - -extern NSURLCacheStoragePolicy CacheStoragePolicyForRequestAndResponse(NSURLRequest * request, NSHTTPURLResponse * response); diff --git a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CacheStoragePolicy.m b/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CacheStoragePolicy.m deleted file mode 100644 index 0c5c80c..0000000 --- a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CacheStoragePolicy.m +++ /dev/null @@ -1,85 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_CacheStoragePolicy.h" - -extern NSURLCacheStoragePolicy CacheStoragePolicyForRequestAndResponse(NSURLRequest * request, NSHTTPURLResponse * response) - // See comment in header. -{ - BOOL cacheable; - NSURLCacheStoragePolicy result; - - //assert(request != NULL); - //assert(response != NULL); - - // First determine if the request is cacheable based on its status code. - - switch ([response statusCode]) { - case 200: - case 203: - case 206: - case 301: - case 304: - case 404: - case 410: { - cacheable = YES; - } break; - default: { - cacheable = NO; - } break; - } - - // If the response might be cacheable, look at the "Cache-Control" header in - // the response. - - // IMPORTANT: We can't rely on -rangeOfString: returning valid results if the target - // string is nil, so we have to explicitly test for nil in the following two cases. - - if (cacheable) { - NSString * responseHeader; - - responseHeader = [[response allHeaderFields][@"Cache-Control"] lowercaseString]; - if ( (responseHeader != nil) && [responseHeader rangeOfString:@"no-store"].location != NSNotFound) { - cacheable = NO; - } - } - - // If we still think it might be cacheable, look at the "Cache-Control" header in - // the request. - - if (cacheable) { - NSString * requestHeader; - - requestHeader = [[request allHTTPHeaderFields][@"Cache-Control"] lowercaseString]; - if ( (requestHeader != nil) - && ([requestHeader rangeOfString:@"no-store"].location != NSNotFound) - && ([requestHeader rangeOfString:@"no-cache"].location != NSNotFound) ) { - cacheable = NO; - } - } - - // Use the cacheable flag to determine the result. - - if (cacheable) { - - // This code only caches HTTPS data in memory. This is inline with earlier versions of - // iOS. Modern versions of iOS use file protection to protect the cache, and thus are - // happy to cache HTTPS on disk. I've not made the correspondencing change because - // it's nice to see all three cache policies in action. - - if ([[[[request URL] scheme] lowercaseString] isEqual:@"https"]) { - result = NSURLCacheStorageAllowedInMemoryOnly; - } else { - result = NSURLCacheStorageAllowed; - } - } else { - result = NSURLCacheStorageNotAllowed; - } - - return result; -} diff --git a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CanonicalRequest.h b/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CanonicalRequest.h deleted file mode 100644 index 8e6f890..0000000 --- a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CanonicalRequest.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -@import Foundation; - -/*! Returns a canonical form of the supplied request. - * \details The Foundation URL loading system needs to be able to canonicalize URL - * requests for various reasons (for example, to look for cache hits). The default - * HTTP/HTTPS protocol has a complex chunk of code to perform this function. Unfortunately - * there's no way for third party code to access this. Instead, we have to reimplement - * it all ourselves. This is split off into a separate file to emphasise that this - * is standard boilerplate that you probably don't need to look at. - * - * IMPORTANT: While you can take most of this code as read, you might want to tweak - * the handling of the "Accept-Language" in the CanonicaliseHeaders routine. - * \param request The request to canonicalise; must not be nil. - * \returns The canonical request; should never be nil. - */ - -extern NSMutableURLRequest * CanonicalRequestForRequest(NSURLRequest *request); diff --git a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CanonicalRequest.m b/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CanonicalRequest.m deleted file mode 100644 index 41805a2..0000000 --- a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CanonicalRequest.m +++ /dev/null @@ -1,397 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_CanonicalRequest.h" - -#include - -#pragma mark * URL canonicalization steps - -/*! A step in the canonicalisation process. - * \details The canonicalisation process is made up of a sequence of steps, each of which is - * implemented by a function that matches this function pointer. The function gets a URL - * and a mutable buffer holding that URL as bytes. The function can mutate the buffer as it - * sees fit. It typically does this by calling CFURLGetByteRangeForComponent to find the range - * of interest in the buffer. In that case bytesInserted is the amount to adjust that range, - * and the function should modify that to account for any bytes it inserts or deletes. If - * the function modifies the buffer too much, it can return kCFNotFound to force the system - * to re-create the URL from the buffer. - * \param url The original URL to work on. - * \param urlData The URL as a mutable buffer; the routine modifies this. - * \param bytesInserted The number of bytes that have been inserted so far the mutable buffer. - * \returns An updated value of bytesInserted or kCFNotFound if the URL must be reparsed. - */ - -typedef CFIndex (*CanonicalRequestStepFunction)(NSURL *url, NSMutableData *urlData, CFIndex bytesInserted); - -/*! The post-scheme separate should be "://"; if that's not the case, fix it. - * \param url The original URL to work on. - * \param urlData The URL as a mutable buffer; the routine modifies this. - * \param bytesInserted The number of bytes that have been inserted so far the mutable buffer. - * \returns An updated value of bytesInserted or kCFNotFound if the URL must be reparsed. - */ - -static CFIndex FixPostSchemeSeparator(NSURL *url, NSMutableData *urlData, CFIndex bytesInserted) -{ - CFRange range; - uint8_t * urlDataBytes; - NSUInteger urlDataLength; - NSUInteger cursor; - NSUInteger separatorLength; - NSUInteger expectedSeparatorLength; - - //assert(url != nil); - //assert(urlData != nil); - //assert(bytesInserted >= 0); - - range = CFURLGetByteRangeForComponent( (CFURLRef) url, kCFURLComponentScheme, NULL); - if (range.location != kCFNotFound) { - //assert(range.location >= 0); - //assert(range.length >= 0); - - urlDataBytes = [urlData mutableBytes]; - urlDataLength = [urlData length]; - - separatorLength = 0; - cursor = (NSUInteger) range.location + (NSUInteger) bytesInserted + (NSUInteger) range.length; - if ( (cursor < urlDataLength) && (urlDataBytes[cursor] == ':') ) { - cursor += 1; - separatorLength += 1; - if ( (cursor < urlDataLength) && (urlDataBytes[cursor] == '/') ) { - cursor += 1; - separatorLength += 1; - if ( (cursor < urlDataLength) && (urlDataBytes[cursor] == '/') ) { - cursor += 1; - separatorLength += 1; - } - } - } - #pragma unused(cursor) // quietens an analyser warning - - expectedSeparatorLength = strlen("://"); - if (separatorLength != expectedSeparatorLength) { - [urlData replaceBytesInRange:NSMakeRange((NSUInteger) range.location + (NSUInteger) bytesInserted + (NSUInteger) range.length, separatorLength) withBytes:"://" length:expectedSeparatorLength]; - bytesInserted = kCFNotFound; // have to build everything now - } - } - - return bytesInserted; -} - -/*! The scheme should be lower case; if it's not, make it so. - * \param url The original URL to work on. - * \param urlData The URL as a mutable buffer; the routine modifies this. - * \param bytesInserted The number of bytes that have been inserted so far the mutable buffer. - * \returns An updated value of bytesInserted or kCFNotFound if the URL must be reparsed. - */ - -static CFIndex LowercaseScheme(NSURL *url, NSMutableData *urlData, CFIndex bytesInserted) -{ - CFRange range; - uint8_t * urlDataBytes; - CFIndex i; - - //assert(url != nil); - //assert(urlData != nil); - //assert(bytesInserted >= 0); - - range = CFURLGetByteRangeForComponent( (CFURLRef) url, kCFURLComponentScheme, NULL); - if (range.location != kCFNotFound) { - //assert(range.location >= 0); - //assert(range.length >= 0); - - urlDataBytes = [urlData mutableBytes]; - for (i = range.location + bytesInserted; i < (range.location + bytesInserted + range.length); i++) { - urlDataBytes[i] = (uint8_t) tolower_l(urlDataBytes[i], NULL); - } - } - return bytesInserted; -} - -/*! The host should be lower case; if it's not, make it so. - * \param url The original URL to work on. - * \param urlData The URL as a mutable buffer; the routine modifies this. - * \param bytesInserted The number of bytes that have been inserted so far the mutable buffer. - * \returns An updated value of bytesInserted or kCFNotFound if the URL must be reparsed. - */ - -static CFIndex LowercaseHost(NSURL *url, NSMutableData *urlData, CFIndex bytesInserted) - // The host should be lower case; if it's not, make it so. -{ - CFRange range; - uint8_t * urlDataBytes; - CFIndex i; - - //assert(url != nil); - //assert(urlData != nil); - //assert(bytesInserted >= 0); - - range = CFURLGetByteRangeForComponent( (CFURLRef) url, kCFURLComponentHost, NULL); - if (range.location != kCFNotFound) { - //assert(range.location >= 0); - //assert(range.length >= 0); - - urlDataBytes = [urlData mutableBytes]; - for (i = range.location + bytesInserted; i < (range.location + bytesInserted + range.length); i++) { - urlDataBytes[i] = (uint8_t) tolower_l(urlDataBytes[i], NULL); - } - } - return bytesInserted; -} - -/*! An empty host should be treated as "localhost" case; if it's not, make it so. - * \param url The original URL to work on. - * \param urlData The URL as a mutable buffer; the routine modifies this. - * \param bytesInserted The number of bytes that have been inserted so far the mutable buffer. - * \returns An updated value of bytesInserted or kCFNotFound if the URL must be reparsed. - */ - -static CFIndex FixEmptyHost(NSURL *url, NSMutableData *urlData, CFIndex bytesInserted) -{ - CFRange range; - CFRange rangeWithSeparator; - - //assert(url != nil); - //assert(urlData != nil); - //assert(bytesInserted >= 0); - - range = CFURLGetByteRangeForComponent( (CFURLRef) url, kCFURLComponentHost, &rangeWithSeparator); - if (range.length == 0) { - NSUInteger localhostLength; - - //assert(range.location >= 0); - //assert(range.length >= 0); - - localhostLength = strlen("localhost"); - if (range.location != kCFNotFound) { - [urlData replaceBytesInRange:NSMakeRange( (NSUInteger) range.location + (NSUInteger) bytesInserted, 0) withBytes:"localhost" length:localhostLength]; - bytesInserted += localhostLength; - } else if ( (rangeWithSeparator.location != kCFNotFound) && (rangeWithSeparator.length == 0) ) { - [urlData replaceBytesInRange:NSMakeRange((NSUInteger) rangeWithSeparator.location + (NSUInteger) bytesInserted, 0) withBytes:"localhost" length:localhostLength]; - bytesInserted += localhostLength; - } - } - return bytesInserted; -} - -/*! Transform an empty URL path to "/". For example, "http://www.apple.com" becomes "http://www.apple.com/". - * \param url The original URL to work on. - * \param urlData The URL as a mutable buffer; the routine modifies this. - * \param bytesInserted The number of bytes that have been inserted so far the mutable buffer. - * \returns An updated value of bytesInserted or kCFNotFound if the URL must be reparsed. - */ - -static CFIndex FixEmptyPath(NSURL *url, NSMutableData *urlData, CFIndex bytesInserted) -{ - CFRange range; - CFRange rangeWithSeparator; - - //assert(url != nil); - //assert(urlData != nil); - //assert(bytesInserted >= 0); - - range = CFURLGetByteRangeForComponent( (CFURLRef) url, kCFURLComponentPath, &rangeWithSeparator); - // The following is not a typo. We use rangeWithSeparator to find where to insert the - // "/" and the range length to decide whether we /need/ to insert the "/". - if ( (rangeWithSeparator.location != kCFNotFound) && (range.length == 0) ) { - //assert(range.location >= 0); - //assert(range.length >= 0); - //assert(rangeWithSeparator.location >= 0); - //assert(rangeWithSeparator.length >= 0); - - [urlData replaceBytesInRange:NSMakeRange( (NSUInteger) rangeWithSeparator.location + (NSUInteger) bytesInserted, 0) withBytes:"/" length:1]; - bytesInserted += 1; - } - return bytesInserted; -} - -/*! If the user specified the default port (80 for HTTP, 443 for HTTPS), remove it from the URL. - * \details Actually this code is disabled because the equivalent code in the default protocol - * handler has also been disabled; some setups depend on get the port number in the URL, even if it - * is the default. - * \param url The original URL to work on. - * \param urlData The URL as a mutable buffer; the routine modifies this. - * \param bytesInserted The number of bytes that have been inserted so far the mutable buffer. - * \returns An updated value of bytesInserted or kCFNotFound if the URL must be reparsed. - */ - -__attribute__((unused)) static CFIndex DeleteDefaultPort(NSURL *url, NSMutableData *urlData, CFIndex bytesInserted) -{ - NSString * scheme; - BOOL isHTTP; - BOOL isHTTPS; - CFRange range; - uint8_t * urlDataBytes; - NSString * portNumberStr; - int portNumber; - - //assert(url != nil); - //assert(urlData != nil); - //assert(bytesInserted >= 0); - - scheme = [[url scheme] lowercaseString]; - //assert(scheme != nil); - - isHTTP = [scheme isEqual:@"http" ]; - isHTTPS = [scheme isEqual:@"https"]; - - range = CFURLGetByteRangeForComponent( (CFURLRef) url, kCFURLComponentPort, NULL); - if (range.location != kCFNotFound) { - //assert(range.location >= 0); - //assert(range.length >= 0); - - urlDataBytes = [urlData mutableBytes]; - - portNumberStr = [[NSString alloc] initWithBytes:&urlDataBytes[range.location + bytesInserted] length:(NSUInteger) range.length encoding:NSUTF8StringEncoding]; - if (portNumberStr != nil) { - portNumber = [portNumberStr intValue]; - if ( (isHTTP && (portNumber == 80)) || (isHTTPS && (portNumber == 443)) ) { - // -1 and +1 to account for the leading ":" - [urlData replaceBytesInRange:NSMakeRange((NSUInteger) range.location + (NSUInteger) bytesInserted - 1, (NSUInteger) range.length + 1) withBytes:NULL length:0]; - bytesInserted -= (range.length + 1); - } - } - } - return bytesInserted; -} - -#pragma mark * Other request canonicalization - -/*! Canonicalise the request headers. - * \param request The request to canonicalise. - */ - -static void CanonicaliseHeaders(NSMutableURLRequest * request) -{ - // If there's no content type and the request is a POST with a body, add a default - // content type of "application/x-www-form-urlencoded". - - if ( ([request valueForHTTPHeaderField:@"Content-Type"] == nil) - && ([[request HTTPMethod] caseInsensitiveCompare:@"POST"] == NSOrderedSame) - && (([request HTTPBody] != nil) || ([request HTTPBodyStream] != nil)) ) { - [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; - } - - // If there's no "Accept" header, add a default. - - if ([request valueForHTTPHeaderField:@"Accept"] == nil) { - [request setValue:@"*/*" forHTTPHeaderField:@"Accept"]; - } - - // If there's not "Accept-Encoding" header, add a default. - - if ([request valueForHTTPHeaderField:@"Accept-Encoding"] == nil) { - [request setValue:@"gzip, deflate" forHTTPHeaderField:@"Accept-Encoding"]; - } - - // If there's not an "Accept-Language" headre, add a default. This is quite bogus; ideally we - // should derive the correct "Accept-Language" value from the langauge that the app is running - // in. However, that's quite difficult to get right, so rather than show some general purpose - // code that might fail in some circumstances, I've decided to just hardwire US English. - // If you use this code in your own app you can customise it as you see fit. One option might be - // to base this value on -[NSBundle preferredLocalizations], so that the web page comes back in - // the language that the app is running in. - - if ([request valueForHTTPHeaderField:@"Accept-Language"] == nil) { - [request setValue:@"en-us" forHTTPHeaderField:@"Accept-Language"]; - } -} - -#pragma mark * API - -extern NSMutableURLRequest * CanonicalRequestForRequest(NSURLRequest *request) -{ - NSMutableURLRequest * result; - NSString * scheme; - - //assert(request != nil); - - // Make a mutable copy of the request. - - result = [request mutableCopy]; - - // First up check that we're dealing with HTTP or HTTPS. If not, do nothing (why were we - // we even called?). - - scheme = [[[request URL] scheme] lowercaseString]; - //assert(scheme != nil); - - if ( ! [scheme isEqual:@"http" ] && ! [scheme isEqual:@"https"]) { - //assert(NO); - } else { - CFIndex bytesInserted; - NSURL * requestURL; - NSMutableData * urlData; - static const CanonicalRequestStepFunction kStepFunctions[] = { - FixPostSchemeSeparator, - LowercaseScheme, - LowercaseHost, - FixEmptyHost, - // DeleteDefaultPort, -- The built-in canonicalizer has stopped doing this, so we don't do it either. - FixEmptyPath - }; - size_t stepIndex; - size_t stepCount; - - // Canonicalise the URL by executing each of our step functions. - - bytesInserted = kCFNotFound; - urlData = nil; - requestURL = [request URL]; - //assert(requestURL != nil); - - stepCount = sizeof(kStepFunctions) / sizeof(*kStepFunctions); - for (stepIndex = 0; stepIndex < stepCount; stepIndex++) { - - // If we don't have valid URL data, create it from the URL. - - //assert(requestURL != nil); - if (bytesInserted == kCFNotFound) { - NSData * urlDataImmutable; - - urlDataImmutable = CFBridgingRelease( CFURLCreateData(NULL, (CFURLRef) requestURL, kCFStringEncodingUTF8, true) ); - //assert(urlDataImmutable != nil); - - urlData = [urlDataImmutable mutableCopy]; - //assert(urlData != nil); - - bytesInserted = 0; - } - //assert(urlData != nil); - - // Run the step. - - bytesInserted = kStepFunctions[stepIndex](requestURL, urlData, bytesInserted); - - // Note: The following logging is useful when debugging this code. Change the - // if expression to YES to enable it. - - if (/* DISABLES CODE */ (NO)) { -// fprintf(stderr, " [%zu] %.*s\n", stepIndex, (int) [urlData length], (const char *) [urlData bytes]); - } - - // If the step invalidated our URL (or we're on the last step, whereupon we'll need - // the URL outside of the loop), recreate the URL from the URL data. - - if ( (bytesInserted == kCFNotFound) || ((stepIndex + 1) == stepCount) ) { - requestURL = CFBridgingRelease( CFURLCreateWithBytes(NULL, [urlData bytes], (CFIndex) [urlData length], kCFStringEncodingUTF8, NULL) ); - //assert(requestURL != nil); - - urlData = nil; - } - } - - [result setURL:requestURL]; - - // Canonicalise the headers. - - CanonicaliseHeaders(result); - } - - return result; -} diff --git a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CustomHTTPProtocol.h b/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CustomHTTPProtocol.h deleted file mode 100644 index 6602dbb..0000000 --- a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CustomHTTPProtocol.h +++ /dev/null @@ -1,138 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -@import Foundation; - -@protocol _CustomHTTPProtocolDelegate; - -/*! An NSURLProtocol subclass that overrides the built-in HTTP/HTTPS protocol to intercept - * authentication challenges for subsystems, ilke UIWebView, that don't otherwise allow it. - * To use this class you should set up your delegate (+setDelegate:) and then call +start. - * If you don't call +start the class is completely benign. - * - * The really tricky stuff here is related to the authentication challenge delegate - * callbacks; see the docs for _CustomHTTPProtocolDelegate for the details. - */ - -@interface _CustomHTTPProtocol : NSURLProtocol - -/*! Call this to start the module. Prior to this the module is just dormant, and - * all HTTP requests proceed as normal. After this all HTTP and HTTPS requests - * go through this module. - */ - -+ (void)start; - -//liman -+ (void)stop; - -/*! Sets the delegate for the class. - * \details Note that there's one delegate for the entire class, not one per - * instance of the class as is more normal. The delegate is not retained in general, - * but is retained for the duration of any given call. Once you set the delegate to nil - * you can be assured that it won't be called unretained (that is, by the time that - * -setDelegate: returns, we've already done all possible retains on the delegate). - * \param newValue The new delegate to use; may be nil. - */ - -+ (void)setDelegate:(id<_CustomHTTPProtocolDelegate>)newValue; - -/*! Returns the class delegate. - */ - -+ (id<_CustomHTTPProtocolDelegate>)delegate; - -@property (atomic, strong, readonly ) NSURLAuthenticationChallenge * pendingChallenge; ///< The current authentication challenge; it's only safe to access this from the main thread. - -/*! Call this method to resolve an authentication challeng. This must be called on the main thread. - * \param challenge The challenge to resolve. This must match the pendingChallenge property. - * \param credential The credential to use, or nil to continue without a credential. - */ - -- (void)resolveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge withCredential:(NSURLCredential *)credential; - -@end - -/*! The delegate for the CustomHTTPProtocol class (not its instances). - * \details The delegate handles two different types of callbacks: - * - * - authentication challenges - * - * - logging - * - * The latter is very simple. The former is quite tricky. The basic idea is that each CustomHTTPProtocol - * instance sends the delegate a serialised stream of authentication challenges, each of which it is - * expected to resolve. The sequence is as follows: - * - * -# It calls -customHTTPProtocol:canAuthenticateAgainstProtectionSpace: to determine if the delegate - * can handle the challenge. This can be call on an arbitrary background thread. - * - * -# If the delegate returns YES, it calls -customHTTPProtocol:didReceiveAuthenticationChallenge: to - * actually process the challenge. This is always called on the main thread. The delegate can resolve - * the challenge synchronously (that is, before returning from the call) or it can return from the call - * and then, later on, resolve the challenge. Resolving the challenge involves calling - * -[CustomHTTPProtocol resolveAuthenticationChallenge:withCredential:], which also must be called - * on the main thread. Between the calls to -customHTTPProtocol:didReceiveAuthenticationChallenge: - * and -[CustomHTTPProtocol resolveAuthenticationChallenge:withCredential:], the protocol's - * pendingChallenge property will contain the challenge. - * - * -# While there is a pending challenge, the protocol may call -customHTTPProtocol:didCancelAuthenticationChallenge: - * to cancel the challenge. This is always called on the main thread. - * - * Note that this design follows the original NSURLConnection model, not the newer NSURLConnection model - * (introduced in OS X 10.7 / iOS 5) or the NSURLSession model, because of my concerns about performance. - * Specifically, -customHTTPProtocol:canAuthenticateAgainstProtectionSpace: can be called on any thread - * but -customHTTPProtocol:didReceiveAuthenticationChallenge: is called on the main thread. If I unified - * them I'd end up calling the resulting single routine on the main thread, which meanings a lot more - * bouncing between threads, much of which would be pointless in the common case where you don't want to - * customise the default behaviour. Alternatively I could call the unified routine on an arbitrary thread, - * but that would make it harder for clients and require a major rework of my implementation. - */ - -@protocol _CustomHTTPProtocolDelegate - -@optional - -/*! Called by an CustomHTTPProtocol instance to ask the delegate whether it's prepared to handle - * a particular authentication challenge. Can be called on any thread. - * \param protocol The protocol instance itself; will not be nil. - * \param protectionSpace The protection space for the authentication challenge; will not be nil. - * \returns Return YES if you want the -customHTTPProtocol:didReceiveAuthenticationChallenge: delegate - * callback, or NO for the challenge to be handled in the default way. - */ - -- (BOOL)customHTTPProtocol:(_CustomHTTPProtocol *)protocol canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace; - -/*! Called by an CustomHTTPProtocol instance to request that the delegate process on authentication - * challenge. Will be called on the main thread. Unless the challenge is cancelled (see below) - * the delegate must eventually resolve it by calling -resolveAuthenticationChallenge:withCredential:. - * \param protocol The protocol instance itself; will not be nil. - * \param challenge The authentication challenge; will not be nil. - */ - -- (void)customHTTPProtocol:(_CustomHTTPProtocol *)protocol didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; - -/*! Called by an CustomHTTPProtocol instance to cancel an issued authentication challenge. - * Will be called on the main thread. - * \param protocol The protocol instance itself; will not be nil. - * \param challenge The authentication challenge; will not be nil; will match the challenge - * previously issued by -customHTTPProtocol:canAuthenticateAgainstProtectionSpace:. - */ - -- (void)customHTTPProtocol:(_CustomHTTPProtocol *)protocol didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; - -/*! Called by the CustomHTTPProtocol to log various bits of information. - * Can be called on any thread. - * \param protocol The protocol instance itself; nil to indicate log messages from the class itself. - * \param format A standard NSString-style format string; will not be nil. - * \param arguments Arguments for that format string. - */ - -- (void)customHTTPProtocol:(_CustomHTTPProtocol *)protocol logWithFormat:(NSString *)format arguments:(va_list)arguments; - -@end diff --git a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CustomHTTPProtocol.m b/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CustomHTTPProtocol.m deleted file mode 100644 index 0e8163d..0000000 --- a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_CustomHTTPProtocol.m +++ /dev/null @@ -1,1189 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_CustomHTTPProtocol.h" - -#import "_CanonicalRequest.h" -#import "_CacheStoragePolicy.h" -#import "_QNSURLSessionDemux.h" - -//liman -#import "_Swizzling.h" -#import "_NetworkHelper.h" -#import "_HttpDatasource.h" -#import "NSObject+CocoaDebug.h" - -// https://stackoverflow.com/questions/27604052/nsurlsessiontask-authentication-challenge-completionhandler-and-nsurlauthenticat -@interface CPURLSessionChallengeSender : NSObject - -- (instancetype)initWithSessionCompletionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler; - -@end - -@implementation CPURLSessionChallengeSender -{ - void (^_sessionCompletionHandler)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential); -} - -- (instancetype)initWithSessionCompletionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler -{ - self = [super init]; - - if (self) - { - _sessionCompletionHandler = [completionHandler copy]; - } - - return self; -} - -- (void)useCredential:(NSURLCredential *)credential forAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge -{ - _sessionCompletionHandler(NSURLSessionAuthChallengeUseCredential, credential); -} - -- (void)continueWithoutCredentialForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge -{ - _sessionCompletionHandler(NSURLSessionAuthChallengeUseCredential, nil); -} - -- (void)cancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; -{ - _sessionCompletionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil); -} - -- (void)performDefaultHandlingForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge -{ - _sessionCompletionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil); -} - -- (void)rejectProtectionSpaceAndContinueWithChallenge:(NSURLAuthenticationChallenge *)challenge -{ - _sessionCompletionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, nil); -} - -@end - -//liman -typedef NSURLSessionConfiguration *(*SessionConfigConstructor)(id,SEL); - -static SessionConfigConstructor orig_defaultSessionConfiguration; -static SessionConfigConstructor orig_ephemeralSessionConfiguration; - -static NSURLSessionConfiguration *replaced_defaultSessionConfiguration(id self, SEL _cmd) -{ - NSURLSessionConfiguration *config = orig_defaultSessionConfiguration(self,_cmd); - - if ([config respondsToSelector:@selector(protocolClasses)] && [config respondsToSelector:@selector(setProtocolClasses:)]) { - NSMutableArray *urlProtocolClasses = [NSMutableArray arrayWithArray:config.protocolClasses]; - Class protoCls = _CustomHTTPProtocol.class; - if (![urlProtocolClasses containsObject:protoCls]) { - [urlProtocolClasses insertObject:protoCls atIndex:0]; - } - - config.protocolClasses = urlProtocolClasses; - } - - return config; -} - -static NSURLSessionConfiguration *replaced_ephemeralSessionConfiguration(id self, SEL _cmd) -{ - NSURLSessionConfiguration *config = orig_ephemeralSessionConfiguration(self,_cmd); - - if ([config respondsToSelector:@selector(protocolClasses)] && [config respondsToSelector:@selector(setProtocolClasses:)]) { - NSMutableArray *urlProtocolClasses = [NSMutableArray arrayWithArray:config.protocolClasses]; - Class protoCls = _CustomHTTPProtocol.class; - if (![urlProtocolClasses containsObject:protoCls]) { - [urlProtocolClasses insertObject:protoCls atIndex:0]; - } - - config.protocolClasses = urlProtocolClasses; - } - - return config; -} - -// I use the following typedef to keep myself sane in the face of the wacky -// Objective-C block syntax. - -typedef void (^_ChallengeCompletionHandler)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * credential); - -@interface _CustomHTTPProtocol () - -@property (atomic, strong, readwrite) NSThread * clientThread; ///< The thread on which we should call the client. - -/*! The run loop modes in which to call the client. - * \details The concurrency control here is complex. It's set up on the client - * thread in -startLoading and then never modified. It is, however, read by code - * running on other threads (specifically the main thread), so we deallocate it in - * -dealloc rather than in -stopLoading. We can be sure that it's not read before - * it's set up because the main thread code that reads it can only be called after - * -startLoading has started the connection running. - */ - -@property (atomic, copy, readwrite) NSArray * modes; -@property (atomic, assign, readwrite) NSTimeInterval startTime; ///< The start time of the request; written by client thread only; read by any thread. -@property (atomic, strong, readwrite) NSURLSessionDataTask * task; ///< The NSURLSession task for that request; client thread only. -@property (atomic, strong, readwrite) NSURLAuthenticationChallenge * pendingChallenge; -@property (atomic, copy, readwrite) _ChallengeCompletionHandler pendingChallengeCompletionHandler; ///< The completion handler that matches pendingChallenge; main thread only. - -//liman -@property (atomic, strong) NSURLResponse *response; -@property (atomic, strong) NSMutableData *data; -@property (atomic, strong) NSError *error; - -@end - -@implementation _CustomHTTPProtocol - -#pragma mark * Subclass specific additions - -/*! The backing store for the class delegate. This is protected by @synchronized on the class. - */ - -static id<_CustomHTTPProtocolDelegate> sDelegate; - -+ (void)start -{ - [NSURLProtocol registerClass:self]; -} - -//liman -+ (void)stop -{ - [NSURLProtocol unregisterClass:self]; -} - -+ (id<_CustomHTTPProtocolDelegate>)delegate -{ - id<_CustomHTTPProtocolDelegate> result; - - @synchronized (self) { - result = sDelegate; - } - return result; -} - -+ (void)setDelegate:(id<_CustomHTTPProtocolDelegate>)newValue -{ - @synchronized (self) { - sDelegate = newValue; - } -} - -/*! Returns the session demux object used by all the protocol instances. - * \details This object allows us to have a single NSURLSession, with a session delegate, - * and have its delegate callbacks routed to the correct protocol instance on the correct - * thread in the correct modes. Can be called on any thread. - */ - -+ (_QNSURLSessionDemux *)sharedDemux -{ - static dispatch_once_t sOnceToken; - static _QNSURLSessionDemux * sDemux; - dispatch_once(&sOnceToken, ^{ - NSURLSessionConfiguration * config; - - config = [NSURLSessionConfiguration defaultSessionConfiguration]; - // You have to explicitly configure the session to use your own protocol subclass here - // otherwise you don't see redirects . - config.protocolClasses = @[ self ]; - sDemux = [[_QNSURLSessionDemux alloc] initWithConfiguration:config]; - }); - return sDemux; -} - -/*! Called by by both class code and instance code to log various bits of information. - * Can be called on any thread. - * \param protocol The protocol instance; nil if it's the class doing the logging. - * \param format A standard NSString-style format string; will not be nil. - */ - -#pragma mark * NSURLProtocol overrides - -/*! Used to mark our recursive requests so that we don't try to handle them (and thereby - * suffer an infinite recursive death). - */ - -static NSString * kOurRecursiveRequestFlagProperty = @"com.apple.dts.CustomHTTPProtocol"; - -//liman -//+ (BOOL)canInitWithRequest:(NSURLRequest *)request -//{ -// BOOL shouldAccept; -// NSURL * url; -// NSString * scheme; -// -// // Check the basics. This routine is extremely defensive because experience has shown that -// // it can be called with some very odd requests . -// -// shouldAccept = (request != nil); -// if (shouldAccept) { -// url = [request URL]; -// shouldAccept = (url != nil); -// } -// if ( ! shouldAccept ) { -// [self customHTTPProtocol:nil logWithFormat:@"decline request (malformed)"]; -// } -// -// // Decline our recursive requests. -// -// if (shouldAccept) { -// shouldAccept = ([self propertyForKey:kOurRecursiveRequestFlagProperty inRequest:request] == nil); -// if ( ! shouldAccept ) { -// [self customHTTPProtocol:nil logWithFormat:@"decline request %@ (recursive)", url]; -// } -// } -// -// // Get the scheme. -// -// if (shouldAccept) { -// scheme = [[url scheme] lowercaseString]; -// shouldAccept = (scheme != nil); -// -// if ( ! shouldAccept ) { -// [self customHTTPProtocol:nil logWithFormat:@"decline request %@ (no scheme)", url]; -// } -// } -// -// // Look for "http" or "https". -// // -// // Flip either or both of the following to YESes to control which schemes go through this custom -// // NSURLProtocol subclass. -// -// if (shouldAccept) { -// shouldAccept = /* DISABLES CODE */ (NO) && [scheme isEqual:@"http"]; -// if ( ! shouldAccept ) { -// shouldAccept = YES && [scheme isEqual:@"https"]; -// } -// -// if ( ! shouldAccept ) { -// [self customHTTPProtocol:nil logWithFormat:@"decline request %@ (scheme mismatch)", url]; -// } else { -// [self customHTTPProtocol:nil logWithFormat:@"accept request %@", url]; -// } -// } -// -// return shouldAccept; -//} - -//liman -+ (BOOL)canInitWithRequest:(NSURLRequest *)request -{ - if (![request.URL.scheme isEqualToString:@"http"] && - ![request.URL.scheme isEqualToString:@"https"]) { - return NO; - } - - if ([NSURLProtocol propertyForKey:kOurRecursiveRequestFlagProperty inRequest:request] ) { - return NO; - } - - if ([[_NetworkHelper shared] onlyURLs].count > 0) { - NSString* url = [request.URL.absoluteString lowercaseString]; - for (NSString* _url in [_NetworkHelper shared].onlyURLs) { - if ([url rangeOfString:[_url lowercaseString]].location != NSNotFound) - return YES; - } - return NO; - } - - return YES; -} - -+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request -{ - NSURLRequest * result; - - //assert(request != nil); - // can be called on any thread - - // Canonicalising a request is quite complex, so all the heavy lifting has - // been shuffled off to a separate module. - - result = CanonicalRequestForRequest(request); - - - return result; -} - -- (id)initWithRequest:(NSURLRequest *)request cachedResponse:(NSCachedURLResponse *)cachedResponse client:(id )client -{ - //assert(request != nil); - // cachedResponse may be nil - //assert(client != nil); - // can be called on any thread - - self = [super initWithRequest:request cachedResponse:cachedResponse client:client]; - - return self; -} - -- (void)dealloc -{ - // can be called on any thread - - //assert(self->_task == nil); // we should have cleared it by now - //assert(self->_pendingChallenge == nil); // we should have cancelled it by now - //assert(self->_pendingChallengeCompletionHandler == nil); // we should have cancelled it by now -} - -- (void)startLoading -{ - NSMutableURLRequest * recursiveRequest; - NSMutableArray * calculatedModes; - NSString * currentMode; - - // At this point we kick off the process of loading the URL via NSURLSession. - // The thread that calls this method becomes the client thread. - - //assert(self.clientThread == nil); // you can't call -startLoading twice - //assert(self.task == nil); - - // Calculate our effective run loop modes. In some circumstances (yes I'm looking at - // you UIWebView!) we can be called from a non-standard thread which then runs a - // non-standard run loop mode waiting for the request to finish. We detect this - // non-standard mode and add it to the list of run loop modes we use when scheduling - // our callbacks. Exciting huh? - // - // For debugging purposes the non-standard mode is "WebCoreSynchronousLoaderRunLoopMode" - // but it's better not to hard-code that here. - - //assert(self.modes == nil); - calculatedModes = [NSMutableArray array]; - [calculatedModes addObject:NSDefaultRunLoopMode]; - currentMode = [[NSRunLoop currentRunLoop] currentMode]; - if ( (currentMode != nil) && ! [currentMode isEqual:NSDefaultRunLoopMode] ) { - [calculatedModes addObject:currentMode]; - } - self.modes = calculatedModes; - //assert([self.modes count] > 0); - - // Create new request that's a clone of the request we were initialised with, - // except that it has our 'recursive request flag' property set on it. - - recursiveRequest = [[self request] mutableCopy]; - //assert(recursiveRequest != nil); - - [[self class] setProperty:@YES forKey:kOurRecursiveRequestFlagProperty inRequest:recursiveRequest]; - - //liman - self.startTime = [[NSDate date] timeIntervalSince1970]; - self.data = [NSMutableData data]; - - // Latch the thread we were called on, primarily for debugging purposes. - - self.clientThread = [NSThread currentThread]; - - // Once everything is ready to go, create a data task with the new request. - - self.task = [[[self class] sharedDemux] dataTaskWithRequest:recursiveRequest delegate:self modes:self.modes]; - //assert(self.task != nil); - - [self.task resume]; -} - -- (void)stopLoading -{ - // The implementation just cancels the current load (if it's still running). - - //assert(self.clientThread != nil); // someone must have called -startLoading - - // Check that we're being stopped on the same thread that we were started - // on. Without this invariant things are going to go badly (for example, - // run loop sources that got attached during -startLoading may not get - // detached here). - // - // I originally had code here to bounce over to the client thread but that - // actually gets complex when you consider run loop modes, so I've nixed it. - // Rather, I rely on our client calling us on the right thread, which is what - // the following //assert is about. - - //assert([NSThread currentThread] == self.clientThread); - - [self cancelPendingChallenge]; - if (self.task != nil) { - [self.task cancel]; - self.task = nil; - // The following ends up calling -URLSession:task:didCompleteWithError: with NSURLErrorDomain / NSURLErrorCancelled, - // which specificallys traps and ignores the error. - } - // Don't nil out self.modes; see property declaration comments for a a discussion of this. - - - - //liman - if (![_NetworkHelper shared].isNetworkEnable) { - return; - } - - _HttpModel* model = [[_HttpModel alloc] init]; - model.url = self.request.URL; - model.method = self.request.HTTPMethod; - model.mineType = self.response.MIMEType; - if (self.request.HTTPBody) { - model.requestData = self.request.HTTPBody; - } - if (self.request.HTTPBodyStream) {//liman - NSData* data = [NSData dataWithInputStream:self.request.HTTPBodyStream]; - model.requestData = data; - } - - NSHTTPURLResponse* httpResponse = (NSHTTPURLResponse*)self.response; - model.statusCode = [NSString stringWithFormat:@"%d",(int)httpResponse.statusCode]; - model.responseData = self.data; - model.size = [[NSByteCountFormatter new] stringFromByteCount:self.data.length]; - model.isImage = [self.response.MIMEType rangeOfString:@"image"].location != NSNotFound; - - //时间 - NSTimeInterval startTimeDouble = self.startTime; - NSTimeInterval endTimeDouble = [[NSDate date] timeIntervalSince1970]; - NSTimeInterval durationDouble = fabs(endTimeDouble - startTimeDouble); - - model.startTime = [NSString stringWithFormat:@"%f", startTimeDouble]; - model.endTime = [NSString stringWithFormat:@"%f", endTimeDouble]; - model.totalDuration = [NSString stringWithFormat:@"%f (s)", durationDouble]; - - - model.errorDescription = self.error.description; - model.errorLocalizedDescription = self.error.localizedDescription; - model.requestHeaderFields = self.request.allHTTPHeaderFields; - - if ([self.response isKindOfClass:[NSHTTPURLResponse class]]) { - model.responseHeaderFields = ((NSHTTPURLResponse *)self.response).allHeaderFields; - } - - if (self.response.MIMEType == nil) { - model.isImage = NO; - } - - if ([model.url.absoluteString length] > 4) { - NSString *str = [model.url.absoluteString substringFromIndex: [model.url.absoluteString length] - 4]; - if ([str isEqualToString:@".png"] || [str isEqualToString:@".PNG"] || [str isEqualToString:@".jpg"] || [str isEqualToString:@".JPG"] || [str isEqualToString:@".gif"] || [str isEqualToString:@".GIF"]) { - model.isImage = YES; - } - } - if ([model.url.absoluteString length] > 5) { - NSString *str = [model.url.absoluteString substringFromIndex: [model.url.absoluteString length] - 5]; - if ([str isEqualToString:@".jpeg"] || [str isEqualToString:@".JPEG"]) { - model.isImage = YES; - } - } - - //Handling errors 404... - model = [self handleError:self.error model:model]; - - - if ([[_HttpDatasource shared] addHttpRequset:model]) - { - [[NSNotificationCenter defaultCenter] postNotificationName:@"reloadHttp_CocoaDebug" object:nil userInfo:@{@"statusCode":model.statusCode}]; - } -} - -#pragma mark * Authentication challenge handling - -/*! Performs the block on the specified thread in one of specified modes. - * \param thread The thread to target; nil implies the main thread. - * \param modes The modes to target; nil or an empty array gets you the default run loop mode. - * \param block The block to run. - */ - -- (void)performOnThread:(NSThread *)thread modes:(NSArray *)modes block:(dispatch_block_t)block -{ - // thread may be nil - // modes may be nil - //assert(block != nil); - - if (thread == nil) { - thread = [NSThread mainThread]; - } - if ([modes count] == 0) { - modes = @[ NSDefaultRunLoopMode ]; - } - [self performSelector:@selector(onThreadPerformBlock:) onThread:thread withObject:[block copy] waitUntilDone:NO modes:modes]; -} - -/*! A helper method used by -performOnThread:modes:block:. Runs in the specified context - * and simply calls the block. - * \param block The block to run. - */ - -- (void)onThreadPerformBlock:(dispatch_block_t)block -{ - //assert(block != nil); - block(); -} - -/*! Called by our NSURLSession delegate callback to pass the challenge to our delegate. - * \description This simply passes the challenge over to the main thread. - * We do this so that all accesses to pendingChallenge are done from the main thread, - * which avoids the need for extra synchronisation. - * - * By the time this runes, the NSURLSession delegate callback has already confirmed with - * the delegate that it wants the challenge. - * - * Note that we use the default run loop mode here, not the common modes. We don't want - * an authorisation dialog showing up on top of an active menu (-: - * - * Also, we implement our own 'perform block' infrastructure because Cocoa doesn't have - * one and CFRunLoopPerformBlock is inadequate for the - * return case (where we need to pass in an array of modes; CFRunLoopPerformBlock only takes - * one mode). - * \param challenge The authentication challenge to process; must not be nil. - * \param completionHandler The associated completion handler; must not be nil. - */ - -- (void)didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(_ChallengeCompletionHandler)completionHandler -{ - //assert(challenge != nil); - //assert(completionHandler != nil); - //assert([NSThread currentThread] == self.clientThread); - - [self performOnThread:nil modes:nil block:^{ - [self mainThreadDidReceiveAuthenticationChallenge:challenge completionHandler:completionHandler]; - }]; -} - -/*! The main thread side of authentication challenge processing. - * \details If there's already a pending challenge, something has gone wrong and - * the routine simply cancels the new challenge. If our delegate doesn't implement - * the -customHTTPProtocol:canAuthenticateAgainstProtectionSpace: delegate callback, - * we also cancel the challenge. OTOH, if all goes well we simply call our delegate - * with the challenge. - * \param challenge The authentication challenge to process; must not be nil. - * \param completionHandler The associated completion handler; must not be nil. - */ - -- (void)mainThreadDidReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(_ChallengeCompletionHandler)completionHandler -{ - //assert(challenge != nil); - //assert(completionHandler != nil); - //assert([NSThread isMainThread]); - - if (self.pendingChallenge != nil) { - - // Our delegate is not expecting a second authentication challenge before resolving the - // first. Likewise, NSURLSession shouldn't send us a second authentication challenge - // before we resolve the first. If this happens, //assert, log, and cancel the challenge. - // - // Note that we have to cancel the challenge on the thread on which we received it, - // namely, the client thread. - - - //assert(NO); - [self clientThreadCancelAuthenticationChallenge:challenge completionHandler:completionHandler]; - } else { - id<_CustomHTTPProtocolDelegate> strongDelegate; - - strongDelegate = [[self class] delegate]; - - // Tell the delegate about it. It would be weird if the delegate didn't support this - // selector (it did return YES from -customHTTPProtocol:canAuthenticateAgainstProtectionSpace: - // after all), but if it doesn't then we just cancel the challenge ourselves (or the client - // thread, of course). - - if ( ! [strongDelegate respondsToSelector:@selector(customHTTPProtocol:canAuthenticateAgainstProtectionSpace:)] ) { - - //assert(NO); - [self clientThreadCancelAuthenticationChallenge:challenge completionHandler:completionHandler]; - } else { - - // Remember that this challenge is in progress. - - self.pendingChallenge = challenge; - self.pendingChallengeCompletionHandler = completionHandler; - - // Pass the challenge to the delegate. - - - [strongDelegate customHTTPProtocol:self didReceiveAuthenticationChallenge:self.pendingChallenge]; - } - } -} - -/*! Cancels an authentication challenge that hasn't made it to the pending challenge state. - * \details This routine is called as part of various error cases in the challenge handling - * code. It cancels a challenge that, for some reason, we've failed to pass to our delegate. - * - * The routine is always called on the main thread but bounces over to the client thread to - * do the actual cancellation. - * \param challenge The authentication challenge to cancel; must not be nil. - * \param completionHandler The associated completion handler; must not be nil. - */ - -- (void)clientThreadCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(_ChallengeCompletionHandler)completionHandler -{ - #pragma unused(challenge) - //assert(challenge != nil); - //assert(completionHandler != nil); - //assert([NSThread isMainThread]); - - [self performOnThread:self.clientThread modes:self.modes block:^{ - completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil); - }]; -} - -/*! Cancels an authentication challenge that /has/ made to the pending challenge state. - * \details This routine is called by -stopLoading to cancel any challenge that might be - * pending when the load is cancelled. It's always called on the client thread but - * immediately bounces over to the main thread (because .pendingChallenge is a main - * thread only value). - */ - -- (void)cancelPendingChallenge -{ - //assert([NSThread currentThread] == self.clientThread); - - // Just pass the work off to the main thread. We do this so that all accesses - // to pendingChallenge are done from the main thread, which avoids the need for - // extra synchronisation. - - [self performOnThread:nil modes:nil block:^{ - if (self.pendingChallenge == nil) { - // This is not only not unusual, it's actually very typical. It happens every time you shut down - // the connection. Ideally I'd like to not even call -mainThreadCancelPendingChallenge when - // there's no challenge outstanding, but the synchronisation issues are tricky. Rather than solve - // those, I'm just not going to log in this case. - // - // [[self class] customHTTPProtocol:self logWithFormat:@"challenge not cancelled; no challenge pending"]; - } else { - id<_CustomHTTPProtocolDelegate> strongeDelegate; - NSURLAuthenticationChallenge * challenge; - - strongeDelegate = [[self class] delegate]; - - challenge = self.pendingChallenge; - self.pendingChallenge = nil; - self.pendingChallengeCompletionHandler = nil; - - if ([strongeDelegate respondsToSelector:@selector(customHTTPProtocol:didCancelAuthenticationChallenge:)]) { - [strongeDelegate customHTTPProtocol:self didCancelAuthenticationChallenge:challenge]; - } else { - // If we managed to send a challenge to the client but can't cancel it, that's bad. - // There's nothing we can do at this point except log the problem. - //assert(NO); - } - } - }]; -} - -- (void)resolveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge withCredential:(NSURLCredential *)credential -{ - //assert(challenge == self.pendingChallenge); - // credential may be nil - //assert([NSThread isMainThread]); - //assert(self.clientThread != nil); - - if (challenge != self.pendingChallenge) { - // This should never happen, and we want to know if it does, at least in the debug build. - //assert(NO); - } else { - _ChallengeCompletionHandler completionHandler; - - // We clear out our record of the pending challenge and then pass the real work - // over to the client thread (which ensures that the challenge is resolved on - // the same thread we received it on). - - completionHandler = self.pendingChallengeCompletionHandler; - self.pendingChallenge = nil; - self.pendingChallengeCompletionHandler = nil; - - [self performOnThread:self.clientThread modes:self.modes block:^{ - if (credential == nil) { - completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil); - } else { - completionHandler(NSURLSessionAuthChallengeUseCredential, credential); - } - }]; - } -} - -#pragma mark * NSURLSession delegate callbacks - -//liman -//- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)newRequest completionHandler:(void (^)(NSURLRequest *))completionHandler -//{ -// NSMutableURLRequest * redirectRequest; -// -// #pragma unused(session) -// #pragma unused(task) -// //assert(task == self.task); -// //assert(response != nil); -// //assert(newRequest != nil); -// #pragma unused(completionHandler) -// //assert(completionHandler != nil); -// //assert([NSThread currentThread] == self.clientThread); -// -// -// // The new request was copied from our old request, so it has our magic property. We actually -// // have to remove that so that, when the client starts the new request, we see it. If we -// // don't do this then we never see the new request and thus don't get a chance to change -// // its caching behaviour. -// // -// // We also cancel our current connection because the client is going to start a new request for -// // us anyway. -// -// //assert([[self class] propertyForKey:kOurRecursiveRequestFlagProperty inRequest:newRequest] != nil); -// -// redirectRequest = [newRequest mutableCopy]; -// [[self class] removePropertyForKey:kOurRecursiveRequestFlagProperty inRequest:redirectRequest]; -// -// // Tell the client about the redirect. -// -// [[self client] URLProtocol:self wasRedirectedToRequest:redirectRequest redirectResponse:response]; -// -// // Stop our load. The CFNetwork infrastructure will create a new NSURLProtocol instance to run -// // the load of the redirect. -// -// // The following ends up calling -URLSession:task:didCompleteWithError: with NSURLErrorDomain / NSURLErrorCancelled, -// // which specificallys traps and ignores the error. -// -// [self.task cancel]; -// -// [[self client] URLProtocol:self didFailWithError:[NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]]; -//} - -//liman -- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest * _Nullable))completionHandler -{ - //Redirect: code >=300 && < 400 - if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) { - NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; - NSInteger status = httpResponse.statusCode; - if (status >= 300 && status < 400) { - [[self client] URLProtocol:self wasRedirectedToRequest:request redirectResponse:response]; - //Remember to set to nil, otherwise the normal request will be requested twice - request = nil; - } - } - - completionHandler(request); -} - -- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))completionHandler -{ - BOOL result; - id<_CustomHTTPProtocolDelegate> strongeDelegate; - - #pragma unused(session) - #pragma unused(task) - //assert(task == self.task); - //assert(challenge != nil); - //assert(completionHandler != nil); - //assert([NSThread currentThread] == self.clientThread); - - // Ask our delegate whether it wants this challenge. We do this from this thread, not the main thread, - // to avoid the overload of bouncing to the main thread for challenges that aren't going to be customised - // anyway. - - strongeDelegate = [[self class] delegate]; - - result = NO; - if ([strongeDelegate respondsToSelector:@selector(customHTTPProtocol:canAuthenticateAgainstProtectionSpace:)]) { - result = [strongeDelegate customHTTPProtocol:self canAuthenticateAgainstProtectionSpace:[challenge protectionSpace]]; - } - - // If the client wants the challenge, kick off that process. If not, resolve it by doing the default thing. - - if (result) { - - [self didReceiveAuthenticationChallenge:challenge completionHandler:completionHandler]; - } else { - -// completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil); - // Callback the original method - NSURLAuthenticationChallenge* challengeWrapper = [[NSURLAuthenticationChallenge alloc] initWithAuthenticationChallenge:challenge sender:[[CPURLSessionChallengeSender alloc] initWithSessionCompletionHandler:completionHandler]]; - [self.client URLProtocol:self didReceiveAuthenticationChallenge:challengeWrapper]; - } -} - -- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveResponse:(NSURLResponse *)response completionHandler:(void (^)(NSURLSessionResponseDisposition))completionHandler -{ - NSURLCacheStoragePolicy cacheStoragePolicy; - NSInteger statusCode; - - #pragma unused(session) - #pragma unused(dataTask) - //assert(dataTask == self.task); - //assert(response != nil); - //assert(completionHandler != nil); - //assert([NSThread currentThread] == self.clientThread); - - // Pass the call on to our client. The only tricky thing is that we have to decide on a - // cache storage policy, which is based on the actual request we issued, not the request - // we were given. - - if ([response isKindOfClass:[NSHTTPURLResponse class]]) { - cacheStoragePolicy = CacheStoragePolicyForRequestAndResponse(self.task.originalRequest, (NSHTTPURLResponse *) response); - statusCode = [((NSHTTPURLResponse *) response) statusCode]; - } else { - //assert(NO); - cacheStoragePolicy = NSURLCacheStorageNotAllowed; - statusCode = 42; - } - - - [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:cacheStoragePolicy]; - - self.response = response;//liman - - completionHandler(NSURLSessionResponseAllow); -} - -- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data -{ - #pragma unused(session) - #pragma unused(dataTask) - //assert(dataTask == self.task); - //assert(data != nil); - //assert([NSThread currentThread] == self.clientThread); - - // Just pass the call on to our client. - - - [[self client] URLProtocol:self didLoadData:data]; - [self.data appendData:data];//liman -} - -- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask willCacheResponse:(NSCachedURLResponse *)proposedResponse completionHandler:(void (^)(NSCachedURLResponse *))completionHandler -{ - #pragma unused(session) - #pragma unused(dataTask) - //assert(dataTask == self.task); - //assert(proposedResponse != nil); - //assert(completionHandler != nil); - //assert([NSThread currentThread] == self.clientThread); - - // We implement this delegate callback purely for the purposes of logging. - - - completionHandler(proposedResponse); -} - -//liman -//- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error -// // An NSURLSession delegate callback. We pass this on to the client. -//{ -// #pragma unused(session) -// #pragma unused(task) -// //assert( (self.task == nil) || (task == self.task) ); // can be nil in the 'cancel from -stopLoading' case -// //assert([NSThread currentThread] == self.clientThread); -// -// // Just log and then, in most cases, pass the call on to our client. -// -// if (error == nil) { -// -// [[self client] URLProtocolDidFinishLoading:self]; -// } else if ( [[error domain] isEqual:NSURLErrorDomain] && ([error code] == NSURLErrorCancelled) ) { -// // Do nothing. This happens in two cases: -// // -// // o during a redirect, in which case the redirect code has already told the client about -// // the failure -// // -// // o if the request is cancelled by a call to -stopLoading, in which case the client doesn't -// // want to know about the failure -// } else { -// -// [[self client] URLProtocol:self didFailWithError:error]; -// } -// -// // We don't need to clean up the connection here; the system will call, or has already called, -// // -stopLoading to do that. -//} - -//liman -- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error -{ - if (error) { - [[self client] URLProtocol:self didFailWithError:error]; - self.error = error; - } else { - [[self client] URLProtocolDidFinishLoading:self]; - } -} - - -#pragma mark - -//liman -+ (void)load { - - if (![[NSUserDefaults standardUserDefaults] boolForKey:@"disableNetworkMonitoring_CocoaDebug"]) { - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - - orig_defaultSessionConfiguration = (SessionConfigConstructor)replaceMethod(@selector(defaultSessionConfiguration), (IMP)replaced_defaultSessionConfiguration, [NSURLSessionConfiguration class], YES); - - orig_ephemeralSessionConfiguration = (SessionConfigConstructor)replaceMethod(@selector(ephemeralSessionConfiguration), (IMP)replaced_ephemeralSessionConfiguration, [NSURLSessionConfiguration class], YES); - }); - } -} - -//Handling errors 404... -- (_HttpModel *)handleError:(NSError *)error model:(_HttpModel *)model { - if (!error) { - //https://httpcodes.co/status/ - switch (model.statusCode.integerValue) { - case 100: - model.errorDescription = @"Informational :\nClient should continue with request"; - model.errorLocalizedDescription = @"Continue"; - break; - case 101: - model.errorDescription = @"Informational :\nServer is switching protocols"; - model.errorLocalizedDescription = @"Switching Protocols"; - break; - case 102: - model.errorDescription = @"Informational :\nServer has received and is processing the request"; - model.errorLocalizedDescription = @"Processing"; - break; - case 103: - model.errorDescription = @"Informational :\nresume aborted PUT or POST requests"; - model.errorLocalizedDescription = @"Checkpoint"; - break; - case 122: - model.errorDescription = @"Informational :\nURI is longer than a maximum of 2083 characters"; - model.errorLocalizedDescription = @"Request-URI too long"; - break; - case 300: - model.errorDescription = @"Redirection :\nMultiple options for the resource delivered"; - model.errorLocalizedDescription = @"Multiple Choices"; - break; - case 301: - model.errorDescription = @"Redirection :\nThis and all future requests directed to the given URI"; - model.errorLocalizedDescription = @"Moved Permanently"; - break; - case 302: - model.errorDescription = @"Redirection :\nTemporary response to request found via alternative URI"; - model.errorLocalizedDescription = @"Found"; - break; - case 303: - model.errorDescription = @"Redirection :\nPermanent response to request found via alternative URI"; - model.errorLocalizedDescription = @"See Other"; - break; - case 304: - model.errorDescription = @"Redirection :\nResource has not been modified since last requested"; - model.errorLocalizedDescription = @"Not Modified"; - break; - case 305: - model.errorDescription = @"Redirection :\nContent located elsewhere, retrieve from there"; - model.errorLocalizedDescription = @"Use Proxy"; - break; - case 306: - model.errorDescription = @"Redirection :\nSubsequent requests should use the specified proxy"; - model.errorLocalizedDescription = @"Switch Proxy"; - break; - case 307: - model.errorDescription = @"Redirection :\nConnect again to different URI as provided"; - model.errorLocalizedDescription = @"Temporary Redirect"; - break; - case 308: - model.errorDescription = @"Redirection :\nConnect again to a different URI using the same method"; - model.errorLocalizedDescription = @"Permanent Redirect"; - break; - case 400: - model.errorDescription = @"Client Error :\nRequest cannot be fulfilled due to bad syntax"; - model.errorLocalizedDescription = @"Bad Request"; - break; - case 401: - model.errorDescription = @"Client Error :\nAuthentication is possible but has failed"; - model.errorLocalizedDescription = @"Unauthorized"; - break; - case 402: - model.errorDescription = @"Client Error :\nPayment required, reserved for future use"; - model.errorLocalizedDescription = @"Payment Required"; - break; - case 403: - model.errorDescription = @"Client Error :\nServer refuses to respond to request"; - model.errorLocalizedDescription = @"Forbidden"; - break; - case 404: - model.errorDescription = @"Client Error :\nRequested resource could not be found"; - model.errorLocalizedDescription = @"Not Found"; - break; - case 405: - model.errorDescription = @"Client Error :\nRequest method not supported by that resource"; - model.errorLocalizedDescription = @"Method Not Allowed"; - break; - case 406: - model.errorDescription = @"Client Error :\nContent not acceptable according to the Accept headers"; - model.errorLocalizedDescription = @"Not Acceptable"; - break; - case 407: - model.errorDescription = @"Client Error :\nClient must first authenticate itself with the proxy"; - model.errorLocalizedDescription = @"Proxy Authentication Required"; - break; - case 408: - model.errorDescription = @"Client Error :\nServer timed out waiting for the request"; - model.errorLocalizedDescription = @"Request Timeout"; - break; - case 409: - model.errorDescription = @"Client Error :\nRequest could not be processed because of conflict"; - model.errorLocalizedDescription = @"Conflict"; - break; - case 410: - model.errorDescription = @"Client Error :\nResource is no longer available and will not be available again"; - model.errorLocalizedDescription = @"Gone"; - break; - case 411: - model.errorDescription = @"Client Error :\nRequest did not specify the length of its content"; - model.errorLocalizedDescription = @"Length Required"; - break; - case 412: - model.errorDescription = @"Client Error :\nServer does not meet request preconditions"; - model.errorLocalizedDescription = @"Precondition Failed"; - break; - case 413: - model.errorDescription = @"Client Error :\nRequest is larger than the server is willing or able to process"; - model.errorLocalizedDescription = @"Request Entity Too Large"; - break; - case 414: - model.errorDescription = @"Client Error :\nURI provided was too long for the server to process"; - model.errorLocalizedDescription = @"Request-URI Too Long"; - break; - case 415: - model.errorDescription = @"Client Error :\nServer does not support media type"; - model.errorLocalizedDescription = @"Unsupported Media Type"; - break; - case 416: - model.errorDescription = @"Client Error :\nClient has asked for unprovidable portion of the file"; - model.errorLocalizedDescription = @"Requested Range Not Satisfiable"; - break; - case 417: - model.errorDescription = @"Client Error :\nServer cannot meet requirements of Expect request-header field"; - model.errorLocalizedDescription = @"Expectation Failed"; - break; - case 418: - model.errorDescription = @"Client Error :\nI'm a teapot"; - model.errorLocalizedDescription = @"I'm a Teapot"; - break; - case 420: - model.errorDescription = @"Client Error :\nTwitter rate limiting"; - model.errorLocalizedDescription = @"Enhance Your Calm"; - break; - case 421: - model.errorDescription = @"Client Error :\nMisdirected Request"; - model.errorLocalizedDescription = @"Misdirected Request"; - break; - case 422: - model.errorDescription = @"Client Error :\nRequest unable to be followed due to semantic errors"; - model.errorLocalizedDescription = @"Unprocessable Entity"; - break; - case 423: - model.errorDescription = @"Client Error :\nResource that is being accessed is locked"; - model.errorLocalizedDescription = @"Locked"; - break; - case 424: - model.errorDescription = @"Client Error :\nRequest failed due to failure of a previous request"; - model.errorLocalizedDescription = @"Failed Dependency"; - break; - case 426: - model.errorDescription = @"Client Error :\nClient should switch to a different protocol"; - model.errorLocalizedDescription = @"Upgrade Required"; - break; - case 428: - model.errorDescription = @"Client Error :\nOrigin server requires the request to be conditional"; - model.errorLocalizedDescription = @"Precondition Required"; - break; - case 429: - model.errorDescription = @"Client Error :\nUser has sent too many requests in a given amount of time"; - model.errorLocalizedDescription = @"Too Many Requests"; - break; - case 431: - model.errorDescription = @"Client Error :\nServer is unwilling to process the request"; - model.errorLocalizedDescription = @"Request Header Fields Too Large"; - break; - case 444: - model.errorDescription = @"Client Error :\nServer returns no information and closes the connection"; - model.errorLocalizedDescription = @"No Response"; - break; - case 449: - model.errorDescription = @"Client Error :\nRequest should be retried after performing action"; - model.errorLocalizedDescription = @"Retry With"; - break; - case 450: - model.errorDescription = @"Client Error :\nWindows Parental Controls blocking access to webpage"; - model.errorLocalizedDescription = @"Blocked by Windows Parental Controls"; - break; - case 451: - model.errorDescription = @"Client Error :\nThe server cannot reach the client's mailbox"; - model.errorLocalizedDescription = @"Wrong Exchange server"; - break; - case 499: - model.errorDescription = @"Client Error :\nConnection closed by client while HTTP server is processing"; - model.errorLocalizedDescription = @"Client Closed Request"; - break; - case 500: - model.errorDescription = @"Server Error :\ngeneric error message"; - model.errorLocalizedDescription = @"Internal Server Error"; - break; - case 501: - model.errorDescription = @"Server Error :\nserver does not recognise method or lacks ability to fulfill"; - model.errorLocalizedDescription = @"Not Implemented"; - break; - case 502: - model.errorDescription = @"Server Error :\nserver received an invalid response from upstream server"; - model.errorLocalizedDescription = @"Bad Gateway"; - break; - case 503: - model.errorDescription = @"Server Error :\nserver is currently unavailable"; - model.errorLocalizedDescription = @"Service Unavailable"; - break; - case 504: - model.errorDescription = @"Server Error :\ngateway did not receive response from upstream server"; - model.errorLocalizedDescription = @"Gateway Timeout"; - break; - case 505: - model.errorDescription = @"Server Error :\nserver does not support the HTTP protocol version"; - model.errorLocalizedDescription = @"HTTP Version Not Supported"; - break; - case 506: - model.errorDescription = @"Server Error :\ncontent negotiation for the request results in a circular reference"; - model.errorLocalizedDescription = @"Variant Also Negotiates"; - break; - case 507: - model.errorDescription = @"Server Error :\nserver is unable to store the representation"; - model.errorLocalizedDescription = @"Insufficient Storage"; - break; - case 508: - model.errorDescription = @"Server Error :\nserver detected an infinite loop while processing the request"; - model.errorLocalizedDescription = @"Loop Detected"; - break; - case 509: - model.errorDescription = @"Server Error :\nbandwidth limit exceeded"; - model.errorLocalizedDescription = @"Bandwidth Limit Exceeded"; - break; - case 510: - model.errorDescription = @"Server Error :\nfurther extensions to the request are required"; - model.errorLocalizedDescription = @"Not Extended"; - break; - case 511: - model.errorDescription = @"Server Error :\nclient needs to authenticate to gain network access"; - model.errorLocalizedDescription = @"Network Authentication Required"; - break; - case 526: - model.errorDescription = @"Server Error :\nThe origin web server does not have a valid SSL certificate"; - model.errorLocalizedDescription = @"Invalid SSL certificate"; - break; - case 598: - model.errorDescription = @"Server Error :\nnetwork read timeout behind the proxy"; - model.errorLocalizedDescription = @"Network Read Timeout Error"; - break; - case 599: - model.errorDescription = @"Server Error :\nnetwork connect timeout behind the proxy"; - model.errorLocalizedDescription = @"Network Connect Timeout Error"; - break; - default: - break; - } - } - - return model; -} - -@end diff --git a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_QNSURLSessionDemux.h b/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_QNSURLSessionDemux.h deleted file mode 100644 index 0f01f24..0000000 --- a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_QNSURLSessionDemux.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import - -/*! A simple class for demultiplexing NSURLSession delegate callbacks to a per-task delegate object. - - You initialise the class with a session configuration. After that you can create data tasks - within that session by calling -dataTaskWithRequest:delegate:modes:. Any delegate callbacks - for that data task are redirected to the delegate on the thread that created the task in - one of the specified run loop modes. That thread must run its run loop in order to get - these callbacks. -*/ - -@interface _QNSURLSessionDemux : NSObject - -/*! Create a demultiplex for the specified session configuration. - * \param configuration The session configuration to use; if nil, a default session is created. - * \returns An initialised instance. - */ - -- (instancetype)initWithConfiguration:(NSURLSessionConfiguration *)configuration; - -@property (atomic, copy, readonly ) NSURLSessionConfiguration * configuration; ///< A copy of the configuration passed to -initWithConfiguration:. -@property (atomic, strong, readonly ) NSURLSession * session; ///< The session created from the configuration passed to -initWithConfiguration:. - -/*! Creates a new data task whose delegate callbacks are routed to the supplied delegate. - * \details The callbacks are run on the current thread (that is, the thread that called this - * method) in the specified modes. - * - * The delegate is retained until the task completes, that is, until after your - * -URLSession:task:didCompleteWithError: delegate callback returns. - * - * The returned task is suspend. You must resume the returned task for the task to - * make progress. Furthermore, it's not safe to simply discard the returned task - * because in that case the task's delegate is never released. - * - * \param request The request that the data task executes; must not be nil. - * \param delegate The delegate to receive the data task's delegate callbacks; must not be nil. - * \param modes The run loop modes in which to run the data task's delegate callbacks; if nil or - * empty, the default run loop mode (NSDefaultRunLoopMode is used). - * \returns A suspended data task that you must resume. - */ - -- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request delegate:(id)delegate modes:(NSArray *)modes; - -@end diff --git a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_QNSURLSessionDemux.m b/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_QNSURLSessionDemux.m deleted file mode 100644 index 72441a3..0000000 --- a/Pods/CocoaDebug/Sources/CustomHTTPProtocol/_QNSURLSessionDemux.m +++ /dev/null @@ -1,279 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_QNSURLSessionDemux.h" - -@interface _QNSURLSessionDemuxTaskInfo : NSObject - -- (instancetype)initWithTask:(NSURLSessionDataTask *)task delegate:(id)delegate modes:(NSArray *)modes; - -@property (atomic, strong, readonly ) NSURLSessionDataTask * task; -@property (atomic, strong, readonly ) id delegate; -@property (atomic, strong, readonly ) NSThread * thread; -@property (atomic, copy, readonly ) NSArray * modes; - -- (void)performBlock:(dispatch_block_t)block; - -- (void)invalidate; - -@end - -@interface _QNSURLSessionDemuxTaskInfo () - -@property (atomic, strong, readwrite) id delegate; -@property (atomic, strong, readwrite) NSThread * thread; - -@end - -@implementation _QNSURLSessionDemuxTaskInfo - -- (instancetype)initWithTask:(NSURLSessionDataTask *)task delegate:(id)delegate modes:(NSArray *)modes -{ - //assert(task != nil); - //assert(delegate != nil); - //assert(modes != nil); - - self = [super init]; - if (self != nil) { - self->_task = task; - self->_delegate = delegate; - self->_thread = [NSThread currentThread]; - self->_modes = [modes copy]; - } - return self; -} - -- (void)performBlock:(dispatch_block_t)block -{ - //assert(self.delegate != nil); - //assert(self.thread != nil); - [self performSelector:@selector(performBlockOnClientThread:) onThread:self.thread withObject:[block copy] waitUntilDone:NO modes:self.modes]; -} - -- (void)performBlockOnClientThread:(dispatch_block_t)block -{ - //assert([NSThread currentThread] == self.thread); - block(); -} - -- (void)invalidate -{ - self.delegate = nil; - self.thread = nil; -} - -@end - -@interface _QNSURLSessionDemux () - -@property (atomic, strong, readonly ) NSMutableDictionary * taskInfoByTaskID; // keys NSURLSessionTask taskIdentifier, values are SessionManager -@property (atomic, strong, readonly ) NSOperationQueue * sessionDelegateQueue; - -@end - -@implementation _QNSURLSessionDemux - -- (instancetype)init -{ - return [self initWithConfiguration:nil]; -} - -- (instancetype)initWithConfiguration:(NSURLSessionConfiguration *)configuration -{ - // configuration may be nil - self = [super init]; - if (self != nil) { - if (configuration == nil) { - configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; - } - self->_configuration = [configuration copy]; - - self->_taskInfoByTaskID = [[NSMutableDictionary alloc] init]; - - self->_sessionDelegateQueue = [[NSOperationQueue alloc] init]; - [self->_sessionDelegateQueue setMaxConcurrentOperationCount:1]; - [self->_sessionDelegateQueue setName:@"_QNSURLSessionDemux"]; - - self->_session = [NSURLSession sessionWithConfiguration:self->_configuration delegate:self delegateQueue:self->_sessionDelegateQueue]; - self->_session.sessionDescription = @"_QNSURLSessionDemux"; - } - return self; -} - -- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request delegate:(id)delegate modes:(NSArray *)modes -{ - NSURLSessionDataTask * task; - _QNSURLSessionDemuxTaskInfo * taskInfo; - - //assert(request != nil); - //assert(delegate != nil); - // modes may be nil - - if ([modes count] == 0) { - modes = @[ NSDefaultRunLoopMode ]; - } - - task = [self.session dataTaskWithRequest:request]; - //assert(task != nil); - - taskInfo = [[_QNSURLSessionDemuxTaskInfo alloc] initWithTask:task delegate:delegate modes:modes]; - - @synchronized (self) { - self.taskInfoByTaskID[@(task.taskIdentifier)] = taskInfo; - } - - return task; -} - -- (_QNSURLSessionDemuxTaskInfo *)taskInfoForTask:(NSURLSessionTask *)task -{ - _QNSURLSessionDemuxTaskInfo * result; - - //assert(task != nil); - - @synchronized (self) { - result = self.taskInfoByTaskID[@(task.taskIdentifier)]; - //assert(result != nil); - } - return result; -} - -- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)newRequest completionHandler:(void (^)(NSURLRequest *))completionHandler -{ - _QNSURLSessionDemuxTaskInfo * taskInfo; - - taskInfo = [self taskInfoForTask:task]; - if ([taskInfo.delegate respondsToSelector:@selector(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:)]) { - [taskInfo performBlock:^{ - [taskInfo.delegate URLSession:session task:task willPerformHTTPRedirection:response newRequest:newRequest completionHandler:completionHandler]; - }]; - } else { - completionHandler(newRequest); - } -} - -- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler -{ - _QNSURLSessionDemuxTaskInfo * taskInfo; - - taskInfo = [self taskInfoForTask:task]; - if ([taskInfo.delegate respondsToSelector:@selector(URLSession:task:didReceiveChallenge:completionHandler:)]) { - [taskInfo performBlock:^{ - [taskInfo.delegate URLSession:session task:task didReceiveChallenge:challenge completionHandler:completionHandler]; - }]; - } else { - completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil); - } -} - -- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task needNewBodyStream:(void (^)(NSInputStream *bodyStream))completionHandler -{ - _QNSURLSessionDemuxTaskInfo * taskInfo; - - taskInfo = [self taskInfoForTask:task]; - if ([taskInfo.delegate respondsToSelector:@selector(URLSession:task:needNewBodyStream:)]) { - [taskInfo performBlock:^{ - [taskInfo.delegate URLSession:session task:task needNewBodyStream:completionHandler]; - }]; - } else { - completionHandler(nil); - } -} - -- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didSendBodyData:(int64_t)bytesSent totalBytesSent:(int64_t)totalBytesSent totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend -{ - _QNSURLSessionDemuxTaskInfo * taskInfo; - - taskInfo = [self taskInfoForTask:task]; - if ([taskInfo.delegate respondsToSelector:@selector(URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)]) { - [taskInfo performBlock:^{ - [taskInfo.delegate URLSession:session task:task didSendBodyData:bytesSent totalBytesSent:totalBytesSent totalBytesExpectedToSend:totalBytesExpectedToSend]; - }]; - } -} - -- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error -{ - _QNSURLSessionDemuxTaskInfo * taskInfo; - - taskInfo = [self taskInfoForTask:task]; - - // This is our last delegate callback so we remove our task info record. - - @synchronized (self) { - [self.taskInfoByTaskID removeObjectForKey:@(taskInfo.task.taskIdentifier)]; - } - - // Call the delegate if required. In that case we invalidate the task info on the client thread - // after calling the delegate, otherwise the client thread side of the -performBlock: code can - // find itself with an invalidated task info. - - if ([taskInfo.delegate respondsToSelector:@selector(URLSession:task:didCompleteWithError:)]) { - [taskInfo performBlock:^{ - [taskInfo.delegate URLSession:session task:task didCompleteWithError:error]; - [taskInfo invalidate]; - }]; - } else { - [taskInfo invalidate]; - } -} - -- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveResponse:(NSURLResponse *)response completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler -{ - _QNSURLSessionDemuxTaskInfo * taskInfo; - - taskInfo = [self taskInfoForTask:dataTask]; - if ([taskInfo.delegate respondsToSelector:@selector(URLSession:dataTask:didReceiveResponse:completionHandler:)]) { - [taskInfo performBlock:^{ - [taskInfo.delegate URLSession:session dataTask:dataTask didReceiveResponse:response completionHandler:completionHandler]; - }]; - } else { - completionHandler(NSURLSessionResponseAllow); - } -} - -- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask -{ - _QNSURLSessionDemuxTaskInfo * taskInfo; - - taskInfo = [self taskInfoForTask:dataTask]; - if ([taskInfo.delegate respondsToSelector:@selector(URLSession:dataTask:didBecomeDownloadTask:)]) { - [taskInfo performBlock:^{ - [taskInfo.delegate URLSession:session dataTask:dataTask didBecomeDownloadTask:downloadTask]; - }]; - } -} - -- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data -{ - _QNSURLSessionDemuxTaskInfo * taskInfo; - - taskInfo = [self taskInfoForTask:dataTask]; - if ([taskInfo.delegate respondsToSelector:@selector(URLSession:dataTask:didReceiveData:)]) { - [taskInfo performBlock:^{ - [taskInfo.delegate URLSession:session dataTask:dataTask didReceiveData:data]; - }]; - } -} - -- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask willCacheResponse:(NSCachedURLResponse *)proposedResponse completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler -{ - _QNSURLSessionDemuxTaskInfo * taskInfo; - - taskInfo = [self taskInfoForTask:dataTask]; - if ([taskInfo.delegate respondsToSelector:@selector(URLSession:dataTask:willCacheResponse:completionHandler:)]) { - [taskInfo performBlock:^{ - [taskInfo.delegate URLSession:session dataTask:dataTask willCacheResponse:proposedResponse completionHandler:completionHandler]; - }]; - } else { - completionHandler(proposedResponse); - } -} - -@end - diff --git a/Pods/CocoaDebug/Sources/Logs/CocoaDebugTool.h b/Pods/CocoaDebug/Sources/Logs/CocoaDebugTool.h deleted file mode 100644 index 76efdef..0000000 --- a/Pods/CocoaDebug/Sources/Logs/CocoaDebugTool.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// CocoaDebugTool.h -// Example_Swift -// -// Created by man 5/8/19. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import - -@interface CocoaDebugTool : NSObject - -/// log with string, -/// default color is white -+ (void)logWithString:(NSString *)string; -+ (void)logWithString:(NSString *)string color:(UIColor *)color; - -/// log with JSON Data, -/// default color is white, -/// return string -+ (NSString *)logWithJsonData:(NSData *)data; -+ (NSString *)logWithJsonData:(NSData *)data color:(UIColor *)color; - -/// log with Protobuf Data, -/// default color is white, -/// return string -//+ (NSString *)logWithProtobufData:(NSData *)data className:(NSString *)className; -//+ (NSString *)logWithProtobufData:(NSData *)data className:(NSString *)className color:(UIColor *)color; - -@end diff --git a/Pods/CocoaDebug/Sources/Logs/CocoaDebugTool.m b/Pods/CocoaDebug/Sources/Logs/CocoaDebugTool.m deleted file mode 100644 index 0fc96bd..0000000 --- a/Pods/CocoaDebug/Sources/Logs/CocoaDebugTool.m +++ /dev/null @@ -1,103 +0,0 @@ -// -// CocoaDebugTool.m -// Example_Swift -// -// Created by man 5/8/19. -// Copyright © 2020 man. All rights reserved. -// - -#import "CocoaDebugTool.h" -#import "_OCLogHelper.h" -#import "GPBMessage+CocoaDebug.h" -//#import "GPBMessage.h" - -@implementation CocoaDebugTool - -#pragma mark - logWithString -+ (void)logWithString:(NSString *)string { - [self logWithString:string color:[UIColor colorWithRed:1 green:1 blue:1 alpha:1]]; -} - -+ (void)logWithString:(NSString *)string color:(UIColor *)color { - [self finalLogWithString:string type:CocoaDebugToolTypeNone color:color]; -} - - -#pragma mark - logWithJsonData -+ (NSString *)logWithJsonData:(NSData *)data { - return [self logWithJsonData:data color:[UIColor colorWithRed:1 green:1 blue:1 alpha:1]]; -} - -+ (NSString *)logWithJsonData:(NSData *)data color:(UIColor *)color { - NSString *string = [self getPrettyJsonStringWithData:data] ? : @"NULL"; - return [self finalLogWithString:string type:CocoaDebugToolTypeJson color:color]; -} - - -//#pragma mark - logWithProtobufData -//+ (NSString *)logWithProtobufData:(NSData *)data className:(NSString *)className { -// return [self logWithProtobufData:data className:className color:[UIColor colorWithRed:1 green:1 blue:1 alpha:1]]; -//} -// -//+ (NSString *)logWithProtobufData:(NSData *)data className:(NSString *)className color:(UIColor *)color { -// NSString *string = [self parsingProtobufWithData:data className:className] ? : @"NULL"; -// return [self finalLogWithString:string type:CocoaDebugToolTypeProtobuf color:color]; -//} - - - - -#pragma mark - tool - -+ (NSString *)getPrettyJsonStringWithJsonString:(NSString *)jsonString { - return [self getPrettyJsonStringWithData:[jsonString dataUsingEncoding:NSUTF8StringEncoding]]; -} - -+ (NSString *)getPrettyJsonStringWithData:(NSData *)data { - if (!data) {return nil;} - - //1.pretty json - NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil]; - if (!dict) {return nil;} - - NSData *prettyData = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted error:nil]; - if (!prettyData) {return nil;} - - NSString *prettyJsonString = [[NSString alloc] initWithData:prettyData encoding:NSUTF8StringEncoding]; - if (prettyJsonString) { - return prettyJsonString; - } - - //2.protobuf - // GPBMessage *message = [GPBMessage parseFromData:data error:nil]; - // if ([message serializedSize] > 0) { - // return [message description]; - // } - - //3.utf-8 string - return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; -} - -+ (NSString *)finalLogWithString:(NSString *)string type:(CocoaDebugToolType)type color:(UIColor *)color { - [[_OCLogHelper shared] handleLogWithFile:@"XXX" function:@"XXX" line:1 message:string color:color type:type]; - return string; -} - -//解析Protobuf -//+ (NSString *)parsingProtobufWithData:(NSData *)data className:(NSString *)className { -// if (!data || !className) {return nil;} -// -// Class cls = NSClassFromString(className); -// //protobuf -// GPBMessage *obj = [cls parseFromData:data error:nil]; -// //HuiCao -// NSString *jsonString = [obj _JSONStringWithIgnoreFields:nil]; -// if (!jsonString) {return nil;} -// -// NSString *prettyJsonString = [self getPrettyJsonStringWithJsonString:jsonString]; -// if (!prettyJsonString) {return nil;} -// -// return [prettyJsonString stringByReplacingOccurrencesOfString:@"\\/" withString:@"/"]; -//} - -@end diff --git a/Pods/CocoaDebug/Sources/Logs/LogCell.swift b/Pods/CocoaDebug/Sources/Logs/LogCell.swift deleted file mode 100644 index d7547c3..0000000 --- a/Pods/CocoaDebug/Sources/Logs/LogCell.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -class LogCell: UITableViewCell { - - @IBOutlet weak var labelContent: CustomTextView! - @IBOutlet weak var viewTypeLogColor: UIView! - - var model: _OCLogModel? { - didSet { - guard let model = model else { return } - - labelContent.text = nil - labelContent.text = model.str - labelContent.attributedText = model.attr - - labelContent.textContainer.lineBreakMode = NSLineBreakMode.byCharWrapping - labelContent.textContainer.lineFragmentPadding = 0 - labelContent.textContainerInset = .zero - labelContent.isUserInteractionEnabled = false - - //tag - if model.isTag == true { - self.contentView.backgroundColor = "#007aff".hexColor - } else { - //isSelected - if model.isSelected == true { - self.contentView.backgroundColor = "#222222".hexColor - } else { - self.contentView.backgroundColor = .black - } - } - } - } -} - - -class CustomTextView : UITextView { - - required init(coder aDecoder: NSCoder) { - super.init(coder: aDecoder)! - self.inputView = UIView.init(frame: CGRect(x: 0, y: 0, width: 1, height: 1)) - } - - override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool { - if action == #selector(selectAll) { - if let range = selectedTextRange, range.start == beginningOfDocument, range.end == endOfDocument { - return false - } - return !text.isEmpty - } - else if action == #selector(paste(_:)) { - return false - } - else if action == #selector(cut(_:)) { - return false - } - - return super.canPerformAction(action, withSender: sender) - } -} diff --git a/Pods/CocoaDebug/Sources/Logs/LogViewController.swift b/Pods/CocoaDebug/Sources/Logs/LogViewController.swift deleted file mode 100644 index 788f481..0000000 --- a/Pods/CocoaDebug/Sources/Logs/LogViewController.swift +++ /dev/null @@ -1,700 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -class LogViewController: UIViewController { - - var reachEndDefault: Bool = true - var reachEndRN: Bool = true - var reachEndWeb: Bool = true - - var firstInDefault: Bool = true - var firstInRN: Bool = true - var firstInWeb: Bool = true - - var selectedSegmentIndex: Int = 0 - var selectedSegment_0: Bool = false - var selectedSegment_1: Bool = false - var selectedSegment_2: Bool = false - - var defaultReloadDataFinish: Bool = true - var rnReloadDataFinish: Bool = true - var webReloadDataFinish: Bool = true - - - @IBOutlet weak var segmentedControl: UISegmentedControl! - @IBOutlet weak var deleteItem: UIBarButtonItem! - - @IBOutlet weak var defaultTableView: UITableView! - @IBOutlet weak var defaultSearchBar: UISearchBar! - var defaultModels: [_OCLogModel] = [_OCLogModel]() - var defaultCacheModels: Array<_OCLogModel>? - var defaultSearchModels: Array<_OCLogModel>? - - @IBOutlet weak var rnTableView: UITableView! - @IBOutlet weak var rnSearchBar: UISearchBar! - var rnModels: [_OCLogModel] = [_OCLogModel]() - var rnCacheModels: Array<_OCLogModel>? - var rnSearchModels: Array<_OCLogModel>? - - @IBOutlet weak var webTableView: UITableView! - @IBOutlet weak var webSearchBar: UISearchBar! - var webModels: [_OCLogModel] = [_OCLogModel]() - var webCacheModels: Array<_OCLogModel>? - var webSearchModels: Array<_OCLogModel>? - - - - //MARK: - tool - //搜索逻辑 - func searchLogic(_ searchText: String = "") { - - if selectedSegmentIndex == 0 - { - guard let defaultCacheModels = defaultCacheModels else {return} - defaultSearchModels = defaultCacheModels - - if searchText == "" { - defaultModels = defaultCacheModels - } else { - guard let defaultSearchModels = defaultSearchModels else {return} - - for _ in defaultSearchModels { - if let index = self.defaultSearchModels?.firstIndex(where: { (model) -> Bool in - return !model.content.lowercased().contains(searchText.lowercased())//忽略大小写 - }) { - self.defaultSearchModels?.remove(at: index) - } - } - defaultModels = self.defaultSearchModels ?? [] - } - } - else if selectedSegmentIndex == 1 - { - guard let rnCacheModels = rnCacheModels else {return} - rnSearchModels = rnCacheModels - - if searchText == "" { - rnModels = rnCacheModels - } else { - guard let rnSearchModels = rnSearchModels else {return} - - for _ in rnSearchModels { - if let index = self.rnSearchModels?.firstIndex(where: { (model) -> Bool in - return !model.content.lowercased().contains(searchText.lowercased())//忽略大小写 - }) { - self.rnSearchModels?.remove(at: index) - } - } - rnModels = self.rnSearchModels ?? [] - } - } - else - { - guard let webCacheModels = webCacheModels else {return} - webSearchModels = webCacheModels - - if searchText == "" { - webModels = webCacheModels - } else { - guard let webSearchModels = webSearchModels else {return} - - for _ in webSearchModels { - if let index = self.webSearchModels?.firstIndex(where: { (model) -> Bool in - return !model.content.lowercased().contains(searchText.lowercased())//忽略大小写 - }) { - self.webSearchModels?.remove(at: index) - } - } - webModels = self.webSearchModels ?? [] - } - } - } - - //MARK: - private - func reloadLogs(needScrollToEnd: Bool = false, needReloadData: Bool = true) { - - if selectedSegmentIndex == 0 - { - if defaultReloadDataFinish == false {return} - - if defaultSearchBar.isHidden != false || - rnSearchBar.isHidden != true || - webSearchBar.isHidden != true { - defaultSearchBar.isHidden = false - rnSearchBar.isHidden = true - webSearchBar.isHidden = true - } - - if defaultTableView.isHidden != false || - rnTableView.isHidden != true || - webTableView.isHidden != true { - defaultTableView.isHidden = false - rnTableView.isHidden = true - webTableView.isHidden = true - } - - if needReloadData == false && defaultModels.count > 0 {return} - - if let arr = _OCLogStoreManager.shared()?.normalLogArray { - defaultModels = arr as! [_OCLogModel] - } - - self.defaultCacheModels = self.defaultModels - - self.searchLogic(CocoaDebugSettings.shared.logSearchWordNormal ?? "") - - // dispatch_main_async_safe { [weak self] in - self.defaultReloadDataFinish = false - self.defaultTableView.reloadData { - self.defaultReloadDataFinish = true - } - - if needScrollToEnd == false {return} - - //table下滑到底部 - // guard let count = self.defaultModels.count else {return} - if self.defaultModels.count > 0 { - // guard let firstInDefault = self.firstInDefault else {return} - self.defaultTableView.tableViewScrollToBottom(animated: !firstInDefault) - self.firstInDefault = false - } - // } - } - else if selectedSegmentIndex == 1 - { - if rnReloadDataFinish == false {return} - - if defaultSearchBar.isHidden != true || - rnSearchBar.isHidden != false || - webSearchBar.isHidden != true { - defaultSearchBar.isHidden = true - rnSearchBar.isHidden = false - webSearchBar.isHidden = true - } - - if defaultTableView.isHidden != true || - rnTableView.isHidden != false || - webTableView.isHidden != true { - defaultTableView.isHidden = true - rnTableView.isHidden = false - webTableView.isHidden = true - } - - if needReloadData == false && rnModels.count > 0 {return} - - if let arr = _OCLogStoreManager.shared()?.rnLogArray { - rnModels = arr as! [_OCLogModel] - } - - self.rnCacheModels = self.rnModels - - self.searchLogic(CocoaDebugSettings.shared.logSearchWordRN ?? "") - - // dispatch_main_async_safe { [weak self] in - self.rnReloadDataFinish = false - self.rnTableView.reloadData { - self.rnReloadDataFinish = true - } - - if needScrollToEnd == false {return} - - //table下滑到底部 - // guard let count = self.rnModels.count else {return} - if self.rnModels.count > 0 { - // guard let firstInRN = self.firstInRN else {return} - self.rnTableView.tableViewScrollToBottom(animated: !firstInRN) - self.firstInRN = false - } - // } - } - else - { - if webReloadDataFinish == false {return} - - if defaultSearchBar.isHidden != true || - rnSearchBar.isHidden != true || - webSearchBar.isHidden != false { - defaultSearchBar.isHidden = true - rnSearchBar.isHidden = true - webSearchBar.isHidden = false - } - - if defaultTableView.isHidden != true || - rnTableView.isHidden != true || - webTableView.isHidden != false { - defaultTableView.isHidden = true - rnTableView.isHidden = true - webTableView.isHidden = false - } - - if needReloadData == false && webModels.count > 0 {return} - - if let arr = _OCLogStoreManager.shared().webLogArray { - webModels = arr as! [_OCLogModel] - } - - self.webCacheModels = self.webModels - - self.searchLogic(CocoaDebugSettings.shared.logSearchWordWeb ?? "") - - // dispatch_main_async_safe { [weak self] in - self.webReloadDataFinish = false - self.webTableView.reloadData { - self.webReloadDataFinish = true - } - - if needScrollToEnd == false {return} - - //table下滑到底部 - // guard let count = self.webModels.count else {return} - if self.webModels.count > 0 { - // guard let firstInWeb = self.firstInWeb else {return} - self.webTableView.tableViewScrollToBottom(animated: !firstInWeb) - self.firstInWeb = false - } - // } - } - } - - - //MARK: - init - override func viewDidLoad() { - super.viewDidLoad() - - let tap = UITapGestureRecognizer.init(target: self, action: #selector(didTapView)) - tap.cancelsTouchesInView = false - view.addGestureRecognizer(tap) - - - deleteItem.tintColor = Color.mainGreen - segmentedControl.tintColor = Color.mainGreen - - if UIScreen.main.bounds.size.width == 320 { - segmentedControl.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.systemFont(ofSize: 11)], for: .normal) - } else { - segmentedControl.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.systemFont(ofSize: 13)], for: .normal) - } - - //notification - NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "refreshLogs_CocoaDebug"), object: nil, queue: OperationQueue.main) { [weak self] _ in - self?.refreshLogs_notification() - } - - - defaultTableView.tableFooterView = UIView() - defaultTableView.delegate = self - defaultTableView.dataSource = self - // defaultTableView.rowHeight = UITableViewAutomaticDimension - defaultSearchBar.delegate = self - defaultSearchBar.text = CocoaDebugSettings.shared.logSearchWordNormal - defaultSearchBar.isHidden = true - //抖动bug - defaultTableView.estimatedRowHeight = 0 - defaultTableView.estimatedSectionHeaderHeight = 0 - defaultTableView.estimatedSectionFooterHeight = 0 - - - - rnTableView.tableFooterView = UIView() - rnTableView.delegate = self - rnTableView.dataSource = self - // rnTableView.rowHeight = UITableViewAutomaticDimension - rnSearchBar.delegate = self - rnSearchBar.text = CocoaDebugSettings.shared.logSearchWordRN - rnSearchBar.isHidden = true - //抖动bug - rnTableView.estimatedRowHeight = 0 - rnTableView.estimatedSectionHeaderHeight = 0 - rnTableView.estimatedSectionFooterHeight = 0 - - - - webTableView.tableFooterView = UIView() - webTableView.delegate = self - webTableView.dataSource = self - // webTableView.rowHeight = UITableViewAutomaticDimension - webSearchBar.delegate = self - webSearchBar.text = CocoaDebugSettings.shared.logSearchWordWeb - webSearchBar.isHidden = true - //抖动bug - webTableView.estimatedRowHeight = 0 - webTableView.estimatedSectionHeaderHeight = 0 - webTableView.estimatedSectionFooterHeight = 0 - - - - //segmentedControl - selectedSegmentIndex = CocoaDebugSettings.shared.logSelectIndex - segmentedControl.selectedSegmentIndex = selectedSegmentIndex - - if selectedSegmentIndex == 0 { - selectedSegment_0 = true - } else if selectedSegmentIndex == 1 { - selectedSegment_1 = true - } else { - selectedSegment_2 = true - } - - reloadLogs(needScrollToEnd: true, needReloadData: true) - - - - //hide searchBar icon - let textFieldInsideSearchBar = defaultSearchBar.value(forKey: "searchField") as! UITextField - textFieldInsideSearchBar.leftViewMode = .never - textFieldInsideSearchBar.leftView = nil - textFieldInsideSearchBar.backgroundColor = .white - textFieldInsideSearchBar.returnKeyType = .default - - let textFieldInsideSearchBar2 = rnSearchBar.value(forKey: "searchField") as! UITextField - textFieldInsideSearchBar2.leftViewMode = .never - textFieldInsideSearchBar2.leftView = nil - textFieldInsideSearchBar2.backgroundColor = .white - textFieldInsideSearchBar2.returnKeyType = .default - - let textFieldInsideSearchBar3 = webSearchBar.value(forKey: "searchField") as! UITextField - textFieldInsideSearchBar3.leftViewMode = .never - textFieldInsideSearchBar3.leftView = nil - textFieldInsideSearchBar3.backgroundColor = .white - textFieldInsideSearchBar3.returnKeyType = .default - } - - override func viewWillDisappear(_ animated: Bool) { - super.viewWillDisappear(animated) - defaultSearchBar.resignFirstResponder() - rnSearchBar.resignFirstResponder() - webSearchBar.resignFirstResponder() - } - - deinit { - //notification - NotificationCenter.default.removeObserver(self) - } - - - //MARK: - target action - @IBAction func didTapDown(_ sender: Any) { - if selectedSegmentIndex == 0 - { - defaultTableView.tableViewScrollToBottom(animated: true) - defaultSearchBar.resignFirstResponder() - reachEndDefault = true - } - else if selectedSegmentIndex == 1 - { - rnTableView.tableViewScrollToBottom(animated: true) - rnSearchBar.resignFirstResponder() - reachEndRN = true - } - else - { - webTableView.tableViewScrollToBottom(animated: true) - webSearchBar.resignFirstResponder() - reachEndWeb = true - } - } - - @IBAction func didTapUp(_ sender: Any) { - if selectedSegmentIndex == 0 - { - defaultTableView.tableViewScrollToHeader(animated: true) - defaultSearchBar.resignFirstResponder() - reachEndDefault = false - } - else if selectedSegmentIndex == 1 - { - rnTableView.tableViewScrollToHeader(animated: true) - rnSearchBar.resignFirstResponder() - reachEndRN = false - } - else - { - webTableView.tableViewScrollToHeader(animated: true) - webSearchBar.resignFirstResponder() - reachEndWeb = false - } - } - - - @IBAction func resetLogs(_ sender: Any) { - if selectedSegmentIndex == 0 - { - defaultModels = [] - defaultCacheModels = [] - // defaultSearchBar.text = nil - defaultSearchBar.resignFirstResponder() - // CocoaDebugSettings.shared.logSearchWordNormal = nil - - _OCLogStoreManager.shared()?.resetNormalLogs() - - // dispatch_main_async_safe { [weak self] in - self.defaultTableView.reloadData() - // } - } - else if selectedSegmentIndex == 1 - { - rnModels = [] - rnCacheModels = [] - // rnSearchBar.text = nil - rnSearchBar.resignFirstResponder() - // CocoaDebugSettings.shared.logSearchWordRN = nil - - _OCLogStoreManager.shared()?.resetRNLogs() - - // dispatch_main_async_safe { [weak self] in - self.rnTableView.reloadData() - // } - } - else - { - webModels = [] - webCacheModels = [] - // webSearchBar.text = nil - webSearchBar.resignFirstResponder() - // CocoaDebugSettings.shared.logSearchWordWeb = nil - - _OCLogStoreManager.shared().resetWebLogs() - - // dispatch_main_async_safe { [weak self] in - self.webTableView.reloadData() - // } - } - } - - @IBAction func segmentedControlAction(_ sender: UISegmentedControl) { - selectedSegmentIndex = segmentedControl.selectedSegmentIndex - CocoaDebugSettings.shared.logSelectIndex = selectedSegmentIndex - - if selectedSegmentIndex == 0 { - rnSearchBar.resignFirstResponder() - webSearchBar.resignFirstResponder() - } else if selectedSegmentIndex == 1 { - defaultSearchBar.resignFirstResponder() - webSearchBar.resignFirstResponder() - } else { - defaultSearchBar.resignFirstResponder() - rnSearchBar.resignFirstResponder() - } - - if selectedSegmentIndex == 0 && selectedSegment_0 == false { - selectedSegment_0 = true - reloadLogs(needScrollToEnd: true, needReloadData: true) - return - } - - if selectedSegmentIndex == 1 && selectedSegment_1 == false { - selectedSegment_1 = true - reloadLogs(needScrollToEnd: true, needReloadData: true) - return - } - - if selectedSegmentIndex == 2 && selectedSegment_2 == false { - selectedSegment_2 = true - reloadLogs(needScrollToEnd: true, needReloadData: true) - return - } - - reloadLogs(needScrollToEnd: false, needReloadData: false) - } - - @objc func didTapView() { - if selectedSegmentIndex == 0 { - defaultSearchBar.resignFirstResponder() - } else if selectedSegmentIndex == 1 { - rnSearchBar.resignFirstResponder() - } else { - webSearchBar.resignFirstResponder() - } - } - - - //MARK: - notification - @objc func refreshLogs_notification() { - if self.selectedSegmentIndex == 0 { - self.reloadLogs(needScrollToEnd: self.reachEndDefault , needReloadData: true) - } else if self.selectedSegmentIndex == 1 { - self.reloadLogs(needScrollToEnd: self.reachEndRN , needReloadData: true) - } else { - self.reloadLogs(needScrollToEnd: self.reachEndWeb , needReloadData: true) - } - } -} - -//MARK: - UITableViewDataSource -extension LogViewController: UITableViewDataSource { - - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - if tableView == defaultTableView { - return defaultModels.count - } else if tableView == rnTableView { - return rnModels.count - } else { - return webModels.count - } - } - - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: "LogCell", for: indexPath) as! LogCell - - if tableView == defaultTableView - { - cell.model = defaultModels[indexPath.row] - } - else if tableView == rnTableView - { - cell.model = rnModels[indexPath.row] - } - else - { - cell.model = webModels[indexPath.row] - } - - return cell - } -} - -//MARK: - UITableViewDelegate -extension LogViewController: UITableViewDelegate { - - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - tableView.deselectRow(at: indexPath, animated: true) - - var logTitleString = "" - var models_: [_OCLogModel]? - - if tableView == defaultTableView - { - defaultSearchBar.resignFirstResponder() - reachEndDefault = false - logTitleString = "Log" - models_ = defaultModels - } - else if tableView == rnTableView - { - rnSearchBar.resignFirstResponder() - reachEndRN = false - logTitleString = "RN" - models_ = rnModels - } - else - { - webSearchBar.resignFirstResponder() - reachEndWeb = false - logTitleString = "Web" - models_ = webModels - } - - // - guard let models = models_ else {return} - - let vc = JsonViewController.instanceFromStoryBoard() - vc.editType = .log - vc.logTitleString = logTitleString - vc.logModels = models - vc.logModel = models[indexPath.row] - - navigationController?.pushViewController(vc, animated: true) - - vc.justCancelCallback = { - tableView.reloadData() - } - } - - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - - var model: _OCLogModel - - if tableView == defaultTableView { - model = defaultModels[indexPath.row] - - } else if tableView == rnTableView { - model = rnModels[indexPath.row] - - } else { - model = webModels[indexPath.row] - } - - if let height = model.str?.height(with: UIFont.boldSystemFont(ofSize: 12), constraintToWidth: UIScreen.main.bounds.size.width) { - return height + 10; - } - - return 0 - } -} - -//MARK: - UIScrollViewDelegate -extension LogViewController: UIScrollViewDelegate { - - func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { - if scrollView == defaultTableView { - defaultSearchBar.resignFirstResponder() - reachEndDefault = false - } else if scrollView == rnTableView { - rnSearchBar.resignFirstResponder() - reachEndRN = false - } else { - webSearchBar.resignFirstResponder() - reachEndWeb = false - } - } - - func scrollViewDidScroll(_ scrollView: UIScrollView) { - if (scrollView.contentOffset.y + 1) >= (scrollView.contentSize.height - scrollView.frame.size.height) { - //bottom reached - if scrollView == defaultTableView { - reachEndDefault = true - } else if scrollView == rnTableView { - reachEndRN = true - } else { - reachEndWeb = true - } - } - } -} - -//MARK: - UISearchBarDelegate -extension LogViewController: UISearchBarDelegate { - - func searchBarSearchButtonClicked(_ searchBar: UISearchBar) - { - searchBar.resignFirstResponder() - } - - func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) - { - if searchBar == defaultSearchBar - { - CocoaDebugSettings.shared.logSearchWordNormal = searchText - searchLogic(searchText) - - // dispatch_main_async_safe { [weak self] in - self.defaultTableView.reloadData() - // } - } - else if searchBar == rnSearchBar - { - CocoaDebugSettings.shared.logSearchWordRN = searchText - searchLogic(searchText) - - // dispatch_main_async_safe { [weak self] in - self.rnTableView.reloadData() - // } - } - else - { - CocoaDebugSettings.shared.logSearchWordWeb = searchText - searchLogic(searchText) - - // dispatch_main_async_safe { [weak self] in - self.webTableView.reloadData() - // } - } - } -} diff --git a/Pods/CocoaDebug/Sources/Logs/_NSLogHook.m b/Pods/CocoaDebug/Sources/Logs/_NSLogHook.m deleted file mode 100644 index 9dd3d05..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_NSLogHook.m +++ /dev/null @@ -1,96 +0,0 @@ -// -// _NSLogHook.m -// Example_Swift -// -// Created by man 7/26/19. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import "_OCLogHelper.h" -#import "_fishhook.h" -//#import -//#import "RCTLog.h" - -@interface _NSLogHook : NSObject - -@end - -@implementation _NSLogHook - -static void (*_original_nslog)(NSString *format, ...); - -#pragma mark - hooks -void cocoadebug_nslog(NSString *format, ...) -{ - if (![format isKindOfClass:[NSString class]]) {return;} - - va_list vl; - va_start(vl, format); - NSString *str = [[NSString alloc] initWithFormat:format arguments:vl]; - - @try { - _original_nslog(str); - } @catch(NSException *exception) { - - } @finally { - - } - - @try { - [_OCLogHelper.shared handleLogWithFile:@"" function:@"" line:999999999 message:str color:[UIColor whiteColor] type:CocoaDebugToolTypeNone]; - } @catch(NSException *exception) { - - } @finally { - - } - - va_end(vl); -} - -#pragma mark - load -+ (void)load -{ - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableLogMonitoring_CocoaDebug"]) { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - struct rebinding nslog_rebinding = {"NSLog",cocoadebug_nslog,(void*)&_original_nslog}; - rebind_symbols((struct rebinding[1]){nslog_rebinding}, 1); - }); - } -} - -//#pragma mark - RN -//void _RCTLogJavaScriptInternal(RCTLogLevel level, NSString *message) -//{ -// if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableRNMonitoring_CocoaDebug"]) {return;} -// if (![message isKindOfClass:[NSString class]]) {return;} -//// if (level != RCTLogLevelError && level != RCTLogLevelInfo) {return;} -// -// NSString *levelStr = @""; -// -// switch (level) { -//// case RCTLogLevelTrace: -//// levelStr = @"[RCTLogTrace]"; -//// break; -// case RCTLogLevelInfo: -// levelStr = @"[RCTLogInfo]"; -// break; -// case RCTLogLevelWarning: -// levelStr = @"[RCTLogWarn]"; -// break; -// case RCTLogLevelError: -// levelStr = @"[RCTLogError]"; -// break; -//// case RCTLogLevelFatal: -//// levelStr = @"[RCTLogFatal]"; -// break; -// default: -// break; -// } -// -// [_OCLogHelper.shared handleLogWithFile:[NSString stringWithFormat:@"%@\n", levelStr] function:@"" line:-1 message:message color:[UIColor whiteColor] type:CocoaDebugToolTypeRN]; -//} - -@end - diff --git a/Pods/CocoaDebug/Sources/Logs/_OCLogHelper.h b/Pods/CocoaDebug/Sources/Logs/_OCLogHelper.h deleted file mode 100644 index dc373cc..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_OCLogHelper.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import -#import "_OCLogModel.h" - -@interface _OCLogHelper : NSObject - -//@property (nonatomic, assign) BOOL enable; - -+ (instancetype)shared; - -- (void)handleLogWithFile:(NSString *)file function:(NSString *)function line:(NSInteger)line message:(NSString *)message color:(UIColor *)color type:(CocoaDebugToolType)type; - -@end diff --git a/Pods/CocoaDebug/Sources/Logs/_OCLogHelper.m b/Pods/CocoaDebug/Sources/Logs/_OCLogHelper.m deleted file mode 100644 index 979e3d6..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_OCLogHelper.m +++ /dev/null @@ -1,91 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_OCLogHelper.h" -#import "_OCLogStoreManager.h" - -@implementation _OCLogHelper - -+ (instancetype)shared -{ - static id sharedInstance = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedInstance = [[self alloc] init]; - }); - - return sharedInstance; -} - -//default value for @property -//- (id)init { -// if (self = [super init]) { -// self.enable = YES; -// } -// return self; -//} - -- (NSString *)parseFileInfo:(NSString *)file function:(NSString *)function line:(NSInteger)line -{ - if (![file isKindOfClass:[NSString class]] || ![function isKindOfClass:[NSString class]]) { - return @"\n"; - } - - if ([file isEqualToString:@"XXX"] && [function isEqualToString:@"XXX"] && line == 1) { - return @"XXX|XXX|1"; - } - - if (line == 0) { //web - NSString *fileName = [[file componentsSeparatedByString:@"/"] lastObject] ?: @""; - return [NSString stringWithFormat:@"%@ %@\n", fileName, function]; - } - - if (line == 999999999) { //nslog - NSString *fileName = [[file componentsSeparatedByString:@"/"] lastObject] ?: @""; - return [NSString stringWithFormat:@"%@ %@\n", fileName, function]; - } - - if (line == -1) { //RN - return file; - } - - NSString *fileName = [[file componentsSeparatedByString:@"/"] lastObject] ?: @""; - return [NSString stringWithFormat:@"%@[%ld]%@\n", fileName, (long)line, function]; -} - -- (void)handleLogWithFile:(NSString *)file function:(NSString *)function line:(NSInteger)line message:(NSString *)message color:(UIColor *)color type:(CocoaDebugToolType)type -{ -// if (!self.enable && type != CocoaDebugToolTypeRN) {return;} - if (!file || !function || !message || !color) {return;} - - //1. - NSString *fileInfo = [self parseFileInfo:file function:function line:line]; - - //2. - _OCLogModel *newLog = [[_OCLogModel alloc] initWithContent:message color:color fileInfo:fileInfo isTag:NO type:type]; - - // if (line == 0 && ![fileInfo isEqualToString:@"XXX|XXX|1"]) { - // newLog.logType = CocoaDebugLogType... - // } - - if (type == CocoaDebugToolTypeRN) { - newLog.logType = CocoaDebugLogTypeRN; - } - - if ([file isEqualToString:@"[WKWebView]"]) { - newLog.logType = CocoaDebugLogTypeWeb; - } - - [[_OCLogStoreManager shared] addLog:newLog]; - - //3. - [[NSNotificationCenter defaultCenter] postNotificationName:@"refreshLogs_CocoaDebug" object:nil userInfo:nil]; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Logs/_OCLogModel.h b/Pods/CocoaDebug/Sources/Logs/_OCLogModel.h deleted file mode 100644 index f0eaf08..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_OCLogModel.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import - -typedef NS_ENUM(NSInteger, CocoaDebugLogType) { - CocoaDebugLogTypeNormal = 0, - CocoaDebugLogTypeRN, - CocoaDebugLogTypeWeb -}; - -typedef NS_ENUM (NSInteger, CocoaDebugToolType) { - CocoaDebugToolTypeNone, - CocoaDebugToolTypeRN, - CocoaDebugToolTypeJson, - CocoaDebugToolTypeProtobuf -}; - -@interface _OCLogModel : NSObject - -@property (nonatomic, copy) NSData *contentData; - -@property (nonatomic, copy) NSString *Id; -@property (nonatomic, copy) NSString *fileInfo; -@property (nonatomic, copy) NSString *content; -@property (nonatomic, strong) NSDate *date; -@property (nonatomic, strong) UIColor *color; - -@property (nonatomic, assign) BOOL isTag; -@property (nonatomic, assign) BOOL isSelected; -@property (nonatomic, copy) NSString *str; -@property (nonatomic, copy) NSAttributedString *attr; - -@property (nonatomic, assign) CocoaDebugLogType logType; - -- (instancetype)initWithContent:(NSString *)content color:(UIColor *)color fileInfo:(NSString *)fileInfo isTag:(BOOL)isTag type:(CocoaDebugToolType)type; - -@end diff --git a/Pods/CocoaDebug/Sources/Logs/_OCLogModel.m b/Pods/CocoaDebug/Sources/Logs/_OCLogModel.m deleted file mode 100644 index 734ab6b..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_OCLogModel.m +++ /dev/null @@ -1,110 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_OCLogModel.h" -#import "_OCLoggerFormat.h" -#import "_NetworkHelper.h" - -@implementation _OCLogModel - -- (instancetype)initWithContent:(NSString *)content color:(UIColor *)color fileInfo:(NSString *)fileInfo isTag:(BOOL)isTag type:(CocoaDebugToolType)type -{ - if (self = [super init]) { - - if ([fileInfo isEqualToString:@"XXX|XXX|1"]) { - if (type == CocoaDebugToolTypeProtobuf) { - fileInfo = @"Protobuf\n"; - } else { - fileInfo = @"\n"; - } - } - - // - if (type == CocoaDebugToolTypeNone) { - if ([fileInfo isEqualToString:@" \n"]) {//nslog - fileInfo = @"NSLog\n"; - } else if ([fileInfo isEqualToString:@"\n"]) {//color - fileInfo = @"\n"; - } - } - - //RN (java script) - if ([fileInfo isEqualToString:@"[RCTLogError]\n"]) { - fileInfo = @"[error]\n"; - } else if ([fileInfo isEqualToString:@"[RCTLogInfo]\n"]) { - fileInfo = @"[log]\n"; - } - - // - self.Id = [[NSUUID UUID] UUIDString]; - self.fileInfo = fileInfo; - self.date = [NSDate date]; - self.color = color; - self.isTag = isTag; - - if ([content isKindOfClass:[NSString class]]) { - self.contentData = [content dataUsingEncoding:NSUTF8StringEncoding]; - } - - //避免日志数量过多导致卡顿 - if (content.length > 1000) { - content = [content substringToIndex:1000]; - } - self.content = content; - - ///////////////////////////////////////////////////////////////////////// - - NSInteger startIndex = 0; - NSInteger lenghtDate = 0; - NSString *stringContent = @""; - - stringContent = [stringContent stringByAppendingFormat:@"[%@]", [_OCLoggerFormat formatDate:self.date]]; - lenghtDate = [stringContent length]; - startIndex = [stringContent length]; - - if (self.fileInfo) { - stringContent = [stringContent stringByAppendingFormat:@"%@%@", self.fileInfo, self.content]; - } else { - stringContent = [stringContent stringByAppendingFormat:@"%@", self.content]; - } - - NSMutableAttributedString *attstr = [[NSMutableAttributedString alloc] initWithString:stringContent]; - [attstr addAttribute:NSForegroundColorAttributeName value:self.color range:NSMakeRange(0, [stringContent length])]; - - NSRange range = NSMakeRange(0, lenghtDate); - [attstr addAttribute:NSForegroundColorAttributeName value: [[_NetworkHelper shared] mainColor] range: range]; - [attstr addAttribute:NSFontAttributeName value: [UIFont boldSystemFontOfSize:12] range: range]; - - NSRange range2 = NSMakeRange(startIndex, self.fileInfo.length); - - if ([self.fileInfo isEqualToString:@"[error]\n"]) { - [attstr addAttribute: NSForegroundColorAttributeName value: [UIColor systemRedColor] range: range2]; - } else { - [attstr addAttribute: NSForegroundColorAttributeName value: [UIColor systemGrayColor] range: range2]; - } - - [attstr addAttribute: NSFontAttributeName value: [UIFont boldSystemFontOfSize:12] range: range2]; - - - //换行 - NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; - paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping; - - NSRange rang3 = NSMakeRange(0, attstr.length); - [attstr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:rang3]; - - - // - self.str = stringContent; - self.attr = [attstr copy]; - } - - return self; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Logs/_OCLogStoreManager.h b/Pods/CocoaDebug/Sources/Logs/_OCLogStoreManager.h deleted file mode 100644 index 02455d6..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_OCLogStoreManager.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import "_OCLogModel.h" - -@interface _OCLogStoreManager : NSObject - -@property (nonatomic, strong) NSMutableArray<_OCLogModel *> *normalLogArray; -@property (nonatomic, strong) NSMutableArray<_OCLogModel *> *rnLogArray; -@property (nonatomic, strong) NSMutableArray<_OCLogModel *> *webLogArray; - -+ (instancetype)shared; - -- (void)addLog:(_OCLogModel *)log; -- (void)removeLog:(_OCLogModel *)log; - -- (void)resetNormalLogs; -- (void)resetRNLogs; -- (void)resetWebLogs; - -@end - diff --git a/Pods/CocoaDebug/Sources/Logs/_OCLogStoreManager.m b/Pods/CocoaDebug/Sources/Logs/_OCLogStoreManager.m deleted file mode 100644 index 240cab0..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_OCLogStoreManager.m +++ /dev/null @@ -1,127 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_OCLogStoreManager.h" -#import "_NetworkHelper.h" - -@implementation _OCLogStoreManager - -+ (instancetype)shared -{ - static id sharedInstance = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedInstance = [[self alloc] init]; - }); - - return sharedInstance; -} - -- (id)init -{ - self = [super init]; - if (self) { - self.normalLogArray = [NSMutableArray arrayWithCapacity:1000 + 100]; - self.rnLogArray = [NSMutableArray arrayWithCapacity:1000 + 100]; - self.webLogArray = [NSMutableArray arrayWithCapacity:1000 + 100]; - } - return self; -} - -- (void)addLog:(_OCLogModel *)log -{ - if (![log.content isKindOfClass:[NSString class]]) {return;} - - //log过滤, 忽略大小写 - for (NSString *prefixStr in [_NetworkHelper shared].onlyPrefixLogs) { - if (![log.content hasPrefix:prefixStr]) { - return; - } - } - //log过滤, 忽略大小写 - for (NSString *prefixStr in [_NetworkHelper shared].ignoredPrefixLogs) { - if ([log.content hasPrefix:prefixStr]) { - return; - } - } - - - //////////////////////////////////////////////////////////////////////////////////////////////////////// - - - if (log.logType == CocoaDebugLogTypeNormal) - { - //normal - if ([self.normalLogArray count] >= 1000) { - if (self.normalLogArray.count > 0) { - [self.normalLogArray removeObjectAtIndex:0]; - } - } - - [self.normalLogArray addObject:log]; - } - else if (log.logType == CocoaDebugLogTypeRN) - { - //rn - if ([self.rnLogArray count] >= 1000) { - if (self.rnLogArray.count > 0) { - [self.rnLogArray removeObjectAtIndex:0]; - } - } - - [self.rnLogArray addObject:log]; - } - else - { - //web - if ([self.webLogArray count] >= 1000) { - if (self.webLogArray.count > 0) { - [self.webLogArray removeObjectAtIndex:0]; - } - } - - [self.webLogArray addObject:log]; - } -} - -- (void)removeLog:(_OCLogModel *)log -{ - if (log.logType == CocoaDebugLogTypeNormal) - { - //normal - [self.normalLogArray removeObject:log]; - } - else if (log.logType == CocoaDebugLogTypeNormal) - { - //rn - [self.rnLogArray removeObject:log]; - } - else - { - //web - [self.webLogArray removeObject:log]; - } -} - -- (void)resetNormalLogs -{ - [self.normalLogArray removeAllObjects]; -} - -- (void)resetRNLogs -{ - [self.rnLogArray removeAllObjects]; -} - -- (void)resetWebLogs -{ - [self.webLogArray removeAllObjects]; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Logs/_OCLoggerFormat.h b/Pods/CocoaDebug/Sources/Logs/_OCLoggerFormat.h deleted file mode 100644 index a75ab50..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_OCLoggerFormat.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import - -@interface _OCLoggerFormat : NSObject - -+ (NSString *)formatDate:(NSDate *)date; - -@end diff --git a/Pods/CocoaDebug/Sources/Logs/_OCLoggerFormat.m b/Pods/CocoaDebug/Sources/Logs/_OCLoggerFormat.m deleted file mode 100644 index 31bf225..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_OCLoggerFormat.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_OCLoggerFormat.h" - -@implementation _OCLoggerFormat - -+ (NSString *)formatDate:(NSDate *)date -{ - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - formatter.timeZone = [NSTimeZone systemTimeZone]; - formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss.SSS"; - return [formatter stringFromDate:date]; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Logs/_ObjcLog.h b/Pods/CocoaDebug/Sources/Logs/_ObjcLog.h deleted file mode 100644 index 351c526..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_ObjcLog.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import - -@interface _ObjcLog : NSObject - -+ (void)logWithFile:(const char *)file - function:(const char *)function - line:(NSUInteger)line - color:(UIColor *)color - message:(id)format, ...; - -@end diff --git a/Pods/CocoaDebug/Sources/Logs/_ObjcLog.m b/Pods/CocoaDebug/Sources/Logs/_ObjcLog.m deleted file mode 100644 index 52c49b6..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_ObjcLog.m +++ /dev/null @@ -1,57 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_ObjcLog.h" -#import "_OCLogHelper.h" -#import "NSObject+CocoaDebug.h" -#import - -@implementation _ObjcLog - -+ (void)logWithFile:(const char *)file - function:(const char *)function - line:(NSUInteger)line - color:(UIColor *)color - message:(id)format, ... -{ - if (format) - { - va_list args; - va_start(args, format); - - if ([format isKindOfClass:[NSString class]]) - { - // NSLogv(format, args); - [_OCLogHelper.shared handleLogWithFile:[NSString stringWithUTF8String:file] function:[NSString stringWithUTF8String:function] line:line message:[[NSString alloc] initWithFormat:format arguments:args] color:color type:CocoaDebugToolTypeNone]; - } - else if ([format isKindOfClass:[JSValue class]]) - { - id format_ = [format toString]; - if ([format_ isEqualToString:@"[object Object]"]) - { - format_ = [format toDictionary]; - // NSLogv([NSString stringWithFormat:@"%@",format_], args); - [_OCLogHelper.shared handleLogWithFile:[NSString stringWithUTF8String:file] function:[NSString stringWithUTF8String:function] line:line message:[NSString stringWithFormat:@"%@",format_] color:color type:CocoaDebugToolTypeNone]; - } - else - { - // NSLogv([NSString stringWithFormat:@"%@",format], args); - [_OCLogHelper.shared handleLogWithFile:[NSString stringWithUTF8String:file] function:[NSString stringWithUTF8String:function] line:line message:[NSString stringWithFormat:@"%@",format] color:color type:CocoaDebugToolTypeNone]; - } - } - else - { - // NSLogv([NSString stringWithFormat:@"%@",format], args); - [_OCLogHelper.shared handleLogWithFile:[NSString stringWithUTF8String:file] function:[NSString stringWithUTF8String:function] line:line message:[NSString stringWithFormat:@"%@",format] color:color type:CocoaDebugToolTypeNone]; - } - - va_end(args); - } -} - -@end diff --git a/Pods/CocoaDebug/Sources/Logs/_SwiftLogHelper.swift b/Pods/CocoaDebug/Sources/Logs/_SwiftLogHelper.swift deleted file mode 100644 index e046e28..0000000 --- a/Pods/CocoaDebug/Sources/Logs/_SwiftLogHelper.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import Foundation - -public class _SwiftLogHelper: NSObject { - - var enable: Bool = true - - @objc public static let shared = _SwiftLogHelper() - private override init() {} - - - fileprivate func parseFileInfo(file: String?, function: String?, line: Int?) -> String? { - guard let file = file, let function = function, let line = line, let fileName = file.components(separatedBy: "/").last else {return nil} - return "\(fileName)[\(line)]\(function)\n" - } - - - public func handleLog(file: String?, function: String?, line: Int?, message: Any..., color: UIColor?) { - let stringContent = message.reduce("") { result, next -> String in - return "\(result)\(result.count > 0 ? " " : "")\(next)" - } - commonHandleLog(file: file, function: function, line: (line ?? 0), message: stringContent, color: color) - } - - - private func commonHandleLog(file: String?, function: String?, line: Int, message: String, color: UIColor?) { - guard enable else { - return - } - - //1. - let fileInfo = parseFileInfo(file: file, function: function, line: line) - - //2. - if let newLog = _OCLogModel.init(content: message, color: color, fileInfo: fileInfo, isTag: false, type: .none) { - _OCLogStoreManager.shared().addLog(newLog) - } - - //3. - NotificationCenter.default.post(name: NSNotification.Name("refreshLogs_CocoaDebug"), object: nil, userInfo: nil) - } -} diff --git a/Pods/CocoaDebug/Sources/Monitor/FPSCounter.swift b/Pods/CocoaDebug/Sources/Monitor/FPSCounter.swift deleted file mode 100644 index 24b354e..0000000 --- a/Pods/CocoaDebug/Sources/Monitor/FPSCounter.swift +++ /dev/null @@ -1,113 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// -/* -import Foundation -import UIKit - -public class FPSCounter: NSObject { - - internal class DisplayLinkProxy: NSObject { - - @objc weak var parentCounter: FPSCounter? - - @objc func updateFromDisplayLink(_ displayLink: CADisplayLink) { - parentCounter?.updateFromDisplayLink(displayLink) - } - } - - - // MARK: - Initialization - - private var displayLink: CADisplayLink - private var displayLinkProxy: DisplayLinkProxy - - - public override init() { - self.displayLinkProxy = DisplayLinkProxy() - self.displayLink = CADisplayLink( - target: self.displayLinkProxy, - selector: #selector(DisplayLinkProxy.updateFromDisplayLink(_:)) - ) - - super.init() - - self.displayLinkProxy.parentCounter = self - } - - deinit { - self.displayLink.invalidate() - } - - - // MARK: - Configuration - - public weak var delegate: FPSCounterDelegate? - - @objc public var notificationDelay: TimeInterval = 1.0 - - - // MARK: - Tracking - - private var runloop: RunLoop? - private var mode: RunLoop.Mode? - - - @objc public func startMonitoring(inRunLoop runloop: RunLoop = .main, mode: RunLoop.Mode = .common) { - if CocoaDebugSettings.shared.enableFpsMonitoring == false {return} - - self.stopMonitoring() - - self.runloop = runloop - self.mode = mode - self.displayLink.add(to: runloop, forMode: mode) - } - - - @objc public func stopMonitoring() { - guard let runloop = self.runloop, let mode = self.mode else { return } - - self.displayLink.remove(from: runloop, forMode: mode) - self.runloop = nil - self.mode = nil - } - - - // MARK: - Handling Frame Updates - - private var lastNotificationTime: CFAbsoluteTime = 0.0 - private var numberOfFrames = 0 - - private func updateFromDisplayLink(_ displayLink: CADisplayLink) { - if self.lastNotificationTime == 0.0 { - self.lastNotificationTime = CFAbsoluteTimeGetCurrent() - return - } - - self.numberOfFrames += 1 - - let currentTime = CFAbsoluteTimeGetCurrent() - let elapsedTime = currentTime - self.lastNotificationTime - - if elapsedTime >= self.notificationDelay { - self.notifyUpdateForElapsedTime(elapsedTime) - self.lastNotificationTime = 0.0 - self.numberOfFrames = 0 - } - } - - private func notifyUpdateForElapsedTime(_ elapsedTime: CFAbsoluteTime) { - let fps = Int(round(Double(self.numberOfFrames) / elapsedTime)) - self.delegate?.fpsCounter(self, didUpdateFramesPerSecond: fps) - } -} - - -public protocol FPSCounterDelegate: NSObjectProtocol { - func fpsCounter(_ counter: FPSCounter, didUpdateFramesPerSecond fps: Int) -} -*/ diff --git a/Pods/CocoaDebug/Sources/Monitor/_BacktraceLogger.h b/Pods/CocoaDebug/Sources/Monitor/_BacktraceLogger.h deleted file mode 100755 index 924f605..0000000 --- a/Pods/CocoaDebug/Sources/Monitor/_BacktraceLogger.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import - -/*! - * @brief 线程堆栈上下文输出 - */ -@interface _BacktraceLogger : NSObject - -+ (NSString *)cocoadebug_backtraceOfAllThread; -+ (NSString *)cocoadebug_backtraceOfMainThread; -+ (NSString *)cocoadebug_backtraceOfCurrentThread; -+ (NSString *)cocoadebug_backtraceOfNSThread:(NSThread *)thread; - -+ (void)cocoadebug_logMain; -+ (void)cocoadebug_logCurrent; -+ (void)cocoadebug_logAllThread; - -@end diff --git a/Pods/CocoaDebug/Sources/Monitor/_BacktraceLogger.m b/Pods/CocoaDebug/Sources/Monitor/_BacktraceLogger.m deleted file mode 100755 index 04b2980..0000000 --- a/Pods/CocoaDebug/Sources/Monitor/_BacktraceLogger.m +++ /dev/null @@ -1,420 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_BacktraceLogger.h" -#import -#include -#include -#include -#include -#include -#include -#include - -#import "CocoaDebugTool.h" -#import "_OCLogHelper.h" - - -/*! - * @brief 适配不同CPU的宏定义 - * - * @thx 代码出自https://github.com/bestswifter/BSBacktraceLogger 加工修改 - */ -#if defined(__arm64__) -#define _DETAG_INSTRUCTION_ADDRESS(A) ((A) & ~(3UL)) -#define COCOADEBUG_THREAD_STATE_COUNT ARM_THREAD_STATE64_COUNT -#define COCOADEBUG_THREAD_STATE ARM_THREAD_STATE64 -#define COCOADEBUG_FRAME_POINTER __fp -#define COCOADEBUG_STACK_POINTER __sp -#define COCOADEBUG_INSTRUCTION_ADDRESS __pc - -#elif defined(__arm__) -#define _DETAG_INSTRUCTION_ADDRESS(A) ((A) & ~(1UL)) -#define COCOADEBUG_THREAD_STATE_COUNT ARM_THREAD_STATE_COUNT -#define COCOADEBUG_THREAD_STATE ARM_THREAD_STATE -#define COCOADEBUG_FRAME_POINTER __r[7] -#define COCOADEBUG_STACK_POINTER __sp -#define COCOADEBUG_INSTRUCTION_ADDRESS __pc - -#elif defined(__x86_64__) -#define _DETAG_INSTRUCTION_ADDRESS(A) (A) -#define COCOADEBUG_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT -#define COCOADEBUG_THREAD_STATE x86_THREAD_STATE64 -#define COCOADEBUG_FRAME_POINTER __rbp -#define COCOADEBUG_STACK_POINTER __rsp -#define COCOADEBUG_INSTRUCTION_ADDRESS __rip - -#elif defined(__i386__) -#define _DETAG_INSTRUCTION_ADDRESS(A) (A) -#define COCOADEBUG_THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT -#define COCOADEBUG_THREAD_STATE x86_THREAD_STATE32 -#define COCOADEBUG_FRAME_POINTER __ebp -#define COCOADEBUG_STACK_POINTER __esp -#define COCOADEBUG_INSTRUCTION_ADDRESS __eip - -#endif - -#if defined(__LP64__) -#define _TRACE_FMT "%-4d%-31s 0x%016lx %s + %lu" -#define _POINTER_FMT "0x%016lx" -#define _POINTER_SHORT_FMT "0x%lx" -#define COCOADEBUG_NLIST struct nlist_64 -#else -#define _TRACE_FMT "%-4d%-31s 0x%08lx %s + %lu" -#define _POINTER_FMT "0x%08lx" -#define _POINTER_SHORT_FMT "0x%lx" -#define COCOADEBUG_NLIST struct nlist - -#endif - -#define _MAX_FRAME_NUMBER 30 -#define _LOG_SEPERATE printf("\n"); -#define _FAILED_UINT_PTR_ADDRESS 0 -#define _CALL_INSTRUCTION_FROM_RETURN_ADDRESS(A) (_DETAG_INSTRUCTION_ADDRESS((A)) - 1) - - -typedef struct COCOADEBUGStackFrameEntry{ - const struct COCOADEBUGStackFrameEntry * const previous; - const uintptr_t return_address; -} COCOADEBUGStackFrameEntry; - -static mach_port_t main_thread_id; - - - -@implementation _BacktraceLogger - -+ (void)load { - main_thread_id = mach_thread_self(); -} - - -#pragma mark - Public -+ (NSString *)cocoadebug_backtraceOfAllThread { - thread_act_array_t threads; - mach_msg_type_number_t thread_count = 0; - const task_t this_task = mach_task_self(); - - kern_return_t kr = task_threads(this_task, &threads, &thread_count); - if (kr != KERN_SUCCESS) { - return @"Failed to get information of all threads"; - } - NSMutableString * result = @"".mutableCopy; - for (int idx = 0; idx < thread_count; idx++) { - [result appendString: _cocoadebug_backtraceOfThread(threads[idx])]; - } - return result.copy; -} - -+ (NSString *)cocoadebug_backtraceOfMainThread { - return [self cocoadebug_backtraceOfNSThread: [NSThread mainThread]]; -} - -+ (NSString *)cocoadebug_backtraceOfCurrentThread { - return [self cocoadebug_backtraceOfNSThread: [NSThread currentThread]]; -} - -+ (NSString *)cocoadebug_backtraceOfNSThread:(NSThread *)thread { - return _cocoadebug_backtraceOfThread(cocoadebug_machThreadFromNSThread(thread)); -} - -+ (void)cocoadebug_logMain { -// _LOG_SEPERATE -// NSLog(@"Detected UI Blocking %@", [self cocoadebug_backtraceOfMainThread]); -// _LOG_SEPERATE - - [CocoaDebugTool logWithString:[NSString stringWithFormat:@"\nDetected UI Blocking\n%@\n", [self cocoadebug_backtraceOfMainThread]] color:[UIColor redColor]]; - - [[NSNotificationCenter defaultCenter] postNotificationName:@"CocoaDebug_Detected_UI_Blocking" object:nil]; -} - -+ (void)cocoadebug_logCurrent { - _LOG_SEPERATE - NSLog(@"%@", [self cocoadebug_backtraceOfCurrentThread]); - _LOG_SEPERATE -} - -+ (void)cocoadebug_logAllThread { - _LOG_SEPERATE - NSLog(@"%@", [self cocoadebug_backtraceOfAllThread]); - _LOG_SEPERATE -} - - -#pragma mark - Generate -thread_t cocoadebug_machThreadFromNSThread(NSThread * nsthread) { - char name[256]; - thread_act_array_t list; - mach_msg_type_number_t count; - task_threads(mach_task_self(), &list, &count); - - NSTimeInterval timeStamp = [[NSDate date] timeIntervalSince1970]; - NSString * originName = nsthread.name; - [nsthread setName: [NSString stringWithFormat: @"%f", timeStamp]]; - - if ([nsthread isMainThread]) { return (thread_t)main_thread_id; } - - for (int idx = 0; idx < count; idx++) { - pthread_t pt = pthread_from_mach_thread_np(list[idx]); - if ([nsthread isMainThread] && list[idx] == main_thread_id) { return list[idx]; } - if (pt) { - name[0] = '\0'; - pthread_getname_np(pt, name, sizeof(name)); - if (!strcmp(name, [nsthread name].UTF8String)) { - [nsthread setName: originName]; - return list[idx]; - } - } - } - [nsthread setName: originName]; - return mach_thread_self(); -} - -NSString * _cocoadebug_backtraceOfThread(thread_t thread) { - uintptr_t backtraceBuffer[_MAX_FRAME_NUMBER]; - int idx = 0; - NSMutableString * result = [NSString stringWithFormat: @"Backtrace of Thread %u:\n======================================================================================\n", thread].mutableCopy; - - _STRUCT_MCONTEXT machineContext; - if (!cocoadebug_fillThreadStateIntoMachineContext(thread, &machineContext)) { - return [NSString stringWithFormat: @"Failed to get information abount thread: %u", thread]; - } - const uintptr_t instructionAddress = cocoadebug_mach_instructionAddress(&machineContext); - backtraceBuffer[idx++] = instructionAddress; - - uintptr_t linkRegister = cocoadebug_mach_linkRegister(&machineContext); - if (linkRegister) { - backtraceBuffer[idx++] = linkRegister; - } - if (instructionAddress == _FAILED_UINT_PTR_ADDRESS) { return @"Failed to get instruction address"; } - - COCOADEBUGStackFrameEntry frame = { 0 }; - const uintptr_t framePtr = cocoadebug_mach_framePointer(&machineContext); - if (framePtr == _FAILED_UINT_PTR_ADDRESS || - cocoadebug_mach_copyMem((void *)framePtr, &frame, sizeof(frame)) != KERN_SUCCESS) { - return @"failed to get frame pointer"; - } - - for (; idx < _MAX_FRAME_NUMBER; idx++) { - backtraceBuffer[idx] = frame.return_address; - if (backtraceBuffer[idx] == _FAILED_UINT_PTR_ADDRESS || - frame.previous == NULL || - cocoadebug_mach_copyMem(frame.previous, &frame, sizeof(frame)) != KERN_SUCCESS) { - break; - } - } - - int backtraceLength = idx; - Dl_info symbolicated[backtraceLength]; - cocoadebug_symbolicate(backtraceBuffer, symbolicated, backtraceLength, 0); - for (int idx = 0; idx < backtraceLength; idx++) { - [result appendFormat: @"%@", cocoadebug_logBacktraceEntry(idx, backtraceBuffer[idx], &symbolicated[idx])]; - } - [result appendString: @"\n"]; - [result appendString: @"======================================================================================"]; - return result.copy; -} - - -#pragma mark - operate machine context -bool cocoadebug_fillThreadStateIntoMachineContext(thread_t thread, _STRUCT_MCONTEXT * machineContext) { - mach_msg_type_number_t state_count = COCOADEBUG_THREAD_STATE_COUNT; - kern_return_t kr = thread_get_state(thread, COCOADEBUG_THREAD_STATE, (thread_state_t)&machineContext->__ss, &state_count); - return (kr == KERN_SUCCESS); -} - -uintptr_t cocoadebug_mach_linkRegister(_STRUCT_MCONTEXT * const machineContext){ -#if defined(__i386__) || defined(__x86_64__) - return _FAILED_UINT_PTR_ADDRESS; -#else - return machineContext->__ss.__lr; -#endif -} - -uintptr_t cocoadebug_mach_framePointer(_STRUCT_MCONTEXT * const machineContext) { - return machineContext->__ss.COCOADEBUG_FRAME_POINTER; -} - -uintptr_t cocoadebug_mach_instructionAddress(_STRUCT_MCONTEXT * const machineContext) { - return machineContext->__ss.COCOADEBUG_INSTRUCTION_ADDRESS; -} - -kern_return_t cocoadebug_mach_copyMem(const void * src, const void * dst, const size_t numBytes) { - vm_size_t bytesCopied = 0; - return vm_read_overwrite(mach_task_self(), (vm_address_t)src, (vm_size_t)numBytes, (vm_address_t)dst, &bytesCopied); -} - - -#pragma mark - handle symbolicate -void cocoadebug_symbolicate(const uintptr_t * const backtraceBuffer, Dl_info * const symbolsBuffer, const int numEntries, const int skippedEntries) { - int idx = 0; - if (!skippedEntries && idx < numEntries) { - cocoadebug_dladdr(backtraceBuffer[idx], &symbolsBuffer[idx]); - idx++; - } - - for (; idx < numEntries; idx++) { - cocoadebug_dladdr(_CALL_INSTRUCTION_FROM_RETURN_ADDRESS(backtraceBuffer[idx]), &symbolsBuffer[idx]); - } -} - -bool cocoadebug_dladdr(const uintptr_t address, Dl_info * const info) { - info->dli_fname = NULL; - info->dli_fbase = NULL; - info->dli_sname = NULL; - info->dli_saddr = NULL; - - const uint32_t idx = cocoadebug_imageIndexContainingAddress(address); - if (idx == UINT_MAX) { return false; } - - const struct mach_header * header = _dyld_get_image_header(idx); - const uintptr_t imageVMAddressSlide = (uintptr_t)_dyld_get_image_vmaddr_slide(idx); - const uintptr_t addressWithSlide = address - imageVMAddressSlide; - const uintptr_t segmentBase = cocoadebug_segmentBaseOfImageIndex(idx) + imageVMAddressSlide; - if (segmentBase == _FAILED_UINT_PTR_ADDRESS) { return false; } - - info->dli_fbase = (void *)header; - info->dli_fname = _dyld_get_image_name(idx); - - const COCOADEBUG_NLIST * bestMatch = NULL; - uintptr_t bestDistance = ULONG_MAX; - uintptr_t cmdPtr = cocoadebug_firstCmdAfterHeader(header); - if (cmdPtr == _FAILED_UINT_PTR_ADDRESS) { return false; } - - for (uint32_t iCmd = 0; iCmd < header->ncmds; iCmd++) { - const struct load_command * loadCmd = (struct load_command *)cmdPtr; - if (loadCmd->cmd == LC_SYMTAB) { - const struct symtab_command * symtabCmd = (struct symtab_command *)cmdPtr; - const COCOADEBUG_NLIST * symbolTable = (COCOADEBUG_NLIST *)(segmentBase + symtabCmd->symoff); - const uintptr_t stringTable = segmentBase + symtabCmd->stroff; - - for (uint32_t iSym = 0; iSym < symtabCmd->nsyms; iSym++) { - if (symbolTable[iSym].n_value == _FAILED_UINT_PTR_ADDRESS) { continue; } - uintptr_t symbolBase = symbolTable[iSym].n_value; - uintptr_t currentDistance = addressWithSlide - symbolBase; - if ( (addressWithSlide >= symbolBase && currentDistance <= bestDistance) ) { - bestMatch = symbolTable + iSym; - bestDistance = currentDistance; - } - } - if (bestMatch != NULL) { - info->dli_saddr = (void *)(bestMatch->n_value + imageVMAddressSlide); - info->dli_sname = (char *)((intptr_t)stringTable + (intptr_t)bestMatch->n_un.n_strx); - if (*info->dli_sname == '_') { - info->dli_sname++; - } - if (info->dli_saddr == info->dli_fbase && bestMatch->n_type == 3) { - info->dli_sname = NULL; - } - break; - } - } - cmdPtr += loadCmd->cmdsize; - } - return true; -} - -uintptr_t cocoadebug_firstCmdAfterHeader(const struct mach_header * const header) { - switch (header->magic) { - case MH_MAGIC: - case MH_CIGAM: - return (uintptr_t)(header + 1); - case MH_MAGIC_64: - case MH_CIGAM_64: - return (uintptr_t)(((struct mach_header_64*)header) + 1); - default: - return 0; - } -} - -uintptr_t cocoadebug_segmentBaseOfImageIndex(const uint32_t idx) { - const struct mach_header * header = _dyld_get_image_header(idx); - - uintptr_t cmdPtr = cocoadebug_firstCmdAfterHeader(header); - if (cmdPtr == _FAILED_UINT_PTR_ADDRESS) { return _FAILED_UINT_PTR_ADDRESS; } - for (uint32_t idx = 0; idx < header->ncmds; idx++) { - const struct load_command * loadCmd = (struct load_command *)cmdPtr; - if (loadCmd->cmd == LC_SEGMENT) { - const struct segment_command * segCmd = (struct segment_command *)cmdPtr; - if (strcmp(segCmd->segname, SEG_LINKEDIT) == 0) { - return segCmd->vmaddr - segCmd->fileoff; - } - } else if (loadCmd->cmd == LC_SEGMENT_64) { - const struct segment_command_64 * segCmd = (struct segment_command_64 *)cmdPtr; - if (strcmp(segCmd->segname, SEG_LINKEDIT) == 0) { - return segCmd->vmaddr - segCmd->fileoff; - } - } - cmdPtr += loadCmd->cmdsize; - } - return _FAILED_UINT_PTR_ADDRESS; -} - -uint32_t cocoadebug_imageIndexContainingAddress(const uintptr_t address) { - const uint32_t imageCount = _dyld_image_count(); - const struct mach_header * header = _FAILED_UINT_PTR_ADDRESS; - - for (uint32_t iImg = 0; iImg < imageCount; iImg++) { - header = _dyld_get_image_header(iImg); - if (header != NULL) { - uintptr_t addressWSlide = address - (uintptr_t)_dyld_get_image_vmaddr_slide(iImg); - uintptr_t cmdPtr = cocoadebug_firstCmdAfterHeader(header); - if (cmdPtr == _FAILED_UINT_PTR_ADDRESS) { continue; } - - for (uint32_t iCmd = 0; iCmd < header->ncmds; iCmd++) { - const struct load_command * loadCmd = (struct load_command *)cmdPtr; - if (loadCmd->cmd == LC_SEGMENT) { - const struct segment_command * segCmd = (struct segment_command *)cmdPtr; - if (addressWSlide >= segCmd->vmaddr && - addressWSlide < segCmd->vmaddr + segCmd->vmsize) { - return iImg; - } - } else if (loadCmd->cmd == LC_SEGMENT_64) { - const struct segment_command_64 * segCmd = (struct segment_command_64 *)cmdPtr; - if (addressWSlide >= segCmd->vmaddr && - addressWSlide < segCmd->vmaddr + segCmd->vmsize) { - return iImg; - } - } - cmdPtr += loadCmd->cmdsize; - } - } - } - return UINT_MAX; -} - - -#pragma mark - generate backtrace entry -const char * cocoadebug_lastPathEntry(const char * const path) { - if (path == NULL) { return NULL; } - char * lastFile = strrchr(path, '/'); - return lastFile == NULL ? path: lastFile + 1; -} - -NSString * cocoadebug_logBacktraceEntry(const int entryNum, const uintptr_t address, const Dl_info * const dlInfo) { - char faddrBuffer[20]; - char saddrBuffer[20]; - - const char * fname = cocoadebug_lastPathEntry(dlInfo->dli_fname); - if (fname == NULL) { - sprintf(faddrBuffer, _POINTER_FMT, (uintptr_t)dlInfo->dli_fbase); - fname = faddrBuffer; - } - - uintptr_t offset = address - (uintptr_t)dlInfo->dli_saddr; - const char * sname = dlInfo->dli_sname; - if (sname == NULL) { - sprintf(saddrBuffer, _POINTER_SHORT_FMT, (uintptr_t)dlInfo->dli_fbase); - sname = saddrBuffer; - offset = address - (uintptr_t)dlInfo->dli_fbase; - } - return [NSString stringWithFormat: @"%-30s 0x%08" PRIxPTR " %s + %lu\n", fname, (uintptr_t)address, sname, offset]; -} - - -@end diff --git a/Pods/CocoaDebug/Sources/Monitor/_DebugConsoleLabel.h b/Pods/CocoaDebug/Sources/Monitor/_DebugConsoleLabel.h deleted file mode 100644 index e1a5594..0000000 --- a/Pods/CocoaDebug/Sources/Monitor/_DebugConsoleLabel.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// -/* -#import - -@interface _DebugConsoleLabel : UILabel - -- (void)updateLabelWithValue:(float)value; - -- (NSAttributedString *)uiBlockingAttributedStringWith:(float)uiBlocking; - -@end - */ diff --git a/Pods/CocoaDebug/Sources/Monitor/_DebugConsoleLabel.m b/Pods/CocoaDebug/Sources/Monitor/_DebugConsoleLabel.m deleted file mode 100644 index 1cf73fc..0000000 --- a/Pods/CocoaDebug/Sources/Monitor/_DebugConsoleLabel.m +++ /dev/null @@ -1,75 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// -/* -#import "_DebugConsoleLabel.h" - -@interface _DebugConsoleLabel () - -@property (nonatomic, strong) UIFont *mainFont; -@property (nonatomic, strong) UIFont *subFont; - -@end - -@implementation _DebugConsoleLabel - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setDefault]; - } - return self; -} - -- (void)setDefault { - self.textAlignment = NSTextAlignmentCenter; - self.userInteractionEnabled = NO; - self.adjustsFontSizeToFitWidth = YES; - - self.mainFont = [UIFont fontWithName:@"Menlo" size:14]; - if (self.mainFont) { - self.subFont = [UIFont fontWithName:@"Menlo" size:4]; - } else { - self.mainFont = [UIFont fontWithName:@"Courier" size:14]; - self.subFont = [UIFont fontWithName:@"Courier" size:4]; - } -} - -- (void)updateLabelWithValue:(float)value { - self.attributedText = [self uiBlockingAttributedStringWith:value]; -} - -#pragma mark - NSAttributedString - -- (NSAttributedString *)uiBlockingAttributedStringWith:(float)uiBlocking { - CGFloat progress = uiBlocking / 60.0; - UIColor *color = [UIColor colorWithHue:0.27 * (progress - 0.2) saturation:1 brightness:0.9 alpha:1]; - NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%d UIBlocking",(int)round(uiBlocking)]]; - [text addAttribute:NSForegroundColorAttributeName value:color range:NSMakeRange(0, text.length - 3)]; - [text addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:NSMakeRange(text.length - 3, 3)]; - [text addAttribute:NSFontAttributeName value:self.mainFont range:NSMakeRange(0, text.length)]; - [text addAttribute:NSFontAttributeName value:self.subFont range:NSMakeRange(text.length - 4, 1)]; - return text; -} - -#pragma mark - Color - -- (UIColor*)getColorByPercent:(CGFloat)percent { - NSInteger r = 0, g = 0, one = 255 + 255; - if (percent < 0.5) { - r = one * percent; - g = 255; - } - if (percent >= 0.5) { - g = 255 - ((percent - 0.5 ) * one) ; - r = 255; - } - return [UIColor colorWithRed:r/255.0 green:g/255.0 blue:0 alpha:1]; -} - -@end - */ diff --git a/Pods/CocoaDebug/Sources/Monitor/_RunloopMonitor.h b/Pods/CocoaDebug/Sources/Monitor/_RunloopMonitor.h deleted file mode 100644 index f1e08e7..0000000 --- a/Pods/CocoaDebug/Sources/Monitor/_RunloopMonitor.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface _RunloopMonitor : NSObject -//@property (nonatomic, copy, class) NSString * version; -+ (instancetype)shared; - -- (void)beginMonitor; - -- (void)endMonitor; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Pods/CocoaDebug/Sources/Monitor/_RunloopMonitor.m b/Pods/CocoaDebug/Sources/Monitor/_RunloopMonitor.m deleted file mode 100644 index f3b30d7..0000000 --- a/Pods/CocoaDebug/Sources/Monitor/_RunloopMonitor.m +++ /dev/null @@ -1,147 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_RunloopMonitor.h" -#import "_BacktraceLogger.h" - -// 定义延迟时间 毫秒 -static int64_t const OUT_TIME = 100 * NSEC_PER_MSEC; -// before wait 的超时时间 -static NSTimeInterval const WAIT_TIME = 0.5; - -@interface _RunloopMonitor () { - @public - CFRunLoopObserverRef observer; - CFRunLoopActivity currentActivity; - dispatch_semaphore_t semaphore; - BOOL isMonitoring; -} -@end - -static void runloopObserverCallback(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info) { - //_RunloopMonitor * monitor = (__bridge _RunloopMonitor*)info; - [_RunloopMonitor shared]->currentActivity = activity; - -// switch (activity) { -// case kCFRunLoopEntry: -// NSLog(@"##### %@", @"kCFRunLoopEntry"); -// break; -// case kCFRunLoopBeforeTimers: -// NSLog(@"##### %@", @"kCFRunLoopBeforeTimers"); -// break; -// case kCFRunLoopBeforeSources: -// NSLog(@"##### %@", @"kCFRunLoopBeforeSources"); -// break; -// case kCFRunLoopBeforeWaiting: -// NSLog(@"##### %@", @"kCFRunLoopBeforeWaiting"); -// break; -// case kCFRunLoopAfterWaiting: -// NSLog(@"##### %@", @"kCFRunLoopAfterWaiting"); -// break; -// case kCFRunLoopExit: -// NSLog(@"##### %@", @"kCFRunLoopExit"); -// break; -// default: -// break; -// } - - dispatch_semaphore_t sema = [_RunloopMonitor shared]->semaphore; - dispatch_semaphore_signal(sema); -} - -@implementation _RunloopMonitor - -+ (instancetype)shared { - static id ins = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - ins = [[super allocWithZone:NSDefaultMallocZone()] init]; - }); - return ins; -} -+ (instancetype)allocWithZone:(struct _NSZone *)zone { - return [self shared]; -} - -- (void)dealloc { - [self endMonitor]; - [super dealloc]; -} - -- (void)beginMonitor { - - if ([_RunloopMonitor shared]->isMonitoring) return; - - [_RunloopMonitor shared]->isMonitoring = YES; - - // 创建观察者 - CFRunLoopObserverContext context = { - 0, - (__bridge void*)self, - &CFRetain, - &CFRelease, - NULL - }; - //static CFRunLoopObserverRef observer; - observer = CFRunLoopObserverCreate(kCFAllocatorDefault, kCFRunLoopAllActivities, YES, 0, &runloopObserverCallback, &context); - - // 观察主线程 - CFRunLoopAddObserver(CFRunLoopGetMain(), observer, kCFRunLoopCommonModes); - - // 在子线程中监控卡顿 - semaphore = dispatch_semaphore_create(0); //同步? - dispatch_async(dispatch_get_global_queue(0, 0), ^{ - // 开启持续的loop来监控 - while ([_RunloopMonitor shared]->isMonitoring) { - if ([_RunloopMonitor shared]->currentActivity == kCFRunLoopBeforeWaiting) - { - // 处理休眠前事件观测 - __block BOOL timeOut = YES; - dispatch_async(dispatch_get_main_queue(), ^{ - timeOut = NO; // timeOut任务 - }); - [NSThread sleepForTimeInterval:WAIT_TIME]; - // WAIT_TIME 时间后,如果 timeOut任务 任未执行, 则认为主线程前面的任务执行时间过长导致卡顿 - if (timeOut) { - [_BacktraceLogger cocoadebug_logMain]; - } - } - else - { - // 处理 Timer,Source,唤醒后事件 - // 同步等待时间内,接收到信号result=0, 超时则继续往下执行并且result!=0 - long result = dispatch_semaphore_wait([_RunloopMonitor shared]->semaphore, dispatch_time(DISPATCH_TIME_NOW, OUT_TIME)); - if (result != 0) { // 超时 - if (![_RunloopMonitor shared]->observer) { - [[_RunloopMonitor shared] endMonitor]; - continue; - } - if ([_RunloopMonitor shared]->currentActivity == kCFRunLoopBeforeSources || - [_RunloopMonitor shared]->currentActivity == kCFRunLoopAfterWaiting || - [_RunloopMonitor shared]->currentActivity == kCFRunLoopBeforeTimers) { - - [_BacktraceLogger cocoadebug_logMain]; - } - } - } - } - }); - -} - -- (void)endMonitor { - if (!observer) return; - if (!isMonitoring) return; - isMonitoring = NO; - - CFRunLoopRemoveObserver(CFRunLoopGetMain(), observer, kCFRunLoopCommonModes); - CFRelease(observer); - observer = nil; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Network/JsonViewController.swift b/Pods/CocoaDebug/Sources/Network/JsonViewController.swift deleted file mode 100644 index 7f4dfca..0000000 --- a/Pods/CocoaDebug/Sources/Network/JsonViewController.swift +++ /dev/null @@ -1,154 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -enum EditType { - case unknown - case requestHeader - case responseHeader - case log -} - -import Foundation -import UIKit - -class JsonViewController: UIViewController { - - @IBOutlet weak var textView: CustomTextView! - @IBOutlet weak var imageView: UIImageView! - @IBOutlet weak var naviItem: UINavigationItem! - - var naviItemTitleLabel: UILabel? - - var editType: EditType = .unknown - var httpModel: _HttpModel? - var detailModel: NetworkDetailModel? - - //Edited url - var editedURLString: String? - //Edited content - var editedContent: String? - - //log - var logTitleString: String? - var logModels: [_OCLogModel]? - var logModel: _OCLogModel? - var justCancelCallback:(() -> Void)? - - static func instanceFromStoryBoard() -> JsonViewController { - let storyboard = UIStoryboard(name: "Network", bundle: Bundle(for: CocoaDebug.self)) - return storyboard.instantiateViewController(withIdentifier: "JsonViewController") as! JsonViewController - } - - //MARK: - tool - - //detect format (JSON/Form) - func detectSerializer() { - guard let content = detailModel?.content else { - detailModel?.requestSerializer = RequestSerializer.JSON//default JSON format - return - } - - if let _ = content.stringToDictionary() { - //JSON format - detailModel?.requestSerializer = RequestSerializer.JSON - } else { - //Form format - detailModel?.requestSerializer = RequestSerializer.form - - if let jsonString = detailModel?.content?.formStringToJsonString() { - textView.text = jsonString - detailModel?.requestSerializer = RequestSerializer.JSON - detailModel?.content = textView.text - } - } - } - - - //MARK: - init - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - // navigationController?.hidesBarsOnSwipe = true - } - - override func viewWillDisappear(_ animated: Bool) { - super.viewWillDisappear(animated) - // navigationController?.hidesBarsOnSwipe = false - - if let index = logModels?.firstIndex(where: { (model) -> Bool in - return model.isSelected == true - }) { - logModels?[index].isSelected = false - } - - logModel?.isSelected = true - - if let justCancelCallback = justCancelCallback { - justCancelCallback() - } - } - - override func viewDidLoad() { - super.viewDidLoad() - - naviItemTitleLabel = UILabel.init(frame: CGRect(x: 0, y: 0, width: 80, height: 40)) - naviItemTitleLabel?.textAlignment = .center - naviItemTitleLabel?.textColor = Color.mainGreen - naviItemTitleLabel?.font = .boldSystemFont(ofSize: 20) - naviItemTitleLabel?.text = detailModel?.title - naviItem.titleView = naviItemTitleLabel - - textView.textContainer.lineFragmentPadding = 15 - // textView.textContainerInset = .zero - - //detect type (default type URL) - if detailModel?.title == "REQUEST HEADER" { - editType = .requestHeader - } - if detailModel?.title == "RESPONSE HEADER" { - editType = .responseHeader - } - - //setup UI - if editType == .requestHeader - { - imageView.isHidden = true - textView.isHidden = false - textView.text = String(detailModel?.requestHeaderFields?.dictionaryToString()?.dropFirst().dropLast().dropFirst().dropLast().dropFirst().dropFirst() ?? "").replacingOccurrences(of: "\",\n \"", with: "\",\n\"") - } - else if editType == .responseHeader - { - imageView.isHidden = true - textView.isHidden = false - textView.text = String(detailModel?.responseHeaderFields?.dictionaryToString()?.dropFirst().dropLast().dropFirst().dropLast().dropFirst().dropFirst() ?? "").replacingOccurrences(of: "\",\n \"", with: "\",\n\"") - } - else if editType == .log - { - imageView.isHidden = true - textView.isHidden = false - naviItemTitleLabel?.text = logTitleString - - if let data = logModel?.contentData { - textView.text = data.dataToString() - } - } - else - { - if let content = detailModel?.content { - imageView.isHidden = true - textView.isHidden = false - textView.text = content - detectSerializer()//detect format (JSON/Form) - } - if let image = detailModel?.image { - textView.isHidden = true - imageView.isHidden = false - imageView.image = image - } - } - } -} diff --git a/Pods/CocoaDebug/Sources/Network/NetworkCell.swift b/Pods/CocoaDebug/Sources/Network/NetworkCell.swift deleted file mode 100644 index 76a31f4..0000000 --- a/Pods/CocoaDebug/Sources/Network/NetworkCell.swift +++ /dev/null @@ -1,157 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import Foundation -import UIKit - -class NetworkCell: UITableViewCell { - - @IBOutlet weak var leftAlignLine: UILabel! - @IBOutlet weak var statusCodeLabel: UILabel! - @IBOutlet weak var methodLabel: UILabel! - @IBOutlet weak var requestTimeTextView: CustomTextView! - @IBOutlet weak var requestUrlTextView: CustomTextView! - @IBOutlet weak var imageLabel: UILabel! - @IBOutlet weak var statusCodeView: UIView! - - var index: NSInteger = 0 - - var httpModel: _HttpModel? { - didSet { - - guard let serverURL = CocoaDebugSettings.shared.serverURL else {return} - - //domain name - requestUrlTextView.text = httpModel?.url.absoluteString - if requestUrlTextView.text?.contains(serverURL) == true { - if #available(iOS 8.2, *) { - requestUrlTextView.font = UIFont.systemFont(ofSize: 13, weight: .heavy) - } else { - // Fallback on earlier versions - requestUrlTextView.font = UIFont.boldSystemFont(ofSize: 13) - } - } else { - if #available(iOS 8.2, *) { - requestUrlTextView.font = UIFont.systemFont(ofSize: 13, weight: .regular) - } else { - // Fallback on earlier versions - requestUrlTextView.font = UIFont.systemFont(ofSize: 13) - } - } - - //Request method - if let method = httpModel?.method { - methodLabel.text = "[" + method + "]" - } - - //Request time - if let startTime = httpModel?.startTime { - if (startTime as NSString).doubleValue == 0 { - requestTimeTextView.text = _OCLoggerFormat.formatDate(Date()) - } else { - requestTimeTextView.text = _OCLoggerFormat.formatDate(NSDate(timeIntervalSince1970: (startTime as NSString).doubleValue) as Date) - } - } - - //https://httpcodes.co/status/ - let successStatusCodes = ["200","201","202","203","204","205","206","207","208","226"] - let informationalStatusCodes = ["100","101","102","103","122"] - let redirectionStatusCodes = ["300","301","302","303","304","305","306","307","308"] - - //status code - statusCodeLabel.text = httpModel?.statusCode - - if successStatusCodes.contains(statusCodeLabel.text ?? "") { - statusCodeLabel.textColor = "#42d459".hexColor - } - else if informationalStatusCodes.contains(statusCodeLabel.text ?? "") { - statusCodeLabel.textColor = "#4b8af7".hexColor - } - else if redirectionStatusCodes.contains(statusCodeLabel.text ?? "") { - statusCodeLabel.textColor = "#ff9800".hexColor - } - else { - statusCodeLabel.textColor = "#ff0000".hexColor - } - - if statusCodeLabel.text == "0" { //"0" means network unavailable - statusCodeLabel.text = "❌" - } - - //Whether to display the image label - if httpModel?.isImage == true - { - imageLabel.isHidden = false - imageLabel.text = "Image" - } - else - { - //js css - if let urlString = httpModel?.url.absoluteString { - if urlString.suffix(3) == ".js" { - imageLabel.isHidden = false - imageLabel.text = "JavaScript" - } else if urlString.suffix(4) == ".css" { - imageLabel.isHidden = false - imageLabel.text = "CSS" - } else { - imageLabel.isHidden = true - } - } else { - imageLabel.isHidden = true - } - } - - //tag - if httpModel?.isTag == true { - self.contentView.backgroundColor = "#007aff".hexColor - } else { - self.contentView.backgroundColor = .black - } - - //isSelected - if httpModel?.isSelected == true { - statusCodeView.backgroundColor = "#222222".hexColor - } else { - statusCodeView.backgroundColor = "#333333".hexColor - } - } - } - - //MARK: - awakeFromNib - override func awakeFromNib() { - super.awakeFromNib() - - imageLabel.backgroundColor = Color.mainGreen - requestTimeTextView.textColor = Color.mainGreen - - requestTimeTextView.textContainer.lineFragmentPadding = 0 - requestTimeTextView.textContainerInset = .zero - requestTimeTextView.isSelectable = false - - requestUrlTextView.textContainer.lineFragmentPadding = 0 - requestUrlTextView.textContainerInset = .zero - requestUrlTextView.isSelectable = true - - leftAlignLine.textAlignment = .center - leftAlignLine.textColor = .white - leftAlignLine.adjustsFontSizeToFitWidth = true - if #available(iOS 8.2, *) { - leftAlignLine.font = UIFont.systemFont(ofSize: 20, weight: .bold) - } else { - leftAlignLine.font = UIFont.boldSystemFont(ofSize: 20) - } - } - - //MARK: - layoutSubviews - override func layoutSubviews() { - superview?.layoutSubviews() - - leftAlignLine.text = String(index + 1) - } -} diff --git a/Pods/CocoaDebug/Sources/Network/NetworkDetailCell.swift b/Pods/CocoaDebug/Sources/Network/NetworkDetailCell.swift deleted file mode 100644 index d4d9a52..0000000 --- a/Pods/CocoaDebug/Sources/Network/NetworkDetailCell.swift +++ /dev/null @@ -1,83 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import Foundation -import UIKit - -class NetworkDetailCell: UITableViewCell { - - @IBOutlet weak var titleLabel: UILabel! - @IBOutlet weak var contentTextView: CustomTextView! - @IBOutlet weak var imgView: UIImageView! - @IBOutlet weak var titleView: UIView! - @IBOutlet weak var topLine: UIView! - @IBOutlet weak var middleLine: UIView! - @IBOutlet weak var bottomLine: UIView! - @IBOutlet weak var editView: UIView! - - @IBOutlet weak var titleViewBottomSpaceToMiddleLine: NSLayoutConstraint! - //-12.5 - - - var tapEditViewCallback:((NetworkDetailModel?) -> Void)? - - var detailModel: NetworkDetailModel? { - didSet { - - titleLabel.text = detailModel?.title - contentTextView.text = detailModel?.content - - //image - if detailModel?.image == nil { - imgView.isHidden = true - } else { - imgView.isHidden = false - imgView.image = detailModel?.image - } - - //Hide content automatically - if detailModel?.blankContent == "..." { - middleLine.isHidden = true - imgView.isHidden = true - titleViewBottomSpaceToMiddleLine.constant = -12.5 + 2 - } else { - middleLine.isHidden = false - if detailModel?.image != nil { - imgView.isHidden = false - } - titleViewBottomSpaceToMiddleLine.constant = 0 - } - - //Bottom dividing line - if detailModel?.isLast == true { - bottomLine.isHidden = false - } else { - bottomLine.isHidden = true - } - } - } - - //MARK: - awakeFromNib - override func awakeFromNib() { - super.awakeFromNib() - - editView.addGestureRecognizer(UITapGestureRecognizer.init(target: self, action: #selector(tapEditView))) - - contentTextView.textContainer.lineFragmentPadding = 0 - contentTextView.textContainerInset = .zero - } - - - //MARK: - target action - //edit - @objc func tapEditView() { - if let tapEditViewCallback = tapEditViewCallback { - tapEditViewCallback(detailModel) - } - } -} diff --git a/Pods/CocoaDebug/Sources/Network/NetworkDetailModel.swift b/Pods/CocoaDebug/Sources/Network/NetworkDetailModel.swift deleted file mode 100644 index 9de7699..0000000 --- a/Pods/CocoaDebug/Sources/Network/NetworkDetailModel.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import Foundation - -struct NetworkDetailModel { - var title: String? - var content: String? - var url: String? - var image: UIImage? - var blankContent: String? - var isLast: Bool = false - var requestSerializer: RequestSerializer = RequestSerializer.JSON//default JSON format - var requestHeaderFields: [String: Any]? - var responseHeaderFields: [String: Any]? - var requestData: Data? - var responseData: Data? - var httpModel: _HttpModel? - - - init(title: String? = nil, content: String? = "", url: String? = "", image: UIImage? = nil, httpModel: _HttpModel? = nil) { - self.title = title?.replacingOccurrences(of: "\\/", with: "/") - self.content = content?.replacingOccurrences(of: "\\/", with: "/") - self.url = url?.replacingOccurrences(of: "\\/", with: "/") - self.image = image - self.httpModel = httpModel - - - - -// if title == "REQUEST" { -// self.requestData = httpModel?.requestData -// -// guard let content = content, let url = url, let data = self.requestData, let keys = CocoaDebugSettings.shared.protobufTransferMap?.keys else {return} -// if !content.contains("GPBMessage") {return} -// self.title = "REQUEST (Protobuf)" -// -// for key in keys { -// if url.contains(key) { -// //1. -// guard let arr : Array = CocoaDebugSettings.shared.protobufTransferMap?[key] else {return} -// if arr.count == 2 { -// //2. -// let clsNameString = arr[0] -// guard let cls : AnyObject.Type = NSClassFromString(clsNameString) else {return} -// //protobuf -// guard let obj = try? cls.parse(from: data) else {return} -// //HuiCao -// let jsonString = obj._JSONString(withIgnoreFields: nil) -// //pretty print -// if let prettyJsonString = jsonString?.jsonStringToPrettyJsonString() { -// self.content = prettyJsonString -// } else { -// self.content = jsonString -// } -// -// self.content = self.content?.replacingOccurrences(of: "\\/", with: "/") -// return -// } -// } -// } -// } - - - -// else if title == "RESPONSE" { -// self.responseData = httpModel?.responseData -// -// guard let content = content, let url = url, let data = self.responseData, let keys = CocoaDebugSettings.shared.protobufTransferMap?.keys else {return} -// if !content.contains("GPBMessage") {return} -// self.title = "RESPONSE (Protobuf)" -// -// for key in keys { -// if url.contains(key) { -// //1. -// guard let arr : Array = CocoaDebugSettings.shared.protobufTransferMap?[key] else {return} -// if arr.count == 2 { -// //2. -// let clsNameString = arr[1] -// guard let cls : AnyObject.Type = NSClassFromString(clsNameString) else {return} -// //protobuf -// guard let obj = try? cls.parse(from: data) else {return} -// //HuiCao -// let jsonString = obj._JSONString(withIgnoreFields: nil) -// //pretty print -// if let prettyJsonString = jsonString?.jsonStringToPrettyJsonString() { -// self.content = prettyJsonString -// } else { -// self.content = jsonString -// } -// -// self.content = self.content?.replacingOccurrences(of: "\\/", with: "/") -// return -// } -// } -// } -// } - } -} diff --git a/Pods/CocoaDebug/Sources/Network/NetworkDetailViewController.swift b/Pods/CocoaDebug/Sources/Network/NetworkDetailViewController.swift deleted file mode 100644 index 1fb4579..0000000 --- a/Pods/CocoaDebug/Sources/Network/NetworkDetailViewController.swift +++ /dev/null @@ -1,523 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import Foundation -import UIKit -import MessageUI - -class NetworkDetailViewController: UITableViewController, MFMailComposeViewControllerDelegate { - - @IBOutlet weak var closeItem: UIBarButtonItem! - @IBOutlet weak var naviItem: UINavigationItem! - - var naviItemTitleLabel: UILabel? - - var httpModel: _HttpModel? - var httpModels: [_HttpModel]? - - var detailModels: [NetworkDetailModel] = [NetworkDetailModel]() - - var requestDictionary: [String: Any]? = Dictionary() - - var headerCell: NetworkCell? - - var messageBody: String = "" - - var justCancelCallback:(() -> Void)? - - static func instanceFromStoryBoard() -> NetworkDetailViewController { - let storyboard = UIStoryboard(name: "Network", bundle: Bundle(for: CocoaDebug.self)) - return storyboard.instantiateViewController(withIdentifier: "NetworkDetailViewController") as! NetworkDetailViewController - } - - - //MARK: - tool - func setupModels() - { - guard let requestSerializer = httpModel?.requestSerializer else {return} - var requestContent: String? = nil - - //otherwise it will crash when it is nil - if httpModel?.requestData == nil { - httpModel?.requestData = Data.init() - } - if httpModel?.responseData == nil { - httpModel?.responseData = Data.init() - } - - //detect the request parameter format (JSON/Form) - if requestSerializer == RequestSerializer.JSON { - //JSON - requestContent = httpModel?.requestData.dataToPrettyPrintString() - } - else if requestSerializer == RequestSerializer.form { - if let data = httpModel?.requestData { - //1.protobuf -// if let message = try? GPBMessage.parse(from: data) { -// if message.serializedSize() > 0 { -// requestContent = message.description -// } else { - //2.Form - requestContent = data.dataToString() -// } -// } - if requestContent == nil || requestContent == "" || requestContent == "\u{8}\u{1e}" { - //3.utf-8 string - requestContent = String(data: data, encoding: .utf8) - } - if requestContent == "" || requestContent == "\u{8}\u{1e}" { - requestContent = nil - } - } - } - - if httpModel?.isImage == true { - //image: - //1. - let model_1 = NetworkDetailModel.init(title: "URL", content: "https://github.com/CocoaDebug/CocoaDebug", url: httpModel?.url.absoluteString, httpModel: httpModel) - let model_3 = NetworkDetailModel.init(title: "REQUEST", content: requestContent, url: httpModel?.url.absoluteString, httpModel: httpModel) - var model_5 = NetworkDetailModel.init(title: "RESPONSE", content: nil, url: httpModel?.url.absoluteString, httpModel: httpModel) - let model_6 = NetworkDetailModel.init(title: "ERROR", content: httpModel?.errorLocalizedDescription, url: httpModel?.url.absoluteString, httpModel: httpModel) - let model_7 = NetworkDetailModel.init(title: "ERROR DESCRIPTION", content: httpModel?.errorDescription, url: httpModel?.url.absoluteString, httpModel: httpModel) - if let responseData = httpModel?.responseData { - model_5 = NetworkDetailModel.init(title: "RESPONSE", content: nil, url: httpModel?.url.absoluteString, image: UIImage.init(gifData: responseData), httpModel: httpModel) - } - //2. - let model_8 = NetworkDetailModel.init(title: "TOTAL TIME", content: httpModel?.totalDuration, url: httpModel?.url.absoluteString, httpModel: httpModel) - let model_9 = NetworkDetailModel.init(title: "MIME TYPE", content: httpModel?.mineType, url: httpModel?.url.absoluteString, httpModel: httpModel) - var model_2 = NetworkDetailModel.init(title: "REQUEST HEADER", content: nil, url: httpModel?.url.absoluteString, httpModel: httpModel) - if let requestHeaderFields = httpModel?.requestHeaderFields { - if !requestHeaderFields.isEmpty { - model_2 = NetworkDetailModel.init(title: "REQUEST HEADER", content: requestHeaderFields.description, url: httpModel?.url.absoluteString, httpModel: httpModel) - model_2.requestHeaderFields = requestHeaderFields - model_2.content = String(requestHeaderFields.dictionaryToString()?.dropFirst().dropLast().dropFirst().dropLast().dropFirst().dropFirst() ?? "").replacingOccurrences(of: "\",\n \"", with: "\",\n\"").replacingOccurrences(of: "\\/", with: "/") - } - } - var model_4 = NetworkDetailModel.init(title: "RESPONSE HEADER", content: nil, url: httpModel?.url.absoluteString, httpModel: httpModel) - if let responseHeaderFields = httpModel?.responseHeaderFields { - if !responseHeaderFields.isEmpty { - model_4 = NetworkDetailModel.init(title: "RESPONSE HEADER", content: responseHeaderFields.description, url: httpModel?.url.absoluteString, httpModel: httpModel) - model_4.responseHeaderFields = responseHeaderFields - model_4.content = String(responseHeaderFields.dictionaryToString()?.dropFirst().dropLast().dropFirst().dropLast().dropFirst().dropFirst() ?? "").replacingOccurrences(of: "\",\n \"", with: "\",\n\"").replacingOccurrences(of: "\\/", with: "/") - } - } - let model_0 = NetworkDetailModel.init(title: "RESPONSE SIZE", content: httpModel?.size, url: httpModel?.url.absoluteString, httpModel: httpModel) - //3. - detailModels.append(model_1) - detailModels.append(model_2) - detailModels.append(model_3) - detailModels.append(model_4) - detailModels.append(model_5) - detailModels.append(model_6) - detailModels.append(model_7) - detailModels.append(model_0) - detailModels.append(model_8) - detailModels.append(model_9) - } - else { - //not image: - //1. - let model_1 = NetworkDetailModel.init(title: "URL", content: "https://github.com/CocoaDebug/CocoaDebug", url: httpModel?.url.absoluteString, httpModel: httpModel) - let model_3 = NetworkDetailModel.init(title: "REQUEST", content: requestContent, url: httpModel?.url.absoluteString, httpModel: httpModel) - let model_5 = NetworkDetailModel.init(title: "RESPONSE", content: httpModel?.responseData.dataToPrettyPrintString(), url: httpModel?.url.absoluteString, httpModel: httpModel) - let model_6 = NetworkDetailModel.init(title: "ERROR", content: httpModel?.errorLocalizedDescription, url: httpModel?.url.absoluteString, httpModel: httpModel) - let model_7 = NetworkDetailModel.init(title: "ERROR DESCRIPTION", content: httpModel?.errorDescription, url: httpModel?.url.absoluteString, httpModel: httpModel) - //2. - let model_8 = NetworkDetailModel.init(title: "TOTAL TIME", content: httpModel?.totalDuration, url: httpModel?.url.absoluteString, httpModel: httpModel) - let model_9 = NetworkDetailModel.init(title: "MIME TYPE", content: httpModel?.mineType, url: httpModel?.url.absoluteString, httpModel: httpModel) - var model_2 = NetworkDetailModel.init(title: "REQUEST HEADER", content: nil, url: httpModel?.url.absoluteString, httpModel: httpModel) - if let requestHeaderFields = httpModel?.requestHeaderFields { - if !requestHeaderFields.isEmpty { - model_2 = NetworkDetailModel.init(title: "REQUEST HEADER", content: requestHeaderFields.description, url: httpModel?.url.absoluteString, httpModel: httpModel) - model_2.requestHeaderFields = requestHeaderFields - model_2.content = String(requestHeaderFields.dictionaryToString()?.dropFirst().dropLast().dropFirst().dropLast().dropFirst().dropFirst() ?? "").replacingOccurrences(of: "\",\n \"", with: "\",\n\"").replacingOccurrences(of: "\\/", with: "/") - } - } - var model_4 = NetworkDetailModel.init(title: "RESPONSE HEADER", content: nil, url: httpModel?.url.absoluteString, httpModel: httpModel) - if let responseHeaderFields = httpModel?.responseHeaderFields { - if !responseHeaderFields.isEmpty { - model_4 = NetworkDetailModel.init(title: "RESPONSE HEADER", content: responseHeaderFields.description, url: httpModel?.url.absoluteString, httpModel: httpModel) - model_4.responseHeaderFields = responseHeaderFields - model_4.content = String(responseHeaderFields.dictionaryToString()?.dropFirst().dropLast().dropFirst().dropLast().dropFirst().dropFirst() ?? "").replacingOccurrences(of: "\",\n \"", with: "\",\n\"").replacingOccurrences(of: "\\/", with: "/") - } - } - let model_0 = NetworkDetailModel.init(title: "RESPONSE SIZE", content: httpModel?.size, url: httpModel?.url.absoluteString, httpModel: httpModel) - //3. - detailModels.append(model_1) - detailModels.append(model_2) - detailModels.append(model_3) - detailModels.append(model_4) - detailModels.append(model_5) - detailModels.append(model_6) - detailModels.append(model_7) - detailModels.append(model_0) - detailModels.append(model_8) - detailModels.append(model_9) - } - } - - //detetc request format (JSON/Form) - func detectRequestSerializer() { - guard let requestData = httpModel?.requestData else { - httpModel?.requestSerializer = RequestSerializer.JSON//default JSON format - return - } - - if let _ = requestData.dataToDictionary() { - //JSON format - httpModel?.requestSerializer = RequestSerializer.JSON - } else { - //Form format - httpModel?.requestSerializer = RequestSerializer.form - } - } - - - //email configure - func configureMailComposer(_ copy: Bool = false) -> MFMailComposeViewController? { - - //1.image - var img: UIImage? = nil - var isImage: Bool = false - if let httpModel = httpModel { - isImage = httpModel.isImage - } - - //2.body message ------------------ start ------------------ - var string: String = "" - messageBody = "" - - for model in detailModels { - if let title = model.title, let content = model.content { - if content != "" { - string = "\n\n" + "------- " + title + " -------" + "\n" + content - } - } - if !messageBody.contains(string) { - messageBody.append(string) - } - //image - if isImage == true { - if let image = model.image { - img = image - } - } - } - - //2.1.url - var url: String = "" - if let httpModel = httpModel { - url = httpModel.url.absoluteString - } - - //2.2.method - var method: String = "" - if let httpModel = httpModel { - method = "[" + httpModel.method + "]" - } - - //2.3.time - var time: String = "" - if let httpModel = httpModel { - if let startTime = httpModel.startTime { - if (startTime as NSString).doubleValue == 0 { - time = _OCLoggerFormat.formatDate(Date()) - } else { - time = _OCLoggerFormat.formatDate(NSDate(timeIntervalSince1970: (startTime as NSString).doubleValue) as Date) - } - } - } - - //2.4.statusCode - var statusCode: String = "" - if let httpModel = httpModel { - statusCode = httpModel.statusCode - if statusCode == "0" { //"0" means network unavailable - statusCode = "❌" - } - } - - //body message ------------------ end ------------------ - var subString = method + " " + time + " " + "(" + statusCode + ")" - if subString.contains("❌") { - subString = subString.replacingOccurrences(of: "(", with: "").replacingOccurrences(of: ")", with: "") - } - - messageBody = messageBody.replacingOccurrences(of: "https://github.com/CocoaDebug/CocoaDebug", with: url) - messageBody = subString + messageBody - - ////////////////////////////////////////////////////////////////////////////////// - - if !MFMailComposeViewController.canSendMail() { - if copy == false { - //share via email - let alert = UIAlertController.init(title: "No Mail Accounts", message: "Please set up a Mail account in order to send email.", preferredStyle: .alert) - let action = UIAlertAction.init(title: "OK", style: .cancel) { _ in - } - alert.addAction(action) - - alert.popoverPresentationController?.permittedArrowDirections = .init(rawValue: 0) - alert.popoverPresentationController?.sourceView = self.view - alert.popoverPresentationController?.sourceRect = CGRect(x: self.view.bounds.midX, y: self.view.bounds.midY, width: 0, height: 0) - - self.present(alert, animated: true, completion: nil) - } else { - //copy to clipboard - } - - return nil - } - - if copy == true { - //copy to clipboard - return nil - } - - //3.email recipients - let mailComposeVC = MFMailComposeViewController() - mailComposeVC.mailComposeDelegate = self - mailComposeVC.setToRecipients(CocoaDebugSettings.shared.emailToRecipients) - mailComposeVC.setCcRecipients(CocoaDebugSettings.shared.emailCcRecipients) - - //4.image - if let img = img { - if let imageData = img.pngData() { - mailComposeVC.addAttachmentData(imageData, mimeType: "image/png", fileName: "image") - } - } - - //5.body - mailComposeVC.setMessageBody(messageBody, isHTML: false) - - //6.subject - mailComposeVC.setSubject(url) - - return mailComposeVC - } - - - //MARK: - init - override func viewDidLoad() { - super.viewDidLoad() - - naviItemTitleLabel = UILabel.init(frame: CGRect(x: 0, y: 0, width: 80, height: 40)) - naviItemTitleLabel?.textAlignment = .center - naviItemTitleLabel?.textColor = Color.mainGreen - naviItemTitleLabel?.font = .boldSystemFont(ofSize: 20) - naviItemTitleLabel?.text = "Details" - naviItem.titleView = naviItemTitleLabel - - closeItem.tintColor = Color.mainGreen - - //detect the request format (JSON/Form) - detectRequestSerializer() - - setupModels() - - if var lastModel = detailModels.last { - lastModel.isLast = true - detailModels.removeLast() - detailModels.append(lastModel) - } - - //Use a separate xib-cell file, must be registered, otherwise it will crash - let bundle = Bundle(for: type(of: self)) - let nib = UINib(nibName: "NetworkCell", bundle: bundle) - tableView.register(nib, forCellReuseIdentifier: "NetworkCell") - - //header - headerCell = bundle.loadNibNamed(String(describing: NetworkCell.self), owner: nil, options: nil)?.first as? NetworkCell - headerCell?.httpModel = httpModel - } - - override func viewWillDisappear(_ animated: Bool) { - super.viewWillDisappear(animated) - - if let index = httpModels?.firstIndex(where: { (model) -> Bool in - return model.isSelected == true - }) { - httpModels?[index].isSelected = false - } - - httpModel?.isSelected = true - - if let justCancelCallback = justCancelCallback { - justCancelCallback() - } - } - - //MARK: - target action - @IBAction func close(_ sender: UIBarButtonItem) { - (self.navigationController as! CocoaDebugNavigationController).exit() - } - - @IBAction func didTapMail(_ sender: UIBarButtonItem) { - - // create an actionSheet - let alert: UIAlertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) - - // create an action - let firstAction: UIAlertAction = UIAlertAction(title: "share via email", style: .default) { [weak self] action -> Void in - if let mailComposeViewController = self?.configureMailComposer() { - self?.present(mailComposeViewController, animated: true, completion: nil) - } - } - - let secondAction: UIAlertAction = UIAlertAction(title: "copy to clipboard", style: .default) { [weak self] action -> Void in - _ = self?.configureMailComposer(true) - UIPasteboard.general.string = self?.messageBody - } - - let moreAction: UIAlertAction = UIAlertAction(title: "more", style: .default) { [weak self] action -> Void in - _ = self?.configureMailComposer(true) - let items: [Any] = [self?.messageBody ?? ""] - let action = UIActivityViewController(activityItems: items, applicationActivities: nil) - if UI_USER_INTERFACE_IDIOM() == .phone { - self?.present(action, animated: true, completion: nil) - } else { - action.popoverPresentationController?.sourceRect = .init(x: self?.view.bounds.midX ?? 0, y: self?.view.bounds.midY ?? 0, width: 0, height: 0) - action.popoverPresentationController?.sourceView = self?.view - self?.present(action, animated: true, completion: nil) - } - - } - - let cancelAction: UIAlertAction = UIAlertAction(title: "Cancel", style: .cancel) { action -> Void in - } - - // add actions - alert.addAction(secondAction) - alert.addAction(firstAction) - alert.addAction(moreAction) - alert.addAction(cancelAction) - - alert.popoverPresentationController?.permittedArrowDirections = .init(rawValue: 0) - alert.popoverPresentationController?.sourceView = self.view - alert.popoverPresentationController?.sourceRect = CGRect(x: self.view.bounds.midX, y: self.view.bounds.midY, width: 0, height: 0) - - // present an actionSheet... - present(alert, animated: true, completion: nil) - } -} - -//MARK: - UITableViewDataSource -extension NetworkDetailViewController { - - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return detailModels.count - } - - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: "NetworkDetailCell", for: indexPath) - as! NetworkDetailCell - cell.detailModel = detailModels[indexPath.row] - - //2.click edit view - cell.tapEditViewCallback = { [weak self] detailModel in - let vc = JsonViewController.instanceFromStoryBoard() - vc.detailModel = detailModel - self?.navigationController?.pushViewController(vc, animated: true) - } - - return cell - } -} - -//MARK: - UITableViewDelegate -extension NetworkDetailViewController { - - override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - - let detailModel = detailModels[indexPath.row] - - if detailModel.blankContent == "..." { - if detailModel.isLast == true { - return 50.5 - } - return 50 - } - - if indexPath.row == 0 { - return 0 - } - - if detailModel.image == nil { - if let content = detailModel.content { - if content == "" { - return 0 - } - //Calculate NSString height - let height = content.height(with: UIFont.systemFont(ofSize: 13), constraintToWidth: (UIScreen.main.bounds.size.width - 30)) - return height + 70 - } - return 0 - } - - return UIScreen.main.bounds.size.width + 50 - } - - - override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { - return headerCell?.contentView - } - - - override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { - guard let serverURL = CocoaDebugSettings.shared.serverURL else {return 0} - - var height: CGFloat = 0.0 - - if let cString = httpModel?.url.absoluteString.cString(using: String.Encoding.utf8) { - if let content_ = NSString(cString: cString, encoding: String.Encoding.utf8.rawValue) { - - if httpModel?.url.absoluteString.contains(serverURL) == true { - //Calculate NSString height - if #available(iOS 8.2, *) { - height = content_.height(with: UIFont.systemFont(ofSize: 13, weight: .heavy), constraintToWidth: (UIScreen.main.bounds.size.width - 92)) - } else { - // Fallback on earlier versions - height = content_.height(with: UIFont.boldSystemFont(ofSize: 13), constraintToWidth: (UIScreen.main.bounds.size.width - 92)) - } - } else { - //Calculate NSString height - if #available(iOS 8.2, *) { - height = content_.height(with: UIFont.systemFont(ofSize: 13, weight: .regular), constraintToWidth: (UIScreen.main.bounds.size.width - 92)) - } else { - // Fallback on earlier versions - height = content_.height(with: UIFont.systemFont(ofSize: 13), constraintToWidth: (UIScreen.main.bounds.size.width - 92)) - } - } - return height + 57 - } - } - - return 0 - } -} - -//MARK: - MFMailComposeViewControllerDelegate -extension NetworkDetailViewController { - - func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) { - - controller.dismiss(animated: true) { - if error != nil { - let alert = UIAlertController.init(title: error?.localizedDescription, message: nil, preferredStyle: .alert) - let action = UIAlertAction.init(title: "OK", style: .cancel, handler: { _ in - }) - alert.addAction(action) - - alert.popoverPresentationController?.permittedArrowDirections = .init(rawValue: 0) - alert.popoverPresentationController?.sourceView = self.view - alert.popoverPresentationController?.sourceRect = CGRect(x: self.view.bounds.midX, y: self.view.bounds.midY, width: 0, height: 0) - - self.present(alert, animated: true, completion: nil) - } - } - } -} diff --git a/Pods/CocoaDebug/Sources/Network/NetworkViewController.swift b/Pods/CocoaDebug/Sources/Network/NetworkViewController.swift deleted file mode 100644 index 0091289..0000000 --- a/Pods/CocoaDebug/Sources/Network/NetworkViewController.swift +++ /dev/null @@ -1,298 +0,0 @@ -// -// CocoaDebug -// liman -// -// Created by liman 02/02/2023. -// Copyright © 2023 liman. All rights reserved. -// - -import UIKit - -class NetworkViewController: UIViewController { - - var reachEnd: Bool = true - var firstIn: Bool = true - var reloadDataFinish: Bool = true - - var models: Array<_HttpModel>? - var cacheModels: Array<_HttpModel>? - var searchModels: Array<_HttpModel>? - - var naviItemTitleLabel: UILabel? - - @IBOutlet weak var tableView: UITableView! - @IBOutlet weak var searchBar: UISearchBar! - @IBOutlet weak var deleteItem: UIBarButtonItem! - @IBOutlet weak var naviItem: UINavigationItem! - - //MARK: - tool - //搜索逻辑 - func searchLogic(_ searchText: String = "") { - guard let cacheModels = cacheModels else {return} - searchModels = cacheModels - - if searchText == "" { - models = cacheModels - } else { - guard let searchModels = searchModels else {return} - - for _ in searchModels { - if let index = self.searchModels?.firstIndex(where: { (model) -> Bool in - return !model.url.absoluteString.lowercased().contains(searchText.lowercased())//忽略大小写 - }) { - self.searchModels?.remove(at: index) - } - } - models = self.searchModels - } - } - - //MARK: - private - func reloadHttp(needScrollToEnd: Bool = false) { - - if reloadDataFinish == false {return} - - if searchBar.isHidden != false { - searchBar.isHidden = false - } - - self.models = (_HttpDatasource.shared().httpModels as NSArray as? [_HttpModel]) - self.cacheModels = self.models - - self.searchLogic(CocoaDebugSettings.shared.networkSearchWord ?? "") - - // dispatch_main_async_safe { [weak self] in - self.reloadDataFinish = false - self.tableView.reloadData { - self.reloadDataFinish = true - } - - if needScrollToEnd == false {return} - - //table下滑到底部 - if let count = self.models?.count { - if count > 0 { - // guard let firstIn = self.firstIn else {return} - self.tableView.tableViewScrollToBottom(animated: !firstIn) - self.firstIn = false - } - } - // } - } - - //MARK: - init - override func viewDidLoad() { - super.viewDidLoad() - - let tap = UITapGestureRecognizer.init(target: self, action: #selector(didTapView)) - tap.cancelsTouchesInView = false - view.addGestureRecognizer(tap) - - naviItemTitleLabel = UILabel.init(frame: CGRect(x: 0, y: 0, width: 80, height: 40)) - naviItemTitleLabel?.textAlignment = .center - naviItemTitleLabel?.textColor = Color.mainGreen - naviItemTitleLabel?.font = .boldSystemFont(ofSize: 20) - naviItem.titleView = naviItemTitleLabel - - naviItemTitleLabel?.text = "🚀[0]" - deleteItem.tintColor = Color.mainGreen - - //notification - NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "reloadHttp_CocoaDebug"), object: nil, queue: OperationQueue.main) { [weak self] _ in - self?.reloadHttp(needScrollToEnd: self?.reachEnd ?? true) - } - - - tableView.tableFooterView = UIView() - tableView.dataSource = self - tableView.delegate = self - - //抖动bug - tableView.estimatedRowHeight = 0 - tableView.estimatedSectionHeaderHeight = 0 - tableView.estimatedSectionFooterHeight = 0 - - searchBar.delegate = self - searchBar.text = CocoaDebugSettings.shared.networkSearchWord - searchBar.isHidden = true - - //hide searchBar icon - let textFieldInsideSearchBar = searchBar.value(forKey: "searchField") as! UITextField - textFieldInsideSearchBar.leftViewMode = .never - textFieldInsideSearchBar.leftView = nil - textFieldInsideSearchBar.backgroundColor = .white - textFieldInsideSearchBar.returnKeyType = .default - - reloadHttp(needScrollToEnd: true) - - if models?.count ?? 0 > CocoaDebugSettings.shared.networkLastIndex && CocoaDebugSettings.shared.networkLastIndex > 0 { - tableView.tableViewScrollToIndex(index: CocoaDebugSettings.shared.networkLastIndex, animated: false) - } - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - } - - override func viewWillDisappear(_ animated: Bool) { - super.viewWillDisappear(animated) - searchBar.resignFirstResponder() - } - - deinit { - //notification - NotificationCenter.default.removeObserver(self) - } - - //MARK: - target action - @IBAction func didTapDown(_ sender: Any) { - tableView.tableViewScrollToBottom(animated: true) - searchBar.resignFirstResponder() - reachEnd = true - CocoaDebugSettings.shared.networkLastIndex = 0 - } - - @IBAction func didTapUp(_ sender: Any) { - tableView.tableViewScrollToHeader(animated: true) - searchBar.resignFirstResponder() - reachEnd = false - CocoaDebugSettings.shared.networkLastIndex = 0 - } - - - @IBAction func tapTrashButton(_ sender: UIBarButtonItem) { - _HttpDatasource.shared().reset() - models = [] - cacheModels = [] - // searchBar.text = nil - searchBar.resignFirstResponder() - // CocoaDebugSettings.shared.networkSearchWord = nil - CocoaDebugSettings.shared.networkLastIndex = 0 - - // dispatch_main_async_safe { [weak self] in - self.tableView.reloadData() - self.naviItemTitleLabel?.text = "🚀[0]" - // } - - NotificationCenter.default.post(name: NSNotification.Name("deleteAllLogs_CocoaDebug"), object: nil, userInfo: nil) - } - - @objc func didTapView() { - searchBar.resignFirstResponder() - } -} - -//MARK: - UITableViewDataSource -extension NetworkViewController: UITableViewDataSource { - - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - if let count = models?.count { - naviItemTitleLabel?.text = "🚀[" + String(count) + "]" - return count - } - return 0 - } - - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: "NetworkCell", for: indexPath) - as! NetworkCell - - cell.httpModel = models?[indexPath.row] - cell.index = indexPath.row - return cell - } -} - -//MARK: - UITableViewDelegate -extension NetworkViewController: UITableViewDelegate { - - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - - guard let serverURL = CocoaDebugSettings.shared.serverURL else {return 0} - let model = models?[indexPath.row] - var height: CGFloat = 0.0 - - if let cString = model?.url.absoluteString.cString(using: String.Encoding.utf8) { - if let content_ = NSString(cString: cString, encoding: String.Encoding.utf8.rawValue) { - - if model?.url.absoluteString.contains(serverURL) == true { - //计算NSString高度 - if #available(iOS 8.2, *) { - height = content_.height(with: UIFont.systemFont(ofSize: 13, weight: .heavy), constraintToWidth: (UIScreen.main.bounds.size.width - 92)) - } else { - // Fallback on earlier versions - height = content_.height(with: UIFont.boldSystemFont(ofSize: 13), constraintToWidth: (UIScreen.main.bounds.size.width - 92)) - } - } else { - //计算NSString高度 - if #available(iOS 8.2, *) { - height = content_.height(with: UIFont.systemFont(ofSize: 13, weight: .regular), constraintToWidth: (UIScreen.main.bounds.size.width - 92)) - } else { - // Fallback on earlier versions - height = content_.height(with: UIFont.systemFont(ofSize: 13), constraintToWidth: (UIScreen.main.bounds.size.width - 92)) - } - } - - return height + 57 - } - } - - return 0 - } - - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) - { - tableView.deselectRow(at: indexPath, animated: true) - searchBar.resignFirstResponder() - reachEnd = false - - guard let models = models else {return} - - let vc: NetworkDetailViewController = NetworkDetailViewController.instanceFromStoryBoard() - vc.httpModels = models - vc.httpModel = models[indexPath.row] - self.navigationController?.pushViewController(vc, animated: true) - - vc.justCancelCallback = { [weak self] in - self?.tableView.reloadData() - } - - CocoaDebugSettings.shared.networkLastIndex = indexPath.row - } -} - -//MARK: - UIScrollViewDelegate -extension NetworkViewController: UIScrollViewDelegate { - - func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { - searchBar.resignFirstResponder() - reachEnd = false - } - - func scrollViewDidScroll(_ scrollView: UIScrollView) { - if (scrollView.contentOffset.y + 1) >= (scrollView.contentSize.height - scrollView.frame.size.height) { - //bottom reached - reachEnd = true - } - } -} - -//MARK: - UISearchBarDelegate -extension NetworkViewController: UISearchBarDelegate { - - func searchBarSearchButtonClicked(_ searchBar: UISearchBar) - { - searchBar.resignFirstResponder() - } - - func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) - { - CocoaDebugSettings.shared.networkSearchWord = searchText - searchLogic(searchText) - - // dispatch_main_async_safe { [weak self] in - self.tableView.reloadData() - // } - } -} - diff --git a/Pods/CocoaDebug/Sources/Network/_HttpDatasource.h b/Pods/CocoaDebug/Sources/Network/_HttpDatasource.h deleted file mode 100755 index 2b29af7..0000000 --- a/Pods/CocoaDebug/Sources/Network/_HttpDatasource.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import "_HttpModel.h" - -@interface _HttpDatasource : NSObject - -@property (nonatomic, strong) NSMutableArray<_HttpModel *> *httpModels; - -+ (instancetype)shared; - -///记录 -- (BOOL)addHttpRequset:(_HttpModel*)model; - -///清空 -- (void)reset; - -///删除 -- (void)remove:(_HttpModel *)model; - -@end diff --git a/Pods/CocoaDebug/Sources/Network/_HttpDatasource.m b/Pods/CocoaDebug/Sources/Network/_HttpDatasource.m deleted file mode 100755 index 86dd8d3..0000000 --- a/Pods/CocoaDebug/Sources/Network/_HttpDatasource.m +++ /dev/null @@ -1,86 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_HttpDatasource.h" -#import "_NetworkHelper.h" - -@implementation _HttpDatasource - -+ (instancetype)shared -{ - static id sharedInstance = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedInstance = [[self alloc] init]; - }); - - return sharedInstance; -} - -- (id)init -{ - self = [super init]; - if (self) { - self.httpModels = [NSMutableArray arrayWithCapacity:1000 + 100]; - } - return self; -} - -- (BOOL)addHttpRequset:(_HttpModel*)model -{ - if ([model.url.absoluteString isEqualToString:@""]) { - return NO; - } - - - //url Filter, ignore case - for (NSString *urlString in [[_NetworkHelper shared] ignoredURLs]) { - if ([[model.url.absoluteString lowercaseString] containsString:[urlString lowercaseString]]) { - return NO; - } - } - - //Maximum number limit - if (self.httpModels.count >= 1000) { - if ([self.httpModels count] > 0) { - [self.httpModels removeObjectAtIndex:0]; - } - } - - //detect repeated - __block BOOL isExist = NO; - [self.httpModels enumerateObjectsUsingBlock:^(_HttpModel *obj, NSUInteger index, BOOL *stop) { - if ([obj.requestId isEqualToString:model.requestId]) { - isExist = YES; - } - }]; - if (!isExist) { - [self.httpModels addObject:model]; - } else { - return NO; - } - - return YES; -} - -- (void)reset -{ - [self.httpModels removeAllObjects]; -} - -- (void)remove:(_HttpModel *)model -{ - [self.httpModels enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(_HttpModel *obj, NSUInteger index, BOOL *stop) { - if ([obj.requestId isEqualToString:model.requestId]) { - [self.httpModels removeObjectAtIndex:index]; - } - }]; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Network/_HttpModel.h b/Pods/CocoaDebug/Sources/Network/_HttpModel.h deleted file mode 100644 index 07d4671..0000000 --- a/Pods/CocoaDebug/Sources/Network/_HttpModel.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import - -typedef NS_ENUM(NSUInteger, RequestSerializer) { - RequestSerializerJSON = 0, //JSON format - RequestSerializerForm //Form format -}; - -@interface _HttpModel : NSObject - -@property (nonatomic,strong)NSURL *url; -@property (nonatomic,copy)NSData *requestData; -@property (nonatomic,copy)NSData *responseData; -@property (nonatomic,copy)NSString *requestId; -@property (nonatomic,copy)NSString *method; -@property (nonatomic,copy)NSString *statusCode; -@property (nonatomic,copy)NSString *mineType; -@property (nonatomic,copy)NSString *startTime; -@property (nonatomic,copy)NSString *endTime; -@property (nonatomic,copy)NSString *totalDuration; -@property (nonatomic,assign)BOOL isImage; - - -@property (nonatomic,copy)NSDictionary *requestHeaderFields; -@property (nonatomic,copy)NSDictionary *responseHeaderFields; -@property (nonatomic,assign)BOOL isTag; -@property (nonatomic,assign)BOOL isSelected; -@property (nonatomic,assign)RequestSerializer requestSerializer;//default JSON format -@property (nonatomic,copy)NSString *errorDescription; -@property (nonatomic,copy)NSString *errorLocalizedDescription; -@property (nonatomic,copy)NSString *size; - -@end diff --git a/Pods/CocoaDebug/Sources/Network/_HttpModel.m b/Pods/CocoaDebug/Sources/Network/_HttpModel.m deleted file mode 100644 index 6766abe..0000000 --- a/Pods/CocoaDebug/Sources/Network/_HttpModel.m +++ /dev/null @@ -1,25 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_HttpModel.h" - -@implementation _HttpModel - -//default value for @property -- (id)init { - if (self = [super init]) { - self.statusCode = @"0"; - self.url = [[NSURL alloc] initWithString:@""]; - } - return self; -} - -@end - - - diff --git a/Pods/CocoaDebug/Sources/Network/_NetworkHelper.h b/Pods/CocoaDebug/Sources/Network/_NetworkHelper.h deleted file mode 100755 index 19d9298..0000000 --- a/Pods/CocoaDebug/Sources/Network/_NetworkHelper.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import - -@interface _NetworkHelper : NSObject - -//color for objc -@property (nonatomic, strong) UIColor *mainColor; - -//Set domain names not to be crawled, ignore case, and crawl all by default -@property (nonatomic, copy) NSArray *ignoredURLs; - -//Set only the domain name to be crawled, ignore case, and crawl all by default -@property (nonatomic, copy) NSArray *onlyURLs; - -//Set the log prefix not to be crawled, ignore case, and crawl all by default -@property (nonatomic, copy) NSArray *ignoredPrefixLogs; - -//Set the log prefix to be crawled, ignore case, and crawl all by default -@property (nonatomic, copy) NSArray *onlyPrefixLogs; - -//protobuf -@property (nonatomic, copy) NSDictionary *> *protobufTransferMap; - -// -@property (nonatomic, assign) BOOL isNetworkEnable; - -// -- (void)enable; -- (void)disable; - -+ (instancetype)shared; - -@end diff --git a/Pods/CocoaDebug/Sources/Network/_NetworkHelper.m b/Pods/CocoaDebug/Sources/Network/_NetworkHelper.m deleted file mode 100755 index ffeaea0..0000000 --- a/Pods/CocoaDebug/Sources/Network/_NetworkHelper.m +++ /dev/null @@ -1,56 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_NetworkHelper.h" -#import "_CustomHTTPProtocol.h" -#import "NSObject+CocoaDebug.h" - -@interface _NetworkHelper() - -@end - -@implementation _NetworkHelper - -+ (instancetype)shared -{ - static id sharedInstance = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedInstance = [[self alloc] init]; - }); - - return sharedInstance; -} - -//default value for @property -- (id)init { - if (self = [super init]) { - self.mainColor = [UIColor colorFromHexString:@"#42d459"]; - self.isNetworkEnable = YES; - } - return self; -} - -- (void)enable { - if (self.isNetworkEnable) { - return; - } - self.isNetworkEnable = YES; - [_CustomHTTPProtocol start]; -} - -- (void)disable { - if (!self.isNetworkEnable) { - return; - } - self.isNetworkEnable = NO; - [_CustomHTTPProtocol stop]; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Resources/App.storyboard b/Pods/CocoaDebug/Sources/Resources/App.storyboard deleted file mode 100644 index cc474bf..0000000 --- a/Pods/CocoaDebug/Sources/Resources/App.storyboard +++ /dev/null @@ -1,987 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z.png deleted file mode 100644 index 34e307b..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z@2x.png deleted file mode 100644 index 8e95c91..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z@3x.png deleted file mode 100644 index c82b81c..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac.png deleted file mode 100644 index 8a4078d..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac@2x.png deleted file mode 100644 index 5c3cba2..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac@3x.png deleted file mode 100644 index 74e51c3..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk.png deleted file mode 100644 index 0cd2102..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk@2x.png deleted file mode 100644 index 5011076..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk@3x.png deleted file mode 100644 index 54f7857..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi.png deleted file mode 100644 index 2129398..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi@2x.png deleted file mode 100644 index 91886ab..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi@3x.png deleted file mode 100644 index d3d4a3a..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin.png deleted file mode 100644 index a331fbd..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin@2x.png deleted file mode 100644 index bddf55a..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin@3x.png deleted file mode 100644 index f788604..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp.png deleted file mode 100644 index ffdc86b..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp@2x.png deleted file mode 100644 index 1cfbf49..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp@3x.png deleted file mode 100644 index 7ecd19e..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_css.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_css.png deleted file mode 100644 index 5ea07a2..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_css.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_css@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_css@2x.png deleted file mode 100644 index fe2a0ac..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_css@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_css@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_css@3x.png deleted file mode 100644 index b6d0ac4..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_css@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat.png deleted file mode 100644 index 606cf44..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat@2x.png deleted file mode 100644 index bcbf653..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat@3x.png deleted file mode 100644 index 4b11582..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_db.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_db.png deleted file mode 100644 index 869baea..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_db.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_db@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_db@2x.png deleted file mode 100644 index b52aeb0..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_db@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_db@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_db@3x.png deleted file mode 100644 index 284474a..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_db@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_default.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_default.png deleted file mode 100644 index cf7623d..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_default.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_default@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_default@2x.png deleted file mode 100644 index 6ab8cd0..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_default@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_default@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_default@3x.png deleted file mode 100644 index 3ce0fc4..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_default@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll.png deleted file mode 100644 index 834ba30..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll@2x.png deleted file mode 100644 index 68c374d..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll@3x.png deleted file mode 100644 index c24bee3..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg.png deleted file mode 100644 index 6118128..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg@2x.png deleted file mode 100644 index c1890f5..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg@3x.png deleted file mode 100644 index b1fb70d..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc.png deleted file mode 100644 index a2b5907..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc@2x.png deleted file mode 100644 index cdd94ce..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc@3x.png deleted file mode 100644 index b1d6f24..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps.png deleted file mode 100644 index 78c1f4b..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps@2x.png deleted file mode 100644 index 471480b..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps@3x.png deleted file mode 100644 index 1dcb48b..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla.png deleted file mode 100644 index ef8a61b..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla@2x.png deleted file mode 100644 index 3b5dd47..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla@3x.png deleted file mode 100644 index 469f0b0..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv.png deleted file mode 100644 index 6507e82..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv@2x.png deleted file mode 100644 index 90849fa..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv@3x.png deleted file mode 100644 index 473cbe3..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty.png deleted file mode 100644 index 2885eab..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty@2x.png deleted file mode 100644 index af6b8a1..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty@3x.png deleted file mode 100644 index bbee889..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty.png deleted file mode 100644 index 89273d0..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty@2x.png deleted file mode 100644 index bfa3a57..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty@3x.png deleted file mode 100644 index 54cc48b..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif.png deleted file mode 100644 index 58602cf..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif@2x.png deleted file mode 100644 index 70cdaca..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif@3x.png deleted file mode 100644 index 3412cbd..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_html.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_html.png deleted file mode 100644 index 5ec10b0..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_html.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_html@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_html@2x.png deleted file mode 100644 index 58133c6..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_html@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_html@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_html@3x.png deleted file mode 100644 index ffa2643..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_html@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa.png deleted file mode 100644 index 6ea9338..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa@2x.png deleted file mode 100644 index cbe3d45..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa@3x.png deleted file mode 100644 index 7cfcdff..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar.png deleted file mode 100644 index 5630501..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar@2x.png deleted file mode 100644 index 69dacbc..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar@3x.png deleted file mode 100644 index 316d6f6..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_java.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_java.png deleted file mode 100644 index 467b424..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_java.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_java@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_java@2x.png deleted file mode 100644 index 6a02dd4..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_java@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_java@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_java@3x.png deleted file mode 100644 index 962d325..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_java@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg.png deleted file mode 100644 index 80f9a4e..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg@2x.png deleted file mode 100644 index 9c96afc..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg@3x.png deleted file mode 100644 index b4c3fd7..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_js.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_js.png deleted file mode 100644 index cbbc56d..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_js.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_js@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_js@2x.png deleted file mode 100644 index d2a1bc6..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_js@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_js@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_js@3x.png deleted file mode 100644 index ce6d5ca..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_js@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_json.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_json.png deleted file mode 100644 index 4ab79a7..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_json.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_json@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_json@2x.png deleted file mode 100644 index 4fd3a10..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_json@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_json@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_json@3x.png deleted file mode 100644 index 98e4d99..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_json@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote.png deleted file mode 100644 index 13ac311..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote@2x.png deleted file mode 100644 index be78bc1..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote@3x.png deleted file mode 100644 index 4957ff8..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_md.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_md.png deleted file mode 100644 index 51d0e1c..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_md.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_md@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_md@2x.png deleted file mode 100644 index 3314572..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_md@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_md@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_md@3x.png deleted file mode 100644 index 1e31e02..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_md@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi.png deleted file mode 100644 index e2badf2..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi@2x.png deleted file mode 100644 index fd98b37..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi@3x.png deleted file mode 100644 index ddcb632..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov.png deleted file mode 100644 index 05491d0..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov@2x.png deleted file mode 100644 index 017a04b..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov@3x.png deleted file mode 100644 index 789dd2c..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3.png deleted file mode 100644 index 8cf2e9b..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3@2x.png deleted file mode 100644 index 0f11998..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3@3x.png deleted file mode 100644 index ceee321..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4.png deleted file mode 100644 index 6cfcd47..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4@2x.png deleted file mode 100644 index 0221be6..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4@3x.png deleted file mode 100644 index dbc7352..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg.png deleted file mode 100644 index 9257249..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg@2x.png deleted file mode 100644 index 9897310..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg@3x.png deleted file mode 100644 index 6bd8df2..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers.png deleted file mode 100644 index 268130a..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers@2x.png deleted file mode 100644 index b35687c..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers@3x.png deleted file mode 100644 index 940e000..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg.png deleted file mode 100644 index ff2a052..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg@2x.png deleted file mode 100644 index efaec66..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg@3x.png deleted file mode 100644 index 7f7532d..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages.png deleted file mode 100644 index 9b9b43f..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages@2x.png deleted file mode 100644 index cfcbce7..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages@3x.png deleted file mode 100644 index 2809da4..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf.png deleted file mode 100644 index e438061..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf@2x.png deleted file mode 100644 index 766dd1a..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf@3x.png deleted file mode 100644 index 51ec549..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_php.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_php.png deleted file mode 100644 index 04d20af..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_php.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_php@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_php@2x.png deleted file mode 100644 index 69ad856..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_php@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_php@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_php@3x.png deleted file mode 100644 index a38eee9..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_php@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist.png deleted file mode 100644 index 13b5ded..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist@2x.png deleted file mode 100644 index 18fe562..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist@3x.png deleted file mode 100644 index 7ea2428..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_png.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_png.png deleted file mode 100644 index df3886c..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_png.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_png@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_png@2x.png deleted file mode 100644 index 3005b0a..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_png@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_png@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_png@3x.png deleted file mode 100644 index 179b40d..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_png@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt.png deleted file mode 100644 index b22af91..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt@2x.png deleted file mode 100644 index 68269f2..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt@3x.png deleted file mode 100644 index 5c4d60c..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd.png deleted file mode 100644 index 6da0763..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd@2x.png deleted file mode 100644 index 461debc..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd@3x.png deleted file mode 100644 index f8e99f6..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql.png deleted file mode 100644 index 1e91ef4..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql@2x.png deleted file mode 100644 index 0196ec8..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql@3x.png deleted file mode 100644 index fca57f6..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg.png deleted file mode 100644 index d0ef765..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg@2x.png deleted file mode 100644 index 2b69c1e..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg@3x.png deleted file mode 100644 index 762feb5..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift.png deleted file mode 100644 index 66546f8..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift@2x.png deleted file mode 100644 index 995f421..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift@3x.png deleted file mode 100644 index e40d7a7..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif.png deleted file mode 100644 index 7bd067c..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif@2x.png deleted file mode 100644 index 58f1b92..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif@3x.png deleted file mode 100644 index 4bce4c6..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent.png deleted file mode 100644 index 88af527..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent@2x.png deleted file mode 100644 index 887864e..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent@3x.png deleted file mode 100644 index 88be174..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf.png deleted file mode 100644 index 7eef026..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf@2x.png deleted file mode 100644 index 2a26d2d..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf@3x.png deleted file mode 100644 index 0f09009..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt.png deleted file mode 100644 index 3120097..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt@2x.png deleted file mode 100644 index 5a9395a..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt@3x.png deleted file mode 100644 index 4dde71e..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav.png deleted file mode 100644 index 0ea2b27..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav@2x.png deleted file mode 100644 index f039c93..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav@3x.png deleted file mode 100644 index 552b284..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv.png deleted file mode 100644 index 973b694..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv@2x.png deleted file mode 100644 index a502a93..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv@3x.png deleted file mode 100644 index 08459c4..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls.png deleted file mode 100644 index f58d8d3..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls@2x.png deleted file mode 100644 index 44ac3d4..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls@3x.png deleted file mode 100644 index d9df17d..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml.png deleted file mode 100644 index 2a55e9e..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml@2x.png deleted file mode 100644 index 4b57d9c..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml@3x.png deleted file mode 100644 index f0687c6..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip.png deleted file mode 100644 index d911fc3..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip@2x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip@2x.png deleted file mode 100644 index b144d2a..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip@3x.png b/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip@3x.png deleted file mode 100644 index 9da7370..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip@3x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/Logs.storyboard b/Pods/CocoaDebug/Sources/Resources/Logs.storyboard deleted file mode 100644 index 1ae0abd..0000000 --- a/Pods/CocoaDebug/Sources/Resources/Logs.storyboard +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Pods/CocoaDebug/Sources/Resources/Manager.storyboard b/Pods/CocoaDebug/Sources/Resources/Manager.storyboard deleted file mode 100644 index f45a73e..0000000 --- a/Pods/CocoaDebug/Sources/Resources/Manager.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Pods/CocoaDebug/Sources/Resources/Network.storyboard b/Pods/CocoaDebug/Sources/Resources/Network.storyboard deleted file mode 100644 index 79cd96c..0000000 --- a/Pods/CocoaDebug/Sources/Resources/Network.storyboard +++ /dev/null @@ -1,414 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Pods/CocoaDebug/Sources/Resources/NetworkCell.xib b/Pods/CocoaDebug/Sources/Resources/NetworkCell.xib deleted file mode 100644 index 4d70cae..0000000 --- a/Pods/CocoaDebug/Sources/Resources/NetworkCell.xib +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_app@2x.png b/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_app@2x.png deleted file mode 100644 index 9da8c40..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_app@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_bugs@2x.png b/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_bugs@2x.png deleted file mode 100644 index 21b67e5..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_bugs@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_close@2x.png b/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_close@2x.png deleted file mode 100644 index 9ef157d..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_close@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_down@2x.png b/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_down@2x.png deleted file mode 100644 index fc0e7ea..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_down@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_logs@2x.png b/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_logs@2x.png deleted file mode 100644 index b4f9639..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_logs@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_mail@2x.png b/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_mail@2x.png deleted file mode 100644 index d433245..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_mail@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_network@2x.png b/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_network@2x.png deleted file mode 100644 index 885c605..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_network@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_sandbox@2x.png b/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_sandbox@2x.png deleted file mode 100644 index d3edd8c..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_sandbox@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_up@2x.png b/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_up@2x.png deleted file mode 100644 index 57feab3..0000000 Binary files a/Pods/CocoaDebug/Sources/Resources/images/_icon_file_type_up@2x.png and /dev/null differ diff --git a/Pods/CocoaDebug/Sources/Sandbox/_DirectoryContentsTableViewController.h b/Pods/CocoaDebug/Sources/Sandbox/_DirectoryContentsTableViewController.h deleted file mode 100755 index 27ea8bd..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_DirectoryContentsTableViewController.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import "_FileInfo.h" - -@interface _DirectoryContentsTableViewController : UIViewController - -@property (nonatomic, assign, getter=isHomeDirectory) BOOL homeDirectory; -@property (nonatomic, strong) _FileInfo *fileInfo; - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_DirectoryContentsTableViewController.m b/Pods/CocoaDebug/Sources/Sandbox/_DirectoryContentsTableViewController.m deleted file mode 100755 index 3b0207f..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_DirectoryContentsTableViewController.m +++ /dev/null @@ -1,741 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_DirectoryContentsTableViewController.h" -#import "_FilePreviewController.h" -#import "_FileTableViewCell.h" -#import "_ImageResources.h" -#import "_Sandboxer.h" -#import -#import "_Sandboxer-Header.h" -#import "_NetworkHelper.h" -#import "_ImageController.h" -#import "_SandboxerHelper.h" -#import "NSObject+CocoaDebug.h" - -@interface _DirectoryContentsTableViewController () - -@property (nonatomic, strong) NSMutableArray<_FileInfo *> *dataSource; -@property (nonatomic, strong) NSMutableArray<_FileInfo *> *dataSource_cache; -@property (nonatomic, strong) NSMutableArray<_FileInfo *> *dataSource_search; - -@property (nonatomic, strong) _FileInfo *previewingFileInfo; -@property (nonatomic, strong) _FileInfo *deletingFileInfo; - -@property (nonatomic, strong) UIBarButtonItem *refreshItem; -@property (nonatomic, strong) UIBarButtonItem *editItem; -@property (nonatomic, strong) UIBarButtonItem *closeItem; -@property (nonatomic, strong) UIBarButtonItem *deleteAllItem; -@property (nonatomic, strong) UIBarButtonItem *deleteItem; - -@property (nonatomic, strong) UITableView *tableView; -@property (nonatomic, strong) UISearchBar *searchBar; - -@property (nonatomic, copy) NSString *randomId; -@property (nonatomic, copy) NSString *searchText; - -@end - -@implementation _DirectoryContentsTableViewController - -//liman -- (void)customNavigationBar -{ - //****** copy codes from LogNavigationViewController.swift ****** - self.navigationController.navigationBar.translucent = NO; - - self.navigationController.navigationBar.tintColor = [_NetworkHelper shared].mainColor; - self.navigationController.navigationBar.titleTextAttributes = @{ - NSFontAttributeName:[UIFont boldSystemFontOfSize:20], - NSForegroundColorAttributeName: [_NetworkHelper shared].mainColor - }; - - //bugfix #issues-158 - if (@available(iOS 13.0, *)) { - UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init]; - [appearance configureWithOpaqueBackground]; - appearance.shadowColor = [UIColor clearColor]; - self.navigationController.navigationBar.standardAppearance = appearance; - self.navigationController.navigationBar.scrollEdgeAppearance = appearance; - } - - - //swift: - - //bugfix #issues-158 -// if #available(iOS 13, *) { -// let appearance = UINavigationBarAppearance() -// appearance.configureWithOpaqueBackground() -// // self.navigationController?.navigationBar.isTranslucent = true // pass "true" for fixing iOS 15.0 black bg issue -// // self.navigationController?.navigationBar.tintColor = UIColor.white // We need to set tintcolor for iOS 15.0 -// appearance.shadowColor = .clear //removing navigationbar 1 px bottom border. -//// UINavigationBar.appearance().standardAppearance = appearance -//// UINavigationBar.appearance().scrollEdgeAppearance = appearance -// self.navigationBar.standardAppearance = appearance -// self.navigationBar.scrollEdgeAppearance = appearance -// } - -} - -- (void)exit { - [self.navigationController dismissViewControllerAnimated:YES completion:nil]; -} - -#pragma mark - View Lifecycle -- (void)dealloc { - [[_SandboxerHelper sharedInstance].searchTextDictionary removeObjectForKey:self.randomId]; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.randomId = [_SandboxerHelper generateRandomId]; - - if (![_SandboxerHelper sharedInstance].searchTextDictionary) { - [_SandboxerHelper sharedInstance].searchTextDictionary = [NSMutableDictionary dictionary]; - } - - // - UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapView)]; - tap.cancelsTouchesInView = NO; - [self.view addGestureRecognizer:tap]; - - //liman - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:31/255.0 green:33/255.0 blue:36/255.0 alpha:1.0]; - self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil]; - - //liman - if (_IsStringEmpty(self.title)) { - if (self.isHomeDirectory) { - [self customNavigationBar];//liman - self.title = @"Sandbox"; - } else { - self.title = self.fileInfo.displayName; - } - } - - // - [self setupViews]; - [self registerForPreviewing]; -} - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - self.searchText = [[_SandboxerHelper sharedInstance].searchTextDictionary objectForKey:self.randomId]; - - [self loadDirectoryContents]; - [self endEditing]; -} - -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - - if (self.tableView.isEditing) { - [self.navigationController setToolbarHidden:YES animated:YES]; - } - [self.searchBar resignFirstResponder]; -} - -#pragma mark - Private Methods -- (void)setupViews { - //not needed for now - self.editItem = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStylePlain target:self action:@selector(editAction)]; - self.editItem.possibleTitles = [NSSet setWithObjects:@"Edit", @"Cancel", nil]; - - // - self.refreshItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(loadDirectoryContents)]; - self.closeItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"_icon_file_type_close" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil] style:UIBarButtonItemStyleDone target:self action:@selector(exit)]; - - if (self.homeDirectory) { - self.navigationItem.leftBarButtonItems = @[self.closeItem]; - self.navigationItem.rightBarButtonItems = @[self.refreshItem]; - } else { - self.navigationItem.rightBarButtonItems = @[self.closeItem, self.refreshItem]; - } - - - // - self.view.backgroundColor = [UIColor blackColor]; - self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height - 44 - [UIApplication sharedApplication].statusBarFrame.size.height - 50) style:UITableViewStylePlain]; - - - BOOL iPhoneX = NO; - if (@available(iOS 11.0, *)) { - UIWindow *mainWindow = [[UIApplication sharedApplication] keyWindow]; - if (mainWindow.safeAreaInsets.top > 24.0) { - iPhoneX = YES; - } - } - - if (iPhoneX) { - self.tableView.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height - 44 - [UIApplication sharedApplication].statusBarFrame.size.height - 50 - 34); - } - - - self.tableView.dataSource = self; - self.tableView.delegate = self; - self.tableView.allowsMultipleSelectionDuringEditing = YES; - self.tableView.rowHeight = 60.0; - self.tableView.backgroundColor = [UIColor blackColor]; - self.tableView.tableFooterView = [[UIView alloc] init]; - self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; - [self.tableView registerClass:[_FileTableViewCell class] forCellReuseIdentifier:_FileTableViewCellReuseIdentifier]; - [self.view addSubview:self.tableView]; - - self.searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 44)]; - self.searchBar.delegate = self; - self.searchBar.barTintColor = [UIColor blackColor]; - self.searchBar.enablesReturnKeyAutomatically = NO; - [self.view addSubview:self.searchBar]; - - //hide searchBar icon - UITextField *textFieldInsideSearchBar = [self.searchBar valueForKey:@"searchField"]; - textFieldInsideSearchBar.leftViewMode = UITextFieldViewModeNever; - textFieldInsideSearchBar.leftView = nil; - textFieldInsideSearchBar.backgroundColor = [UIColor whiteColor]; - textFieldInsideSearchBar.returnKeyType = UIReturnKeyDefault; -} - -- (void)registerForPreviewing { - if (_SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9.0")) { - if (@available(iOS 9.0, *)) { - if (self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable) { - [self registerForPreviewingWithDelegate:self sourceView:self.view]; - } - } else { - // Fallback on earlier versions - } - } -} - -- (void)loadDirectoryContents { - self.refreshItem.enabled = NO; - - __weak _DirectoryContentsTableViewController *weakSelf = self; - - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ - - NSMutableArray<_FileInfo *> *dataSource_ = [_FileInfo contentsOfDirectoryAtURL:weakSelf.fileInfo.URL]; - if ([dataSource_ count] > 0) { - weakSelf.dataSource = dataSource_; - weakSelf.dataSource_cache = dataSource_; - } - - dispatch_async(dispatch_get_main_queue(), ^{ - - weakSelf.refreshItem.enabled = YES; - [weakSelf updateToolbarItems]; - [weakSelf searchBar:weakSelf.searchBar textDidChange:weakSelf.searchBar.text]; - }); - }); - - [self.searchBar resignFirstResponder]; -} - -- (_FileInfo *)fileInfoAtIndexPath:(NSIndexPath *)indexPath { - return self.dataSource[indexPath.row]; -} - -- (UIViewController *)viewControllerWithFileInfo:(_FileInfo *)fileInfo { - if (fileInfo.isDirectory) { - _DirectoryContentsTableViewController *directoryContentsTableViewController = [[_DirectoryContentsTableViewController alloc] init]; - directoryContentsTableViewController.fileInfo = fileInfo; -// directoryContentsTableViewController.hidesBottomBarWhenPushed = YES;//liman - return directoryContentsTableViewController; - } else { - if ([_Sandboxer shared].isShareable && fileInfo.isCanPreviewInQuickLook) { - //NSLog(@"Quick Look can preview this file"); - self.previewingFileInfo = fileInfo; - QLPreviewController *previewController = [[QLPreviewController alloc] init]; - previewController.dataSource = self; - previewController.hidesBottomBarWhenPushed = YES;//liman - return previewController; - } else { - //liman - if (fileInfo.URL) { - NSData *data = [NSData dataWithContentsOfURL:fileInfo.URL]; - if (data) { - UIImage *image = [UIImage imageWithGIFData:data]; - if (image) { - _ImageController *vc = [[_ImageController alloc] initWithImage:image fileInfo:fileInfo]; - vc.hidesBottomBarWhenPushed = YES;//liman - return vc; - } - } - } - - //NSLog(@"Quick Look can not preview this file"); - _FilePreviewController *filePreviewController = [[_FilePreviewController alloc] init]; - filePreviewController.fileInfo = fileInfo; - filePreviewController.hidesBottomBarWhenPushed = YES;//liman - return filePreviewController; - } - } -} - -- (BOOL)isCanDeleteAll { - if ((![_Sandboxer shared].isFileDeletable && ![_Sandboxer shared].isDirectoryDeletable) || self.dataSource.count == 0) { - return NO; - } - - NSInteger fileCount = 0; - NSInteger directoryCount = 0; - [self getDeletableFileCount:&fileCount directoryCount:&directoryCount]; - - if (([_Sandboxer shared].isFileDeletable && ![_Sandboxer shared].isDirectoryDeletable && fileCount == 0) || // Can only delete files, but the number of files is 0 - (![_Sandboxer shared].isFileDeletable && [_Sandboxer shared].isDirectoryDeletable && directoryCount == 0)) { // Can only delete folders, but the number of folders is 0 - return NO; - } - - return YES; -} - -- (void)getDeletableFileCount:(NSInteger *)fileCount directoryCount:(NSInteger *)directoryCount { - NSInteger fc = 0; - NSInteger dc = 0; - for (_FileInfo *fileInfo in self.dataSource) { - if (fileInfo.isDirectory && [_Sandboxer shared].isDirectoryDeletable) { - dc++; - } else if (!fileInfo.isDirectory && [_Sandboxer shared].isFileDeletable) { - fc++; - } - } - - *fileCount = fc; - *directoryCount = dc; -} - -- (void)updateToolbarItems { - [self updateToolbarDeleteAllItem]; - [self updateToolbarDeleteItem]; -} - -- (void)updateToolbarDeleteAllItem { - if (self.deleteAllItem) { - self.deleteAllItem.enabled = [self isCanDeleteAll]; - } -} - -- (void)updateToolbarDeleteItem { - if (self.deleteItem) { - self.deleteItem.enabled = self.tableView.indexPathsForSelectedRows.count > 0; - } -} - -- (NSString *)messageForDeleteWithFileCount:(NSInteger)fileCount directoryCount:(NSInteger)directoryCount { - NSMutableString *message = [NSMutableString stringWithString:@"Are you sure to delete"]; - if ([_Sandboxer shared].isFileDeletable && fileCount > 0) { - [message appendFormat:@"%ld files", (long)fileCount]; - } - - if ([_Sandboxer shared].isDirectoryDeletable && directoryCount > 0) { - if ([_Sandboxer shared].isFileDeletable && fileCount > 0) { - [message appendString:@","]; - } - - [message appendFormat:@"%ld directories", (long)directoryCount]; - } - - [message appendString:@"?"]; - - return message.copy; -} - -#pragma mark - alert -- (UIAlertController *)alertControllerForDeleteWithMessage:(NSString *)message deleteHandler:(void (^ __nullable)(UIAlertAction *action))handler { - UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:message preferredStyle:UIAlertControllerStyleAlert]; - [alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]]; - [alert addAction:[UIAlertAction actionWithTitle:@"Delete" style:UIAlertActionStyleDestructive handler:handler]]; - - alert.popoverPresentationController.permittedArrowDirections = 0; - alert.popoverPresentationController.sourceView = self.view; - alert.popoverPresentationController.sourceRect = CGRectMake(self.view.bounds.size.width / 2.0, self.view.bounds.size.height / 2.0, 0, 0); - - return alert; -} - -- (void)showAlert { - UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Not supported" message:nil preferredStyle:UIAlertControllerStyleAlert]; - UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]; - [alert addAction:cancelAction]; - - alert.popoverPresentationController.permittedArrowDirections = 0; - alert.popoverPresentationController.sourceView = self.view; - alert.popoverPresentationController.sourceRect = CGRectMake(self.view.bounds.size.width / 2.0, self.view.bounds.size.height / 2.0, 0, 0); - - [self presentViewController:alert animated:YES completion:nil]; -} - -#pragma mark - target action -- (void)didTapView { - [self.searchBar resignFirstResponder]; -} - -- (void)editAction { - if (![_Sandboxer shared].isFileDeletable && ![_Sandboxer shared].isDirectoryDeletable) { - [self showAlert]; - return; - } - - if (!self.tableView.isEditing) { - [self beginEditing]; - } else { - [self endEditing]; - } - - [self.searchBar resignFirstResponder]; -} - -- (void)beginEditing { - if (self.tableView.isEditing) { return; } - self.tableView.editing = YES; - self.editItem.title = @"Cancel"; - self.editItem.style = UIBarButtonItemStyleDone; - - [self.navigationController setToolbarHidden:NO animated:YES]; - - if (nil == self.deleteAllItem) { - self.deleteAllItem = [[UIBarButtonItem alloc] initWithTitle:@"Delete All" style:UIBarButtonItemStylePlain target:self action:@selector(deleteAllAction)]; - self.deleteItem = [[UIBarButtonItem alloc] initWithTitle:@"Delete" style:UIBarButtonItemStylePlain target:self action:@selector(deleteSelectedFilesAction)]; - - //liman - [self.deleteAllItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor redColor]} forState:UIControlStateNormal]; - [self.deleteItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor redColor]} forState:UIControlStateNormal]; - [self.deleteAllItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithRed:209/255.0 green:157/255.0 blue:157/255.0 alpha:1.0]} forState:UIControlStateHighlighted]; - [self.deleteItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithRed:209/255.0 green:157/255.0 blue:157/255.0 alpha:1.0]} forState:UIControlStateHighlighted]; - - - [self setToolbarItems:@[self.deleteAllItem, - [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil], - self.deleteItem] animated:YES]; - } - - [self updateToolbarItems]; -} - -- (void)endEditing { - if (!self.tableView.isEditing) { return; } - self.tableView.editing = NO; - self.editItem.title = @"Edit"; - self.editItem.style = UIBarButtonItemStylePlain; - - [self.navigationController setToolbarHidden:YES animated:YES]; -} - -- (void)deleteAllAction { - if (![self isCanDeleteAll]) { - return; - } - - NSInteger fileCount = 0; - NSInteger directoryCount = 0; - [self getDeletableFileCount:&fileCount directoryCount:&directoryCount]; - NSString *message = [self messageForDeleteWithFileCount:fileCount directoryCount:directoryCount]; - - UIAlertController *alert = [self alertControllerForDeleteWithMessage:message deleteHandler:^(UIAlertAction *action) { - [self deleteAllFiles]; - }]; - - alert.popoverPresentationController.permittedArrowDirections = 0; - alert.popoverPresentationController.sourceView = self.view; - alert.popoverPresentationController.sourceRect = CGRectMake(self.view.bounds.size.width / 2.0, self.view.bounds.size.height / 2.0, 0, 0); - - [self presentViewController:alert animated:YES completion:nil]; -} - -- (void)deleteSelectedFilesAction { - ////NSLog(@"mlb - %@, title = %@", NSStringFromSelector(_cmd), self.title); - NSInteger fileCount = 0; - NSInteger directoryCount = 0; - for (NSIndexPath *indexPath in self.tableView.indexPathsForSelectedRows) { - _FileInfo *fileInfo = [self fileInfoAtIndexPath:indexPath]; - ////NSLog(@"mlb - Delete file: %@", fileInfo.displayName); - if (fileInfo.isDirectory) { - directoryCount++; - } else { - fileCount++; - } - } - - NSString *message = [self messageForDeleteWithFileCount:fileCount directoryCount:directoryCount]; - - UIAlertController *alert = [self alertControllerForDeleteWithMessage:message deleteHandler:^(UIAlertAction *action) { - [self deleteSelectedFiles]; - }]; - - alert.popoverPresentationController.permittedArrowDirections = 0; - alert.popoverPresentationController.sourceView = self.view; - alert.popoverPresentationController.sourceRect = CGRectMake(self.view.bounds.size.width / 2.0, self.view.bounds.size.height / 2.0, 0, 0); - - [self presentViewController:alert animated:YES completion:nil]; -} - -- (void)deleteAllFiles { - ////NSLog(@"mlb - %@, title = %@", NSStringFromSelector(_cmd), self.title); - NSMutableArray<_FileInfo *> *deletedFileInfos = [NSMutableArray arrayWithCapacity:self.dataSource.count]; - NSMutableArray *deletedIndexPaths = [NSMutableArray arrayWithCapacity:self.dataSource.count]; - [self.dataSource enumerateObjectsWithOptions:NSEnumerationReverse | NSEnumerationConcurrent usingBlock:^(_FileInfo * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { - if ([self deleteFile:obj]) { - ////NSLog(@"mlb - %@, idx = %lu, obj = %@", NSStringFromSelector(_cmd), (unsigned long)idx, obj.displayName); - [deletedIndexPaths addObject:[NSIndexPath indexPathForRow:idx inSection:0]]; - [deletedFileInfos addObject:obj]; - } - }]; - - [self.dataSource removeObjectsInArray:deletedFileInfos]; - - //TODO... cache search - - [self.tableView deleteRowsAtIndexPaths:deletedIndexPaths withRowAnimation:UITableViewRowAnimationAutomatic]; - - [self endEditing]; -} - -- (void)deleteSelectedFiles { - ////NSLog(@"mlb - %@, title = %@", NSStringFromSelector(_cmd), self.title); - NSMutableArray<_FileInfo *> *deletedFileInfos = [NSMutableArray arrayWithCapacity:self.tableView.indexPathsForSelectedRows.count]; - for (NSIndexPath *indexPath in self.tableView.indexPathsForSelectedRows) { - _FileInfo *fileInfo = self.dataSource[indexPath.row]; - if ([self deleteFile:fileInfo]) { - [deletedFileInfos addObject:fileInfo]; - } - } - - [self.dataSource removeObjectsInArray:deletedFileInfos]; - - //TODO... cache search - - [self.tableView deleteRowsAtIndexPaths:self.tableView.indexPathsForSelectedRows withRowAnimation:UITableViewRowAnimationAutomatic]; - - [self endEditing]; -} - -- (void)deleteSelectedFile { - if ([self deleteFile:self.deletingFileInfo]) { - NSInteger index = -1; - index = [self.dataSource indexOfObject:self.deletingFileInfo]; - - [self.dataSource removeObject:self.deletingFileInfo]; - - if ([self.dataSource_cache count] > 0 && [self.dataSource_cache containsObject:self.deletingFileInfo]) { - [self.dataSource_cache removeObject:self.deletingFileInfo]; - } - if ([self.dataSource_search count] > 0 && [self.dataSource_search containsObject:self.deletingFileInfo]) { - [self.dataSource_search removeObject:self.deletingFileInfo]; - } - - if (index >= 0) { - [self.tableView deleteRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:index inSection:0]] withRowAnimation:UITableViewRowAnimationFade]; - } - - self.deletingFileInfo = nil; - } -} - -- (BOOL)deleteFile:(_FileInfo *)fileInfo { - if (![_Sandboxer shared].isFileDeletable || - (![_Sandboxer shared].isDirectoryDeletable && fileInfo.isDirectory)) { - return NO; - } - - if ([[NSFileManager defaultManager] fileExistsAtPath:fileInfo.URL.path]) { - NSError *error; - [[NSFileManager defaultManager] removeItemAtURL:fileInfo.URL error:&error]; - if (error) { - return NO; - } - } - - return YES; -} - -#pragma mark - UITableViewDataSource - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return self.dataSource.count; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - _FileTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:_FileTableViewCellReuseIdentifier forIndexPath:indexPath]; - _FileInfo *fileInfo = [self fileInfoAtIndexPath:indexPath]; - cell.imageView.image = [_ImageResources fileTypeImageNamed:fileInfo.typeImageName]; - cell.textLabel.text = [_Sandboxer shared].isExtensionHidden ? fileInfo.displayName.stringByDeletingPathExtension : fileInfo.displayName; -// cell.accessoryType = fileInfo.isDirectory ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone; - cell.accessoryType = UITableViewCellAccessoryNone; //liman - - //liman - NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:fileInfo.modificationDateText]; - if ([attributedString length] >= 25) { - [attributedString setAttributes:@{NSForegroundColorAttributeName: [_NetworkHelper shared].mainColor, NSFontAttributeName: [UIFont boldSystemFontOfSize:12]} range:NSMakeRange(0, 25)]; - } - cell.detailTextLabel.attributedText = [attributedString copy]; -// cell.detailTextLabel.text = fileInfo.modificationDateText; - - return cell; -} - -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { - if ([self fileInfoAtIndexPath:indexPath].isDirectory) { - return [_Sandboxer shared].isDirectoryDeletable; - } else { - return [_Sandboxer shared].isFileDeletable; - } -} - -- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { - _FileInfo *fileInfo = [self fileInfoAtIndexPath:indexPath]; - if (editingStyle == UITableViewCellEditingStyleDelete) { - ////NSLog(@"Clicked delete editing style"); - self.deletingFileInfo = fileInfo; - NSMutableString *message = [NSMutableString string]; - if (fileInfo.isDirectory) { - [message appendFormat:@"Are you sure to delete this directory(including %lu files(or directories) inside)?", (unsigned long)fileInfo.filesCount]; - } else { - [message appendString:@"Are you sure to delete this file?"]; - } - - UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:message preferredStyle:UIAlertControllerStyleAlert]; - [alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]]; - [alert addAction:[UIAlertAction actionWithTitle:@"Delete" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) { - [self deleteSelectedFile]; - }]]; - - alert.popoverPresentationController.permittedArrowDirections = 0; - alert.popoverPresentationController.sourceView = self.view; - alert.popoverPresentationController.sourceRect = CGRectMake(self.view.bounds.size.width / 2.0, self.view.bounds.size.height / 2.0, 0, 0); - - [self presentViewController:alert animated:YES completion:nil]; - } -} - -#pragma mark - UITableViewDelegate - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - return self.searchBar; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - return 44; -} - -- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { - return UITableViewCellEditingStyleDelete; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - _FileInfo *fileInfo = [self fileInfoAtIndexPath:indexPath]; - if (tableView.isEditing) { - if ((fileInfo.isDirectory && ![_Sandboxer shared].isDirectoryDeletable) || (!fileInfo.isDirectory && ![_Sandboxer shared].isFileDeletable)) { - [tableView deselectRowAtIndexPath:indexPath animated:YES]; - } else { - [self updateToolbarDeleteItem]; - } - } else { - [self.navigationController pushViewController:[self viewControllerWithFileInfo:fileInfo] animated:YES]; - } - - [self.searchBar resignFirstResponder]; -} - -- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath { - _FileInfo *fileInfo = [self fileInfoAtIndexPath:indexPath]; - if (tableView.isEditing) { - if ((fileInfo.isDirectory && ![_Sandboxer shared].isDirectoryDeletable) || (!fileInfo.isDirectory && ![_Sandboxer shared].isFileDeletable)) { - - } else { - [self updateToolbarDeleteItem]; - } - } -} - - -#pragma mark - QLPreviewControllerDataSource - -- (NSInteger)numberOfPreviewItemsInPreviewController:(QLPreviewController *)controller { - return self.previewingFileInfo ? 1 : 0; -} - -- (id)previewController:(QLPreviewController *)controller previewItemAtIndex:(NSInteger)index { - return self.previewingFileInfo.URL; -} - -#pragma mark - UIViewControllerPreviewingDelegate - -/// Create a previewing view controller to be shown at "Peek". -- (UIViewController *)previewingContext:(id)previewingContext viewControllerForLocation:(CGPoint)location { - // Obtain the index path and the cell that was pressed. - NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:location]; - _FileTableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath]; - if (!cell) { return nil; } - - _FileInfo *fileInfo = [self fileInfoAtIndexPath:indexPath]; - // Create a detail view controller and set its properties. - UIViewController *detailViewController = [self viewControllerWithFileInfo:fileInfo]; - - /* - Set the height of the preview by setting the preferred content size of the detail view controller. - Width should be zero, because it's not used in portrait. - */ - detailViewController.preferredContentSize = CGSizeZero; - - // Set the source rect to the cell frame, so surrounding elements are blurred. - if (_SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9.0")) { - if (@available(iOS 9.0, *)) { - previewingContext.sourceRect = cell.frame; - } else { - // Fallback on earlier versions - } - } - - return detailViewController; -} - -- (void)previewingContext:(id)previewingContext commitViewController:(UIViewController *)viewControllerToCommit { - [self showViewController:viewControllerToCommit sender:self]; -} - -#pragma mark - UIScrollViewDelegate -- (void)scrollViewDidScroll:(UIScrollView *)scrollView { - [self.searchBar resignFirstResponder]; -} - -#pragma mark - UISearchBarDelegate -- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar { - [self.searchBar resignFirstResponder]; -} - -- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText { - if (searchText && ![self.searchText isEqualToString:searchText]) { - [[_SandboxerHelper sharedInstance].searchTextDictionary setObject:searchText forKey:self.randomId]; - } - - if (!searchText || [searchText isEqualToString:@""]) { - self.dataSource = self.dataSource_cache; - [self.tableView reloadData]; - return; - } - - if (!self.dataSource_search) { - self.dataSource_search = [NSMutableArray array]; - } else { - [self.dataSource_search removeAllObjects]; - } - - for (_FileInfo *obj in self.dataSource_cache) { - if ([[obj.displayName lowercaseString] containsString:[searchText lowercaseString]]) { - [self.dataSource_search addObject:obj]; - } - } - - self.dataSource = self.dataSource_search; - [self.tableView reloadData]; -} - -@end - diff --git a/Pods/CocoaDebug/Sources/Sandbox/_FileInfo.h b/Pods/CocoaDebug/Sources/Sandbox/_FileInfo.h deleted file mode 100755 index afa79fb..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_FileInfo.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import - -typedef NS_ENUM(NSUInteger, _FileType) { - _FileTypeUnknown, - _FileTypeDirectory, - // Image - _FileTypeJPG, _FileTypePNG, _FileTypeGIF, _FileTypeSVG, _FileTypeBMP, _FileTypeTIF, - // Audio - _FileTypeMP3, _FileTypeAAC, _FileTypeWAV, _FileTypeOGG, - // Video - _FileTypeMP4, _FileTypeAVI, _FileTypeFLV, _FileTypeMIDI, _FileTypeMOV, _FileTypeMPG, _FileTypeWMV, - // Apple - _FileTypeDMG, _FileTypeIPA, _FileTypeNumbers, _FileTypePages, _FileTypeKeynote, - // Google - _FileTypeAPK, - // Microsoft - _FileTypeWord, _FileTypeExcel, _FileTypePPT, _FileTypeEXE, _FileTypeDLL, - // Document - _FileTypeTXT, _FileTypeRTF, _FileTypePDF, _FileTypeZIP, _FileType7z, _FileTypeCVS, _FileTypeMD, - // Programming - _FileTypeSwift, _FileTypeJava, _FileTypeC, _FileTypeCPP, _FileTypePHP, - _FileTypeJSON, _FileTypePList, _FileTypeXML, _FileTypeDatabase, - _FileTypeJS, _FileTypeHTML, _FileTypeCSS, - _FileTypeBIN, _FileTypeDat, _FileTypeSQL, _FileTypeJAR, - // Adobe - _FileTypeFlash, _FileTypePSD, _FileTypeEPS, - // Other - _FileTypeTTF, _FileTypeTorrent, -}; - -@interface _FileInfo : NSObject - -@property (nonatomic, strong) NSURL *URL; -@property (nonatomic, strong) NSString *displayName; -@property (nonatomic, strong) NSString *extension; -@property (nonatomic, strong) NSString *modificationDateText; -@property (nonatomic, strong) NSDictionary *attributes; - -@property (nonatomic, assign) _FileType type; -@property (nonatomic, assign, readonly) BOOL isDirectory; -@property (nonatomic, assign) NSUInteger filesCount; // File always 0 - -@property (nonatomic, strong, readonly) NSString *typeImageName; -@property (nonatomic, assign, readonly) BOOL isCanPreviewInQuickLook; -@property (nonatomic, assign, readonly) BOOL isCanPreviewInWebView; - -- (instancetype)initWithFileURL:(NSURL *)URL; - -+ (NSDictionary *)attributesWithFileURL:(NSURL *)URL; -+ (NSMutableArray<_FileInfo *> *)contentsOfDirectoryAtURL:(NSURL *)URL; - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_FileInfo.m b/Pods/CocoaDebug/Sources/Sandbox/_FileInfo.m deleted file mode 100755 index 3543a02..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_FileInfo.m +++ /dev/null @@ -1,365 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_FileInfo.h" -#import "_Sandboxer.h" -#import "_SandboxerHelper.h" -#import "_Sandboxer-Header.h" -#import - -@interface _FileInfo () - -@property (nonatomic, strong, readwrite) NSString *typeImageName; - -@end - -@implementation _FileInfo - -- (instancetype)initWithFileURL:(NSURL *)URL { - if (self = [super init]) { - self.URL = URL; - self.displayName = URL.lastPathComponent; - self.attributes = [_FileInfo attributesWithFileURL:URL]; - - if ([self.attributes.fileType isEqualToString:NSFileTypeDirectory]) { - self.type = _FileTypeDirectory; - self.filesCount = [_FileInfo contentCountOfDirectoryAtURL:URL]; - //liman - if ([URL isFileURL]) { - self.modificationDateText = [NSString stringWithFormat:@"[%@] %@", [_SandboxerHelper fileModificationDateTextWithDate:self.attributes.fileModificationDate], [_SandboxerHelper sizeOfFolder:URL.path]]; - } - } else { - self.extension = URL.pathExtension; - self.type = [_FileInfo fileTypeWithExtension:self.extension]; - self.filesCount = 0; - //liman - if ([URL isFileURL]) { - self.modificationDateText = [NSString stringWithFormat:@"[%@] %@", [_SandboxerHelper fileModificationDateTextWithDate:self.attributes.fileModificationDate], [_SandboxerHelper sizeOfFile:URL.path]]; - } - } - - //liman - if ([self.modificationDateText containsString:@"[] "]) { - self.modificationDateText = [[self.modificationDateText mutableCopy] stringByReplacingOccurrencesOfString:@"[] " withString:@""]; - } - } - - return self; -} - -#pragma mark - Getters - -- (BOOL)isDirectory { - return self.type == _FileTypeDirectory; -} - -- (NSString *)typeImageName { - if (!_typeImageName) { - - switch (self.type) { - case _FileTypeUnknown: _typeImageName = @"icon_file_type_default"; break; - case _FileTypeDirectory: _typeImageName = self.filesCount == 0 ? @"icon_file_type_folder_empty" : @"icon_file_type_folder_not_empty"; break; - // Image - case _FileTypeJPG: _typeImageName = @"icon_file_type_jpg"; break; - case _FileTypePNG: _typeImageName = @"icon_file_type_png"; break; - case _FileTypeGIF: _typeImageName = @"icon_file_type_gif"; break; - case _FileTypeSVG: _typeImageName = @"icon_file_type_svg"; break; - case _FileTypeBMP: _typeImageName = @"icon_file_type_bmp"; break; - case _FileTypeTIF: _typeImageName = @"icon_file_type_tif"; break; - // Audio - case _FileTypeMP3: _typeImageName = @"icon_file_type_mp3"; break; - case _FileTypeAAC: _typeImageName = @"icon_file_type_aac"; break; - case _FileTypeWAV: _typeImageName = @"icon_file_type_wav"; break; - case _FileTypeOGG: _typeImageName = @"icon_file_type_ogg"; break; - // Video - case _FileTypeMP4: _typeImageName = @"icon_file_type_mp4"; break; - case _FileTypeAVI: _typeImageName = @"icon_file_type_avi"; break; - case _FileTypeFLV: _typeImageName = @"icon_file_type_flv"; break; - case _FileTypeMIDI: _typeImageName = @"icon_file_type_midi"; break; - case _FileTypeMOV: _typeImageName = @"icon_file_type_mov"; break; - case _FileTypeMPG: _typeImageName = @"icon_file_type_mpg"; break; - case _FileTypeWMV: _typeImageName = @"icon_file_type_wmv"; break; - // Apple - case _FileTypeDMG: _typeImageName = @"icon_file_type_dmg"; break; - case _FileTypeIPA: _typeImageName = @"icon_file_type_ipa"; break; - case _FileTypeNumbers: _typeImageName = @"icon_file_type_numbers"; break; - case _FileTypePages: _typeImageName = @"icon_file_type_pages"; break; - case _FileTypeKeynote: _typeImageName = @"icon_file_type_keynote"; break; - // Google - case _FileTypeAPK: _typeImageName = @"icon_file_type_apk"; break; - // Microsoft - case _FileTypeWord: _typeImageName = @"icon_file_type_doc"; break; - case _FileTypeExcel: _typeImageName = @"icon_file_type_xls"; break; - case _FileTypePPT: _typeImageName = @"icon_file_type_ppt"; break; - case _FileTypeEXE: _typeImageName = @"icon_file_type_exe"; break; - case _FileTypeDLL: _typeImageName = @"icon_file_type_dll"; break; - // Document - case _FileTypeTXT: _typeImageName = @"icon_file_type_txt"; break; - case _FileTypeRTF: _typeImageName = @"icon_file_type_rtf"; break; - case _FileTypePDF: _typeImageName = @"icon_file_type_pdf"; break; - case _FileTypeZIP: _typeImageName = @"icon_file_type_zip"; break; - case _FileType7z: _typeImageName = @"icon_file_type_7z"; break; - case _FileTypeCVS: _typeImageName = @"icon_file_type_cvs"; break; - case _FileTypeMD: _typeImageName = @"icon_file_type_md"; break; - // Programming - case _FileTypeSwift: _typeImageName = @"icon_file_type_swift"; break; - case _FileTypeJava: _typeImageName = @"icon_file_type_java"; break; - case _FileTypeC: _typeImageName = @"icon_file_type_c"; break; - case _FileTypeCPP: _typeImageName = @"icon_file_type_cpp"; break; - case _FileTypePHP: _typeImageName = @"icon_file_type_php"; break; - case _FileTypeJSON: _typeImageName = @"icon_file_type_json"; break; - case _FileTypePList: _typeImageName = @"icon_file_type_plist"; break; - case _FileTypeXML: _typeImageName = @"icon_file_type_xml"; break; - case _FileTypeDatabase: _typeImageName = @"icon_file_type_db"; break; - case _FileTypeJS: _typeImageName = @"icon_file_type_js"; break; - case _FileTypeHTML: _typeImageName = @"icon_file_type_html"; break; - case _FileTypeCSS: _typeImageName = @"icon_file_type_css"; break; - case _FileTypeBIN: _typeImageName = @"icon_file_type_bin"; break; - case _FileTypeDat: _typeImageName = @"icon_file_type_dat"; break; - case _FileTypeSQL: _typeImageName = @"icon_file_type_sql"; break; - case _FileTypeJAR: _typeImageName = @"icon_file_type_jar"; break; - // Adobe - case _FileTypeFlash: _typeImageName = @"icon_file_type_fla"; break; - case _FileTypePSD: _typeImageName = @"icon_file_type_psd"; break; - case _FileTypeEPS: _typeImageName = @"icon_file_type_eps"; break; - // Other - case _FileTypeTTF: _typeImageName = @"icon_file_type_ttf"; break; - case _FileTypeTorrent: _typeImageName = @"icon_file_type_torrent"; break; - } - } - - return _typeImageName; -} - -- (BOOL)isCanPreviewInQuickLook { - return [QLPreviewController canPreviewItem:self.URL]; -} - -- (BOOL)isCanPreviewInWebView { - if (// Image - self.type == _FileTypePNG || - self.type == _FileTypeJPG || - self.type == _FileTypeGIF || - self.type == _FileTypeSVG || - self.type == _FileTypeBMP || - // Audio - self.type == _FileTypeWAV || - // Apple - self.type == _FileTypeNumbers || - self.type == _FileTypePages || - self.type == _FileTypeKeynote || - // Microsoft - self.type == _FileTypeWord || - self.type == _FileTypeExcel || - // Document - self.type == _FileTypeTXT || - self.type == _FileTypePDF || - self.type == _FileTypeMD || - // Programming - self.type == _FileTypeJava || - self.type == _FileTypeSwift || - self.type == _FileTypeCSS || - // Adobe - self.type == _FileTypePSD) { - return YES; - } - - return NO; -} - -#pragma mark - Public Methods - -+ (NSDictionary *)attributesWithFileURL:(NSURL *)URL { - NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:URL.path error:nil]; - - return attributes; -} - -+ (NSMutableArray<_FileInfo *> *)contentsOfDirectoryAtURL:(NSURL *)URL { -// ////NSLog(@"%@, url = %@", NSStringFromSelector(_cmd), URL.path); - NSMutableArray *fileInfos = [NSMutableArray array]; - BOOL isDir = NO; - BOOL isExists = [[NSFileManager defaultManager] fileExistsAtPath:URL.path isDirectory:&isDir]; - if (isExists && isDir) { - NSArray *contents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:URL.path error:nil]; - if ([contents count] > 0) { - for (NSString *name in contents) { - if (_Sandboxer.shared.isSystemFilesHidden && [name hasPrefix:@"."]) { continue; } - _FileInfo *fileInfo = [[_FileInfo alloc] initWithFileURL:[URL URLByAppendingPathComponent:name]]; - [fileInfos addObject:fileInfo]; - } - } - } - - return fileInfos; -} - -+ (NSUInteger)contentCountOfDirectoryAtURL:(NSURL *)URL { -// ////NSLog(@"%@, url = %@", NSStringFromSelector(_cmd), URL.path); - NSUInteger count = 0; - BOOL isDir = NO; - BOOL isExists = [[NSFileManager defaultManager] fileExistsAtPath:URL.path isDirectory:&isDir]; - if (isExists && isDir) { - NSArray *contents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:URL.path error:nil]; - if ([contents count] > 0) { - for (NSString *name in contents) { - if (_Sandboxer.shared.isSystemFilesHidden && [name hasPrefix:@"."]) { continue; } - count++; - } - } - } - - return count; -} - -+ (_FileType)fileTypeWithExtension:(NSString *)extension { - _FileType type = _FileTypeUnknown; - - if (_IsStringEmpty(extension)) { - return type; - } - - // Image - if ([extension compare:@"jpg" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeJPG; - } else if ([extension compare:@"png" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypePNG; - } else if ([extension compare:@"gif" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeGIF; - } else if ([extension compare:@"svg" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeSVG; - } else if ([extension compare:@"bmp" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeBMP; - } else if ([extension compare:@"tif" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeTIF; - } - // Audio - else if ([extension compare:@"mp3" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeMP3; - } else if ([extension compare:@"aac" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeAAC; - } else if ([extension compare:@"wav" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeWAV; - } else if ([extension compare:@"ogg" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeOGG; - } - // Video - else if ([extension compare:@"mp4" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeMP4; - } else if ([extension compare:@"avi" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeAVI; - } else if ([extension compare:@"flv" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeFLV; - } else if ([extension compare:@"midi" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeMIDI; - } else if ([extension compare:@"mov" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeMOV; - } else if ([extension compare:@"mpg" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeMPG; - } else if ([extension compare:@"wmv" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeWMV; - } - // Apple - else if ([extension compare:@"dmg" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeDMG; - } else if ([extension compare:@"ipa" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeIPA; - } else if ([extension compare:@"numbers" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeNumbers; - } else if ([extension compare:@"pages" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypePages; - } else if ([extension compare:@"key" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeKeynote; - } - // Google - else if ([extension compare:@"apk" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeAPK; - } - // Microsoft - else if ([extension compare:@"doc" options:NSCaseInsensitiveSearch] == NSOrderedSame || - [extension compare:@"docx" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeWord; - } else if ([extension compare:@"xls" options:NSCaseInsensitiveSearch] == NSOrderedSame || - [extension compare:@"xlsx" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeExcel; - } else if ([extension compare:@"ppt" options:NSCaseInsensitiveSearch] == NSOrderedSame || - [extension compare:@"pptx" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypePPT; - } else if ([extension compare:@"exe" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeEXE; - } else if ([extension compare:@"dll" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeDLL; - } - // Document - else if ([extension compare:@"txt" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeTXT; - } else if ([extension compare:@"rtf" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeRTF; - } else if ([extension compare:@"pdf" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypePDF; - } else if ([extension compare:@"zip" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeZIP; - } else if ([extension compare:@"7z" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileType7z; - } else if ([extension compare:@"cvs" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeCVS; - } else if ([extension compare:@"md" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeMD; - } - // Programming - else if ([extension compare:@"swift" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeSwift; - } else if ([extension compare:@"java" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeJava; - } else if ([extension compare:@"c" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeC; - } else if ([extension compare:@"cpp" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeCPP; - } else if ([extension compare:@"php" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypePHP; - } else if ([extension compare:@"json" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeJSON; - } else if ([extension compare:@"plist" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypePList; - } else if ([extension compare:@"xml" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeXML; - } else if ([extension compare:@"db" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeDatabase; - } else if ([extension compare:@"js" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeJS; - } else if ([extension compare:@"html" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeHTML; - } else if ([extension compare:@"css" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeCSS; - } else if ([extension compare:@"bin" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeBIN; - } else if ([extension compare:@"dat" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeDat; - } else if ([extension compare:@"sql" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeSQL; - } else if ([extension compare:@"jar" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeJAR; - } - // Adobe - else if ([extension compare:@"psd" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypePSD; - } - else if ([extension compare:@"eps" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeEPS; - } - // Other - else if ([extension compare:@"ttf" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeTTF; - } else if ([extension compare:@"torrent" options:NSCaseInsensitiveSearch] == NSOrderedSame) { - type = _FileTypeTorrent; - } - - return type; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_FilePreviewController.h b/Pods/CocoaDebug/Sources/Sandbox/_FilePreviewController.h deleted file mode 100755 index 09bf62a..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_FilePreviewController.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import - -@class _FileInfo; - -@interface _FilePreviewController : UIViewController - -@property (nonatomic, strong) _FileInfo *fileInfo; - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_FilePreviewController.m b/Pods/CocoaDebug/Sources/Sandbox/_FilePreviewController.m deleted file mode 100755 index b36b7d6..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_FilePreviewController.m +++ /dev/null @@ -1,225 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_FilePreviewController.h" -#import "_FileInfo.h" -#import -#import -#import "_Sandboxer-Header.h" -#import "_Sandboxer.h" - -@interface _FilePreviewController () - -@property (nonatomic, strong) WKWebView *wkWebView; - -@property (nonatomic, strong) UITextView *textView; - -@property (nonatomic, strong) UIActivityIndicatorView *activityIndicatorView; - -@property (nonatomic, strong) UIDocumentInteractionController *documentInteractionController; - -@end - -@implementation _FilePreviewController - -#pragma mark - View Lifecycle - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.title = self.fileInfo.displayName.stringByDeletingPathExtension; - self.view.backgroundColor = [UIColor whiteColor]; - - [self init_documentInteractionController]; - [self initDatas]; - [self setupViews]; - [self loadFile]; -} - -- (void)viewDidLayoutSubviews { - [super viewDidLayoutSubviews]; - - if (self.wkWebView) { - self.wkWebView.frame = self.view.bounds; - } - -// if (self.webView) { -// self.webView.frame = self.view.bounds; -// } - - if (self.textView) { - self.textView.frame = self.view.bounds; - } - - self.activityIndicatorView.center = self.view.center; -} - -#pragma mark - Private Methods - -- (void)init_documentInteractionController { - if (!self.documentInteractionController) { - self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:self.fileInfo.URL]; - self.documentInteractionController.delegate = self; - self.documentInteractionController.name = self.fileInfo.displayName; - } -} - -- (void)initDatas { - -} - -- (void)setupViews { - - if ([_Sandboxer shared].isShareable) { - UIBarButtonItem *shareItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(sharingAction)]; - self.navigationItem.rightBarButtonItem = shareItem; - } - - if (self.fileInfo.isCanPreviewInWebView) { - self.wkWebView = [[WKWebView alloc] initWithFrame:self.view.bounds]; - self.wkWebView.backgroundColor = [UIColor whiteColor]; - self.wkWebView.navigationDelegate = self; - [self.view addSubview:self.wkWebView]; - } else { - switch (self.fileInfo.type) { - case _FileTypePList: { - self.textView = [[UITextView alloc] initWithFrame:self.view.bounds]; - self.textView.editable = NO; - self.textView.alwaysBounceVertical = YES; - [self.view addSubview:self.textView]; - break; - } - default: - break; - } - } - - [self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showOrHideNavigationBar)]]; - - self.activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; - [self.view addSubview:self.activityIndicatorView]; -} - -- (void)loadFile { - if (self.fileInfo.isCanPreviewInWebView) { - if (@available(iOS 9.0, *)) { - [self.wkWebView loadFileURL:self.fileInfo.URL allowingReadAccessToURL:self.fileInfo.URL]; - } else { - // Fallback on earlier versions - } - } else { - switch (self.fileInfo.type) { - case _FileTypePList: { - [self.activityIndicatorView startAnimating]; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - NSData *data = [NSData dataWithContentsOfFile:self.fileInfo.URL.path]; - if (data) { - NSString *content = [[NSPropertyListSerialization propertyListWithData:data options:kNilOptions format:nil error:nil] description]; - dispatch_async(dispatch_get_main_queue(), ^{ - [self.activityIndicatorView stopAnimating]; - self.textView.text = content; - }); - } else { - dispatch_async(dispatch_get_main_queue(), ^{ - [self.activityIndicatorView stopAnimating]; - [self showAlert]; - }); - } - }); - break; - } - default: { - [self showAlert]; - } - break; - } - } -} - -#pragma mark - alert -- (void)showAlert { - UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Not supported" message:nil preferredStyle:UIAlertControllerStyleAlert]; - UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]; - [alert addAction:cancelAction]; - - alert.popoverPresentationController.permittedArrowDirections = 0; - alert.popoverPresentationController.sourceView = self.view; - alert.popoverPresentationController.sourceRect = CGRectMake(self.view.bounds.size.width / 2.0, self.view.bounds.size.height / 2.0, 0, 0); - - [self presentViewController:alert animated:YES completion:nil]; -} - -#pragma mark - Action - -- (void)showOrHideNavigationBar { - [self.navigationController setNavigationBarHidden:!self.navigationController.isNavigationBarHidden animated:YES]; -} - -- (void)sharingAction { - if (![_Sandboxer shared].isShareable) { return; } - - [self init_documentInteractionController]; - - if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) { - [self.documentInteractionController presentOptionsMenuFromBarButtonItem:self.navigationItem.rightBarButtonItem animated:YES]; - } else { - [self.documentInteractionController presentOptionsMenuFromRect:CGRectZero inView:self.view animated:YES]; - } -} - -#pragma mark - UIDocumentInteractionControllerDelegate - -- (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller { - return self.navigationController; -} - -- (CGRect)documentInteractionControllerRectForPreview:(UIDocumentInteractionController *)controller { - return self.view.bounds; -} - -- (UIView *)documentInteractionControllerViewForPreview:(UIDocumentInteractionController *)controller { - return self.view; -} - -#pragma mark - QLPreviewControllerDataSource - -- (NSInteger)numberOfPreviewItemsInPreviewController:(QLPreviewController *)controller { - return 1; -} - -- (id)previewController:(QLPreviewController *)controller previewItemAtIndex:(NSInteger)index { - return self.fileInfo.URL; -} - -#pragma mark - WKNavigationDelegate - -- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation { - ////NSLog(@"%@", NSStringFromSelector(_cmd)); - [self.activityIndicatorView startAnimating]; -} - -- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation { - ////NSLog(@"%@", NSStringFromSelector(_cmd)); - [self.activityIndicatorView stopAnimating]; -} - -- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation { - ////NSLog(@"%@", NSStringFromSelector(_cmd)); - [self.activityIndicatorView stopAnimating]; -} - -- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error { - ////NSLog(@"%@, error = %@", NSStringFromSelector(_cmd), error); - [self.activityIndicatorView stopAnimating]; -} - -#pragma mark - WKUIDelegate - - - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_FileTableViewCell.h b/Pods/CocoaDebug/Sources/Sandbox/_FileTableViewCell.h deleted file mode 100755 index f01a375..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_FileTableViewCell.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import - -UIKIT_EXTERN NSString *const _FileTableViewCellReuseIdentifier; - -@interface _FileTableViewCell : UITableViewCell - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_FileTableViewCell.m b/Pods/CocoaDebug/Sources/Sandbox/_FileTableViewCell.m deleted file mode 100755 index 9d4fce3..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_FileTableViewCell.m +++ /dev/null @@ -1,52 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_FileTableViewCell.h" - -NSString *const _FileTableViewCellReuseIdentifier = @"_FileCell"; - -@implementation _FileTableViewCell - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - self = [super initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifier]; - - if (self) { - [self setupViews]; - } - - return self; -} - -- (void)setupViews { - - //liman - self.backgroundColor = [UIColor blackColor]; - self.contentView.backgroundColor = [UIColor blackColor]; - - self.textLabel.textColor = [UIColor whiteColor]; - self.textLabel.adjustsFontSizeToFitWidth = YES; - - self.detailTextLabel.textColor = [UIColor systemGrayColor]; - self.detailTextLabel.adjustsFontSizeToFitWidth = YES; - self.detailTextLabel.font = [UIFont boldSystemFontOfSize:12]; - // self.selectionStyle = UITableViewCellSelectionStyleNone; - - UIView *selectedView = [[UIView alloc] init]; - selectedView.backgroundColor = [UIColor clearColor]; - self.selectedBackgroundView = selectedView; -} - -#pragma mark - Action - - - -#pragma mark - Public Methods - - - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_ImageController.h b/Pods/CocoaDebug/Sources/Sandbox/_ImageController.h deleted file mode 100644 index eb07ffc..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_ImageController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// _ImageController.h -// Example_Objc -// -// Created by man 7/25/19. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import "_FileInfo.h" - -@interface _ImageController : UIViewController - -- (instancetype)initWithImage:(UIImage *)image fileInfo:(_FileInfo *)fileInfo; - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_ImageController.m b/Pods/CocoaDebug/Sources/Sandbox/_ImageController.m deleted file mode 100644 index 4437be7..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_ImageController.m +++ /dev/null @@ -1,126 +0,0 @@ -// -// _ImageController.m -// Example_Objc -// -// Created by man 7/25/19. -// Copyright © 2020 man. All rights reserved. -// - -#import "_ImageController.h" -#import "_Sandboxer.h" - -@interface _ImageController () - -@property (nonatomic, strong) UIImageView *imageView; -@property (nonatomic, strong) UIImage *image; -@property (nonatomic, strong) _FileInfo *fileInfo; -@property (nonatomic, strong) UIDocumentInteractionController *documentInteractionController; -@property (nonatomic, assign) BOOL flag; - -@end - -@implementation _ImageController - -#pragma mark - Getters -- (UIDocumentInteractionController *)documentInteractionController { - if (!_documentInteractionController) { - _documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:self.fileInfo.URL]; - _documentInteractionController.delegate = self; - _documentInteractionController.name = self.fileInfo.displayName; - } - - return _documentInteractionController; -} - -#pragma mark - init -- (instancetype)initWithImage:(UIImage *)image fileInfo:(_FileInfo *)fileInfo { - if (self = [super init]) { - self.image = image; - self.fileInfo = fileInfo; - } - return self; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - if ([_Sandboxer shared].isShareable) { - UIBarButtonItem *shareItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(sharingAction)]; - self.navigationItem.rightBarButtonItem = shareItem; - } - - self.view.backgroundColor = [UIColor whiteColor]; - self.title = self.fileInfo.displayName; - - self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.image.size.width, self.image.size.height)]; - self.imageView.center = CGPointMake(self.view.center.x, self.view.center.y - self.navigationController.navigationBar.frame.size.height - [[UIApplication sharedApplication] statusBarFrame].size.height); - self.imageView.contentMode = UIViewContentModeScaleAspectFit; - self.imageView.image = self.image; - [self.view addSubview:self.imageView]; -} - -#pragma mark - touchesBegan -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { - self.flag = !self.flag; - - if (self.flag) - { - [self.navigationController setNavigationBarHidden:YES animated:YES]; - [UIView animateWithDuration:UINavigationControllerHideShowBarDuration animations:^{ - self.imageView.center = CGPointMake(self.view.center.x, self.view.center.y); - self.view.backgroundColor = [UIColor blackColor]; - }]; - } - else - { - [self.navigationController setNavigationBarHidden:NO animated:YES]; - - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) - { - [UIView animateWithDuration:UINavigationControllerHideShowBarDuration animations:^{ - self.imageView.center = CGPointMake(self.view.center.x, self.view.center.y - 111); - self.view.backgroundColor = [UIColor whiteColor]; - }]; - } - else - { - BOOL iPhoneX = NO; - if (@available(iOS 11.0, *)) { - UIWindow *mainWindow = [[UIApplication sharedApplication] keyWindow]; - if (mainWindow.safeAreaInsets.top > 24.0) { - iPhoneX = YES; - } - } - - [UIView animateWithDuration:UINavigationControllerHideShowBarDuration animations:^{ - self.imageView.center = CGPointMake(self.view.center.x, self.view.center.y - (iPhoneX ? 132 : 96)); - self.view.backgroundColor = [UIColor whiteColor]; - }]; - } - } -} - -#pragma mark - UIDocumentInteractionControllerDelegate -- (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller { - return self.navigationController; -} - -- (CGRect)documentInteractionControllerRectForPreview:(UIDocumentInteractionController *)controller { - return self.view.bounds; -} - -- (UIView *)documentInteractionControllerViewForPreview:(UIDocumentInteractionController *)controller { - return self.view; -} - -#pragma mark - target action -- (void)sharingAction { - if (![_Sandboxer shared].isShareable) { return; } - if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) { - [self.documentInteractionController presentOptionsMenuFromBarButtonItem:self.navigationItem.rightBarButtonItem animated:YES]; - } else { - [self.documentInteractionController presentOptionsMenuFromRect:CGRectZero inView:self.view animated:YES]; - } -} - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_ImageResources.h b/Pods/CocoaDebug/Sources/Sandbox/_ImageResources.h deleted file mode 100755 index dd363d8..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_ImageResources.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import - -@interface _ImageResources : NSObject - -+ (UIImage * _Nullable)imageNamed:(NSString * _Nonnull)imageName; - -+ (UIImage * _Nullable)fileTypeImageNamed:(NSString * _Nonnull)imageName; - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_ImageResources.m b/Pods/CocoaDebug/Sources/Sandbox/_ImageResources.m deleted file mode 100755 index 05d2866..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_ImageResources.m +++ /dev/null @@ -1,85 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_ImageResources.h" - -@implementation _ImageResources - -+ (UIImage * _Nullable)imageNamed:(NSString * _Nonnull)imageName { - return [self imageNamed:imageName fileType:@"png" inDirectory:nil]; -} - -+ (UIImage * _Nullable)fileTypeImageNamed:(NSString * _Nonnull)imageName { - return [self imageNamed:imageName fileType:@"png" inDirectory:nil]; -} - -+ (UIImage * _Nullable)imageNamed:(NSString * _Nonnull)imageName fileType:(NSString * _Nonnull)fileType inDirectory:(NSString * _Nullable)directory { - NSBundle *bundle = [NSBundle bundleForClass:self.class]; - - NSString *x1ImagePath = [bundle pathForResource:[self imageName:imageName appendingScale:1] ofType:fileType inDirectory:directory]; - NSString *x2ImagePath = [bundle pathForResource:[self imageName:imageName appendingScale:2] ofType:fileType inDirectory:directory]; - NSString *x3ImagePath = [bundle pathForResource:[self imageName:imageName appendingScale:3] ofType:fileType inDirectory:directory]; - - NSInteger scale = (NSInteger)[UIScreen mainScreen].scale; - NSString *imagePath; - switch (scale) { - case 1: - imagePath = x1ImagePath; - if (!imagePath) { - imagePath = x2ImagePath; - } - - if (!imagePath) { - imagePath = x3ImagePath; - } - break; - case 2: - imagePath = x2ImagePath; - if (!imagePath) { - imagePath = x3ImagePath; - } - - if (!imagePath) { - imagePath = x1ImagePath; - } - break; - case 3: - imagePath = x3ImagePath; - if (!imagePath) { - imagePath = x2ImagePath; - } - - if (!imagePath) { - imagePath = x1ImagePath; - } - break; - default: - // default @1x - imagePath = x1ImagePath; - break; - } - - UIImage *image = [UIImage imageWithContentsOfFile:imagePath]; - - return image; -} - -#pragma mark - Private Methods - -+ (NSString *)imageName:(NSString *)imageName appendingScale:(NSInteger)scale { - NSString *name; - if (scale == 1) { - name = imageName; - } else { - name = [NSString stringWithFormat:@"%@@%ldx", imageName, (long)scale]; - } - - return name; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_Sandboxer-Header.h b/Pods/CocoaDebug/Sources/Sandbox/_Sandboxer-Header.h deleted file mode 100755 index 51ba326..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_Sandboxer-Header.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#ifndef _Sandboxer_Header_h -#define _Sandboxer_Header_h - -/* - * System Versioning Preprocessor Macros - */ - -#define _SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) -#define _SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) -#define _SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) -#define _SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) -#define _SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) - -#define _IsStringEmpty(string) (nil == string || (NSNull *)string == [NSNull null] || [@"" isEqualToString:string]) -#define _IsStringNotEmpty(string) (string && (NSNull *)string != [NSNull null] && ![@"" isEqualToString:string]) - - -#endif /* _Sandboxer_Header_h */ diff --git a/Pods/CocoaDebug/Sources/Sandbox/_Sandboxer.h b/Pods/CocoaDebug/Sources/Sandbox/_Sandboxer.h deleted file mode 100755 index 9255dca..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_Sandboxer.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import - -@interface _Sandboxer : NSObject - -@property (class, nonatomic, readonly, strong) _Sandboxer *shared; - -@property (nonatomic, assign, getter=isSystemFilesHidden) BOOL systemFilesHidden; // Default is YES -@property (nonatomic, copy) NSURL *homeFileURL; // Default is Home Directory -@property (nonatomic, copy) NSString *homeTitle; // Default is `Home` - -@property (nonatomic, assign, getter=isExtensionHidden) BOOL extensionHidden; // Default is NO - -@property (nonatomic, assign, getter=isShareable) BOOL shareable; // Default is YES - -@property (nonatomic, assign, getter=isFileDeletable) BOOL fileDeletable; // Default is NO -@property (nonatomic, assign, getter=isDirectoryDeletable) BOOL directoryDeletable; // Default is NO - -- (instancetype)init __attribute__((unavailable("Use [_Sandboxer shared] or _Sandboxer.shared instead."))); - -//liman -- (UINavigationController *)homeDirectoryNavigationController; - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_Sandboxer.m b/Pods/CocoaDebug/Sources/Sandbox/_Sandboxer.m deleted file mode 100755 index b643acb..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_Sandboxer.m +++ /dev/null @@ -1,80 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_Sandboxer.h" -#import "_DirectoryContentsTableViewController.h" - -@interface _Sandboxer () - -@property (nonatomic, strong) UINavigationController *homeDirectoryNavigationController; - -@end - -@implementation _Sandboxer - -@synthesize homeTitle = _homeTitle; - -+ (_Sandboxer *)shared { - static _Sandboxer *_sharedInstance = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _sharedInstance = [[_Sandboxer alloc] _init]; - }); - - return _sharedInstance; -} - -- (instancetype)_init { - if (self = [super init]) { - [self _config]; - } - - return self; -} - -#pragma mark - Private Methods - -- (void)_config { - _systemFilesHidden = YES; - _homeFileURL = [NSURL fileURLWithPath:NSHomeDirectory() isDirectory:YES]; - _extensionHidden = NO; - _shareable = YES; -} - -#pragma mark - Setters - -- (void)setHomeTitle:(NSString *)title { - if (![_homeTitle isEqualToString:title]) { - _homeTitle = [title copy]; - [[self.homeDirectoryNavigationController.viewControllers firstObject] setTitle:_homeTitle]; - } -} - -#pragma mark - Getters - -- (NSString *)homeTitle { - if (nil == _homeTitle) { - _homeTitle = @"Sandbox"; - } - - return _homeTitle; -} - -- (UINavigationController *)homeDirectoryNavigationController { - if (!_homeDirectoryNavigationController) { - _DirectoryContentsTableViewController *directoryContentsTableViewController = [[_DirectoryContentsTableViewController alloc] init]; - directoryContentsTableViewController.homeDirectory = YES; - directoryContentsTableViewController.fileInfo = [[_FileInfo alloc] initWithFileURL:self.homeFileURL]; - directoryContentsTableViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; - _homeDirectoryNavigationController = [[UINavigationController alloc] initWithRootViewController:directoryContentsTableViewController]; - } - - return _homeDirectoryNavigationController; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_SandboxerHelper.h b/Pods/CocoaDebug/Sources/Sandbox/_SandboxerHelper.h deleted file mode 100755 index 0ec1d73..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_SandboxerHelper.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import - -@interface _SandboxerHelper : NSObject - -+ (NSString *)fileModificationDateTextWithDate:(NSDate *)date; - -//liman - -//Get Folder Size -+ (NSString *)sizeOfFolder:(NSString *)folderPath; -//Get File Size -+ (NSString *)sizeOfFile:(NSString *)filePath; - -+ (instancetype)sharedInstance; - -+ (NSString *)generateRandomId; - -@property (nonatomic, strong) NSMutableDictionary *searchTextDictionary; - -@end diff --git a/Pods/CocoaDebug/Sources/Sandbox/_SandboxerHelper.m b/Pods/CocoaDebug/Sources/Sandbox/_SandboxerHelper.m deleted file mode 100755 index 8603a3b..0000000 --- a/Pods/CocoaDebug/Sources/Sandbox/_SandboxerHelper.m +++ /dev/null @@ -1,81 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_SandboxerHelper.h" - -@implementation _SandboxerHelper - -+ (NSDateFormatter *)fileModificationDateFormatter { - static NSDateFormatter *_fileModificationDateFormatter; - if (!_fileModificationDateFormatter) { - _fileModificationDateFormatter = [[NSDateFormatter alloc] init]; - _fileModificationDateFormatter.dateFormat = @"yyyy-MM-dd HH:mm:ss.SSS"; - } - - return _fileModificationDateFormatter; -} - -#pragma mark - Public Methods - -+ (instancetype)sharedInstance { - static id sharedInstance = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedInstance = [[self alloc] init]; - }); - return sharedInstance; -} - -+ (NSString *)fileModificationDateTextWithDate:(NSDate *)date { - if (!date) { return @""; } - return [[_SandboxerHelper fileModificationDateFormatter] stringFromDate:date]; -} - -//liman - -//Get Folder Size -+ (NSString *)sizeOfFolder:(NSString *)folderPath { - //Calculate Folder Size with only files - // NSArray *folderContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:folderPath error:nil]; - - //Calculate Folder Size with other sub directories in the folder - NSArray *folderContents = [[NSFileManager defaultManager] subpathsOfDirectoryAtPath:folderPath error:nil]; - - __block unsigned long long int folderSize = 0; - - [folderContents enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { - NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[folderPath stringByAppendingPathComponent:obj] error:nil]; - folderSize += [[fileAttributes objectForKey:NSFileSize] intValue]; - }]; - NSString *folderSizeStr = [NSByteCountFormatter stringFromByteCount:folderSize countStyle:NSByteCountFormatterCountStyleFile]; - return folderSizeStr; -} - -//Get File Size -+ (NSString *)sizeOfFile:(NSString *)filePath { - NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil]; - NSInteger fileSize = [[fileAttributes objectForKey:NSFileSize] integerValue]; - NSString *fileSizeString = [NSByteCountFormatter stringFromByteCount:fileSize countStyle:NSByteCountFormatterCountStyleFile]; - return fileSizeString; -} - -#pragma mark - tool -+ (NSString *)generateRandomId { - UInt64 time = [[NSDate date] timeIntervalSince1970] * 1000; - return [NSString stringWithFormat:@"%llu_%@", time, [self generateRandomString]]; -} - -+ (NSString *)generateRandomString { - char data[10]; - for (int x = 0; x < 10; ++x) { - data[x] = (char)('A' + (arc4random_uniform(26))); - } - return [[NSString alloc] initWithBytes:data length:10 encoding:NSUTF8StringEncoding]; -} - -@end diff --git a/Pods/CocoaDebug/Sources/Swizzling/_Swizzling.h b/Pods/CocoaDebug/Sources/Swizzling/_Swizzling.h deleted file mode 100755 index a060dc3..0000000 --- a/Pods/CocoaDebug/Sources/Swizzling/_Swizzling.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import - -/** - * Replaces the selector's associated method implementation with the - * given implementation (or adds it, if there was no existing one). - * - * @param selector The selector entry in the dispatch table. - * @param newImpl The implementation that will be associated with - * the given selector. - * @param affectedClass The class whose dispatch table will be altered. - * @param isClassMethod Set to YES if the selector denotes a class - * method, or NO if it is an instance method. - * @return The previous implementation associated with - * the swizzled selector. You should store the - * implementation and call it when overwriting - * the selector. - */ -__attribute__((warn_unused_result)) IMP replaceMethod(SEL selector, IMP newImpl, Class affectedClass, BOOL isClassMethod); - - - - diff --git a/Pods/CocoaDebug/Sources/Swizzling/_Swizzling.m b/Pods/CocoaDebug/Sources/Swizzling/_Swizzling.m deleted file mode 100755 index 6f8f17f..0000000 --- a/Pods/CocoaDebug/Sources/Swizzling/_Swizzling.m +++ /dev/null @@ -1,20 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -#import "_Swizzling.h" - -IMP replaceMethod(SEL selector, IMP newImpl, Class affectedClass, BOOL isClassMethod) { - Method origMethod = isClassMethod ? class_getClassMethod(affectedClass, selector) : class_getInstanceMethod(affectedClass, selector); - IMP origImpl = method_getImplementation(origMethod); - - if (!class_addMethod(isClassMethod ? object_getClass(affectedClass) : affectedClass, selector, newImpl, method_getTypeEncoding(origMethod))) { - method_setImplementation(origMethod, newImpl); - } - - return origImpl; -} diff --git a/Pods/CocoaDebug/Sources/Swizzling/_WKWebView+Swizzling.m b/Pods/CocoaDebug/Sources/Swizzling/_WKWebView+Swizzling.m deleted file mode 100644 index ed33e47..0000000 --- a/Pods/CocoaDebug/Sources/Swizzling/_WKWebView+Swizzling.m +++ /dev/null @@ -1,171 +0,0 @@ -// -// WKWebView+Swizzling.m -// 1233213 -// -// Created by man 2019/1/8. -// Copyright © 2020 man. All rights reserved. -// - -#import -#import -#import "_ObjcLog.h" -#import "_NetworkHelper.h" - -@interface WKWebView () - -@end - -@implementation WKWebView (_Swizzling) - -#pragma mark - life -+ (void)load { - - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableWKWebViewMonitoring_CocoaDebug"]) { - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - - SEL original_sel = @selector(initWithFrame:configuration:); - SEL replaced_sel = @selector(replaced_initWithFrame:configuration:); - Method original_method = class_getInstanceMethod([self class], original_sel); - Method replaced_method = class_getInstanceMethod([self class], replaced_sel); - if (!class_addMethod([self class], original_sel, method_getImplementation(replaced_method), method_getTypeEncoding(replaced_method))) { - method_exchangeImplementations(original_method, replaced_method); - } - - /*********************************************************************************************************************************/ - - SEL original_sel2 = NSSelectorFromString(@"dealloc"); - SEL replaced_sel2 = @selector(replaced_dealloc); - Method original_method2 = class_getInstanceMethod([self class], original_sel2); - Method replaced_method2 = class_getInstanceMethod([self class], replaced_sel2); - if (!class_addMethod([self class], original_sel2, method_getImplementation(replaced_method2), method_getTypeEncoding(replaced_method2))) { - method_exchangeImplementations(original_method2, replaced_method2); - } - - SEL original_sel3 = NSSelectorFromString(@"willDealloc"); - SEL replaced_sel3 = @selector(replaced_willDealloc); - Method replaced_method3 = class_getInstanceMethod([self class], replaced_sel3); - class_addMethod([self class], original_sel3, method_getImplementation(replaced_method3), method_getTypeEncoding(replaced_method3)); - }); - } -} - -#pragma mark - replaced method - -- (BOOL)replaced_willDealloc { - // removeScriptMessageHandlerForName - [self.configuration.userContentController removeScriptMessageHandlerForName:@"log"]; - [self.configuration.userContentController removeScriptMessageHandlerForName:@"error"]; - [self.configuration.userContentController removeScriptMessageHandlerForName:@"warn"]; - [self.configuration.userContentController removeScriptMessageHandlerForName:@"debug"]; - [self.configuration.userContentController removeScriptMessageHandlerForName:@"info"]; - - return true; -} - -- (void)replaced_dealloc { - //WKWebView - [_ObjcLog logWithFile:"[WKWebView]" function:"" line:0 color:[UIColor redColor] message:@"-------------------------------- dealloc --------------------------------"]; -} - -- (instancetype)replaced_initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration *)configuration { - //WKWebView - [_ObjcLog logWithFile:"[WKWebView]" function:"" line:0 color:[_NetworkHelper shared].mainColor message:@"----------------------------------- init -----------------------------------"]; - - [self log:configuration]; - [self error:configuration]; - [self warn:configuration]; - [self debug:configuration]; - [self info:configuration]; - - return [self replaced_initWithFrame:frame configuration:configuration]; -} - -#pragma mark - private -- (void)log:(WKWebViewConfiguration *)configuration { - [configuration.userContentController removeScriptMessageHandlerForName:@"log"]; - [configuration.userContentController addScriptMessageHandler:self name:@"log"]; - //rewrite the method of console.log - NSString *jsCode = @"console.log = (function(oriLogFunc){\ - return function(str)\ - {\ - window.webkit.messageHandlers.log.postMessage(str);\ - oriLogFunc.call(console,str);\ - }\ - })(console.log);"; - //injected the method when H5 starts to create the DOM tree - [configuration.userContentController addUserScript:[[WKUserScript alloc] initWithSource:jsCode injectionTime:WKUserScriptInjectionTimeAtDocumentStart forMainFrameOnly:YES]]; -} - -- (void)error:(WKWebViewConfiguration *)configuration { - [configuration.userContentController removeScriptMessageHandlerForName:@"error"]; - [configuration.userContentController addScriptMessageHandler:self name:@"error"]; - //rewrite the method of console.error - NSString *jsCode = @"console.error = (function(oriLogFunc){\ - return function(str)\ - {\ - window.webkit.messageHandlers.error.postMessage(str);\ - oriLogFunc.call(console,str);\ - }\ - })(console.error);"; - //injected the method when H5 starts to create the DOM tree - [configuration.userContentController addUserScript:[[WKUserScript alloc] initWithSource:jsCode injectionTime:WKUserScriptInjectionTimeAtDocumentStart forMainFrameOnly:YES]]; -} - -- (void)warn:(WKWebViewConfiguration *)configuration { - [configuration.userContentController removeScriptMessageHandlerForName:@"warn"]; - [configuration.userContentController addScriptMessageHandler:self name:@"warn"]; - //rewrite the method of console.warn - NSString *jsCode = @"console.warn = (function(oriLogFunc){\ - return function(str)\ - {\ - window.webkit.messageHandlers.warn.postMessage(str);\ - oriLogFunc.call(console,str);\ - }\ - })(console.warn);"; - //injected the method when H5 starts to create the DOM tree - [configuration.userContentController addUserScript:[[WKUserScript alloc] initWithSource:jsCode injectionTime:WKUserScriptInjectionTimeAtDocumentStart forMainFrameOnly:YES]]; -} - -- (void)debug:(WKWebViewConfiguration *)configuration { - [configuration.userContentController removeScriptMessageHandlerForName:@"debug"]; - [configuration.userContentController addScriptMessageHandler:self name:@"debug"]; - //rewrite the method of console.debug - NSString *jsCode = @"console.debug = (function(oriLogFunc){\ - return function(str)\ - {\ - window.webkit.messageHandlers.debug.postMessage(str);\ - oriLogFunc.call(console,str);\ - }\ - })(console.debug);"; - //injected the method when H5 starts to create the DOM tree - [configuration.userContentController addUserScript:[[WKUserScript alloc] initWithSource:jsCode injectionTime:WKUserScriptInjectionTimeAtDocumentStart forMainFrameOnly:YES]]; -} - -- (void)info:(WKWebViewConfiguration *)configuration { - [configuration.userContentController removeScriptMessageHandlerForName:@"info"]; - [configuration.userContentController addScriptMessageHandler:self name:@"info"]; - //rewrite the method of console.info - NSString *jsCode = @"console.info = (function(oriLogFunc){\ - return function(str)\ - {\ - window.webkit.messageHandlers.info.postMessage(str);\ - oriLogFunc.call(console,str);\ - }\ - })(console.info);"; - //injected the method when H5 starts to create the DOM tree - [configuration.userContentController addUserScript:[[WKUserScript alloc] initWithSource:jsCode injectionTime:WKUserScriptInjectionTimeAtDocumentStart forMainFrameOnly:YES]]; -} - - - -#pragma mark - WKScriptMessageHandler -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation" -- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message { - [_ObjcLog logWithFile:"[WKWebView]" function:[message.name UTF8String] line:0 color:[UIColor whiteColor] message:message.body]; -} -#pragma clang diagnostic pop - -@end diff --git a/Pods/CocoaDebug/Sources/Window/Bubble.swift b/Pods/CocoaDebug/Sources/Window/Bubble.swift deleted file mode 100644 index e1d1610..0000000 --- a/Pods/CocoaDebug/Sources/Window/Bubble.swift +++ /dev/null @@ -1,327 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit -import UIKit.UIGestureRecognizerSubclass - -protocol BubbleDelegate: AnyObject { - func didTapBubble() -} - -//https://httpcodes.co/status/ -private var _successStatusCodes = ["200","201","202","203","204","205","206","207","208","226"] -private var _informationalStatusCodes = ["100","101","102","103","122"] -private var _redirectionStatusCodes = ["300","301","302","303","304","305","306","307","308"] - -private var _width: CGFloat = 25 -private var _height: CGFloat = 25 - -class Bubble: UIView { - - weak var delegate: BubbleDelegate? - - public var width: CGFloat = _width - public var height: CGFloat = _height - - private var numberLabel: UILabel? = { - return UILabel.init() - }() - private var networkNumber: Int = 0 - - - static var originalPosition: CGPoint { - if CocoaDebugSettings.shared.bubbleFrameX != 0 && CocoaDebugSettings.shared.bubbleFrameY != 0 { - return CGPoint(x: CGFloat(CocoaDebugSettings.shared.bubbleFrameX), y: CGFloat(CocoaDebugSettings.shared.bubbleFrameY)) - } - - var h = 0 - if #available(iOS 11.0, *) { - if UIApplication.shared.keyWindow?.safeAreaInsets.top ?? 0 > 24.0 { - h = 16; - } - } - return CGPoint(x: 1.875 + _width/2, y: UIScreen.main.bounds.size.height/2 - _height - CGFloat(h)) - } - - static var size: CGSize {return CGSize(width: _width, height: _height)} - - - //MARK: - tool - fileprivate func initLabelEvent(_ content: String, _ foo: Bool) { - if content == "🚀" || content == "❌" - { - //step 0 - let WH: CGFloat = 20 - //step 1 - let label = UILabel() - label.text = content - label.font = UIFont.boldSystemFont(ofSize: 14) - - //step 2 - if foo == true { - label.frame = CGRect(x: self.frame.size.width/2 - WH/2, y: self.frame.size.height/2 - WH/2, width: WH, height: WH) - self.addSubview(label) - } else { - label.frame = CGRect(x: self.center.x - WH/2, y: self.center.y - WH/2, width: WH, height: WH) - self.superview?.addSubview(label) - } - //step 3 - UIView.animate(withDuration: 0.8, animations: { - label.frame.origin.y = foo ? -100 : (self.center.y - 100) - label.alpha = 0 - }, completion: { _ in - label.removeFromSuperview() - }) - } - else - { - //step 0 - let WH: CGFloat = 35 - //step 1 - let label = UILabel() - label.text = content - label.textAlignment = .center - label.adjustsFontSizeToFitWidth = true - label.font = UIFont.boldSystemFont(ofSize: 14) - - if _informationalStatusCodes.contains(content) { - label.textColor = "#4b8af7".hexColor - } - else if _redirectionStatusCodes.contains(content) { - label.textColor = "#ff9800".hexColor - } - else { - label.textColor = .red - } - - //step 3 - if foo == true { - label.frame = CGRect(x: self.frame.size.width/2 - WH/2, y: self.frame.size.height/2 - WH/2, width: WH, height: WH) - self.addSubview(label) - } else { - label.frame = CGRect(x: self.center.x - WH/2, y: self.center.y - WH/2, width: WH, height: WH) - self.superview?.addSubview(label) - } - //step 4 - UIView.animate(withDuration: 0.8, animations: { - label.frame.origin.y = foo ? -100 : (self.center.y - 100) - label.alpha = 0 - }, completion: { _ in - label.removeFromSuperview() - }) - } - } - - - fileprivate func initLayer() { - self.backgroundColor = .black - self.layer.cornerRadius = _width/2 - self.sizeToFit() - - if let numberLabel = numberLabel { - numberLabel.text = String(networkNumber) - numberLabel.textColor = .white - numberLabel.textAlignment = .center - numberLabel.adjustsFontSizeToFitWidth = true - numberLabel.isHidden = true - numberLabel.frame = CGRect(x:0, y:0, width:_width, height:_height) - self.addSubview(numberLabel) - } - - let tapGesture = UITapGestureRecognizer(target: self, action: #selector(Bubble.tap)) - self.addGestureRecognizer(tapGesture) - - let longTap = UILongPressGestureRecognizer.init(target: self, action: #selector(Bubble.longTap)) - self.addGestureRecognizer(longTap) - } - - func changeSideDisplay() { - UIView.animate(withDuration: 0.5, delay: 0.1, usingSpringWithDamping: 0.5, - initialSpringVelocity: 5, options: .curveEaseInOut, animations: { - }, completion: nil) - } - - func updateOrientation(newSize: CGSize) { - let oldSize = CGSize(width: newSize.height, height: newSize.width) - let percent = center.y / oldSize.height * 100 - let newOrigin = newSize.height * percent / 100 - let originX = frame.origin.x < newSize.height / 2 ? _width/8*4.25 : newSize.width - _width/8*4.25 - self.center = CGPoint(x: originX, y: newOrigin) - } - - //MARK: - init - override init(frame: CGRect) { - super.init(frame: frame) - initLayer() - - //添加手势 - let selector = #selector(Bubble.panDidFire(panner:)) - let panGesture = UIPanGestureRecognizer(target: self, action: selector) - self.addGestureRecognizer(panGesture) - - //notification - NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "reloadHttp_CocoaDebug"), object: nil, queue: OperationQueue.main) { [weak self] notification in - self?.reloadHttp_notification(notification) - } - - NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "deleteAllLogs_CocoaDebug"), object: nil, queue: OperationQueue.main) { [weak self] _ in - self?.deleteAllLogs_notification() - } - - NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "SHOW_COCOADEBUG_FORCE"), object: nil, queue: OperationQueue.main) { [weak self] _ in - self?.show_cocoadebug_force() - } - } - - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - deinit { - //notification - NotificationCenter.default.removeObserver(self) - } - - //MARK: - notification - //网络通知 - @objc func reloadHttp_notification(_ notification: Notification) { - - guard let userInfo = notification.userInfo else {return} - let statusCode = userInfo["statusCode"] as? String - - if _successStatusCodes.contains(statusCode ?? "") { - self.initLabelEvent("🚀", true) - } - else if statusCode == "0" { //"0" means network unavailable - self.initLabelEvent("❌", true) - } - else { - guard let statusCode = statusCode else {return} - self.initLabelEvent(statusCode, true) - } - - - self.networkNumber = (self.networkNumber ) + 1 - self.numberLabel?.text = String(networkNumber) - - - if self.networkNumber == 0 { - self.numberLabel?.isHidden = true - } else { - self.numberLabel?.isHidden = false - } - - if networkNumber >= 0 && networkNumber < 10 { - self.numberLabel?.font = UIFont.boldSystemFont(ofSize: 11) - } else if networkNumber >= 10 && networkNumber < 100 { - self.numberLabel?.font = UIFont.boldSystemFont(ofSize: 11) - } else if networkNumber >= 100 && networkNumber < 1000 { - self.numberLabel?.font = UIFont.boldSystemFont(ofSize: 9) - } else if networkNumber >= 1000 && networkNumber < 10000 { - self.numberLabel?.font = UIFont.boldSystemFont(ofSize: 7.5) - } else { - self.numberLabel?.font = UIFont.boldSystemFont(ofSize: 7) - } - } - - - @objc func deleteAllLogs_notification() { - self.networkNumber = 0 - - self.numberLabel?.text = String(networkNumber) - - if self.networkNumber == 0 { - self.numberLabel?.isHidden = true - } else { - self.numberLabel?.isHidden = false - } - } - - @objc func show_cocoadebug_force() { - CocoaDebugSettings.shared.showBubbleAndWindow = !CocoaDebugSettings.shared.showBubbleAndWindow - CocoaDebugSettings.shared.showBubbleAndWindow = !CocoaDebugSettings.shared.showBubbleAndWindow - } - - - //MARK: - target action - @objc func tap() { - delegate?.didTapBubble() - } - - @objc func longTap() { - _HttpDatasource.shared().reset() - CocoaDebugSettings.shared.networkLastIndex = 0 - NotificationCenter.default.post(name: NSNotification.Name("deleteAllLogs_CocoaDebug"), object: nil, userInfo: nil) - } - - @objc func panDidFire(panner: UIPanGestureRecognizer) { - if panner.state == .began { - UIView.animate(withDuration: 0.5, delay: 0, options: .curveLinear, animations: { [weak self] in - self?.transform = CGAffineTransform(scaleX: 0.8, y: 0.8) - }, completion: nil) - } - - let offset = panner.translation(in: self.superview) - panner.setTranslation(CGPoint.zero, in: self.superview) - var center = self.center - center.x += offset.x - center.y += offset.y - self.center = center - - if panner.state == .ended || panner.state == .cancelled { - - var frameInset: UIEdgeInsets - - if #available(iOS 11.0, *) { - frameInset = UIApplication.shared.keyWindow?.safeAreaInsets ?? UIEdgeInsets(top: UIApplication.shared.statusBarFrame.height, left: 0, bottom: 0, right: 0) - } else { - frameInset = UIDevice.current.orientation.isPortrait ? UIEdgeInsets(top: 20, left: 0, bottom: 0, right: 0) : .zero - } - - let location = panner.location(in: self.superview) - let velocity = panner.velocity(in: self.superview) - - var finalX: Double = Double(self.width/8*4.25) - var finalY: Double = Double(location.y) - - if location.x > UIScreen.main.bounds.size.width / 2 { - finalX = Double(UIScreen.main.bounds.size.width) - Double(self.width/8*4.25) - } - - self.changeSideDisplay() - - let horizentalVelocity = abs(velocity.x) - let positionX = abs(finalX - Double(location.x)) - - let velocityForce = sqrt(pow(velocity.x, 2) * pow(velocity.y, 2)) - - let durationAnimation = (velocityForce > 1000.0) ? min(0.3, positionX / Double(horizentalVelocity)) : 0.3 - - if velocityForce > 1000.0 { - finalY += Double(velocity.y) * durationAnimation - } - - if finalY > Double(UIScreen.main.bounds.size.height) - Double(self.height/8*4.25) { - finalY = Double(UIScreen.main.bounds.size.height) - Double(frameInset.bottom) - Double(self.height/8*4.25) - } else if finalY < Double(self.height/8*4.25) + Double(frameInset.top) { - finalY = Double(self.height/8*4.25) + Double(frameInset.top) - } - - // - CocoaDebugSettings.shared.bubbleFrameX = Float(finalX) - CocoaDebugSettings.shared.bubbleFrameY = Float(finalY) - - // - UIView.animate(withDuration: durationAnimation * 5, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 6, options: .allowUserInteraction, animations: { [weak self] in - self?.center = CGPoint(x: finalX, y: finalY) - self?.transform = CGAffineTransform.identity - }, completion:nil) - } - } -} - diff --git a/Pods/CocoaDebug/Sources/Window/CocoaDebugNavigationController.swift b/Pods/CocoaDebug/Sources/Window/CocoaDebugNavigationController.swift deleted file mode 100644 index df41dbf..0000000 --- a/Pods/CocoaDebug/Sources/Window/CocoaDebugNavigationController.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -class CocoaDebugNavigationController: UINavigationController { - - override func viewDidLoad() { - super.viewDidLoad() - - navigationBar.isTranslucent = false //liman - - navigationBar.tintColor = Color.mainGreen - navigationBar.titleTextAttributes = [.font: UIFont.boldSystemFont(ofSize: 20), - .foregroundColor: Color.mainGreen] - - let selector = #selector(CocoaDebugNavigationController.exit) - - let image = UIImage(named: "_icon_file_type_close", in: Bundle(for: CocoaDebugNavigationController.self), compatibleWith: nil) - let leftItem = UIBarButtonItem(image: image, - style: .done, target: self, action: selector) - leftItem.tintColor = Color.mainGreen - topViewController?.navigationItem.leftBarButtonItem = leftItem - - //bugfix #issues-158 - if #available(iOS 13, *) { - let appearance = UINavigationBarAppearance() - appearance.configureWithOpaqueBackground() - // self.navigationController?.navigationBar.isTranslucent = true // pass "true" for fixing iOS 15.0 black bg issue - // self.navigationController?.navigationBar.tintColor = UIColor.white // We need to set tintcolor for iOS 15.0 - appearance.shadowColor = .clear //removing navigationbar 1 px bottom border. -// UINavigationBar.appearance().standardAppearance = appearance -// UINavigationBar.appearance().scrollEdgeAppearance = appearance - self.navigationBar.standardAppearance = appearance - self.navigationBar.scrollEdgeAppearance = appearance - } - } - - - @objc func exit() { - dismiss(animated: true, completion: nil) - } -} diff --git a/Pods/CocoaDebug/Sources/Window/CocoaDebugTabBarController.swift b/Pods/CocoaDebug/Sources/Window/CocoaDebugTabBarController.swift deleted file mode 100644 index cb386a7..0000000 --- a/Pods/CocoaDebug/Sources/Window/CocoaDebugTabBarController.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -class CocoaDebugTabBarController: UITabBarController { - - //MARK: - init - override func viewDidLoad() { - super.viewDidLoad() - - UIApplication.shared.keyWindow?.endEditing(true) - - setChildControllers() - - self.selectedIndex = CocoaDebugSettings.shared.tabBarSelectItem - self.tabBar.tintColor = Color.mainGreen - - //bugfix #issues-158 - if #available(iOS 13, *) { - let appearance = UITabBarAppearance() - appearance.configureWithOpaqueBackground() - appearance.shadowColor = .clear //removing navigationbar 1 px bottom border. -// self.tabBar.appearance().standardAppearance = appearance -// self.tabBar.appearance().scrollEdgeAppearance = appearance - self.tabBar.standardAppearance = appearance - if #available(iOS 15.0, *) { - self.tabBar.scrollEdgeAppearance = appearance - } - } - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - - CocoaDebugSettings.shared.visible = true - } - - override func viewWillDisappear(_ animated: Bool) { - super.viewWillDisappear(animated) - CocoaDebugSettings.shared.visible = false - } - override func viewDidDisappear(_ animated: Bool) { - super.viewDidDisappear(animated) - WindowHelper.shared.displayedList = false - } - - //MARK: - private - func setChildControllers() { - - //1. - let logs = UIStoryboard(name: "Logs", bundle: Bundle(for: CocoaDebug.self)).instantiateViewController(withIdentifier: "Logs") - let network = UIStoryboard(name: "Network", bundle: Bundle(for: CocoaDebug.self)).instantiateViewController(withIdentifier: "Network") - let app = UIStoryboard(name: "App", bundle: Bundle(for: CocoaDebug.self)).instantiateViewController(withIdentifier: "App") - - //2. - _Sandboxer.shared.isSystemFilesHidden = false - _Sandboxer.shared.isExtensionHidden = false - _Sandboxer.shared.isShareable = true - _Sandboxer.shared.isFileDeletable = true - _Sandboxer.shared.isDirectoryDeletable = true - guard let sandbox = _Sandboxer.shared.homeDirectoryNavigationController() else {return} - sandbox.tabBarItem.title = "Sandbox" - sandbox.tabBarItem.image = UIImage.init(named: "_icon_file_type_sandbox", in: Bundle.init(for: CocoaDebug.self), compatibleWith: nil) - - //3. - guard let additionalViewController = CocoaDebugSettings.shared.additionalViewController else { - self.viewControllers = [network, logs, sandbox, app] - return - } - - //4.Add additional controller - var temp = [network, logs, sandbox, app] - - let nav = UINavigationController.init(rootViewController: additionalViewController) - nav.navigationBar.barTintColor = "#1f2124".hexColor - nav.tabBarItem = UITabBarItem.init(tabBarSystemItem: .more, tag: 4) - - //****** copy codes from LogNavigationViewController.swift ****** - nav.navigationBar.isTranslucent = false - - nav.navigationBar.tintColor = Color.mainGreen - nav.navigationBar.titleTextAttributes = [.font: UIFont.boldSystemFont(ofSize: 20), - .foregroundColor: Color.mainGreen] - - let selector = #selector(CocoaDebugNavigationController.exit) - - - let image = UIImage(named: "_icon_file_type_close", in: Bundle(for: CocoaDebugNavigationController.self), compatibleWith: nil) - let leftItem = UIBarButtonItem(image: image, - style: .done, target: self, action: selector) - leftItem.tintColor = Color.mainGreen - nav.topViewController?.navigationItem.leftBarButtonItem = leftItem - //****** copy codes from LogNavigationViewController.swift ****** - - temp.append(nav) - - self.viewControllers = temp - } - - //MARK: - target action - @objc func exit() { - dismiss(animated: true, completion: nil) - } - - //MARK: - show more than 5 tabs by CocoaDebug - // override var traitCollection: UITraitCollection { - // var realTraits = super.traitCollection - // var lieTrait = UITraitCollection.init(horizontalSizeClass: .regular) - // return UITraitCollection(traitsFrom: [realTraits, lieTrait]) - // } -} - -//MARK: - UITabBarDelegate -extension CocoaDebugTabBarController { - - override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) { - guard let items = self.tabBar.items else {return} - - for index in 0...items.count-1 { - if item == items[index] { - CocoaDebugSettings.shared.tabBarSelectItem = index - } - } - } -} diff --git a/Pods/CocoaDebug/Sources/Window/CocoaDebugViewController.swift b/Pods/CocoaDebug/Sources/Window/CocoaDebugViewController.swift deleted file mode 100644 index 97e8058..0000000 --- a/Pods/CocoaDebug/Sources/Window/CocoaDebugViewController.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -class CocoaDebugViewController: UIViewController { - - var bubble = Bubble(frame: CGRect(origin: .zero, size: Bubble.size)) - var uiBlockingBubble = UIBlockingBubble(frame: CGRect(origin: .zero, size: UIBlockingBubble.size)) - - override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { - bubble.updateOrientation(newSize: size) - } - - override func viewDidLoad() { - super.viewDidLoad() - self.view.backgroundColor = .clear - - bubble.center = Bubble.originalPosition - bubble.delegate = self - view.addSubview(bubble) - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - WindowHelper.shared.displayedList = false - if CocoaDebugSettings.shared.enableUIBlockingMonitoring { - view.addSubview(uiBlockingBubble) - } - } - - override func viewDidAppear(_ animated: Bool) { - super.viewDidAppear(animated) - if CocoaDebugSettings.shared.enableUIBlockingMonitoring { - uiBlockingBubble.updateFrame() - } - } - - override func viewDidDisappear(_ animated: Bool) { - super.viewDidDisappear(animated) - if CocoaDebugSettings.shared.enableUIBlockingMonitoring { - uiBlockingBubble.removeFromSuperview() - } - } - - func shouldReceive(point: CGPoint) -> Bool { - if WindowHelper.shared.displayedList { - return true - } - return bubble.frame.contains(point) - } -} - -//MARK: - BubbleDelegate -extension CocoaDebugViewController: BubbleDelegate { - - func didTapBubble() { - WindowHelper.shared.displayedList = true - let storyboard = UIStoryboard(name: "Manager", bundle: Bundle(for: CocoaDebug.self)) - guard let vc = storyboard.instantiateInitialViewController() else {return} - vc.view.backgroundColor = .white - vc.modalPresentationStyle = .fullScreen - self.present(vc, animated: true, completion: nil) - } -} diff --git a/Pods/CocoaDebug/Sources/Window/CocoaDebugWindow.swift b/Pods/CocoaDebug/Sources/Window/CocoaDebugWindow.swift deleted file mode 100644 index 3bad476..0000000 --- a/Pods/CocoaDebug/Sources/Window/CocoaDebugWindow.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -protocol WindowDelegate: AnyObject { - func isPointEvent(point: CGPoint) -> Bool -} - -class CocoaDebugWindow: UIWindow { - - weak var delegate: WindowDelegate? - - override init(frame: CGRect) { - super.init(frame: frame) - - self.backgroundColor = .clear - self.windowLevel = UIWindow.Level(rawValue: UIWindow.Level.alert.rawValue - 1) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { - return self.delegate?.isPointEvent(point: point) ?? false - } -} - -extension WindowHelper: WindowDelegate { - func isPointEvent(point: CGPoint) -> Bool { - return self.vc.shouldReceive(point: point) - } -} diff --git a/Pods/CocoaDebug/Sources/Window/Color.swift b/Pods/CocoaDebug/Sources/Window/Color.swift deleted file mode 100644 index eebc7e8..0000000 --- a/Pods/CocoaDebug/Sources/Window/Color.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -struct Color { - - static var colorGradientHead: [CGColor] { - return [UIColor(red:0.25, green:0.25, blue:0.25, alpha:1.00).cgColor, - UIColor(red:0.15, green:0.15, blue:0.15, alpha:1.00).cgColor] - } - - static var mainGreen: UIColor { - return CocoaDebug.mainColor.hexColor - } -} diff --git a/Pods/CocoaDebug/Sources/Window/UIBlockingBubble.swift b/Pods/CocoaDebug/Sources/Window/UIBlockingBubble.swift deleted file mode 100644 index 216f040..0000000 --- a/Pods/CocoaDebug/Sources/Window/UIBlockingBubble.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -class UIBlockingBubble: UIView { - - static var size: CGSize {return CGSize(width: 70, height: 20)} - - private var uiBlockingLabel: UILabel? = { - return UILabel(frame: CGRect(x:0, y:0, width:size.width, height:size.height)) - }() - - fileprivate func initLayer() { - self.backgroundColor = .black - self.layer.cornerRadius = 4 - self.sizeToFit() - - if let uiBlockingLabel = uiBlockingLabel { - self.addSubview(uiBlockingLabel) - } - } - - //MARK: - init - override init(frame: CGRect) { - super.init(frame: CGRect(x: UIScreen.main.bounds.width/4.0, y:1, width: frame.width, height: frame.height)) - - initLayer() - -// uiBlockingLabel?.attributedText = uiBlockingLabel?.uiBlockingAttributedString(with: 60) - -// WindowHelper.shared.uiBlockingCallback = { [weak self] value in -// self?.uiBlockingLabel?.update(withValue: Float(value)) -// } - - uiBlockingLabel?.textAlignment = .center - uiBlockingLabel?.adjustsFontSizeToFitWidth = true - uiBlockingLabel?.text = "Normal" - uiBlockingLabel?.textColor = .white - - NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "CocoaDebug_Detected_UI_Blocking"), object: nil, queue: OperationQueue.main) { [weak self] _ in - self?.uiBlockingLabel?.text = "Blocking" - self?.uiBlockingLabel?.textColor = .red - - DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) {[weak self] in - self?.uiBlockingLabel?.text = "Normal" - self?.uiBlockingLabel?.textColor = .white - } - } - } - - func updateFrame() { - if #available(iOS 11.0, *) { - let safeAreaInsetsTop = UIApplication.shared.keyWindow?.safeAreaInsets.top ?? 0 - if safeAreaInsetsTop > 24 { //iPhoneX - center.x = UIScreen.main.bounds.width/2.0 - center.y = 39 - - let string = CocoaDebugDeviceInfo.sharedInstance().getPlatformString - if string == "iPhone 12 mini" { - center.y = 43 - } else if string == "iPhone 12" { - center.y = 41 - } else if string == "iPhone 12 Pro" { - center.y = 41 - } else if string == "iPhone 12 Pro Max" { - center.y = 41 - } - } - } - } - - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - deinit { - //notification - NotificationCenter.default.removeObserver(self) - } -} diff --git a/Pods/CocoaDebug/Sources/Window/WindowHelper.swift b/Pods/CocoaDebug/Sources/Window/WindowHelper.swift deleted file mode 100644 index 734db4f..0000000 --- a/Pods/CocoaDebug/Sources/Window/WindowHelper.swift +++ /dev/null @@ -1,96 +0,0 @@ -// -// Example -// man -// -// Created by man 11/11/2018. -// Copyright © 2020 man. All rights reserved. -// - -import UIKit - -public class WindowHelper: NSObject { - public static let shared = WindowHelper() - - var window: CocoaDebugWindow - var displayedList = false - lazy var vc = CocoaDebugViewController() //must lazy init, otherwise crash - - //UIBlocking -// fileprivate var uiBlockingCounter = UIBlockingCounter() -// var uiBlockingCallback:((Int) -> Void)? - - - private override init() { - window = CocoaDebugWindow(frame: UIScreen.main.bounds) - // This is for making the window not to effect the StatusBarStyle - window.bounds.size.height = UIScreen.main.bounds.height.nextDown - super.init() - -// uiBlockingCounter.delegate = self - } - - - public func enable() { - if window.rootViewController == vc { - return - } - - window.rootViewController = vc - window.delegate = self - window.isHidden = false - - if CocoaDebugSettings.shared.enableUIBlockingMonitoring == true { - startUIBlockingMonitoring() - } - - - if #available(iOS 13.0, *) { - var success: Bool = false - - for i in 0...10 { - DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + (0.1 * Double(i))) {[weak self] in - if success == true {return} - - for scene in UIApplication.shared.connectedScenes { - if let windowScene = scene as? UIWindowScene { - self?.window.windowScene = windowScene - success = true - } - } - } - } - } - } - - - public func disable() { - if window.rootViewController == nil { - return - } - window.rootViewController = nil - window.delegate = nil - window.isHidden = true - stopUIBlockingMonitoring() - } - - public func startUIBlockingMonitoring() { -// uiBlockingCounter.startMonitoring() - _RunloopMonitor.shared().begin() - } - - public func stopUIBlockingMonitoring() { -// uiBlockingCounter.stopMonitoring() - _RunloopMonitor.shared().end() - } -} - - -// MARK: - UIBlockingCounterDelegate -//extension WindowHelper: UIBlockingCounterDelegate { -// @objc public func uiBlockingCounter(_ counter: UIBlockingCounter, didUpdateFramesPerSecond uiBlocking: Int) { -// if let uiBlockingCallback = uiBlockingCallback { -// uiBlockingCallback(uiBlocking) -// } -// } -//} - diff --git a/Pods/CocoaDebug/Sources/fishhook/_fishhook.c b/Pods/CocoaDebug/Sources/fishhook/_fishhook.c deleted file mode 100644 index 3ccc75c..0000000 --- a/Pods/CocoaDebug/Sources/fishhook/_fishhook.c +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) 2013, Facebook, Inc. -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name Facebook nor the names of its contributors may be used to -// endorse or promote products derived from this software without specific -// prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "_fishhook.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __LP64__ -typedef struct mach_header_64 mach_header_t; -typedef struct segment_command_64 segment_command_t; -typedef struct section_64 section_t; -typedef struct nlist_64 nlist_t; -#define LC_SEGMENT_ARCH_DEPENDENT LC_SEGMENT_64 -#else -typedef struct mach_header mach_header_t; -typedef struct segment_command segment_command_t; -typedef struct section section_t; -typedef struct nlist nlist_t; -#define LC_SEGMENT_ARCH_DEPENDENT LC_SEGMENT -#endif - -#ifndef SEG_DATA_CONST -#define SEG_DATA_CONST "__DATA_CONST" -#endif - -struct rebindings_entry { - struct rebinding *rebindings; - size_t rebindings_nel; - struct rebindings_entry *next; -}; - -static struct rebindings_entry *_rebindings_head; - -static int prepend_rebindings(struct rebindings_entry **rebindings_head, - struct rebinding rebindings[], - size_t nel) { - struct rebindings_entry *new_entry = (struct rebindings_entry *) malloc(sizeof(struct rebindings_entry)); - if (!new_entry) { - return -1; - } - new_entry->rebindings = (struct rebinding *) malloc(sizeof(struct rebinding) * nel); - if (!new_entry->rebindings) { - free(new_entry); - return -1; - } - memcpy(new_entry->rebindings, rebindings, sizeof(struct rebinding) * nel); - new_entry->rebindings_nel = nel; - new_entry->next = *rebindings_head; - *rebindings_head = new_entry; - return 0; -} - -#if 0 -static int get_protection(void *addr, vm_prot_t *prot, vm_prot_t *max_prot) { - mach_port_t task = mach_task_self(); - vm_size_t size = 0; - vm_address_t address = (vm_address_t)addr; - memory_object_name_t object; -#ifdef __LP64__ - mach_msg_type_number_t count = VM_REGION_BASIC_INFO_COUNT_64; - vm_region_basic_info_data_64_t info; - kern_return_t info_ret = vm_region_64( - task, &address, &size, VM_REGION_BASIC_INFO_64, (vm_region_info_64_t)&info, &count, &object); -#else - mach_msg_type_number_t count = VM_REGION_BASIC_INFO_COUNT; - vm_region_basic_info_data_t info; - kern_return_t info_ret = vm_region(task, &address, &size, VM_REGION_BASIC_INFO, (vm_region_info_t)&info, &count, &object); -#endif - if (info_ret == KERN_SUCCESS) { - if (prot != NULL) - *prot = info.protection; - - if (max_prot != NULL) - *max_prot = info.max_protection; - - return 0; - } - - return -1; -} -#endif - -static void perform_rebinding_with_section(struct rebindings_entry *rebindings, - section_t *section, - intptr_t slide, - nlist_t *symtab, - char *strtab, - uint32_t *indirect_symtab) { - uint32_t *indirect_symbol_indices = indirect_symtab + section->reserved1; - void **indirect_symbol_bindings = (void **)((uintptr_t)slide + section->addr); - - for (uint i = 0; i < section->size / sizeof(void *); i++) { - uint32_t symtab_index = indirect_symbol_indices[i]; - if (symtab_index == INDIRECT_SYMBOL_ABS || symtab_index == INDIRECT_SYMBOL_LOCAL || - symtab_index == (INDIRECT_SYMBOL_LOCAL | INDIRECT_SYMBOL_ABS)) { - continue; - } - uint32_t strtab_offset = symtab[symtab_index].n_un.n_strx; - char *symbol_name = strtab + strtab_offset; - bool symbol_name_longer_than_1 = symbol_name[0] && symbol_name[1]; - struct rebindings_entry *cur = rebindings; - while (cur) { - for (uint j = 0; j < cur->rebindings_nel; j++) { - if (symbol_name_longer_than_1 && strcmp(&symbol_name[1], cur->rebindings[j].name) == 0) { - kern_return_t err; - - if (cur->rebindings[j].replaced != NULL && indirect_symbol_bindings[i] != cur->rebindings[j].replacement) - *(cur->rebindings[j].replaced) = indirect_symbol_bindings[i]; - - /** - * 1. Moved the vm protection modifying codes to here to reduce the - * changing scope. - * 2. Adding VM_PROT_WRITE mode unconditionally because vm_region - * API on some iOS/Mac reports mismatch vm protection attributes. - * -- Lianfu Hao Jun 16th, 2021 - **/ - err = vm_protect (mach_task_self (), (uintptr_t)indirect_symbol_bindings, section->size, 0, VM_PROT_READ | VM_PROT_WRITE | VM_PROT_COPY); - if (err == KERN_SUCCESS) { - /** - * Once we failed to change the vm protection, we - * MUST NOT continue the following write actions! - * iOS 15 has corrected the const segments prot. - * -- Lionfore Hao Jun 11th, 2021 - **/ - indirect_symbol_bindings[i] = cur->rebindings[j].replacement; - } - goto symbol_loop; - } - } - cur = cur->next; - } - symbol_loop:; - } -} - -static void rebind_symbols_for_image(struct rebindings_entry *rebindings, - const struct mach_header *header, - intptr_t slide) { - Dl_info info; - if (dladdr(header, &info) == 0) { - return; - } - - segment_command_t *cur_seg_cmd; - segment_command_t *linkedit_segment = NULL; - struct symtab_command* symtab_cmd = NULL; - struct dysymtab_command* dysymtab_cmd = NULL; - - uintptr_t cur = (uintptr_t)header + sizeof(mach_header_t); - for (uint i = 0; i < header->ncmds; i++, cur += cur_seg_cmd->cmdsize) { - cur_seg_cmd = (segment_command_t *)cur; - if (cur_seg_cmd->cmd == LC_SEGMENT_ARCH_DEPENDENT) { - if (strcmp(cur_seg_cmd->segname, SEG_LINKEDIT) == 0) { - linkedit_segment = cur_seg_cmd; - } - } else if (cur_seg_cmd->cmd == LC_SYMTAB) { - symtab_cmd = (struct symtab_command*)cur_seg_cmd; - } else if (cur_seg_cmd->cmd == LC_DYSYMTAB) { - dysymtab_cmd = (struct dysymtab_command*)cur_seg_cmd; - } - } - - if (!symtab_cmd || !dysymtab_cmd || !linkedit_segment || - !dysymtab_cmd->nindirectsyms) { - return; - } - - // Find base symbol/string table addresses - uintptr_t linkedit_base = (uintptr_t)slide + linkedit_segment->vmaddr - linkedit_segment->fileoff; - nlist_t *symtab = (nlist_t *)(linkedit_base + symtab_cmd->symoff); - char *strtab = (char *)(linkedit_base + symtab_cmd->stroff); - - // Get indirect symbol table (array of uint32_t indices into symbol table) - uint32_t *indirect_symtab = (uint32_t *)(linkedit_base + dysymtab_cmd->indirectsymoff); - - cur = (uintptr_t)header + sizeof(mach_header_t); - for (uint i = 0; i < header->ncmds; i++, cur += cur_seg_cmd->cmdsize) { - cur_seg_cmd = (segment_command_t *)cur; - if (cur_seg_cmd->cmd == LC_SEGMENT_ARCH_DEPENDENT) { - if (strcmp(cur_seg_cmd->segname, SEG_DATA) != 0 && - strcmp(cur_seg_cmd->segname, SEG_DATA_CONST) != 0) { - continue; - } - for (uint j = 0; j < cur_seg_cmd->nsects; j++) { - section_t *sect = - (section_t *)(cur + sizeof(segment_command_t)) + j; - if ((sect->flags & SECTION_TYPE) == S_LAZY_SYMBOL_POINTERS) { - perform_rebinding_with_section(rebindings, sect, slide, symtab, strtab, indirect_symtab); - } - if ((sect->flags & SECTION_TYPE) == S_NON_LAZY_SYMBOL_POINTERS) { - perform_rebinding_with_section(rebindings, sect, slide, symtab, strtab, indirect_symtab); - } - } - } - } -} - -static void _rebind_symbols_for_image(const struct mach_header *header, - intptr_t slide) { - rebind_symbols_for_image(_rebindings_head, header, slide); -} - -int rebind_symbols_image(void *header, - intptr_t slide, - struct rebinding rebindings[], - size_t rebindings_nel) { - struct rebindings_entry *rebindings_head = NULL; - int retval = prepend_rebindings(&rebindings_head, rebindings, rebindings_nel); - rebind_symbols_for_image(rebindings_head, (const struct mach_header *) header, slide); - if (rebindings_head) { - free(rebindings_head->rebindings); - } - free(rebindings_head); - return retval; -} - -int rebind_symbols(struct rebinding rebindings[], size_t rebindings_nel) { - int retval = prepend_rebindings(&_rebindings_head, rebindings, rebindings_nel); - if (retval < 0) { - return retval; - } - // If this was the first call, register callback for image additions (which is also invoked for - // existing images, otherwise, just run on existing images - if (!_rebindings_head->next) { - _dyld_register_func_for_add_image(_rebind_symbols_for_image); - } else { - uint32_t c = _dyld_image_count(); - for (uint32_t i = 0; i < c; i++) { - _rebind_symbols_for_image(_dyld_get_image_header(i), _dyld_get_image_vmaddr_slide(i)); - } - } - return retval; -} diff --git a/Pods/CocoaDebug/Sources/fishhook/_fishhook.h b/Pods/CocoaDebug/Sources/fishhook/_fishhook.h deleted file mode 100644 index 0d8e36a..0000000 --- a/Pods/CocoaDebug/Sources/fishhook/_fishhook.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2013, Facebook, Inc. -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name Facebook nor the names of its contributors may be used to -// endorse or promote products derived from this software without specific -// prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef fishhook_h -#define fishhook_h - -#include -#include - -#if !defined(FISHHOOK_EXPORT) -#define FISHHOOK_VISIBILITY __attribute__((visibility("hidden"))) -#else -#define FISHHOOK_VISIBILITY __attribute__((visibility("default"))) -#endif - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -/* - * A structure representing a particular intended rebinding from a symbol - * name to its replacement - */ -struct rebinding { - const char *name; - void *replacement; - void **replaced; -}; - -/* - * For each rebinding in rebindings, rebinds references to external, indirect - * symbols with the specified name to instead point at replacement for each - * image in the calling process as well as for all future images that are loaded - * by the process. If rebind_functions is called more than once, the symbols to - * rebind are added to the existing list of rebindings, and if a given symbol - * is rebound more than once, the later rebinding will take precedence. - */ -FISHHOOK_VISIBILITY -int rebind_symbols(struct rebinding rebindings[], size_t rebindings_nel); - -/* - * Rebinds as above, but only in the specified image. The header should point - * to the mach-o header, the slide should be the slide offset. Others as above. - */ -FISHHOOK_VISIBILITY -int rebind_symbols_image(void *header, - intptr_t slide, - struct rebinding rebindings[], - size_t rebindings_nel); - -#ifdef __cplusplus -} -#endif //__cplusplus - -#endif //fishhook_h - diff --git a/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/cmdutils.c b/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/cmdutils.c new file mode 100644 index 0000000..6f62ec0 --- /dev/null +++ b/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/cmdutils.c @@ -0,0 +1,2376 @@ +/* + * Various utilities for command line tools + * Copyright (c) 2000-2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include +#include + +/* Include only the enabled headers since some compilers (namely, Sun + Studio) will not omit unused inline functions and create undefined + references to libraries that are not being built. */ + +#include "config.h" +//#include "compat/va_copy.h" +#include "avformat.h" +#include "avfilter.h" +#include "avdevice.h" +//#include "libavresample/avresample.h" +#include "swscale.h" +#include "swresample.h" +//#include "libpostproc/postprocess.h" +#include "attributes.h" +#include "avassert.h" +#include "avstring.h" +#include "bprint.h" +#include "display.h" +#include "mathematics.h" +#include "imgutils.h" +//#include "libm.h" +#include "parseutils.h" +#include "pixdesc.h" +#include "eval.h" +#include "dict.h" +#include "opt.h" +#include "cpu.h" +#include "ffversion.h" +#include "avutilVersion.h" +#include "cmdutils.h" +#if HAVE_SYS_RESOURCE_H +#include +#include +#endif +#ifdef _WIN32 +#include +#endif + +static int init_report(const char *env); + +AVDictionary *sws_dict; +AVDictionary *swr_opts; +AVDictionary *format_opts, *codec_opts, *resample_opts; + +static FILE *report_file; +static int report_file_level = AV_LOG_DEBUG; +int hide_banner = 0; + +enum show_muxdemuxers { + SHOW_DEFAULT, + SHOW_DEMUXERS, + SHOW_MUXERS, +}; + +void init_opts(void) +{ + av_dict_set(&sws_dict, "flags", "bicubic", 0); +} + +void uninit_opts(void) +{ + av_dict_free(&swr_opts); + av_dict_free(&sws_dict); + av_dict_free(&format_opts); + av_dict_free(&codec_opts); + av_dict_free(&resample_opts); +} + +void log_callback_help(void *ptr, int level, const char *fmt, va_list vl) +{ + vfprintf(stdout, fmt, vl); +} + +static void log_callback_report(void *ptr, int level, const char *fmt, va_list vl) +{ + va_list vl2; + char line[1024]; + static int print_prefix = 1; + + va_copy(vl2, vl); + av_log_default_callback(ptr, level, fmt, vl); + av_log_format_line(ptr, level, fmt, vl2, line, sizeof(line), &print_prefix); + va_end(vl2); + if (report_file_level >= level) { + fputs(line, report_file); + fflush(report_file); + } +} + +void init_dynload(void) +{ +#if HAVE_SETDLLDIRECTORY && defined(_WIN32) + /* Calling SetDllDirectory with the empty string (but not NULL) removes the + * current working directory from the DLL search path as a security pre-caution. */ + SetDllDirectory(""); +#endif +} + +static void (*program_exit)(int ret); + +void register_exit(void (*cb)(int ret)) +{ + program_exit = cb; +} + +void exit_program(int ret) +{ + if (program_exit) + program_exit(ret); + + exit(ret); +} + +double parse_number_or_die(const char *context, const char *numstr, int type, + double min, double max) +{ + char *tail; + const char *error; + double d = av_strtod(numstr, &tail); + if (*tail) + error = "Expected number for %s but found: %s\n"; + else if (d < min || d > max) + error = "The value for %s was %s which is not within %f - %f\n"; + else if (type == OPT_INT64 && (int64_t)d != d) + error = "Expected int64 for %s but found %s\n"; + else if (type == OPT_INT && (int)d != d) + error = "Expected int for %s but found %s\n"; + else + return d; + av_log(NULL, AV_LOG_FATAL, error, context, numstr, min, max); + exit_program(1); + return 0; +} + +int64_t parse_time_or_die(const char *context, const char *timestr, + int is_duration) +{ + int64_t us; + if (av_parse_time(&us, timestr, is_duration) < 0) { + av_log(NULL, AV_LOG_FATAL, "Invalid %s specification for %s: %s\n", + is_duration ? "duration" : "date", context, timestr); + exit_program(1); + } + return us; +} + +void show_help_options(const OptionDef *options, const char *msg, int req_flags, + int rej_flags, int alt_flags) +{ + const OptionDef *po; + int first; + + first = 1; + for (po = options; po->name; po++) { + char buf[128]; + + if (((po->flags & req_flags) != req_flags) || + (alt_flags && !(po->flags & alt_flags)) || + (po->flags & rej_flags)) + continue; + + if (first) { + printf("%s\n", msg); + first = 0; + } + av_strlcpy(buf, po->name, sizeof(buf)); + if (po->argname) { + av_strlcat(buf, " ", sizeof(buf)); + av_strlcat(buf, po->argname, sizeof(buf)); + } + printf("-%-17s %s\n", buf, po->help); + } + printf("\n"); +} + +void show_help_children(const AVClass *class, int flags) +{ + const AVClass *child = NULL; + if (class->option) { + av_opt_show2(&class, NULL, flags, 0); + printf("\n"); + } + + while (child = av_opt_child_class_next(class, child)) + show_help_children(child, flags); +} + +static const OptionDef *find_option(const OptionDef *po, const char *name) +{ + const char *p = strchr(name, ':'); + int len = p ? p - name : strlen(name); + + while (po->name) { + if (!strncmp(name, po->name, len) && strlen(po->name) == len) + break; + po++; + } + return po; +} + +/* _WIN32 means using the windows libc - cygwin doesn't define that + * by default. HAVE_COMMANDLINETOARGVW is true on cygwin, while + * it doesn't provide the actual command line via GetCommandLineW(). */ +#if HAVE_COMMANDLINETOARGVW && defined(_WIN32) +#include +/* Will be leaked on exit */ +static char** win32_argv_utf8 = NULL; +static int win32_argc = 0; + +/** + * Prepare command line arguments for executable. + * For Windows - perform wide-char to UTF-8 conversion. + * Input arguments should be main() function arguments. + * @param argc_ptr Arguments number (including executable) + * @param argv_ptr Arguments list. + */ +static void prepare_app_arguments(int *argc_ptr, char ***argv_ptr) +{ + char *argstr_flat; + wchar_t **argv_w; + int i, buffsize = 0, offset = 0; + + if (win32_argv_utf8) { + *argc_ptr = win32_argc; + *argv_ptr = win32_argv_utf8; + return; + } + + win32_argc = 0; + argv_w = CommandLineToArgvW(GetCommandLineW(), &win32_argc); + if (win32_argc <= 0 || !argv_w) + return; + + /* determine the UTF-8 buffer size (including NULL-termination symbols) */ + for (i = 0; i < win32_argc; i++) + buffsize += WideCharToMultiByte(CP_UTF8, 0, argv_w[i], -1, + NULL, 0, NULL, NULL); + + win32_argv_utf8 = av_mallocz(sizeof(char *) * (win32_argc + 1) + buffsize); + argstr_flat = (char *)win32_argv_utf8 + sizeof(char *) * (win32_argc + 1); + if (!win32_argv_utf8) { + LocalFree(argv_w); + return; + } + + for (i = 0; i < win32_argc; i++) { + win32_argv_utf8[i] = &argstr_flat[offset]; + offset += WideCharToMultiByte(CP_UTF8, 0, argv_w[i], -1, + &argstr_flat[offset], + buffsize - offset, NULL, NULL); + } + win32_argv_utf8[i] = NULL; + LocalFree(argv_w); + + *argc_ptr = win32_argc; + *argv_ptr = win32_argv_utf8; +} +#else +static inline void prepare_app_arguments(int *argc_ptr, char ***argv_ptr) +{ + /* nothing to do */ +} +#endif /* HAVE_COMMANDLINETOARGVW */ + +static int write_option(void *optctx, const OptionDef *po, const char *opt, + const char *arg) +{ + /* new-style options contain an offset into optctx, old-style address of + * a global var*/ + void *dst = po->flags & (OPT_OFFSET | OPT_SPEC) ? + (uint8_t *)optctx + po->u.off : po->u.dst_ptr; + int *dstcount; + + if (po->flags & OPT_SPEC) { + SpecifierOpt **so = dst; + char *p = strchr(opt, ':'); + char *str; + + dstcount = (int *)(so + 1); + *so = grow_array(*so, sizeof(**so), dstcount, *dstcount + 1); + str = av_strdup(p ? p + 1 : ""); + if (!str) + return AVERROR(ENOMEM); + (*so)[*dstcount - 1].specifier = str; + dst = &(*so)[*dstcount - 1].u; + } + + if (po->flags & OPT_STRING) { + char *str; + str = av_strdup(arg); + av_freep(dst); + if (!str) + return AVERROR(ENOMEM); + *(char **)dst = str; + } else if (po->flags & OPT_BOOL || po->flags & OPT_INT) { + *(int *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX); + } else if (po->flags & OPT_INT64) { + *(int64_t *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX); + } else if (po->flags & OPT_TIME) { + *(int64_t *)dst = parse_time_or_die(opt, arg, 1); + } else if (po->flags & OPT_FLOAT) { + *(float *)dst = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY); + } else if (po->flags & OPT_DOUBLE) { + *(double *)dst = parse_number_or_die(opt, arg, OPT_DOUBLE, -INFINITY, INFINITY); + } else if (po->u.func_arg) { + int ret = po->u.func_arg(optctx, opt, arg); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, + "Failed to set value '%s' for option '%s': %s\n", + arg, opt, av_err2str(ret)); + return ret; + } + } + if (po->flags & OPT_EXIT) + exit_program(0); + + return 0; +} + +int parse_option(void *optctx, const char *opt, const char *arg, + const OptionDef *options) +{ + const OptionDef *po; + int ret; + + po = find_option(options, opt); + if (!po->name && opt[0] == 'n' && opt[1] == 'o') { + /* handle 'no' bool option */ + po = find_option(options, opt + 2); + if ((po->name && (po->flags & OPT_BOOL))) + arg = "0"; + } else if (po->flags & OPT_BOOL) + arg = "1"; + + if (!po->name) + po = find_option(options, "default"); + if (!po->name) { + av_log(NULL, AV_LOG_ERROR, "Unrecognized option '%s'\n", opt); + return AVERROR(EINVAL); + } + if (po->flags & HAS_ARG && !arg) { + av_log(NULL, AV_LOG_ERROR, "Missing argument for option '%s'\n", opt); + return AVERROR(EINVAL); + } + + ret = write_option(optctx, po, opt, arg); + if (ret < 0) + return ret; + + return !!(po->flags & HAS_ARG); +} + +void parse_options(void *optctx, int argc, char **argv, const OptionDef *options, + void (*parse_arg_function)(void *, const char*)) +{ + const char *opt; + int optindex, handleoptions = 1, ret; + + /* perform system-dependent conversions for arguments list */ + prepare_app_arguments(&argc, &argv); + + /* parse options */ + optindex = 1; + while (optindex < argc) { + opt = argv[optindex++]; + + if (handleoptions && opt[0] == '-' && opt[1] != '\0') { + if (opt[1] == '-' && opt[2] == '\0') { + handleoptions = 0; + continue; + } + opt++; + + if ((ret = parse_option(optctx, opt, argv[optindex], options)) < 0) + exit_program(1); + optindex += ret; + } else { + if (parse_arg_function) + parse_arg_function(optctx, opt); + } + } +} + +int parse_optgroup(void *optctx, OptionGroup *g) +{ + int i, ret; + + av_log(NULL, AV_LOG_DEBUG, "Parsing a group of options: %s %s.\n", + g->group_def->name, g->arg); + + for (i = 0; i < g->nb_opts; i++) { + Option *o = &g->opts[i]; + + if (g->group_def->flags && + !(g->group_def->flags & o->opt->flags)) { + av_log(NULL, AV_LOG_ERROR, "Option %s (%s) cannot be applied to " + "%s %s -- you are trying to apply an input option to an " + "output file or vice versa. Move this option before the " + "file it belongs to.\n", o->key, o->opt->help, + g->group_def->name, g->arg); + return AVERROR(EINVAL); + } + + av_log(NULL, AV_LOG_DEBUG, "Applying option %s (%s) with argument %s.\n", + o->key, o->opt->help, o->val); + + ret = write_option(optctx, o->opt, o->key, o->val); + if (ret < 0) + return ret; + } + + av_log(NULL, AV_LOG_DEBUG, "Successfully parsed a group of options.\n"); + + return 0; +} + +int locate_option(int argc, char **argv, const OptionDef *options, + const char *optname) +{ + const OptionDef *po; + int i; + + for (i = 1; i < argc; i++) { + const char *cur_opt = argv[i]; + + if (*cur_opt++ != '-') + continue; + + po = find_option(options, cur_opt); + if (!po->name && cur_opt[0] == 'n' && cur_opt[1] == 'o') + po = find_option(options, cur_opt + 2); + + if ((!po->name && !strcmp(cur_opt, optname)) || + (po->name && !strcmp(optname, po->name))) + return i; + + if (!po->name || po->flags & HAS_ARG) + i++; + } + return 0; +} + +static void dump_argument(const char *a) +{ + const unsigned char *p; + + for (p = a; *p; p++) + if (!((*p >= '+' && *p <= ':') || (*p >= '@' && *p <= 'Z') || + *p == '_' || (*p >= 'a' && *p <= 'z'))) + break; + if (!*p) { + fputs(a, report_file); + return; + } + fputc('"', report_file); + for (p = a; *p; p++) { + if (*p == '\\' || *p == '"' || *p == '$' || *p == '`') + fprintf(report_file, "\\%c", *p); + else if (*p < ' ' || *p > '~') + fprintf(report_file, "\\x%02x", *p); + else + fputc(*p, report_file); + } + fputc('"', report_file); +} + +static void check_options(const OptionDef *po) +{ + while (po->name) { + if (po->flags & OPT_PERFILE) + av_assert0(po->flags & (OPT_INPUT | OPT_OUTPUT)); + po++; + } +} + +void parse_loglevel(int argc, char **argv, const OptionDef *options) +{ + int idx = locate_option(argc, argv, options, "loglevel"); + const char *env; + + check_options(options); + + if (!idx) + idx = locate_option(argc, argv, options, "v"); + if (idx && argv[idx + 1]) + opt_loglevel(NULL, "loglevel", argv[idx + 1]); + idx = locate_option(argc, argv, options, "report"); + if ((env = getenv("FFREPORT")) || idx) { + init_report(env); + if (report_file) { + int i; + fprintf(report_file, "Command line:\n"); + for (i = 0; i < argc; i++) { + dump_argument(argv[i]); + fputc(i < argc - 1 ? ' ' : '\n', report_file); + } + fflush(report_file); + } + } + idx = locate_option(argc, argv, options, "hide_banner"); + if (idx) + hide_banner = 1; +} + +static const AVOption *opt_find(void *obj, const char *name, const char *unit, + int opt_flags, int search_flags) +{ + const AVOption *o = av_opt_find(obj, name, unit, opt_flags, search_flags); + if(o && !o->flags) + return NULL; + return o; +} + +#define FLAGS (o->type == AV_OPT_TYPE_FLAGS && (arg[0]=='-' || arg[0]=='+')) ? AV_DICT_APPEND : 0 +int opt_default(void *optctx, const char *opt, const char *arg) +{ + const AVOption *o; + int consumed = 0; + char opt_stripped[128]; + const char *p; + const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(); +#if CONFIG_AVRESAMPLE + const AVClass *rc = avresample_get_class(); +#endif +#if CONFIG_SWSCALE + const AVClass *sc = sws_get_class(); +#endif +#if CONFIG_SWRESAMPLE + const AVClass *swr_class = swr_get_class(); +#endif + + if (!strcmp(opt, "debug") || !strcmp(opt, "fdebug")) + av_log_set_level(AV_LOG_DEBUG); + + if (!(p = strchr(opt, ':'))) + p = opt + strlen(opt); + av_strlcpy(opt_stripped, opt, FFMIN(sizeof(opt_stripped), p - opt + 1)); + + if ((o = opt_find(&cc, opt_stripped, NULL, 0, + AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) || + ((opt[0] == 'v' || opt[0] == 'a' || opt[0] == 's') && + (o = opt_find(&cc, opt + 1, NULL, 0, AV_OPT_SEARCH_FAKE_OBJ)))) { + av_dict_set(&codec_opts, opt, arg, FLAGS); + consumed = 1; + } + if ((o = opt_find(&fc, opt, NULL, 0, + AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { + av_dict_set(&format_opts, opt, arg, FLAGS); + if (consumed) + av_log(NULL, AV_LOG_VERBOSE, "Routing option %s to both codec and muxer layer\n", opt); + consumed = 1; + } +#if CONFIG_SWSCALE + if (!consumed && (o = opt_find(&sc, opt, NULL, 0, + AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { + struct SwsContext *sws = sws_alloc_context(); + int ret = av_opt_set(sws, opt, arg, 0); + sws_freeContext(sws); + if (!strcmp(opt, "srcw") || !strcmp(opt, "srch") || + !strcmp(opt, "dstw") || !strcmp(opt, "dsth") || + !strcmp(opt, "src_format") || !strcmp(opt, "dst_format")) { + av_log(NULL, AV_LOG_ERROR, "Directly using swscale dimensions/format options is not supported, please use the -s or -pix_fmt options\n"); + return AVERROR(EINVAL); + } + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "Error setting option %s.\n", opt); + return ret; + } + + av_dict_set(&sws_dict, opt, arg, FLAGS); + + consumed = 1; + } +#else + if (!consumed && !strcmp(opt, "sws_flags")) { + av_log(NULL, AV_LOG_WARNING, "Ignoring %s %s, due to disabled swscale\n", opt, arg); + consumed = 1; + } +#endif +#if CONFIG_SWRESAMPLE + if (!consumed && (o=opt_find(&swr_class, opt, NULL, 0, + AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { + struct SwrContext *swr = swr_alloc(); + int ret = av_opt_set(swr, opt, arg, 0); + swr_free(&swr); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "Error setting option %s.\n", opt); + return ret; + } + av_dict_set(&swr_opts, opt, arg, FLAGS); + consumed = 1; + } +#endif +#if CONFIG_AVRESAMPLE + if ((o=opt_find(&rc, opt, NULL, 0, + AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { + av_dict_set(&resample_opts, opt, arg, FLAGS); + consumed = 1; + } +#endif + + if (consumed) + return 0; + return AVERROR_OPTION_NOT_FOUND; +} + +/* + * Check whether given option is a group separator. + * + * @return index of the group definition that matched or -1 if none + */ +static int match_group_separator(const OptionGroupDef *groups, int nb_groups, + const char *opt) +{ + int i; + + for (i = 0; i < nb_groups; i++) { + const OptionGroupDef *p = &groups[i]; + if (p->sep && !strcmp(p->sep, opt)) + return i; + } + + return -1; +} + +/* + * Finish parsing an option group. + * + * @param group_idx which group definition should this group belong to + * @param arg argument of the group delimiting option + */ +static void finish_group(OptionParseContext *octx, int group_idx, + const char *arg) +{ + OptionGroupList *l = &octx->groups[group_idx]; + OptionGroup *g; + + GROW_ARRAY(l->groups, l->nb_groups); + g = &l->groups[l->nb_groups - 1]; + + *g = octx->cur_group; + g->arg = arg; + g->group_def = l->group_def; + g->sws_dict = sws_dict; + g->swr_opts = swr_opts; + g->codec_opts = codec_opts; + g->format_opts = format_opts; + g->resample_opts = resample_opts; + + codec_opts = NULL; + format_opts = NULL; + resample_opts = NULL; + sws_dict = NULL; + swr_opts = NULL; + init_opts(); + + memset(&octx->cur_group, 0, sizeof(octx->cur_group)); +} + +/* + * Add an option instance to currently parsed group. + */ +static void add_opt(OptionParseContext *octx, const OptionDef *opt, + const char *key, const char *val) +{ + int global = !(opt->flags & (OPT_PERFILE | OPT_SPEC | OPT_OFFSET)); + OptionGroup *g = global ? &octx->global_opts : &octx->cur_group; + + GROW_ARRAY(g->opts, g->nb_opts); + g->opts[g->nb_opts - 1].opt = opt; + g->opts[g->nb_opts - 1].key = key; + g->opts[g->nb_opts - 1].val = val; +} + +static void init_parse_context(OptionParseContext *octx, + const OptionGroupDef *groups, int nb_groups) +{ + static const OptionGroupDef global_group = { "global" }; + int i; + + memset(octx, 0, sizeof(*octx)); + + octx->nb_groups = nb_groups; + octx->groups = av_mallocz_array(octx->nb_groups, sizeof(*octx->groups)); + if (!octx->groups) + exit_program(1); + + for (i = 0; i < octx->nb_groups; i++) + octx->groups[i].group_def = &groups[i]; + + octx->global_opts.group_def = &global_group; + octx->global_opts.arg = ""; + + init_opts(); +} + +void uninit_parse_context(OptionParseContext *octx) +{ + int i, j; + + for (i = 0; i < octx->nb_groups; i++) { + OptionGroupList *l = &octx->groups[i]; + + for (j = 0; j < l->nb_groups; j++) { + av_freep(&l->groups[j].opts); + av_dict_free(&l->groups[j].codec_opts); + av_dict_free(&l->groups[j].format_opts); + av_dict_free(&l->groups[j].resample_opts); + + av_dict_free(&l->groups[j].sws_dict); + av_dict_free(&l->groups[j].swr_opts); + } + av_freep(&l->groups); + } + av_freep(&octx->groups); + + av_freep(&octx->cur_group.opts); + av_freep(&octx->global_opts.opts); + + uninit_opts(); +} + +int split_commandline(OptionParseContext *octx, int argc, char *argv[], + const OptionDef *options, + const OptionGroupDef *groups, int nb_groups) +{ + int optindex = 1; + int dashdash = -2; + + /* perform system-dependent conversions for arguments list */ + prepare_app_arguments(&argc, &argv); + + init_parse_context(octx, groups, nb_groups); + av_log(NULL, AV_LOG_DEBUG, "Splitting the commandline.\n"); + + while (optindex < argc) { + const char *opt = argv[optindex++], *arg; + const OptionDef *po; + int ret; + + av_log(NULL, AV_LOG_DEBUG, "Reading option '%s' ...", opt); + + if (opt[0] == '-' && opt[1] == '-' && !opt[2]) { + dashdash = optindex; + continue; + } + /* unnamed group separators, e.g. output filename */ + if (opt[0] != '-' || !opt[1] || dashdash+1 == optindex) { + finish_group(octx, 0, opt); + av_log(NULL, AV_LOG_DEBUG, " matched as %s.\n", groups[0].name); + continue; + } + opt++; + +#define GET_ARG(arg) \ +do { \ + arg = argv[optindex++]; \ + if (!arg) { \ + av_log(NULL, AV_LOG_ERROR, "Missing argument for option '%s'.\n", opt);\ + return AVERROR(EINVAL); \ + } \ +} while (0) + + /* named group separators, e.g. -i */ + if ((ret = match_group_separator(groups, nb_groups, opt)) >= 0) { + GET_ARG(arg); + finish_group(octx, ret, arg); + av_log(NULL, AV_LOG_DEBUG, " matched as %s with argument '%s'.\n", + groups[ret].name, arg); + continue; + } + + /* normal options */ + po = find_option(options, opt); + if (po->name) { + if (po->flags & OPT_EXIT) { + /* optional argument, e.g. -h */ + arg = argv[optindex++]; + } else if (po->flags & HAS_ARG) { + GET_ARG(arg); + } else { + arg = "1"; + } + + add_opt(octx, po, opt, arg); + av_log(NULL, AV_LOG_DEBUG, " matched as option '%s' (%s) with " + "argument '%s'.\n", po->name, po->help, arg); + continue; + } + + /* AVOptions */ + if (argv[optindex]) { + ret = opt_default(NULL, opt, argv[optindex]); + if (ret >= 0) { + av_log(NULL, AV_LOG_DEBUG, " matched as AVOption '%s' with " + "argument '%s'.\n", opt, argv[optindex]); + optindex++; + continue; + } else if (ret != AVERROR_OPTION_NOT_FOUND) { + av_log(NULL, AV_LOG_ERROR, "Error parsing option '%s' " + "with argument '%s'.\n", opt, argv[optindex]); + return ret; + } + } + + /* boolean -nofoo options */ + if (opt[0] == 'n' && opt[1] == 'o' && + (po = find_option(options, opt + 2)) && + po->name && po->flags & OPT_BOOL) { + add_opt(octx, po, opt, "0"); + av_log(NULL, AV_LOG_DEBUG, " matched as option '%s' (%s) with " + "argument 0.\n", po->name, po->help); + continue; + } + + av_log(NULL, AV_LOG_ERROR, "Unrecognized option '%s'.\n", opt); + return AVERROR_OPTION_NOT_FOUND; + } + + if (octx->cur_group.nb_opts || codec_opts || format_opts || resample_opts) + av_log(NULL, AV_LOG_WARNING, "Trailing option(s) found in the " + "command: may be ignored.\n"); + + av_log(NULL, AV_LOG_DEBUG, "Finished splitting the commandline.\n"); + + return 0; +} + +int opt_cpuflags(void *optctx, const char *opt, const char *arg) +{ + int ret; + unsigned flags = av_get_cpu_flags(); + + if ((ret = av_parse_cpu_caps(&flags, arg)) < 0) + return ret; + + av_force_cpu_flags(flags); + return 0; +} + +int opt_loglevel(void *optctx, const char *opt, const char *arg) +{ + const struct { const char *name; int level; } log_levels[] = { + { "quiet" , AV_LOG_QUIET }, + { "panic" , AV_LOG_PANIC }, + { "fatal" , AV_LOG_FATAL }, + { "error" , AV_LOG_ERROR }, + { "warning", AV_LOG_WARNING }, + { "info" , AV_LOG_INFO }, + { "verbose", AV_LOG_VERBOSE }, + { "debug" , AV_LOG_DEBUG }, + { "trace" , AV_LOG_TRACE }, + }; + const char *token; + char *tail; + int flags = av_log_get_flags(); + int level = av_log_get_level(); + int cmd, i = 0; + + av_assert0(arg); + while (*arg) { + token = arg; + if (*token == '+' || *token == '-') { + cmd = *token++; + } else { + cmd = 0; + } + if (!i && !cmd) { + flags = 0; /* missing relative prefix, build absolute value */ + } + if (!strncmp(token, "repeat", 6)) { + if (cmd == '-') { + flags |= AV_LOG_SKIP_REPEATED; + } else { + flags &= ~AV_LOG_SKIP_REPEATED; + } + arg = token + 6; + } else if (!strncmp(token, "level", 5)) { + if (cmd == '-') { + flags &= ~AV_LOG_PRINT_LEVEL; + } else { + flags |= AV_LOG_PRINT_LEVEL; + } + arg = token + 5; + } else { + break; + } + i++; + } + if (!*arg) { + goto end; + } else if (*arg == '+') { + arg++; + } else if (!i) { + flags = av_log_get_flags(); /* level value without prefix, reset flags */ + } + + for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++) { + if (!strcmp(log_levels[i].name, arg)) { + level = log_levels[i].level; + goto end; + } + } + + level = strtol(arg, &tail, 10); + if (*tail) { + av_log(NULL, AV_LOG_FATAL, "Invalid loglevel \"%s\". " + "Possible levels are numbers or:\n", arg); + for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++) + av_log(NULL, AV_LOG_FATAL, "\"%s\"\n", log_levels[i].name); + exit_program(1); + } + +end: + av_log_set_flags(flags); + av_log_set_level(level); + return 0; +} + +static void expand_filename_template(AVBPrint *bp, const char *template, + struct tm *tm) +{ + int c; + + while ((c = *(template++))) { + if (c == '%') { + if (!(c = *(template++))) + break; + switch (c) { + case 'p': + av_bprintf(bp, "%s", program_name); + break; + case 't': + av_bprintf(bp, "%04d%02d%02d-%02d%02d%02d", + tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec); + break; + case '%': + av_bprint_chars(bp, c, 1); + break; + } + } else { + av_bprint_chars(bp, c, 1); + } + } +} + +static int init_report(const char *env) +{ + char *filename_template = NULL; + char *key, *val; + int ret, count = 0; + int prog_loglevel, envlevel = 0; + time_t now; + struct tm *tm; + AVBPrint filename; + + if (report_file) /* already opened */ + return 0; + time(&now); + tm = localtime(&now); + + while (env && *env) { + if ((ret = av_opt_get_key_value(&env, "=", ":", 0, &key, &val)) < 0) { + if (count) + av_log(NULL, AV_LOG_ERROR, + "Failed to parse FFREPORT environment variable: %s\n", + av_err2str(ret)); + break; + } + if (*env) + env++; + count++; + if (!strcmp(key, "file")) { + av_free(filename_template); + filename_template = val; + val = NULL; + } else if (!strcmp(key, "level")) { + char *tail; + report_file_level = strtol(val, &tail, 10); + if (*tail) { + av_log(NULL, AV_LOG_FATAL, "Invalid report file level\n"); + exit_program(1); + } + envlevel = 1; + } else { + av_log(NULL, AV_LOG_ERROR, "Unknown key '%s' in FFREPORT\n", key); + } + av_free(val); + av_free(key); + } + + av_bprint_init(&filename, 0, AV_BPRINT_SIZE_AUTOMATIC); + expand_filename_template(&filename, + av_x_if_null(filename_template, "%p-%t.log"), tm); + av_free(filename_template); + if (!av_bprint_is_complete(&filename)) { + av_log(NULL, AV_LOG_ERROR, "Out of memory building report file name\n"); + return AVERROR(ENOMEM); + } + + prog_loglevel = av_log_get_level(); + if (!envlevel) + report_file_level = FFMAX(report_file_level, prog_loglevel); + + report_file = fopen(filename.str, "w"); + if (!report_file) { + int ret = AVERROR(errno); + av_log(NULL, AV_LOG_ERROR, "Failed to open report \"%s\": %s\n", + filename.str, strerror(errno)); + return ret; + } + av_log_set_callback(log_callback_report); + av_log(NULL, AV_LOG_INFO, + "%s started on %04d-%02d-%02d at %02d:%02d:%02d\n" + "Report written to \"%s\"\n" + "Log level: %d\n", + program_name, + tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec, + filename.str, report_file_level); + av_bprint_finalize(&filename, NULL); + return 0; +} + +int opt_report(void *optctx, const char *opt, const char *arg) +{ + return init_report(NULL); +} + +int opt_max_alloc(void *optctx, const char *opt, const char *arg) +{ + char *tail; + size_t max; + + max = strtol(arg, &tail, 10); + if (*tail) { + av_log(NULL, AV_LOG_FATAL, "Invalid max_alloc \"%s\".\n", arg); + exit_program(1); + } + av_max_alloc(max); + return 0; +} + +int opt_timelimit(void *optctx, const char *opt, const char *arg) +{ +#if HAVE_SETRLIMIT + int lim = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX); + struct rlimit rl = { lim, lim + 1 }; + if (setrlimit(RLIMIT_CPU, &rl)) + perror("setrlimit"); +#else + av_log(NULL, AV_LOG_WARNING, "-%s not implemented on this OS\n", opt); +#endif + return 0; +} + +void print_error(const char *filename, int err) +{ + char errbuf[128]; + const char *errbuf_ptr = errbuf; + + if (av_strerror(err, errbuf, sizeof(errbuf)) < 0) + errbuf_ptr = strerror(AVUNERROR(err)); + av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr); +} + +static int warned_cfg = 0; + +#define INDENT 1 +#define SHOW_VERSION 2 +#define SHOW_CONFIG 4 +#define SHOW_COPYRIGHT 8 + +#define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ + if (CONFIG_##LIBNAME) { \ + const char *indent = flags & INDENT? " " : ""; \ + if (flags & SHOW_VERSION) { \ + unsigned int version = libname##_version(); \ + av_log(NULL, level, \ + "%slib%-11s %2d.%3d.%3d / %2d.%3d.%3d\n", \ + indent, #libname, \ + LIB##LIBNAME##_VERSION_MAJOR, \ + LIB##LIBNAME##_VERSION_MINOR, \ + LIB##LIBNAME##_VERSION_MICRO, \ + AV_VERSION_MAJOR(version), AV_VERSION_MINOR(version),\ + AV_VERSION_MICRO(version)); \ + } \ + if (flags & SHOW_CONFIG) { \ + const char *cfg = libname##_configuration(); \ + if (strcmp(FFMPEG_CONFIGURATION, cfg)) { \ + if (!warned_cfg) { \ + av_log(NULL, level, \ + "%sWARNING: library configuration mismatch\n", \ + indent); \ + warned_cfg = 1; \ + } \ + av_log(NULL, level, "%s%-11s configuration: %s\n", \ + indent, #libname, cfg); \ + } \ + } \ + } \ + +static void print_all_libs_info(int flags, int level) +{ + PRINT_LIB_INFO(avutil, AVUTIL, flags, level); + PRINT_LIB_INFO(avcodec, AVCODEC, flags, level); + PRINT_LIB_INFO(avformat, AVFORMAT, flags, level); + PRINT_LIB_INFO(avdevice, AVDEVICE, flags, level); + PRINT_LIB_INFO(avfilter, AVFILTER, flags, level); +// PRINT_LIB_INFO(avresample, AVRESAMPLE, flags, level); + PRINT_LIB_INFO(swscale, SWSCALE, flags, level); + PRINT_LIB_INFO(swresample, SWRESAMPLE, flags, level); +// PRINT_LIB_INFO(postproc, POSTPROC, flags, level); +} + +static void print_program_info(int flags, int level) +{ + const char *indent = flags & INDENT? " " : ""; + + av_log(NULL, level, "%s version " FFMPEG_VERSION, program_name); + if (flags & SHOW_COPYRIGHT) + av_log(NULL, level, " Copyright (c) %d-%d the FFmpeg developers", + program_birth_year, CONFIG_THIS_YEAR); + av_log(NULL, level, "\n"); + av_log(NULL, level, "%sbuilt with %s\n", indent, CC_IDENT); + + av_log(NULL, level, "%sconfiguration: " FFMPEG_CONFIGURATION "\n", indent); +} + +static void print_buildconf(int flags, int level) +{ + const char *indent = flags & INDENT ? " " : ""; + char str[] = { FFMPEG_CONFIGURATION }; + char *conflist, *remove_tilde, *splitconf; + + // Change all the ' --' strings to '~--' so that + // they can be identified as tokens. + while ((conflist = strstr(str, " --")) != NULL) { + strncpy(conflist, "~--", 3); + } + + // Compensate for the weirdness this would cause + // when passing 'pkg-config --static'. + while ((remove_tilde = strstr(str, "pkg-config~")) != NULL) { + strncpy(remove_tilde, "pkg-config ", 11); + } + + splitconf = strtok(str, "~"); + av_log(NULL, level, "\n%sconfiguration:\n", indent); + while (splitconf != NULL) { + av_log(NULL, level, "%s%s%s\n", indent, indent, splitconf); + splitconf = strtok(NULL, "~"); + } +} + +void show_banner(int argc, char **argv, const OptionDef *options) +{ + int idx = locate_option(argc, argv, options, "version"); + if (hide_banner || idx) + return; + + print_program_info (INDENT|SHOW_COPYRIGHT, AV_LOG_INFO); + print_all_libs_info(INDENT|SHOW_CONFIG, AV_LOG_INFO); + print_all_libs_info(INDENT|SHOW_VERSION, AV_LOG_INFO); +} + +int show_version(void *optctx, const char *opt, const char *arg) +{ + av_log_set_callback(log_callback_help); + print_program_info (SHOW_COPYRIGHT, AV_LOG_INFO); + print_all_libs_info(SHOW_VERSION, AV_LOG_INFO); + + return 0; +} + +int show_buildconf(void *optctx, const char *opt, const char *arg) +{ + av_log_set_callback(log_callback_help); + print_buildconf (INDENT|0, AV_LOG_INFO); + + return 0; +} + +int show_license(void *optctx, const char *opt, const char *arg) +{ +#if CONFIG_NONFREE + printf( + "This version of %s has nonfree parts compiled in.\n" + "Therefore it is not legally redistributable.\n", + program_name ); +#elif CONFIG_GPLV3 + printf( + "%s is free software; you can redistribute it and/or modify\n" + "it under the terms of the GNU General Public License as published by\n" + "the Free Software Foundation; either version 3 of the License, or\n" + "(at your option) any later version.\n" + "\n" + "%s is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU General Public License for more details.\n" + "\n" + "You should have received a copy of the GNU General Public License\n" + "along with %s. If not, see .\n", + program_name, program_name, program_name ); +#elif CONFIG_GPL + printf( + "%s is free software; you can redistribute it and/or modify\n" + "it under the terms of the GNU General Public License as published by\n" + "the Free Software Foundation; either version 2 of the License, or\n" + "(at your option) any later version.\n" + "\n" + "%s is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU General Public License for more details.\n" + "\n" + "You should have received a copy of the GNU General Public License\n" + "along with %s; if not, write to the Free Software\n" + "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n", + program_name, program_name, program_name ); +#elif CONFIG_LGPLV3 + printf( + "%s is free software; you can redistribute it and/or modify\n" + "it under the terms of the GNU Lesser General Public License as published by\n" + "the Free Software Foundation; either version 3 of the License, or\n" + "(at your option) any later version.\n" + "\n" + "%s is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU Lesser General Public License for more details.\n" + "\n" + "You should have received a copy of the GNU Lesser General Public License\n" + "along with %s. If not, see .\n", + program_name, program_name, program_name ); +#else + printf( + "%s is free software; you can redistribute it and/or\n" + "modify it under the terms of the GNU Lesser General Public\n" + "License as published by the Free Software Foundation; either\n" + "version 2.1 of the License, or (at your option) any later version.\n" + "\n" + "%s is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n" + "Lesser General Public License for more details.\n" + "\n" + "You should have received a copy of the GNU Lesser General Public\n" + "License along with %s; if not, write to the Free Software\n" + "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n", + program_name, program_name, program_name ); +#endif + + return 0; +} + +static int is_device(const AVClass *avclass) +{ + if (!avclass) + return 0; + return AV_IS_INPUT_DEVICE(avclass->category) || AV_IS_OUTPUT_DEVICE(avclass->category); +} + +static int show_formats_devices(void *optctx, const char *opt, const char *arg, int device_only, int muxdemuxers) +{ + void *ifmt_opaque = NULL; + const AVInputFormat *ifmt = NULL; + void *ofmt_opaque = NULL; + const AVOutputFormat *ofmt = NULL; + const char *last_name; + int is_dev; + + printf("%s\n" + " D. = Demuxing supported\n" + " .E = Muxing supported\n" + " --\n", device_only ? "Devices:" : "File formats:"); + last_name = "000"; + for (;;) { + int decode = 0; + int encode = 0; + const char *name = NULL; + const char *long_name = NULL; + + if (muxdemuxers !=SHOW_DEMUXERS) { + ofmt_opaque = NULL; + while ((ofmt = av_muxer_iterate(&ofmt_opaque))) { + is_dev = is_device(ofmt->priv_class); + if (!is_dev && device_only) + continue; + if ((!name || strcmp(ofmt->name, name) < 0) && + strcmp(ofmt->name, last_name) > 0) { + name = ofmt->name; + long_name = ofmt->long_name; + encode = 1; + } + } + } + if (muxdemuxers != SHOW_MUXERS) { + ifmt_opaque = NULL; + while ((ifmt = av_demuxer_iterate(&ifmt_opaque))) { + is_dev = is_device(ifmt->priv_class); + if (!is_dev && device_only) + continue; + if ((!name || strcmp(ifmt->name, name) < 0) && + strcmp(ifmt->name, last_name) > 0) { + name = ifmt->name; + long_name = ifmt->long_name; + encode = 0; + } + if (name && strcmp(ifmt->name, name) == 0) + decode = 1; + } + } + if (!name) + break; + last_name = name; + + printf(" %s%s %-15s %s\n", + decode ? "D" : " ", + encode ? "E" : " ", + name, + long_name ? long_name:" "); + } + return 0; +} + +int show_formats(void *optctx, const char *opt, const char *arg) +{ + return show_formats_devices(optctx, opt, arg, 0, SHOW_DEFAULT); +} + +int show_muxers(void *optctx, const char *opt, const char *arg) +{ + return show_formats_devices(optctx, opt, arg, 0, SHOW_MUXERS); +} + +int show_demuxers(void *optctx, const char *opt, const char *arg) +{ + return show_formats_devices(optctx, opt, arg, 0, SHOW_DEMUXERS); +} + +int show_devices(void *optctx, const char *opt, const char *arg) +{ + return show_formats_devices(optctx, opt, arg, 1, SHOW_DEFAULT); +} + +#define PRINT_CODEC_SUPPORTED(codec, field, type, list_name, term, get_name) \ + if (codec->field) { \ + const type *p = codec->field; \ + \ + printf(" Supported " list_name ":"); \ + while (*p != term) { \ + get_name(*p); \ + printf(" %s", name); \ + p++; \ + } \ + printf("\n"); \ + } \ + +static void print_codec(const AVCodec *c) +{ + int encoder = av_codec_is_encoder(c); + + printf("%s %s [%s]:\n", encoder ? "Encoder" : "Decoder", c->name, + c->long_name ? c->long_name : ""); + + printf(" General capabilities: "); + if (c->capabilities & AV_CODEC_CAP_DRAW_HORIZ_BAND) + printf("horizband "); + if (c->capabilities & AV_CODEC_CAP_DR1) + printf("dr1 "); + if (c->capabilities & AV_CODEC_CAP_TRUNCATED) + printf("trunc "); + if (c->capabilities & AV_CODEC_CAP_DELAY) + printf("delay "); + if (c->capabilities & AV_CODEC_CAP_SMALL_LAST_FRAME) + printf("small "); + if (c->capabilities & AV_CODEC_CAP_SUBFRAMES) + printf("subframes "); + if (c->capabilities & AV_CODEC_CAP_EXPERIMENTAL) + printf("exp "); + if (c->capabilities & AV_CODEC_CAP_CHANNEL_CONF) + printf("chconf "); + if (c->capabilities & AV_CODEC_CAP_PARAM_CHANGE) + printf("paramchange "); + if (c->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) + printf("variable "); + if (c->capabilities & (AV_CODEC_CAP_FRAME_THREADS | + AV_CODEC_CAP_SLICE_THREADS | + AV_CODEC_CAP_AUTO_THREADS)) + printf("threads "); + if (c->capabilities & AV_CODEC_CAP_AVOID_PROBING) + printf("avoidprobe "); + if (c->capabilities & AV_CODEC_CAP_HARDWARE) + printf("hardware "); + if (c->capabilities & AV_CODEC_CAP_HYBRID) + printf("hybrid "); + if (!c->capabilities) + printf("none"); + printf("\n"); + + if (c->type == AVMEDIA_TYPE_VIDEO || + c->type == AVMEDIA_TYPE_AUDIO) { + printf(" Threading capabilities: "); + switch (c->capabilities & (AV_CODEC_CAP_FRAME_THREADS | + AV_CODEC_CAP_SLICE_THREADS | + AV_CODEC_CAP_AUTO_THREADS)) { + case AV_CODEC_CAP_FRAME_THREADS | + AV_CODEC_CAP_SLICE_THREADS: printf("frame and slice"); break; + case AV_CODEC_CAP_FRAME_THREADS: printf("frame"); break; + case AV_CODEC_CAP_SLICE_THREADS: printf("slice"); break; + case AV_CODEC_CAP_AUTO_THREADS : printf("auto"); break; + default: printf("none"); break; + } + printf("\n"); + } + + if (avcodec_get_hw_config(c, 0)) { + printf(" Supported hardware devices: "); + for (int i = 0;; i++) { + const AVCodecHWConfig *config = avcodec_get_hw_config(c, i); + if (!config) + break; + printf("%s ", av_hwdevice_get_type_name(config->device_type)); + } + printf("\n"); + } + + if (c->supported_framerates) { + const AVRational *fps = c->supported_framerates; + + printf(" Supported framerates:"); + while (fps->num) { + printf(" %d/%d", fps->num, fps->den); + fps++; + } + printf("\n"); + } + PRINT_CODEC_SUPPORTED(c, pix_fmts, enum AVPixelFormat, "pixel formats", + AV_PIX_FMT_NONE, GET_PIX_FMT_NAME); + PRINT_CODEC_SUPPORTED(c, supported_samplerates, int, "sample rates", 0, + GET_SAMPLE_RATE_NAME); + PRINT_CODEC_SUPPORTED(c, sample_fmts, enum AVSampleFormat, "sample formats", + AV_SAMPLE_FMT_NONE, GET_SAMPLE_FMT_NAME); + PRINT_CODEC_SUPPORTED(c, channel_layouts, uint64_t, "channel layouts", + 0, GET_CH_LAYOUT_DESC); + + if (c->priv_class) { + show_help_children(c->priv_class, + AV_OPT_FLAG_ENCODING_PARAM | + AV_OPT_FLAG_DECODING_PARAM); + } +} + +static char get_media_type_char(enum AVMediaType type) +{ + switch (type) { + case AVMEDIA_TYPE_VIDEO: return 'V'; + case AVMEDIA_TYPE_AUDIO: return 'A'; + case AVMEDIA_TYPE_DATA: return 'D'; + case AVMEDIA_TYPE_SUBTITLE: return 'S'; + case AVMEDIA_TYPE_ATTACHMENT:return 'T'; + default: return '?'; + } +} + +static const AVCodec *next_codec_for_id(enum AVCodecID id, void **iter, + int encoder) +{ + const AVCodec *c; + while ((c = av_codec_iterate(iter))) { + if (c->id == id && + (encoder ? av_codec_is_encoder(c) : av_codec_is_decoder(c))) + return c; + } + return NULL; +} + +static int compare_codec_desc(const void *a, const void *b) +{ + const AVCodecDescriptor * const *da = a; + const AVCodecDescriptor * const *db = b; + + return (*da)->type != (*db)->type ? FFDIFFSIGN((*da)->type, (*db)->type) : + strcmp((*da)->name, (*db)->name); +} + +static unsigned get_codecs_sorted(const AVCodecDescriptor ***rcodecs) +{ + const AVCodecDescriptor *desc = NULL; + const AVCodecDescriptor **codecs; + unsigned nb_codecs = 0, i = 0; + + while ((desc = avcodec_descriptor_next(desc))) + nb_codecs++; + if (!(codecs = av_calloc(nb_codecs, sizeof(*codecs)))) { + av_log(NULL, AV_LOG_ERROR, "Out of memory\n"); + exit_program(1); + } + desc = NULL; + while ((desc = avcodec_descriptor_next(desc))) + codecs[i++] = desc; + av_assert0(i == nb_codecs); + qsort(codecs, nb_codecs, sizeof(*codecs), compare_codec_desc); + *rcodecs = codecs; + return nb_codecs; +} + +static void print_codecs_for_id(enum AVCodecID id, int encoder) +{ + void *iter = NULL; + const AVCodec *codec; + + printf(" (%s: ", encoder ? "encoders" : "decoders"); + + while ((codec = next_codec_for_id(id, &iter, encoder))) + printf("%s ", codec->name); + + printf(")"); +} + +int show_codecs(void *optctx, const char *opt, const char *arg) +{ + const AVCodecDescriptor **codecs; + unsigned i, nb_codecs = get_codecs_sorted(&codecs); + + printf("Codecs:\n" + " D..... = Decoding supported\n" + " .E.... = Encoding supported\n" + " ..V... = Video codec\n" + " ..A... = Audio codec\n" + " ..S... = Subtitle codec\n" + " ...I.. = Intra frame-only codec\n" + " ....L. = Lossy compression\n" + " .....S = Lossless compression\n" + " -------\n"); + for (i = 0; i < nb_codecs; i++) { + const AVCodecDescriptor *desc = codecs[i]; + const AVCodec *codec; + void *iter = NULL; + + if (strstr(desc->name, "_deprecated")) + continue; + + printf(" "); + printf(avcodec_find_decoder(desc->id) ? "D" : "."); + printf(avcodec_find_encoder(desc->id) ? "E" : "."); + + printf("%c", get_media_type_char(desc->type)); + printf((desc->props & AV_CODEC_PROP_INTRA_ONLY) ? "I" : "."); + printf((desc->props & AV_CODEC_PROP_LOSSY) ? "L" : "."); + printf((desc->props & AV_CODEC_PROP_LOSSLESS) ? "S" : "."); + + printf(" %-20s %s", desc->name, desc->long_name ? desc->long_name : ""); + + /* print decoders/encoders when there's more than one or their + * names are different from codec name */ + while ((codec = next_codec_for_id(desc->id, &iter, 0))) { + if (strcmp(codec->name, desc->name)) { + print_codecs_for_id(desc->id, 0); + break; + } + } + iter = NULL; + while ((codec = next_codec_for_id(desc->id, &iter, 1))) { + if (strcmp(codec->name, desc->name)) { + print_codecs_for_id(desc->id, 1); + break; + } + } + + printf("\n"); + } + av_free(codecs); + return 0; +} + +static void print_codecs(int encoder) +{ + const AVCodecDescriptor **codecs; + unsigned i, nb_codecs = get_codecs_sorted(&codecs); + + printf("%s:\n" + " V..... = Video\n" + " A..... = Audio\n" + " S..... = Subtitle\n" + " .F.... = Frame-level multithreading\n" + " ..S... = Slice-level multithreading\n" + " ...X.. = Codec is experimental\n" + " ....B. = Supports draw_horiz_band\n" + " .....D = Supports direct rendering method 1\n" + " ------\n", + encoder ? "Encoders" : "Decoders"); + for (i = 0; i < nb_codecs; i++) { + const AVCodecDescriptor *desc = codecs[i]; + const AVCodec *codec; + void *iter = NULL; + + while ((codec = next_codec_for_id(desc->id, &iter, encoder))) { + printf(" %c", get_media_type_char(desc->type)); + printf((codec->capabilities & AV_CODEC_CAP_FRAME_THREADS) ? "F" : "."); + printf((codec->capabilities & AV_CODEC_CAP_SLICE_THREADS) ? "S" : "."); + printf((codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) ? "X" : "."); + printf((codec->capabilities & AV_CODEC_CAP_DRAW_HORIZ_BAND)?"B" : "."); + printf((codec->capabilities & AV_CODEC_CAP_DR1) ? "D" : "."); + + printf(" %-20s %s", codec->name, codec->long_name ? codec->long_name : ""); + if (strcmp(codec->name, desc->name)) + printf(" (codec %s)", desc->name); + + printf("\n"); + } + } + av_free(codecs); +} + +int show_decoders(void *optctx, const char *opt, const char *arg) +{ + print_codecs(0); + return 0; +} + +int show_encoders(void *optctx, const char *opt, const char *arg) +{ + print_codecs(1); + return 0; +} + +int show_bsfs(void *optctx, const char *opt, const char *arg) +{ + const AVBitStreamFilter *bsf = NULL; + void *opaque = NULL; + + printf("Bitstream filters:\n"); + while ((bsf = av_bsf_iterate(&opaque))) + printf("%s\n", bsf->name); + printf("\n"); + return 0; +} + +int show_protocols(void *optctx, const char *opt, const char *arg) +{ + void *opaque = NULL; + const char *name; + + printf("Supported file protocols:\n" + "Input:\n"); + while ((name = avio_enum_protocols(&opaque, 0))) + printf(" %s\n", name); + printf("Output:\n"); + while ((name = avio_enum_protocols(&opaque, 1))) + printf(" %s\n", name); + return 0; +} + +int show_filters(void *optctx, const char *opt, const char *arg) +{ +#if CONFIG_AVFILTER + const AVFilter *filter = NULL; + char descr[64], *descr_cur; + void *opaque = NULL; + int i, j; + const AVFilterPad *pad; + + printf("Filters:\n" + " T.. = Timeline support\n" + " .S. = Slice threading\n" + " ..C = Command support\n" + " A = Audio input/output\n" + " V = Video input/output\n" + " N = Dynamic number and/or type of input/output\n" + " | = Source or sink filter\n"); + while ((filter = av_filter_iterate(&opaque))) { + descr_cur = descr; + for (i = 0; i < 2; i++) { + if (i) { + *(descr_cur++) = '-'; + *(descr_cur++) = '>'; + } + pad = i ? filter->outputs : filter->inputs; + for (j = 0; pad && avfilter_pad_get_name(pad, j); j++) { + if (descr_cur >= descr + sizeof(descr) - 4) + break; + *(descr_cur++) = get_media_type_char(avfilter_pad_get_type(pad, j)); + } + if (!j) + *(descr_cur++) = ((!i && (filter->flags & AVFILTER_FLAG_DYNAMIC_INPUTS)) || + ( i && (filter->flags & AVFILTER_FLAG_DYNAMIC_OUTPUTS))) ? 'N' : '|'; + } + *descr_cur = 0; + printf(" %c%c%c %-17s %-10s %s\n", + filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE ? 'T' : '.', + filter->flags & AVFILTER_FLAG_SLICE_THREADS ? 'S' : '.', + filter->process_command ? 'C' : '.', + filter->name, descr, filter->description); + } +#else + printf("No filters available: libavfilter disabled\n"); +#endif + return 0; +} + +int show_colors(void *optctx, const char *opt, const char *arg) +{ + const char *name; + const uint8_t *rgb; + int i; + + printf("%-32s #RRGGBB\n", "name"); + + for (i = 0; name = av_get_known_color_name(i, &rgb); i++) + printf("%-32s #%02x%02x%02x\n", name, rgb[0], rgb[1], rgb[2]); + + return 0; +} + +int show_pix_fmts(void *optctx, const char *opt, const char *arg) +{ + const AVPixFmtDescriptor *pix_desc = NULL; + + printf("Pixel formats:\n" + "I.... = Supported Input format for conversion\n" + ".O... = Supported Output format for conversion\n" + "..H.. = Hardware accelerated format\n" + "...P. = Paletted format\n" + "....B = Bitstream format\n" + "FLAGS NAME NB_COMPONENTS BITS_PER_PIXEL\n" + "-----\n"); + +#if !CONFIG_SWSCALE +# define sws_isSupportedInput(x) 0 +# define sws_isSupportedOutput(x) 0 +#endif + + while ((pix_desc = av_pix_fmt_desc_next(pix_desc))) { + enum AVPixelFormat av_unused pix_fmt = av_pix_fmt_desc_get_id(pix_desc); + printf("%c%c%c%c%c %-16s %d %2d\n", + sws_isSupportedInput (pix_fmt) ? 'I' : '.', + sws_isSupportedOutput(pix_fmt) ? 'O' : '.', + pix_desc->flags & AV_PIX_FMT_FLAG_HWACCEL ? 'H' : '.', + pix_desc->flags & AV_PIX_FMT_FLAG_PAL ? 'P' : '.', + pix_desc->flags & AV_PIX_FMT_FLAG_BITSTREAM ? 'B' : '.', + pix_desc->name, + pix_desc->nb_components, + av_get_bits_per_pixel(pix_desc)); + } + return 0; +} + +int show_layouts(void *optctx, const char *opt, const char *arg) +{ + int i = 0; + uint64_t layout, j; + const char *name, *descr; + + printf("Individual channels:\n" + "NAME DESCRIPTION\n"); + for (i = 0; i < 63; i++) { + name = av_get_channel_name((uint64_t)1 << i); + if (!name) + continue; + descr = av_get_channel_description((uint64_t)1 << i); + printf("%-14s %s\n", name, descr); + } + printf("\nStandard channel layouts:\n" + "NAME DECOMPOSITION\n"); + for (i = 0; !av_get_standard_channel_layout(i, &layout, &name); i++) { + if (name) { + printf("%-14s ", name); + for (j = 1; j; j <<= 1) + if ((layout & j)) + printf("%s%s", (layout & (j - 1)) ? "+" : "", av_get_channel_name(j)); + printf("\n"); + } + } + return 0; +} + +int show_sample_fmts(void *optctx, const char *opt, const char *arg) +{ + int i; + char fmt_str[128]; + for (i = -1; i < AV_SAMPLE_FMT_NB; i++) + printf("%s\n", av_get_sample_fmt_string(fmt_str, sizeof(fmt_str), i)); + return 0; +} + +static void show_help_codec(const char *name, int encoder) +{ + const AVCodecDescriptor *desc; + const AVCodec *codec; + + if (!name) { + av_log(NULL, AV_LOG_ERROR, "No codec name specified.\n"); + return; + } + + codec = encoder ? avcodec_find_encoder_by_name(name) : + avcodec_find_decoder_by_name(name); + + if (codec) + print_codec(codec); + else if ((desc = avcodec_descriptor_get_by_name(name))) { + void *iter = NULL; + int printed = 0; + + while ((codec = next_codec_for_id(desc->id, &iter, encoder))) { + printed = 1; + print_codec(codec); + } + + if (!printed) { + av_log(NULL, AV_LOG_ERROR, "Codec '%s' is known to FFmpeg, " + "but no %s for it are available. FFmpeg might need to be " + "recompiled with additional external libraries.\n", + name, encoder ? "encoders" : "decoders"); + } + } else { + av_log(NULL, AV_LOG_ERROR, "Codec '%s' is not recognized by FFmpeg.\n", + name); + } +} + +static void show_help_demuxer(const char *name) +{ + const AVInputFormat *fmt = av_find_input_format(name); + + if (!fmt) { + av_log(NULL, AV_LOG_ERROR, "Unknown format '%s'.\n", name); + return; + } + + printf("Demuxer %s [%s]:\n", fmt->name, fmt->long_name); + + if (fmt->extensions) + printf(" Common extensions: %s.\n", fmt->extensions); + + if (fmt->priv_class) + show_help_children(fmt->priv_class, AV_OPT_FLAG_DECODING_PARAM); +} + +static void show_help_protocol(const char *name) +{ + const AVClass *proto_class; + + if (!name) { + av_log(NULL, AV_LOG_ERROR, "No protocol name specified.\n"); + return; + } + + proto_class = avio_protocol_get_class(name); + if (!proto_class) { + av_log(NULL, AV_LOG_ERROR, "Unknown protocol '%s'.\n", name); + return; + } + + show_help_children(proto_class, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM); +} + +static void show_help_muxer(const char *name) +{ + const AVCodecDescriptor *desc; + const AVOutputFormat *fmt = av_guess_format(name, NULL, NULL); + + if (!fmt) { + av_log(NULL, AV_LOG_ERROR, "Unknown format '%s'.\n", name); + return; + } + + printf("Muxer %s [%s]:\n", fmt->name, fmt->long_name); + + if (fmt->extensions) + printf(" Common extensions: %s.\n", fmt->extensions); + if (fmt->mime_type) + printf(" Mime type: %s.\n", fmt->mime_type); + if (fmt->video_codec != AV_CODEC_ID_NONE && + (desc = avcodec_descriptor_get(fmt->video_codec))) { + printf(" Default video codec: %s.\n", desc->name); + } + if (fmt->audio_codec != AV_CODEC_ID_NONE && + (desc = avcodec_descriptor_get(fmt->audio_codec))) { + printf(" Default audio codec: %s.\n", desc->name); + } + if (fmt->subtitle_codec != AV_CODEC_ID_NONE && + (desc = avcodec_descriptor_get(fmt->subtitle_codec))) { + printf(" Default subtitle codec: %s.\n", desc->name); + } + + if (fmt->priv_class) + show_help_children(fmt->priv_class, AV_OPT_FLAG_ENCODING_PARAM); +} + +#if CONFIG_AVFILTER +static void show_help_filter(const char *name) +{ +#if CONFIG_AVFILTER + const AVFilter *f = avfilter_get_by_name(name); + int i, count; + + if (!name) { + av_log(NULL, AV_LOG_ERROR, "No filter name specified.\n"); + return; + } else if (!f) { + av_log(NULL, AV_LOG_ERROR, "Unknown filter '%s'.\n", name); + return; + } + + printf("Filter %s\n", f->name); + if (f->description) + printf(" %s\n", f->description); + + if (f->flags & AVFILTER_FLAG_SLICE_THREADS) + printf(" slice threading supported\n"); + + printf(" Inputs:\n"); + count = avfilter_pad_count(f->inputs); + for (i = 0; i < count; i++) { + printf(" #%d: %s (%s)\n", i, avfilter_pad_get_name(f->inputs, i), + media_type_string(avfilter_pad_get_type(f->inputs, i))); + } + if (f->flags & AVFILTER_FLAG_DYNAMIC_INPUTS) + printf(" dynamic (depending on the options)\n"); + else if (!count) + printf(" none (source filter)\n"); + + printf(" Outputs:\n"); + count = avfilter_pad_count(f->outputs); + for (i = 0; i < count; i++) { + printf(" #%d: %s (%s)\n", i, avfilter_pad_get_name(f->outputs, i), + media_type_string(avfilter_pad_get_type(f->outputs, i))); + } + if (f->flags & AVFILTER_FLAG_DYNAMIC_OUTPUTS) + printf(" dynamic (depending on the options)\n"); + else if (!count) + printf(" none (sink filter)\n"); + + if (f->priv_class) + show_help_children(f->priv_class, AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | + AV_OPT_FLAG_AUDIO_PARAM); + if (f->flags & AVFILTER_FLAG_SUPPORT_TIMELINE) + printf("This filter has support for timeline through the 'enable' option.\n"); +#else + av_log(NULL, AV_LOG_ERROR, "Build without libavfilter; " + "can not to satisfy request\n"); +#endif +} +#endif + +static void show_help_bsf(const char *name) +{ + const AVBitStreamFilter *bsf = av_bsf_get_by_name(name); + + if (!name) { + av_log(NULL, AV_LOG_ERROR, "No bitstream filter name specified.\n"); + return; + } else if (!bsf) { + av_log(NULL, AV_LOG_ERROR, "Unknown bit stream filter '%s'.\n", name); + return; + } + + printf("Bit stream filter %s\n", bsf->name); + PRINT_CODEC_SUPPORTED(bsf, codec_ids, enum AVCodecID, "codecs", + AV_CODEC_ID_NONE, GET_CODEC_NAME); + if (bsf->priv_class) + show_help_children(bsf->priv_class, AV_OPT_FLAG_BSF_PARAM); +} + +int show_help(void *optctx, const char *opt, const char *arg) +{ + char *topic, *par; + av_log_set_callback(log_callback_help); + + topic = av_strdup(arg ? arg : ""); + if (!topic) + return AVERROR(ENOMEM); + par = strchr(topic, '='); + if (par) + *par++ = 0; + + if (!*topic) { + show_help_default(topic, par); + } else if (!strcmp(topic, "decoder")) { + show_help_codec(par, 0); + } else if (!strcmp(topic, "encoder")) { + show_help_codec(par, 1); + } else if (!strcmp(topic, "demuxer")) { + show_help_demuxer(par); + } else if (!strcmp(topic, "muxer")) { + show_help_muxer(par); + } else if (!strcmp(topic, "protocol")) { + show_help_protocol(par); +#if CONFIG_AVFILTER + } else if (!strcmp(topic, "filter")) { + show_help_filter(par); +#endif + } else if (!strcmp(topic, "bsf")) { + show_help_bsf(par); + } else { + show_help_default(topic, par); + } + + av_freep(&topic); + return 0; +} + +int read_yesno(void) +{ + int c = getchar(); + int yesno = (av_toupper(c) == 'Y'); + + while (c != '\n' && c != EOF) + c = getchar(); + + return yesno; +} + +FILE *get_preset_file(char *filename, size_t filename_size, + const char *preset_name, int is_path, + const char *codec_name) +{ + FILE *f = NULL; + int i; + const char *base[3] = { getenv("FFMPEG_DATADIR"), + getenv("HOME"), + FFMPEG_DATADIR, }; + + if (is_path) { + av_strlcpy(filename, preset_name, filename_size); + f = fopen(filename, "r"); + } else { +#if HAVE_GETMODULEHANDLE && defined(_WIN32) + char datadir[MAX_PATH], *ls; + base[2] = NULL; + + if (GetModuleFileNameA(GetModuleHandleA(NULL), datadir, sizeof(datadir) - 1)) + { + for (ls = datadir; ls < datadir + strlen(datadir); ls++) + if (*ls == '\\') *ls = '/'; + + if (ls = strrchr(datadir, '/')) + { + *ls = 0; + strncat(datadir, "/ffpresets", sizeof(datadir) - 1 - strlen(datadir)); + base[2] = datadir; + } + } +#endif + for (i = 0; i < 3 && !f; i++) { + if (!base[i]) + continue; + snprintf(filename, filename_size, "%s%s/%s.ffpreset", base[i], + i != 1 ? "" : "/.ffmpeg", preset_name); + f = fopen(filename, "r"); + if (!f && codec_name) { + snprintf(filename, filename_size, + "%s%s/%s-%s.ffpreset", + base[i], i != 1 ? "" : "/.ffmpeg", codec_name, + preset_name); + f = fopen(filename, "r"); + } + } + } + + return f; +} + +int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec) +{ + int ret = avformat_match_stream_specifier(s, st, spec); + if (ret < 0) + av_log(s, AV_LOG_ERROR, "Invalid stream specifier: %s.\n", spec); + return ret; +} + +AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, + AVFormatContext *s, AVStream *st, AVCodec *codec) +{ + AVDictionary *ret = NULL; + AVDictionaryEntry *t = NULL; + int flags = s->oformat ? AV_OPT_FLAG_ENCODING_PARAM + : AV_OPT_FLAG_DECODING_PARAM; + char prefix = 0; + const AVClass *cc = avcodec_get_class(); + + if (!codec) + codec = s->oformat ? avcodec_find_encoder(codec_id) + : avcodec_find_decoder(codec_id); + + switch (st->codecpar->codec_type) { + case AVMEDIA_TYPE_VIDEO: + prefix = 'v'; + flags |= AV_OPT_FLAG_VIDEO_PARAM; + break; + case AVMEDIA_TYPE_AUDIO: + prefix = 'a'; + flags |= AV_OPT_FLAG_AUDIO_PARAM; + break; + case AVMEDIA_TYPE_SUBTITLE: + prefix = 's'; + flags |= AV_OPT_FLAG_SUBTITLE_PARAM; + break; + } + + while (t = av_dict_get(opts, "", t, AV_DICT_IGNORE_SUFFIX)) { + char *p = strchr(t->key, ':'); + + /* check stream specification in opt name */ + if (p) + switch (check_stream_specifier(s, st, p + 1)) { + case 1: *p = 0; break; + case 0: continue; + default: exit_program(1); + } + + if (av_opt_find(&cc, t->key, NULL, flags, AV_OPT_SEARCH_FAKE_OBJ) || + !codec || + (codec->priv_class && + av_opt_find(&codec->priv_class, t->key, NULL, flags, + AV_OPT_SEARCH_FAKE_OBJ))) + av_dict_set(&ret, t->key, t->value, 0); + else if (t->key[0] == prefix && + av_opt_find(&cc, t->key + 1, NULL, flags, + AV_OPT_SEARCH_FAKE_OBJ)) + av_dict_set(&ret, t->key + 1, t->value, 0); + + if (p) + *p = ':'; + } + return ret; +} + +AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, + AVDictionary *codec_opts) +{ + int i; + AVDictionary **opts; + + if (!s->nb_streams) + return NULL; + opts = av_mallocz_array(s->nb_streams, sizeof(*opts)); + if (!opts) { + av_log(NULL, AV_LOG_ERROR, + "Could not alloc memory for stream options.\n"); + return NULL; + } + for (i = 0; i < s->nb_streams; i++) + opts[i] = filter_codec_opts(codec_opts, s->streams[i]->codecpar->codec_id, + s, s->streams[i], NULL); + return opts; +} + +void *grow_array(void *array, int elem_size, int *size, int new_size) +{ + if (new_size >= INT_MAX / elem_size) { + av_log(NULL, AV_LOG_ERROR, "Array too big.\n"); + exit_program(1); + } + if (*size < new_size) { + uint8_t *tmp = av_realloc_array(array, new_size, elem_size); + if (!tmp) { + av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n"); + exit_program(1); + } + memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size); + *size = new_size; + return tmp; + } + return array; +} + +double get_rotation(AVStream *st) +{ + uint8_t* displaymatrix = av_stream_get_side_data(st, + AV_PKT_DATA_DISPLAYMATRIX, NULL); + double theta = 0; + if (displaymatrix) + theta = -av_display_rotation_get((int32_t*) displaymatrix); + + theta -= 360*floor(theta/360 + 0.9/360); + + if (fabs(theta - 90*round(theta/90)) > 2) + av_log(NULL, AV_LOG_WARNING, "Odd rotation angle.\n" + "If you want to help, upload a sample " + "of this file to https://streams.videolan.org/upload/ " + "and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)"); + + return theta; +} + +#if CONFIG_AVDEVICE +static int print_device_sources(AVInputFormat *fmt, AVDictionary *opts) +{ + int ret, i; + AVDeviceInfoList *device_list = NULL; + + if (!fmt || !fmt->priv_class || !AV_IS_INPUT_DEVICE(fmt->priv_class->category)) + return AVERROR(EINVAL); + + printf("Auto-detected sources for %s:\n", fmt->name); + if (!fmt->get_device_list) { + ret = AVERROR(ENOSYS); + printf("Cannot list sources. Not implemented.\n"); + goto fail; + } + + if ((ret = avdevice_list_input_sources(fmt, NULL, opts, &device_list)) < 0) { + printf("Cannot list sources.\n"); + goto fail; + } + + for (i = 0; i < device_list->nb_devices; i++) { + printf("%s %s [%s]\n", device_list->default_device == i ? "*" : " ", + device_list->devices[i]->device_name, device_list->devices[i]->device_description); + } + + fail: + avdevice_free_list_devices(&device_list); + return ret; +} + +static int print_device_sinks(AVOutputFormat *fmt, AVDictionary *opts) +{ + int ret, i; + AVDeviceInfoList *device_list = NULL; + + if (!fmt || !fmt->priv_class || !AV_IS_OUTPUT_DEVICE(fmt->priv_class->category)) + return AVERROR(EINVAL); + + printf("Auto-detected sinks for %s:\n", fmt->name); + if (!fmt->get_device_list) { + ret = AVERROR(ENOSYS); + printf("Cannot list sinks. Not implemented.\n"); + goto fail; + } + + if ((ret = avdevice_list_output_sinks(fmt, NULL, opts, &device_list)) < 0) { + printf("Cannot list sinks.\n"); + goto fail; + } + + for (i = 0; i < device_list->nb_devices; i++) { + printf("%s %s [%s]\n", device_list->default_device == i ? "*" : " ", + device_list->devices[i]->device_name, device_list->devices[i]->device_description); + } + + fail: + avdevice_free_list_devices(&device_list); + return ret; +} + +static int show_sinks_sources_parse_arg(const char *arg, char **dev, AVDictionary **opts) +{ + int ret; + if (arg) { + char *opts_str = NULL; + av_assert0(dev && opts); + *dev = av_strdup(arg); + if (!*dev) + return AVERROR(ENOMEM); + if ((opts_str = strchr(*dev, ','))) { + *(opts_str++) = '\0'; + if (opts_str[0] && ((ret = av_dict_parse_string(opts, opts_str, "=", ":", 0)) < 0)) { + av_freep(dev); + return ret; + } + } + } else + printf("\nDevice name is not provided.\n" + "You can pass devicename[,opt1=val1[,opt2=val2...]] as an argument.\n\n"); + return 0; +} + +int show_sources(void *optctx, const char *opt, const char *arg) +{ + AVInputFormat *fmt = NULL; + char *dev = NULL; + AVDictionary *opts = NULL; + int ret = 0; + int error_level = av_log_get_level(); + + av_log_set_level(AV_LOG_ERROR); + + if ((ret = show_sinks_sources_parse_arg(arg, &dev, &opts)) < 0) + goto fail; + + do { + fmt = av_input_audio_device_next(fmt); + if (fmt) { + if (!strcmp(fmt->name, "lavfi")) + continue; //it's pointless to probe lavfi + if (dev && !av_match_name(dev, fmt->name)) + continue; + print_device_sources(fmt, opts); + } + } while (fmt); + do { + fmt = av_input_video_device_next(fmt); + if (fmt) { + if (dev && !av_match_name(dev, fmt->name)) + continue; + print_device_sources(fmt, opts); + } + } while (fmt); + fail: + av_dict_free(&opts); + av_free(dev); + av_log_set_level(error_level); + return ret; +} + +int show_sinks(void *optctx, const char *opt, const char *arg) +{ + AVOutputFormat *fmt = NULL; + char *dev = NULL; + AVDictionary *opts = NULL; + int ret = 0; + int error_level = av_log_get_level(); + + av_log_set_level(AV_LOG_ERROR); + + if ((ret = show_sinks_sources_parse_arg(arg, &dev, &opts)) < 0) + goto fail; + + do { + fmt = av_output_audio_device_next(fmt); + if (fmt) { + if (dev && !av_match_name(dev, fmt->name)) + continue; + print_device_sinks(fmt, opts); + } + } while (fmt); + do { + fmt = av_output_video_device_next(fmt); + if (fmt) { + if (dev && !av_match_name(dev, fmt->name)) + continue; + print_device_sinks(fmt, opts); + } + } while (fmt); + fail: + av_dict_free(&opts); + av_free(dev); + av_log_set_level(error_level); + return ret; +} + +#endif diff --git a/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/cmdutils.h b/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/cmdutils.h new file mode 100644 index 0000000..5ec28cd --- /dev/null +++ b/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/cmdutils.h @@ -0,0 +1,648 @@ +/* + * Various utilities for command line tools + * copyright (c) 2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef FFTOOLS_CMDUTILS_H +#define FFTOOLS_CMDUTILS_H + +#include + +#include "config.h" +#include "avcodec.h" +#include "avfilter.h" +#include "avformat.h" +#include "swscale.h" + +#ifdef _WIN32 +#undef main /* We don't want SDL to override our main() */ +#endif + +/** + * program name, defined by the program for show_version(). + */ +extern const char program_name[]; + +/** + * program birth year, defined by the program for show_banner() + */ +extern const int program_birth_year; + +extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; +extern AVFormatContext *avformat_opts; +extern AVDictionary *sws_dict; +extern AVDictionary *swr_opts; +extern AVDictionary *format_opts, *codec_opts, *resample_opts; +extern int hide_banner; + +/** + * Register a program-specific cleanup routine. + */ +void register_exit(void (*cb)(int ret)); + +/** + * Wraps exit with a program-specific cleanup routine. + */ +void exit_program(int ret) av_noreturn; + +/** + * Initialize dynamic library loading + */ +void init_dynload(void); + +/** + * Initialize the cmdutils option system, in particular + * allocate the *_opts contexts. + */ +void init_opts(void); +/** + * Uninitialize the cmdutils option system, in particular + * free the *_opts contexts and their contents. + */ +void uninit_opts(void); + +/** + * Trivial log callback. + * Only suitable for opt_help and similar since it lacks prefix handling. + */ +void log_callback_help(void* ptr, int level, const char* fmt, va_list vl); + +/** + * Override the cpuflags. + */ +int opt_cpuflags(void *optctx, const char *opt, const char *arg); + +/** + * Fallback for options that are not explicitly handled, these will be + * parsed through AVOptions. + */ +int opt_default(void *optctx, const char *opt, const char *arg); + +/** + * Set the libav* libraries log level. + */ +int opt_loglevel(void *optctx, const char *opt, const char *arg); + +int opt_report(void *optctx, const char *opt, const char *arg); + +int opt_max_alloc(void *optctx, const char *opt, const char *arg); + +int opt_codec_debug(void *optctx, const char *opt, const char *arg); + +/** + * Limit the execution time. + */ +int opt_timelimit(void *optctx, const char *opt, const char *arg); + +/** + * Parse a string and return its corresponding value as a double. + * Exit from the application if the string cannot be correctly + * parsed or the corresponding value is invalid. + * + * @param context the context of the value to be set (e.g. the + * corresponding command line option name) + * @param numstr the string to be parsed + * @param type the type (OPT_INT64 or OPT_FLOAT) as which the + * string should be parsed + * @param min the minimum valid accepted value + * @param max the maximum valid accepted value + */ +double parse_number_or_die(const char *context, const char *numstr, int type, + double min, double max); + +/** + * Parse a string specifying a time and return its corresponding + * value as a number of microseconds. Exit from the application if + * the string cannot be correctly parsed. + * + * @param context the context of the value to be set (e.g. the + * corresponding command line option name) + * @param timestr the string to be parsed + * @param is_duration a flag which tells how to interpret timestr, if + * not zero timestr is interpreted as a duration, otherwise as a + * date + * + * @see av_parse_time() + */ +int64_t parse_time_or_die(const char *context, const char *timestr, + int is_duration); + +typedef struct SpecifierOpt { + char *specifier; /**< stream/chapter/program/... specifier */ + union { + uint8_t *str; + int i; + int64_t i64; + uint64_t ui64; + float f; + double dbl; + } u; +} SpecifierOpt; + +typedef struct OptionDef { + const char *name; + int flags; +#define HAS_ARG 0x0001 +#define OPT_BOOL 0x0002 +#define OPT_EXPERT 0x0004 +#define OPT_STRING 0x0008 +#define OPT_VIDEO 0x0010 +#define OPT_AUDIO 0x0020 +#define OPT_INT 0x0080 +#define OPT_FLOAT 0x0100 +#define OPT_SUBTITLE 0x0200 +#define OPT_INT64 0x0400 +#define OPT_EXIT 0x0800 +#define OPT_DATA 0x1000 +#define OPT_PERFILE 0x2000 /* the option is per-file (currently ffmpeg-only). + implied by OPT_OFFSET or OPT_SPEC */ +#define OPT_OFFSET 0x4000 /* option is specified as an offset in a passed optctx */ +#define OPT_SPEC 0x8000 /* option is to be stored in an array of SpecifierOpt. + Implies OPT_OFFSET. Next element after the offset is + an int containing element count in the array. */ +#define OPT_TIME 0x10000 +#define OPT_DOUBLE 0x20000 +#define OPT_INPUT 0x40000 +#define OPT_OUTPUT 0x80000 + union { + void *dst_ptr; + int (*func_arg)(void *, const char *, const char *); + size_t off; + } u; + const char *help; + const char *argname; +} OptionDef; + +/** + * Print help for all options matching specified flags. + * + * @param options a list of options + * @param msg title of this group. Only printed if at least one option matches. + * @param req_flags print only options which have all those flags set. + * @param rej_flags don't print options which have any of those flags set. + * @param alt_flags print only options that have at least one of those flags set + */ +void show_help_options(const OptionDef *options, const char *msg, int req_flags, + int rej_flags, int alt_flags); + +#if CONFIG_AVDEVICE +#define CMDUTILS_COMMON_OPTIONS_AVDEVICE \ + { "sources" , OPT_EXIT | HAS_ARG, { .func_arg = show_sources }, \ + "list sources of the input device", "device" }, \ + { "sinks" , OPT_EXIT | HAS_ARG, { .func_arg = show_sinks }, \ + "list sinks of the output device", "device" }, \ + +#else +#define CMDUTILS_COMMON_OPTIONS_AVDEVICE +#endif + +#define CMDUTILS_COMMON_OPTIONS \ + { "L", OPT_EXIT, { .func_arg = show_license }, "show license" }, \ + { "h", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ + { "?", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ + { "help", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ + { "-help", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ + { "version", OPT_EXIT, { .func_arg = show_version }, "show version" }, \ + { "buildconf", OPT_EXIT, { .func_arg = show_buildconf }, "show build configuration" }, \ + { "formats", OPT_EXIT, { .func_arg = show_formats }, "show available formats" }, \ + { "muxers", OPT_EXIT, { .func_arg = show_muxers }, "show available muxers" }, \ + { "demuxers", OPT_EXIT, { .func_arg = show_demuxers }, "show available demuxers" }, \ + { "devices", OPT_EXIT, { .func_arg = show_devices }, "show available devices" }, \ + { "codecs", OPT_EXIT, { .func_arg = show_codecs }, "show available codecs" }, \ + { "decoders", OPT_EXIT, { .func_arg = show_decoders }, "show available decoders" }, \ + { "encoders", OPT_EXIT, { .func_arg = show_encoders }, "show available encoders" }, \ + { "bsfs", OPT_EXIT, { .func_arg = show_bsfs }, "show available bit stream filters" }, \ + { "protocols", OPT_EXIT, { .func_arg = show_protocols }, "show available protocols" }, \ + { "filters", OPT_EXIT, { .func_arg = show_filters }, "show available filters" }, \ + { "pix_fmts", OPT_EXIT, { .func_arg = show_pix_fmts }, "show available pixel formats" }, \ + { "layouts", OPT_EXIT, { .func_arg = show_layouts }, "show standard channel layouts" }, \ + { "sample_fmts", OPT_EXIT, { .func_arg = show_sample_fmts }, "show available audio sample formats" }, \ + { "colors", OPT_EXIT, { .func_arg = show_colors }, "show available color names" }, \ + { "loglevel", HAS_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \ + { "v", HAS_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \ + { "report", 0, { .func_arg = opt_report }, "generate a report" }, \ + { "max_alloc", HAS_ARG, { .func_arg = opt_max_alloc }, "set maximum size of a single allocated block", "bytes" }, \ + { "cpuflags", HAS_ARG | OPT_EXPERT, { .func_arg = opt_cpuflags }, "force specific cpu flags", "flags" }, \ + { "hide_banner", OPT_BOOL | OPT_EXPERT, {&hide_banner}, "do not show program banner", "hide_banner" }, \ + CMDUTILS_COMMON_OPTIONS_AVDEVICE \ + +/** + * Show help for all options with given flags in class and all its + * children. + */ +void show_help_children(const AVClass *class, int flags); + +/** + * Per-fftool specific help handler. Implemented in each + * fftool, called by show_help(). + */ +void show_help_default(const char *opt, const char *arg); + +/** + * Generic -h handler common to all fftools. + */ +int show_help(void *optctx, const char *opt, const char *arg); + +/** + * Parse the command line arguments. + * + * @param optctx an opaque options context + * @param argc number of command line arguments + * @param argv values of command line arguments + * @param options Array with the definitions required to interpret every + * option of the form: -option_name [argument] + * @param parse_arg_function Name of the function called to process every + * argument without a leading option name flag. NULL if such arguments do + * not have to be processed. + */ +void parse_options(void *optctx, int argc, char **argv, const OptionDef *options, + void (* parse_arg_function)(void *optctx, const char*)); + +/** + * Parse one given option. + * + * @return on success 1 if arg was consumed, 0 otherwise; negative number on error + */ +int parse_option(void *optctx, const char *opt, const char *arg, + const OptionDef *options); + +/** + * An option extracted from the commandline. + * Cannot use AVDictionary because of options like -map which can be + * used multiple times. + */ +typedef struct Option { + const OptionDef *opt; + const char *key; + const char *val; +} Option; + +typedef struct OptionGroupDef { + /**< group name */ + const char *name; + /** + * Option to be used as group separator. Can be NULL for groups which + * are terminated by a non-option argument (e.g. ffmpeg output files) + */ + const char *sep; + /** + * Option flags that must be set on each option that is + * applied to this group + */ + int flags; +} OptionGroupDef; + +typedef struct OptionGroup { + const OptionGroupDef *group_def; + const char *arg; + + Option *opts; + int nb_opts; + + AVDictionary *codec_opts; + AVDictionary *format_opts; + AVDictionary *resample_opts; + AVDictionary *sws_dict; + AVDictionary *swr_opts; +} OptionGroup; + +/** + * A list of option groups that all have the same group type + * (e.g. input files or output files) + */ +typedef struct OptionGroupList { + const OptionGroupDef *group_def; + + OptionGroup *groups; + int nb_groups; +} OptionGroupList; + +typedef struct OptionParseContext { + OptionGroup global_opts; + + OptionGroupList *groups; + int nb_groups; + + /* parsing state */ + OptionGroup cur_group; +} OptionParseContext; + +/** + * Parse an options group and write results into optctx. + * + * @param optctx an app-specific options context. NULL for global options group + */ +int parse_optgroup(void *optctx, OptionGroup *g); + +/** + * Split the commandline into an intermediate form convenient for further + * processing. + * + * The commandline is assumed to be composed of options which either belong to a + * group (those with OPT_SPEC, OPT_OFFSET or OPT_PERFILE) or are global + * (everything else). + * + * A group (defined by an OptionGroupDef struct) is a sequence of options + * terminated by either a group separator option (e.g. -i) or a parameter that + * is not an option (doesn't start with -). A group without a separator option + * must always be first in the supplied groups list. + * + * All options within the same group are stored in one OptionGroup struct in an + * OptionGroupList, all groups with the same group definition are stored in one + * OptionGroupList in OptionParseContext.groups. The order of group lists is the + * same as the order of group definitions. + */ +int split_commandline(OptionParseContext *octx, int argc, char *argv[], + const OptionDef *options, + const OptionGroupDef *groups, int nb_groups); + +/** + * Free all allocated memory in an OptionParseContext. + */ +void uninit_parse_context(OptionParseContext *octx); + +/** + * Find the '-loglevel' option in the command line args and apply it. + */ +void parse_loglevel(int argc, char **argv, const OptionDef *options); + +/** + * Return index of option opt in argv or 0 if not found. + */ +int locate_option(int argc, char **argv, const OptionDef *options, + const char *optname); + +/** + * Check if the given stream matches a stream specifier. + * + * @param s Corresponding format context. + * @param st Stream from s to be checked. + * @param spec A stream specifier of the [v|a|s|d]:[\] form. + * + * @return 1 if the stream matches, 0 if it doesn't, <0 on error + */ +int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec); + +/** + * Filter out options for given codec. + * + * Create a new options dictionary containing only the options from + * opts which apply to the codec with ID codec_id. + * + * @param opts dictionary to place options in + * @param codec_id ID of the codec that should be filtered for + * @param s Corresponding format context. + * @param st A stream from s for which the options should be filtered. + * @param codec The particular codec for which the options should be filtered. + * If null, the default one is looked up according to the codec id. + * @return a pointer to the created dictionary + */ +AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, + AVFormatContext *s, AVStream *st, AVCodec *codec); + +/** + * Setup AVCodecContext options for avformat_find_stream_info(). + * + * Create an array of dictionaries, one dictionary for each stream + * contained in s. + * Each dictionary will contain the options from codec_opts which can + * be applied to the corresponding stream codec context. + * + * @return pointer to the created array of dictionaries, NULL if it + * cannot be created + */ +AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, + AVDictionary *codec_opts); + +/** + * Print an error message to stderr, indicating filename and a human + * readable description of the error code err. + * + * If strerror_r() is not available the use of this function in a + * multithreaded application may be unsafe. + * + * @see av_strerror() + */ +void print_error(const char *filename, int err); + +/** + * Print the program banner to stderr. The banner contents depend on the + * current version of the repository and of the libav* libraries used by + * the program. + */ +void show_banner(int argc, char **argv, const OptionDef *options); + +/** + * Print the version of the program to stdout. The version message + * depends on the current versions of the repository and of the libav* + * libraries. + * This option processing function does not utilize the arguments. + */ +int show_version(void *optctx, const char *opt, const char *arg); + +/** + * Print the build configuration of the program to stdout. The contents + * depend on the definition of FFMPEG_CONFIGURATION. + * This option processing function does not utilize the arguments. + */ +int show_buildconf(void *optctx, const char *opt, const char *arg); + +/** + * Print the license of the program to stdout. The license depends on + * the license of the libraries compiled into the program. + * This option processing function does not utilize the arguments. + */ +int show_license(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the formats supported by the + * program (including devices). + * This option processing function does not utilize the arguments. + */ +int show_formats(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the muxers supported by the + * program (including devices). + * This option processing function does not utilize the arguments. + */ +int show_muxers(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the demuxer supported by the + * program (including devices). + * This option processing function does not utilize the arguments. + */ +int show_demuxers(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the devices supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_devices(void *optctx, const char *opt, const char *arg); + +#if CONFIG_AVDEVICE +/** + * Print a listing containing autodetected sinks of the output device. + * Device name with options may be passed as an argument to limit results. + */ +int show_sinks(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing autodetected sources of the input device. + * Device name with options may be passed as an argument to limit results. + */ +int show_sources(void *optctx, const char *opt, const char *arg); +#endif + +/** + * Print a listing containing all the codecs supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_codecs(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the decoders supported by the + * program. + */ +int show_decoders(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the encoders supported by the + * program. + */ +int show_encoders(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the filters supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_filters(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the bit stream filters supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_bsfs(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the protocols supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_protocols(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the pixel formats supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_pix_fmts(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the standard channel layouts supported by + * the program. + * This option processing function does not utilize the arguments. + */ +int show_layouts(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the sample formats supported by the + * program. + */ +int show_sample_fmts(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the color names and values recognized + * by the program. + */ +int show_colors(void *optctx, const char *opt, const char *arg); + +/** + * Return a positive value if a line read from standard input + * starts with [yY], otherwise return 0. + */ +int read_yesno(void); + +/** + * Get a file corresponding to a preset file. + * + * If is_path is non-zero, look for the file in the path preset_name. + * Otherwise search for a file named arg.ffpreset in the directories + * $FFMPEG_DATADIR (if set), $HOME/.ffmpeg, and in the datadir defined + * at configuration time or in a "ffpresets" folder along the executable + * on win32, in that order. If no such file is found and + * codec_name is defined, then search for a file named + * codec_name-preset_name.avpreset in the above-mentioned directories. + * + * @param filename buffer where the name of the found filename is written + * @param filename_size size in bytes of the filename buffer + * @param preset_name name of the preset to search + * @param is_path tell if preset_name is a filename path + * @param codec_name name of the codec for which to look for the + * preset, may be NULL + */ +FILE *get_preset_file(char *filename, size_t filename_size, + const char *preset_name, int is_path, const char *codec_name); + +/** + * Realloc array to hold new_size elements of elem_size. + * Calls exit() on failure. + * + * @param array array to reallocate + * @param elem_size size in bytes of each element + * @param size new element count will be written here + * @param new_size number of elements to place in reallocated array + * @return reallocated array + */ +void *grow_array(void *array, int elem_size, int *size, int new_size); + +#define media_type_string av_get_media_type_string + +#define GROW_ARRAY(array, nb_elems)\ + array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1) + +#define GET_PIX_FMT_NAME(pix_fmt)\ + const char *name = av_get_pix_fmt_name(pix_fmt); + +#define GET_CODEC_NAME(id)\ + const char *name = avcodec_descriptor_get(id)->name; + +#define GET_SAMPLE_FMT_NAME(sample_fmt)\ + const char *name = av_get_sample_fmt_name(sample_fmt) + +#define GET_SAMPLE_RATE_NAME(rate)\ + char name[16];\ + snprintf(name, sizeof(name), "%d", rate); + +#define GET_CH_LAYOUT_NAME(ch_layout)\ + char name[16];\ + snprintf(name, sizeof(name), "0x%"PRIx64, ch_layout); + +#define GET_CH_LAYOUT_DESC(ch_layout)\ + char name[128];\ + av_get_channel_layout_string(name, sizeof(name), 0, ch_layout); + +double get_rotation(AVStream *st); + +#endif /* FFTOOLS_CMDUTILS_H */ diff --git a/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/config.h b/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/config.h new file mode 100644 index 0000000..2417a46 --- /dev/null +++ b/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/config.h @@ -0,0 +1,2608 @@ +/* Automatically generated by configure - do not modify! */ +#ifndef FFMPEG_CONFIG_H +#define FFMPEG_CONFIG_H +#define FFMPEG_CONFIGURATION "--target-os=darwin --arch=arm64 --cc='xcrun -sdk iphoneos clang' --as='gas-preprocessor.pl -arch aarch64 -- xcrun -sdk iphoneos clang' --enable-cross-compile --disable-debug --disable-programs --disable-doc --enable-pic --extra-cflags='-arch arm64 -mios-version-min=8.0 -fembed-bitcode' --extra-ldflags='-arch arm64 -mios-version-min=8.0 -fembed-bitcode' --prefix='/Users/zd/Downloads/iOS相关/FFmpeg-iOS-build-script-master/thin/arm64'" +#define FFMPEG_LICENSE "LGPL version 2.1 or later" +#define CONFIG_THIS_YEAR 2020 +#define FFMPEG_DATADIR "/Users/zd/Downloads/iOS相关/FFmpeg-iOS-build-script-master/thin/arm64/share/ffmpeg" +#define AVCONV_DATADIR "/Users/zd/Downloads/iOS相关/FFmpeg-iOS-build-script-master/thin/arm64/share/ffmpeg" +#define CC_IDENT "Apple clang version 14.0.0 (clang-1400.0.29.202)" +#define av_restrict restrict +#define EXTERN_PREFIX "_" +#define EXTERN_ASM _ +#define BUILDSUF "" +#define SLIBSUF ".dylib" +#define HAVE_MMX2 HAVE_MMXEXT +#define SWS_MAX_FILTER_SIZE 256 +#define ARCH_AARCH64 1 +#define ARCH_ALPHA 0 +#define ARCH_ARM 0 +#define ARCH_AVR32 0 +#define ARCH_AVR32_AP 0 +#define ARCH_AVR32_UC 0 +#define ARCH_BFIN 0 +#define ARCH_IA64 0 +#define ARCH_M68K 0 +#define ARCH_MIPS 0 +#define ARCH_MIPS64 0 +#define ARCH_PARISC 0 +#define ARCH_PPC 0 +#define ARCH_PPC64 0 +#define ARCH_S390 0 +#define ARCH_SH4 0 +#define ARCH_SPARC 0 +#define ARCH_SPARC64 0 +#define ARCH_TILEGX 0 +#define ARCH_TILEPRO 0 +#define ARCH_TOMI 0 +#define ARCH_X86 0 +#define ARCH_X86_32 0 +#define ARCH_X86_64 0 +#define HAVE_ARMV5TE 0 +#define HAVE_ARMV6 0 +#define HAVE_ARMV6T2 0 +#define HAVE_ARMV8 1 +#define HAVE_NEON 1 +#define HAVE_VFP 1 +#define HAVE_VFPV3 0 +#define HAVE_SETEND 0 +#define HAVE_ALTIVEC 0 +#define HAVE_DCBZL 0 +#define HAVE_LDBRX 0 +#define HAVE_POWER8 0 +#define HAVE_PPC4XX 0 +#define HAVE_VSX 0 +#define HAVE_AESNI 0 +#define HAVE_AMD3DNOW 0 +#define HAVE_AMD3DNOWEXT 0 +#define HAVE_AVX 0 +#define HAVE_AVX2 0 +#define HAVE_AVX512 0 +#define HAVE_FMA3 0 +#define HAVE_FMA4 0 +#define HAVE_MMX 0 +#define HAVE_MMXEXT 0 +#define HAVE_SSE 0 +#define HAVE_SSE2 0 +#define HAVE_SSE3 0 +#define HAVE_SSE4 0 +#define HAVE_SSE42 0 +#define HAVE_SSSE3 0 +#define HAVE_XOP 0 +#define HAVE_CPUNOP 0 +#define HAVE_I686 0 +#define HAVE_MIPSFPU 0 +#define HAVE_MIPS32R2 0 +#define HAVE_MIPS32R5 0 +#define HAVE_MIPS64R2 0 +#define HAVE_MIPS32R6 0 +#define HAVE_MIPS64R6 0 +#define HAVE_MIPSDSP 0 +#define HAVE_MIPSDSPR2 0 +#define HAVE_MSA 0 +#define HAVE_MSA2 0 +#define HAVE_LOONGSON2 0 +#define HAVE_LOONGSON3 0 +#define HAVE_MMI 0 +#define HAVE_ARMV5TE_EXTERNAL 0 +#define HAVE_ARMV6_EXTERNAL 0 +#define HAVE_ARMV6T2_EXTERNAL 0 +#define HAVE_ARMV8_EXTERNAL 1 +#define HAVE_NEON_EXTERNAL 1 +#define HAVE_VFP_EXTERNAL 1 +#define HAVE_VFPV3_EXTERNAL 0 +#define HAVE_SETEND_EXTERNAL 0 +#define HAVE_ALTIVEC_EXTERNAL 0 +#define HAVE_DCBZL_EXTERNAL 0 +#define HAVE_LDBRX_EXTERNAL 0 +#define HAVE_POWER8_EXTERNAL 0 +#define HAVE_PPC4XX_EXTERNAL 0 +#define HAVE_VSX_EXTERNAL 0 +#define HAVE_AESNI_EXTERNAL 0 +#define HAVE_AMD3DNOW_EXTERNAL 0 +#define HAVE_AMD3DNOWEXT_EXTERNAL 0 +#define HAVE_AVX_EXTERNAL 0 +#define HAVE_AVX2_EXTERNAL 0 +#define HAVE_AVX512_EXTERNAL 0 +#define HAVE_FMA3_EXTERNAL 0 +#define HAVE_FMA4_EXTERNAL 0 +#define HAVE_MMX_EXTERNAL 0 +#define HAVE_MMXEXT_EXTERNAL 0 +#define HAVE_SSE_EXTERNAL 0 +#define HAVE_SSE2_EXTERNAL 0 +#define HAVE_SSE3_EXTERNAL 0 +#define HAVE_SSE4_EXTERNAL 0 +#define HAVE_SSE42_EXTERNAL 0 +#define HAVE_SSSE3_EXTERNAL 0 +#define HAVE_XOP_EXTERNAL 0 +#define HAVE_CPUNOP_EXTERNAL 0 +#define HAVE_I686_EXTERNAL 0 +#define HAVE_MIPSFPU_EXTERNAL 0 +#define HAVE_MIPS32R2_EXTERNAL 0 +#define HAVE_MIPS32R5_EXTERNAL 0 +#define HAVE_MIPS64R2_EXTERNAL 0 +#define HAVE_MIPS32R6_EXTERNAL 0 +#define HAVE_MIPS64R6_EXTERNAL 0 +#define HAVE_MIPSDSP_EXTERNAL 0 +#define HAVE_MIPSDSPR2_EXTERNAL 0 +#define HAVE_MSA_EXTERNAL 0 +#define HAVE_MSA2_EXTERNAL 0 +#define HAVE_LOONGSON2_EXTERNAL 0 +#define HAVE_LOONGSON3_EXTERNAL 0 +#define HAVE_MMI_EXTERNAL 0 +#define HAVE_ARMV5TE_INLINE 0 +#define HAVE_ARMV6_INLINE 0 +#define HAVE_ARMV6T2_INLINE 0 +#define HAVE_ARMV8_INLINE 1 +#define HAVE_NEON_INLINE 1 +#define HAVE_VFP_INLINE 1 +#define HAVE_VFPV3_INLINE 0 +#define HAVE_SETEND_INLINE 0 +#define HAVE_ALTIVEC_INLINE 0 +#define HAVE_DCBZL_INLINE 0 +#define HAVE_LDBRX_INLINE 0 +#define HAVE_POWER8_INLINE 0 +#define HAVE_PPC4XX_INLINE 0 +#define HAVE_VSX_INLINE 0 +#define HAVE_AESNI_INLINE 0 +#define HAVE_AMD3DNOW_INLINE 0 +#define HAVE_AMD3DNOWEXT_INLINE 0 +#define HAVE_AVX_INLINE 0 +#define HAVE_AVX2_INLINE 0 +#define HAVE_AVX512_INLINE 0 +#define HAVE_FMA3_INLINE 0 +#define HAVE_FMA4_INLINE 0 +#define HAVE_MMX_INLINE 0 +#define HAVE_MMXEXT_INLINE 0 +#define HAVE_SSE_INLINE 0 +#define HAVE_SSE2_INLINE 0 +#define HAVE_SSE3_INLINE 0 +#define HAVE_SSE4_INLINE 0 +#define HAVE_SSE42_INLINE 0 +#define HAVE_SSSE3_INLINE 0 +#define HAVE_XOP_INLINE 0 +#define HAVE_CPUNOP_INLINE 0 +#define HAVE_I686_INLINE 0 +#define HAVE_MIPSFPU_INLINE 0 +#define HAVE_MIPS32R2_INLINE 0 +#define HAVE_MIPS32R5_INLINE 0 +#define HAVE_MIPS64R2_INLINE 0 +#define HAVE_MIPS32R6_INLINE 0 +#define HAVE_MIPS64R6_INLINE 0 +#define HAVE_MIPSDSP_INLINE 0 +#define HAVE_MIPSDSPR2_INLINE 0 +#define HAVE_MSA_INLINE 0 +#define HAVE_MSA2_INLINE 0 +#define HAVE_LOONGSON2_INLINE 0 +#define HAVE_LOONGSON3_INLINE 0 +#define HAVE_MMI_INLINE 0 +#define HAVE_ALIGNED_STACK 1 +#define HAVE_FAST_64BIT 1 +#define HAVE_FAST_CLZ 1 +#define HAVE_FAST_CMOV 0 +#define HAVE_LOCAL_ALIGNED 0 +#define HAVE_SIMD_ALIGN_16 1 +#define HAVE_SIMD_ALIGN_32 0 +#define HAVE_SIMD_ALIGN_64 0 +#define HAVE_ATOMIC_CAS_PTR 0 +#define HAVE_MACHINE_RW_BARRIER 0 +#define HAVE_MEMORYBARRIER 0 +#define HAVE_MM_EMPTY 0 +#define HAVE_RDTSC 0 +#define HAVE_SEM_TIMEDWAIT 0 +#define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1 +#define HAVE_CABS 1 +#define HAVE_CEXP 1 +#define HAVE_INLINE_ASM 1 +#define HAVE_SYMVER 1 +#define HAVE_X86ASM 0 +#define HAVE_BIGENDIAN 0 +#define HAVE_FAST_UNALIGNED 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_ASM_TYPES_H 0 +#define HAVE_CDIO_PARANOIA_H 0 +#define HAVE_CDIO_PARANOIA_PARANOIA_H 0 +#define HAVE_CUDA_H 0 +#define HAVE_DISPATCH_DISPATCH_H 1 +#define HAVE_DEV_BKTR_IOCTL_BT848_H 0 +#define HAVE_DEV_BKTR_IOCTL_METEOR_H 0 +#define HAVE_DEV_IC_BT8XX_H 0 +#define HAVE_DEV_VIDEO_BKTR_IOCTL_BT848_H 0 +#define HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H 0 +#define HAVE_DIRECT_H 0 +#define HAVE_DIRENT_H 1 +#define HAVE_DXGIDEBUG_H 0 +#define HAVE_DXVA_H 0 +#define HAVE_ES2_GL_H 0 +#define HAVE_GSM_H 0 +#define HAVE_IO_H 0 +#define HAVE_LINUX_PERF_EVENT_H 0 +#define HAVE_MACHINE_IOCTL_BT848_H 0 +#define HAVE_MACHINE_IOCTL_METEOR_H 0 +#define HAVE_MALLOC_H 0 +#define HAVE_OPENCV2_CORE_CORE_C_H 0 +#define HAVE_OPENGL_GL3_H 0 +#define HAVE_POLL_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SOUNDCARD_H 0 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_SYS_VIDEOIO_H 0 +#define HAVE_TERMIOS_H 1 +#define HAVE_UDPLITE_H 0 +#define HAVE_UNISTD_H 1 +#define HAVE_VALGRIND_VALGRIND_H 0 +#define HAVE_WINDOWS_H 0 +#define HAVE_WINSOCK2_H 0 +#define HAVE_INTRINSICS_NEON 1 +#define HAVE_ATANF 1 +#define HAVE_ATAN2F 1 +#define HAVE_CBRT 1 +#define HAVE_CBRTF 1 +#define HAVE_COPYSIGN 1 +#define HAVE_COSF 1 +#define HAVE_ERF 1 +#define HAVE_EXP2 1 +#define HAVE_EXP2F 1 +#define HAVE_EXPF 1 +#define HAVE_HYPOT 1 +#define HAVE_ISFINITE 1 +#define HAVE_ISINF 1 +#define HAVE_ISNAN 1 +#define HAVE_LDEXPF 1 +#define HAVE_LLRINT 1 +#define HAVE_LLRINTF 1 +#define HAVE_LOG2 1 +#define HAVE_LOG2F 1 +#define HAVE_LOG10F 1 +#define HAVE_LRINT 1 +#define HAVE_LRINTF 1 +#define HAVE_POWF 1 +#define HAVE_RINT 1 +#define HAVE_ROUND 1 +#define HAVE_ROUNDF 1 +#define HAVE_SINF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 +#define HAVE_DOS_PATHS 0 +#define HAVE_LIBC_MSVCRT 0 +#define HAVE_MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS 0 +#define HAVE_SECTION_DATA_REL_RO 0 +#define HAVE_THREADS 1 +#define HAVE_UWP 0 +#define HAVE_WINRT 0 +#define HAVE_ACCESS 1 +#define HAVE_ALIGNED_MALLOC 0 +#define HAVE_ARC4RANDOM 1 +#define HAVE_CLOCK_GETTIME 0 +#define HAVE_CLOSESOCKET 0 +#define HAVE_COMMANDLINETOARGVW 0 +#define HAVE_FCNTL 1 +#define HAVE_GETADDRINFO 1 +#define HAVE_GETHRTIME 0 +#define HAVE_GETOPT 1 +#define HAVE_GETMODULEHANDLE 0 +#define HAVE_GETPROCESSAFFINITYMASK 0 +#define HAVE_GETPROCESSMEMORYINFO 0 +#define HAVE_GETPROCESSTIMES 0 +#define HAVE_GETRUSAGE 1 +#define HAVE_GETSTDHANDLE 0 +#define HAVE_GETSYSTEMTIMEASFILETIME 0 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_GLOB 1 +#define HAVE_GLXGETPROCADDRESS 0 +#define HAVE_GMTIME_R 1 +#define HAVE_INET_ATON 1 +#define HAVE_ISATTY 1 +#define HAVE_KBHIT 0 +#define HAVE_LOCALTIME_R 1 +#define HAVE_LSTAT 1 +#define HAVE_LZO1X_999_COMPRESS 0 +#define HAVE_MACH_ABSOLUTE_TIME 1 +#define HAVE_MAPVIEWOFFILE 0 +#define HAVE_MEMALIGN 0 +#define HAVE_MKSTEMP 1 +#define HAVE_MMAP 1 +#define HAVE_MPROTECT 1 +#define HAVE_NANOSLEEP 1 +#define HAVE_PEEKNAMEDPIPE 0 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_PTHREAD_CANCEL 1 +#define HAVE_SCHED_GETAFFINITY 0 +#define HAVE_SECITEMIMPORT 0 +#define HAVE_SETCONSOLETEXTATTRIBUTE 0 +#define HAVE_SETCONSOLECTRLHANDLER 0 +#define HAVE_SETDLLDIRECTORY 0 +#define HAVE_SETMODE 0 +#define HAVE_SETRLIMIT 1 +#define HAVE_SLEEP 0 +#define HAVE_STRERROR_R 1 +#define HAVE_SYSCONF 1 +#define HAVE_SYSCTL 1 +#define HAVE_USLEEP 1 +#define HAVE_UTGETOSTYPEFROMSTRING 0 +#define HAVE_VIRTUALALLOC 0 +#define HAVE_WGLGETPROCADDRESS 0 +#define HAVE_BCRYPT 0 +#define HAVE_VAAPI_DRM 0 +#define HAVE_VAAPI_X11 0 +#define HAVE_VDPAU_X11 0 +#define HAVE_PTHREADS 1 +#define HAVE_OS2THREADS 0 +#define HAVE_W32THREADS 0 +#define HAVE_AS_ARCH_DIRECTIVE 0 +#define HAVE_AS_DN_DIRECTIVE 0 +#define HAVE_AS_FPU_DIRECTIVE 0 +#define HAVE_AS_FUNC 1 +#define HAVE_AS_OBJECT_ARCH 0 +#define HAVE_ASM_MOD_Q 0 +#define HAVE_BLOCKS_EXTENSION 1 +#define HAVE_EBP_AVAILABLE 0 +#define HAVE_EBX_AVAILABLE 0 +#define HAVE_GNU_AS 0 +#define HAVE_GNU_WINDRES 0 +#define HAVE_IBM_ASM 0 +#define HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS 0 +#define HAVE_INLINE_ASM_LABELS 1 +#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1 +#define HAVE_PRAGMA_DEPRECATED 1 +#define HAVE_RSYNC_CONTIMEOUT 0 +#define HAVE_SYMVER_ASM_LABEL 1 +#define HAVE_SYMVER_GNU_ASM 0 +#define HAVE_VFP_ARGS 0 +#define HAVE_XFORM_ASM 0 +#define HAVE_XMM_CLOBBERS 0 +#define HAVE_KCMVIDEOCODECTYPE_HEVC 1 +#define HAVE_KCVPIXELFORMATTYPE_420YPCBCR10BIPLANARVIDEORANGE 1 +#define HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_SMPTE_ST_2084_PQ 0 +#define HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_ITU_R_2100_HLG 0 +#define HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_LINEAR 0 +#define HAVE_SOCKLEN_T 1 +#define HAVE_STRUCT_ADDRINFO 1 +#define HAVE_STRUCT_GROUP_SOURCE_REQ 1 +#define HAVE_STRUCT_IP_MREQ_SOURCE 1 +#define HAVE_STRUCT_IPV6_MREQ 1 +#define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1 +#define HAVE_STRUCT_POLLFD 1 +#define HAVE_STRUCT_RUSAGE_RU_MAXRSS 1 +#define HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE 0 +#define HAVE_STRUCT_SOCKADDR_IN6 1 +#define HAVE_STRUCT_SOCKADDR_SA_LEN 1 +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 0 +#define HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 0 +#define HAVE_MAKEINFO 1 +#define HAVE_MAKEINFO_HTML 0 +#define HAVE_OPENCL_D3D11 0 +#define HAVE_OPENCL_DRM_ARM 0 +#define HAVE_OPENCL_DRM_BEIGNET 0 +#define HAVE_OPENCL_DXVA2 0 +#define HAVE_OPENCL_VAAPI_BEIGNET 0 +#define HAVE_OPENCL_VAAPI_INTEL_MEDIA 0 +#define HAVE_PERL 1 +#define HAVE_POD2MAN 1 +#define HAVE_TEXI2HTML 0 +#define CONFIG_DOC 0 +#define CONFIG_HTMLPAGES 0 +#define CONFIG_MANPAGES 1 +#define CONFIG_PODPAGES 1 +#define CONFIG_TXTPAGES 1 +#define CONFIG_AVIO_LIST_DIR_EXAMPLE 1 +#define CONFIG_AVIO_READING_EXAMPLE 1 +#define CONFIG_DECODE_AUDIO_EXAMPLE 1 +#define CONFIG_DECODE_VIDEO_EXAMPLE 1 +#define CONFIG_DEMUXING_DECODING_EXAMPLE 1 +#define CONFIG_ENCODE_AUDIO_EXAMPLE 1 +#define CONFIG_ENCODE_VIDEO_EXAMPLE 1 +#define CONFIG_EXTRACT_MVS_EXAMPLE 1 +#define CONFIG_FILTER_AUDIO_EXAMPLE 1 +#define CONFIG_FILTERING_AUDIO_EXAMPLE 1 +#define CONFIG_FILTERING_VIDEO_EXAMPLE 1 +#define CONFIG_HTTP_MULTICLIENT_EXAMPLE 1 +#define CONFIG_HW_DECODE_EXAMPLE 1 +#define CONFIG_METADATA_EXAMPLE 1 +#define CONFIG_MUXING_EXAMPLE 1 +#define CONFIG_QSVDEC_EXAMPLE 0 +#define CONFIG_REMUXING_EXAMPLE 1 +#define CONFIG_RESAMPLING_AUDIO_EXAMPLE 1 +#define CONFIG_SCALING_VIDEO_EXAMPLE 1 +#define CONFIG_TRANSCODE_AAC_EXAMPLE 1 +#define CONFIG_TRANSCODING_EXAMPLE 1 +#define CONFIG_VAAPI_ENCODE_EXAMPLE 0 +#define CONFIG_VAAPI_TRANSCODE_EXAMPLE 0 +#define CONFIG_AVISYNTH 0 +#define CONFIG_FREI0R 0 +#define CONFIG_LIBCDIO 0 +#define CONFIG_LIBDAVS2 0 +#define CONFIG_LIBRUBBERBAND 0 +#define CONFIG_LIBVIDSTAB 0 +#define CONFIG_LIBX264 0 +#define CONFIG_LIBX265 0 +#define CONFIG_LIBXAVS 0 +#define CONFIG_LIBXAVS2 0 +#define CONFIG_LIBXVID 0 +#define CONFIG_DECKLINK 0 +#define CONFIG_LIBFDK_AAC 0 +#define CONFIG_OPENSSL 0 +#define CONFIG_LIBTLS 0 +#define CONFIG_GMP 0 +#define CONFIG_LIBARIBB24 0 +#define CONFIG_LIBLENSFUN 0 +#define CONFIG_LIBOPENCORE_AMRNB 0 +#define CONFIG_LIBOPENCORE_AMRWB 0 +#define CONFIG_LIBVMAF 0 +#define CONFIG_LIBVO_AMRWBENC 0 +#define CONFIG_MBEDTLS 0 +#define CONFIG_RKMPP 0 +#define CONFIG_LIBSMBCLIENT 0 +#define CONFIG_CHROMAPRINT 0 +#define CONFIG_GCRYPT 0 +#define CONFIG_GNUTLS 0 +#define CONFIG_JNI 0 +#define CONFIG_LADSPA 0 +#define CONFIG_LIBAOM 0 +#define CONFIG_LIBASS 0 +#define CONFIG_LIBBLURAY 0 +#define CONFIG_LIBBS2B 0 +#define CONFIG_LIBCACA 0 +#define CONFIG_LIBCELT 0 +#define CONFIG_LIBCODEC2 0 +#define CONFIG_LIBDAV1D 0 +#define CONFIG_LIBDC1394 0 +#define CONFIG_LIBDRM 0 +#define CONFIG_LIBFLITE 0 +#define CONFIG_LIBFONTCONFIG 0 +#define CONFIG_LIBFREETYPE 0 +#define CONFIG_LIBFRIBIDI 0 +#define CONFIG_LIBGLSLANG 0 +#define CONFIG_LIBGME 0 +#define CONFIG_LIBGSM 0 +#define CONFIG_LIBIEC61883 0 +#define CONFIG_LIBILBC 0 +#define CONFIG_LIBJACK 0 +#define CONFIG_LIBKLVANC 0 +#define CONFIG_LIBKVAZAAR 0 +#define CONFIG_LIBMODPLUG 0 +#define CONFIG_LIBMP3LAME 0 +#define CONFIG_LIBMYSOFA 0 +#define CONFIG_LIBOPENCV 0 +#define CONFIG_LIBOPENH264 0 +#define CONFIG_LIBOPENJPEG 0 +#define CONFIG_LIBOPENMPT 0 +#define CONFIG_LIBOPUS 0 +#define CONFIG_LIBPULSE 0 +#define CONFIG_LIBRABBITMQ 0 +#define CONFIG_LIBRAV1E 0 +#define CONFIG_LIBRSVG 0 +#define CONFIG_LIBRTMP 0 +#define CONFIG_LIBSHINE 0 +#define CONFIG_LIBSMBCLIENT 0 +#define CONFIG_LIBSNAPPY 0 +#define CONFIG_LIBSOXR 0 +#define CONFIG_LIBSPEEX 0 +#define CONFIG_LIBSRT 0 +#define CONFIG_LIBSSH 0 +#define CONFIG_LIBTENSORFLOW 0 +#define CONFIG_LIBTESSERACT 0 +#define CONFIG_LIBTHEORA 0 +#define CONFIG_LIBTWOLAME 0 +#define CONFIG_LIBV4L2 0 +#define CONFIG_LIBVORBIS 0 +#define CONFIG_LIBVPX 0 +#define CONFIG_LIBWAVPACK 0 +#define CONFIG_LIBWEBP 0 +#define CONFIG_LIBXML2 0 +#define CONFIG_LIBZIMG 0 +#define CONFIG_LIBZMQ 0 +#define CONFIG_LIBZVBI 0 +#define CONFIG_LV2 0 +#define CONFIG_MEDIACODEC 0 +#define CONFIG_OPENAL 0 +#define CONFIG_OPENGL 0 +#define CONFIG_POCKETSPHINX 0 +#define CONFIG_VAPOURSYNTH 0 +#define CONFIG_ALSA 0 +#define CONFIG_APPKIT 0 +#define CONFIG_AVFOUNDATION 1 +#define CONFIG_BZLIB 1 +#define CONFIG_COREIMAGE 1 +#define CONFIG_ICONV 1 +#define CONFIG_LIBXCB 0 +#define CONFIG_LIBXCB_SHM 0 +#define CONFIG_LIBXCB_SHAPE 0 +#define CONFIG_LIBXCB_XFIXES 0 +#define CONFIG_LZMA 0 +#define CONFIG_MEDIAFOUNDATION 0 +#define CONFIG_SCHANNEL 0 +#define CONFIG_SDL2 0 +#define CONFIG_SECURETRANSPORT 1 +#define CONFIG_SNDIO 0 +#define CONFIG_XLIB 0 +#define CONFIG_ZLIB 1 +#define CONFIG_CUDA_NVCC 0 +#define CONFIG_CUDA_SDK 0 +#define CONFIG_LIBNPP 0 +#define CONFIG_LIBMFX 0 +#define CONFIG_MMAL 0 +#define CONFIG_OMX 0 +#define CONFIG_OPENCL 0 +#define CONFIG_VULKAN 0 +#define CONFIG_AMF 0 +#define CONFIG_AUDIOTOOLBOX 1 +#define CONFIG_CRYSTALHD 0 +#define CONFIG_CUDA 0 +#define CONFIG_CUDA_LLVM 0 +#define CONFIG_CUVID 0 +#define CONFIG_D3D11VA 0 +#define CONFIG_DXVA2 0 +#define CONFIG_FFNVCODEC 0 +#define CONFIG_NVDEC 0 +#define CONFIG_NVENC 0 +#define CONFIG_VAAPI 0 +#define CONFIG_VDPAU 0 +#define CONFIG_VIDEOTOOLBOX 1 +#define CONFIG_V4L2_M2M 0 +#define CONFIG_XVMC 0 +#define CONFIG_FTRAPV 0 +#define CONFIG_GRAY 0 +#define CONFIG_HARDCODED_TABLES 0 +#define CONFIG_OMX_RPI 0 +#define CONFIG_RUNTIME_CPUDETECT 1 +#define CONFIG_SAFE_BITSTREAM_READER 1 +#define CONFIG_SHARED 0 +#define CONFIG_SMALL 0 +#define CONFIG_STATIC 1 +#define CONFIG_SWSCALE_ALPHA 1 +#define CONFIG_GPL 0 +#define CONFIG_NONFREE 0 +#define CONFIG_VERSION3 0 +#define CONFIG_AVDEVICE 1 +#define CONFIG_AVFILTER 1 +#define CONFIG_SWSCALE 1 +#define CONFIG_POSTPROC 0 +#define CONFIG_AVFORMAT 1 +#define CONFIG_AVCODEC 1 +#define CONFIG_SWRESAMPLE 1 +#define CONFIG_AVRESAMPLE 0 +#define CONFIG_AVUTIL 1 +#define CONFIG_FFPLAY 0 +#define CONFIG_FFPROBE 0 +#define CONFIG_FFMPEG 0 +#define CONFIG_DCT 1 +#define CONFIG_DWT 1 +#define CONFIG_ERROR_RESILIENCE 1 +#define CONFIG_FAAN 1 +#define CONFIG_FAST_UNALIGNED 1 +#define CONFIG_FFT 1 +#define CONFIG_LSP 1 +#define CONFIG_LZO 1 +#define CONFIG_MDCT 1 +#define CONFIG_PIXELUTILS 1 +#define CONFIG_NETWORK 1 +#define CONFIG_RDFT 1 +#define CONFIG_AUTODETECT 0 +#define CONFIG_FONTCONFIG 0 +#define CONFIG_LARGE_TESTS 1 +#define CONFIG_LINUX_PERF 0 +#define CONFIG_MEMORY_POISONING 0 +#define CONFIG_NEON_CLOBBER_TEST 0 +#define CONFIG_OSSFUZZ 0 +#define CONFIG_PIC 1 +#define CONFIG_THUMB 0 +#define CONFIG_VALGRIND_BACKTRACE 0 +#define CONFIG_XMM_CLOBBER_TEST 0 +#define CONFIG_BSFS 1 +#define CONFIG_DECODERS 1 +#define CONFIG_ENCODERS 1 +#define CONFIG_HWACCELS 1 +#define CONFIG_PARSERS 1 +#define CONFIG_INDEVS 1 +#define CONFIG_OUTDEVS 0 +#define CONFIG_FILTERS 1 +#define CONFIG_DEMUXERS 1 +#define CONFIG_MUXERS 1 +#define CONFIG_PROTOCOLS 1 +#define CONFIG_AANDCTTABLES 1 +#define CONFIG_AC3DSP 1 +#define CONFIG_ADTS_HEADER 1 +#define CONFIG_AUDIO_FRAME_QUEUE 1 +#define CONFIG_AUDIODSP 1 +#define CONFIG_BLOCKDSP 1 +#define CONFIG_BSWAPDSP 1 +#define CONFIG_CABAC 1 +#define CONFIG_CBS 1 +#define CONFIG_CBS_AV1 1 +#define CONFIG_CBS_H264 1 +#define CONFIG_CBS_H265 1 +#define CONFIG_CBS_JPEG 0 +#define CONFIG_CBS_MPEG2 1 +#define CONFIG_CBS_VP9 1 +#define CONFIG_DIRAC_PARSE 1 +#define CONFIG_DNN 1 +#define CONFIG_DVPROFILE 1 +#define CONFIG_EXIF 1 +#define CONFIG_FAANDCT 1 +#define CONFIG_FAANIDCT 1 +#define CONFIG_FDCTDSP 1 +#define CONFIG_FLACDSP 1 +#define CONFIG_FMTCONVERT 1 +#define CONFIG_FRAME_THREAD_ENCODER 1 +#define CONFIG_G722DSP 1 +#define CONFIG_GOLOMB 1 +#define CONFIG_GPLV3 0 +#define CONFIG_H263DSP 1 +#define CONFIG_H264CHROMA 1 +#define CONFIG_H264DSP 1 +#define CONFIG_H264PARSE 1 +#define CONFIG_H264PRED 1 +#define CONFIG_H264QPEL 1 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HPELDSP 1 +#define CONFIG_HUFFMAN 1 +#define CONFIG_HUFFYUVDSP 1 +#define CONFIG_HUFFYUVENCDSP 1 +#define CONFIG_IDCTDSP 1 +#define CONFIG_IIRFILTER 1 +#define CONFIG_MDCT15 1 +#define CONFIG_INTRAX8 1 +#define CONFIG_ISO_MEDIA 1 +#define CONFIG_IVIDSP 1 +#define CONFIG_JPEGTABLES 1 +#define CONFIG_LGPLV3 0 +#define CONFIG_LIBX262 0 +#define CONFIG_LLAUDDSP 1 +#define CONFIG_LLVIDDSP 1 +#define CONFIG_LLVIDENCDSP 1 +#define CONFIG_LPC 1 +#define CONFIG_LZF 1 +#define CONFIG_ME_CMP 1 +#define CONFIG_MPEG_ER 1 +#define CONFIG_MPEGAUDIO 1 +#define CONFIG_MPEGAUDIODSP 1 +#define CONFIG_MPEGAUDIOHEADER 1 +#define CONFIG_MPEGVIDEO 1 +#define CONFIG_MPEGVIDEOENC 1 +#define CONFIG_MSS34DSP 1 +#define CONFIG_PIXBLOCKDSP 1 +#define CONFIG_QPELDSP 1 +#define CONFIG_QSV 0 +#define CONFIG_QSVDEC 0 +#define CONFIG_QSVENC 0 +#define CONFIG_QSVVPP 0 +#define CONFIG_RANGECODER 1 +#define CONFIG_RIFFDEC 1 +#define CONFIG_RIFFENC 1 +#define CONFIG_RTPDEC 1 +#define CONFIG_RTPENC_CHAIN 1 +#define CONFIG_RV34DSP 1 +#define CONFIG_SCENE_SAD 1 +#define CONFIG_SINEWIN 1 +#define CONFIG_SNAPPY 1 +#define CONFIG_SRTP 1 +#define CONFIG_STARTCODE 1 +#define CONFIG_TEXTUREDSP 1 +#define CONFIG_TEXTUREDSPENC 0 +#define CONFIG_TPELDSP 1 +#define CONFIG_VAAPI_1 0 +#define CONFIG_VAAPI_ENCODE 0 +#define CONFIG_VC1DSP 1 +#define CONFIG_VIDEODSP 1 +#define CONFIG_VP3DSP 1 +#define CONFIG_VP56DSP 1 +#define CONFIG_VP8DSP 1 +#define CONFIG_WMA_FREQS 1 +#define CONFIG_WMV2DSP 1 +#define CONFIG_AAC_ADTSTOASC_BSF 1 +#define CONFIG_AV1_FRAME_MERGE_BSF 1 +#define CONFIG_AV1_FRAME_SPLIT_BSF 1 +#define CONFIG_AV1_METADATA_BSF 1 +#define CONFIG_CHOMP_BSF 1 +#define CONFIG_DUMP_EXTRADATA_BSF 1 +#define CONFIG_DCA_CORE_BSF 1 +#define CONFIG_EAC3_CORE_BSF 1 +#define CONFIG_EXTRACT_EXTRADATA_BSF 1 +#define CONFIG_FILTER_UNITS_BSF 1 +#define CONFIG_H264_METADATA_BSF 1 +#define CONFIG_H264_MP4TOANNEXB_BSF 1 +#define CONFIG_H264_REDUNDANT_PPS_BSF 1 +#define CONFIG_HAPQA_EXTRACT_BSF 1 +#define CONFIG_HEVC_METADATA_BSF 1 +#define CONFIG_HEVC_MP4TOANNEXB_BSF 1 +#define CONFIG_IMX_DUMP_HEADER_BSF 1 +#define CONFIG_MJPEG2JPEG_BSF 1 +#define CONFIG_MJPEGA_DUMP_HEADER_BSF 1 +#define CONFIG_MP3_HEADER_DECOMPRESS_BSF 1 +#define CONFIG_MPEG2_METADATA_BSF 1 +#define CONFIG_MPEG4_UNPACK_BFRAMES_BSF 1 +#define CONFIG_MOV2TEXTSUB_BSF 1 +#define CONFIG_NOISE_BSF 1 +#define CONFIG_NULL_BSF 1 +#define CONFIG_OPUS_METADATA_BSF 1 +#define CONFIG_PCM_RECHUNK_BSF 1 +#define CONFIG_PRORES_METADATA_BSF 1 +#define CONFIG_REMOVE_EXTRADATA_BSF 1 +#define CONFIG_TEXT2MOVSUB_BSF 1 +#define CONFIG_TRACE_HEADERS_BSF 1 +#define CONFIG_TRUEHD_CORE_BSF 1 +#define CONFIG_VP9_METADATA_BSF 1 +#define CONFIG_VP9_RAW_REORDER_BSF 1 +#define CONFIG_VP9_SUPERFRAME_BSF 1 +#define CONFIG_VP9_SUPERFRAME_SPLIT_BSF 1 +#define CONFIG_AASC_DECODER 1 +#define CONFIG_AIC_DECODER 1 +#define CONFIG_ALIAS_PIX_DECODER 1 +#define CONFIG_AGM_DECODER 1 +#define CONFIG_AMV_DECODER 1 +#define CONFIG_ANM_DECODER 1 +#define CONFIG_ANSI_DECODER 1 +#define CONFIG_APNG_DECODER 1 +#define CONFIG_ARBC_DECODER 1 +#define CONFIG_ASV1_DECODER 1 +#define CONFIG_ASV2_DECODER 1 +#define CONFIG_AURA_DECODER 1 +#define CONFIG_AURA2_DECODER 1 +#define CONFIG_AVRP_DECODER 1 +#define CONFIG_AVRN_DECODER 1 +#define CONFIG_AVS_DECODER 1 +#define CONFIG_AVUI_DECODER 1 +#define CONFIG_AYUV_DECODER 1 +#define CONFIG_BETHSOFTVID_DECODER 1 +#define CONFIG_BFI_DECODER 1 +#define CONFIG_BINK_DECODER 1 +#define CONFIG_BITPACKED_DECODER 1 +#define CONFIG_BMP_DECODER 1 +#define CONFIG_BMV_VIDEO_DECODER 1 +#define CONFIG_BRENDER_PIX_DECODER 1 +#define CONFIG_C93_DECODER 1 +#define CONFIG_CAVS_DECODER 1 +#define CONFIG_CDGRAPHICS_DECODER 1 +#define CONFIG_CDTOONS_DECODER 1 +#define CONFIG_CDXL_DECODER 1 +#define CONFIG_CFHD_DECODER 1 +#define CONFIG_CINEPAK_DECODER 1 +#define CONFIG_CLEARVIDEO_DECODER 1 +#define CONFIG_CLJR_DECODER 1 +#define CONFIG_CLLC_DECODER 1 +#define CONFIG_COMFORTNOISE_DECODER 1 +#define CONFIG_CPIA_DECODER 1 +#define CONFIG_CSCD_DECODER 1 +#define CONFIG_CYUV_DECODER 1 +#define CONFIG_DDS_DECODER 1 +#define CONFIG_DFA_DECODER 1 +#define CONFIG_DIRAC_DECODER 1 +#define CONFIG_DNXHD_DECODER 1 +#define CONFIG_DPX_DECODER 1 +#define CONFIG_DSICINVIDEO_DECODER 1 +#define CONFIG_DVAUDIO_DECODER 1 +#define CONFIG_DVVIDEO_DECODER 1 +#define CONFIG_DXA_DECODER 1 +#define CONFIG_DXTORY_DECODER 1 +#define CONFIG_DXV_DECODER 1 +#define CONFIG_EACMV_DECODER 1 +#define CONFIG_EAMAD_DECODER 1 +#define CONFIG_EATGQ_DECODER 1 +#define CONFIG_EATGV_DECODER 1 +#define CONFIG_EATQI_DECODER 1 +#define CONFIG_EIGHTBPS_DECODER 1 +#define CONFIG_EIGHTSVX_EXP_DECODER 1 +#define CONFIG_EIGHTSVX_FIB_DECODER 1 +#define CONFIG_ESCAPE124_DECODER 1 +#define CONFIG_ESCAPE130_DECODER 1 +#define CONFIG_EXR_DECODER 1 +#define CONFIG_FFV1_DECODER 1 +#define CONFIG_FFVHUFF_DECODER 1 +#define CONFIG_FIC_DECODER 1 +#define CONFIG_FITS_DECODER 1 +#define CONFIG_FLASHSV_DECODER 1 +#define CONFIG_FLASHSV2_DECODER 1 +#define CONFIG_FLIC_DECODER 1 +#define CONFIG_FLV_DECODER 1 +#define CONFIG_FMVC_DECODER 1 +#define CONFIG_FOURXM_DECODER 1 +#define CONFIG_FRAPS_DECODER 1 +#define CONFIG_FRWU_DECODER 1 +#define CONFIG_G2M_DECODER 1 +#define CONFIG_GDV_DECODER 1 +#define CONFIG_GIF_DECODER 1 +#define CONFIG_H261_DECODER 1 +#define CONFIG_H263_DECODER 1 +#define CONFIG_H263I_DECODER 1 +#define CONFIG_H263P_DECODER 1 +#define CONFIG_H263_V4L2M2M_DECODER 0 +#define CONFIG_H264_DECODER 1 +#define CONFIG_H264_CRYSTALHD_DECODER 0 +#define CONFIG_H264_V4L2M2M_DECODER 0 +#define CONFIG_H264_MEDIACODEC_DECODER 0 +#define CONFIG_H264_MMAL_DECODER 0 +#define CONFIG_H264_QSV_DECODER 0 +#define CONFIG_H264_RKMPP_DECODER 0 +#define CONFIG_HAP_DECODER 1 +#define CONFIG_HEVC_DECODER 1 +#define CONFIG_HEVC_QSV_DECODER 0 +#define CONFIG_HEVC_RKMPP_DECODER 0 +#define CONFIG_HEVC_V4L2M2M_DECODER 0 +#define CONFIG_HNM4_VIDEO_DECODER 1 +#define CONFIG_HQ_HQA_DECODER 1 +#define CONFIG_HQX_DECODER 1 +#define CONFIG_HUFFYUV_DECODER 1 +#define CONFIG_HYMT_DECODER 1 +#define CONFIG_IDCIN_DECODER 1 +#define CONFIG_IFF_ILBM_DECODER 1 +#define CONFIG_IMM4_DECODER 1 +#define CONFIG_IMM5_DECODER 1 +#define CONFIG_INDEO2_DECODER 1 +#define CONFIG_INDEO3_DECODER 1 +#define CONFIG_INDEO4_DECODER 1 +#define CONFIG_INDEO5_DECODER 1 +#define CONFIG_INTERPLAY_VIDEO_DECODER 1 +#define CONFIG_JPEG2000_DECODER 1 +#define CONFIG_JPEGLS_DECODER 1 +#define CONFIG_JV_DECODER 1 +#define CONFIG_KGV1_DECODER 1 +#define CONFIG_KMVC_DECODER 1 +#define CONFIG_LAGARITH_DECODER 1 +#define CONFIG_LOCO_DECODER 1 +#define CONFIG_LSCR_DECODER 1 +#define CONFIG_M101_DECODER 1 +#define CONFIG_MAGICYUV_DECODER 1 +#define CONFIG_MDEC_DECODER 1 +#define CONFIG_MIMIC_DECODER 1 +#define CONFIG_MJPEG_DECODER 1 +#define CONFIG_MJPEGB_DECODER 1 +#define CONFIG_MMVIDEO_DECODER 1 +#define CONFIG_MOTIONPIXELS_DECODER 1 +#define CONFIG_MPEG1VIDEO_DECODER 1 +#define CONFIG_MPEG2VIDEO_DECODER 1 +#define CONFIG_MPEG4_DECODER 1 +#define CONFIG_MPEG4_CRYSTALHD_DECODER 0 +#define CONFIG_MPEG4_V4L2M2M_DECODER 0 +#define CONFIG_MPEG4_MMAL_DECODER 0 +#define CONFIG_MPEGVIDEO_DECODER 1 +#define CONFIG_MPEG1_V4L2M2M_DECODER 0 +#define CONFIG_MPEG2_MMAL_DECODER 0 +#define CONFIG_MPEG2_CRYSTALHD_DECODER 0 +#define CONFIG_MPEG2_V4L2M2M_DECODER 0 +#define CONFIG_MPEG2_QSV_DECODER 0 +#define CONFIG_MPEG2_MEDIACODEC_DECODER 0 +#define CONFIG_MSA1_DECODER 1 +#define CONFIG_MSCC_DECODER 1 +#define CONFIG_MSMPEG4V1_DECODER 1 +#define CONFIG_MSMPEG4V2_DECODER 1 +#define CONFIG_MSMPEG4V3_DECODER 1 +#define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0 +#define CONFIG_MSRLE_DECODER 1 +#define CONFIG_MSS1_DECODER 1 +#define CONFIG_MSS2_DECODER 1 +#define CONFIG_MSVIDEO1_DECODER 1 +#define CONFIG_MSZH_DECODER 1 +#define CONFIG_MTS2_DECODER 1 +#define CONFIG_MV30_DECODER 1 +#define CONFIG_MVC1_DECODER 1 +#define CONFIG_MVC2_DECODER 1 +#define CONFIG_MVDV_DECODER 1 +#define CONFIG_MVHA_DECODER 1 +#define CONFIG_MWSC_DECODER 1 +#define CONFIG_MXPEG_DECODER 1 +#define CONFIG_NOTCHLC_DECODER 1 +#define CONFIG_NUV_DECODER 1 +#define CONFIG_PAF_VIDEO_DECODER 1 +#define CONFIG_PAM_DECODER 1 +#define CONFIG_PBM_DECODER 1 +#define CONFIG_PCX_DECODER 1 +#define CONFIG_PFM_DECODER 1 +#define CONFIG_PGM_DECODER 1 +#define CONFIG_PGMYUV_DECODER 1 +#define CONFIG_PICTOR_DECODER 1 +#define CONFIG_PIXLET_DECODER 1 +#define CONFIG_PNG_DECODER 1 +#define CONFIG_PPM_DECODER 1 +#define CONFIG_PRORES_DECODER 1 +#define CONFIG_PROSUMER_DECODER 1 +#define CONFIG_PSD_DECODER 1 +#define CONFIG_PTX_DECODER 1 +#define CONFIG_QDRAW_DECODER 1 +#define CONFIG_QPEG_DECODER 1 +#define CONFIG_QTRLE_DECODER 1 +#define CONFIG_R10K_DECODER 1 +#define CONFIG_R210_DECODER 1 +#define CONFIG_RASC_DECODER 1 +#define CONFIG_RAWVIDEO_DECODER 1 +#define CONFIG_RL2_DECODER 1 +#define CONFIG_ROQ_DECODER 1 +#define CONFIG_RPZA_DECODER 1 +#define CONFIG_RSCC_DECODER 1 +#define CONFIG_RV10_DECODER 1 +#define CONFIG_RV20_DECODER 1 +#define CONFIG_RV30_DECODER 1 +#define CONFIG_RV40_DECODER 1 +#define CONFIG_S302M_DECODER 1 +#define CONFIG_SANM_DECODER 1 +#define CONFIG_SCPR_DECODER 1 +#define CONFIG_SCREENPRESSO_DECODER 1 +#define CONFIG_SGI_DECODER 1 +#define CONFIG_SGIRLE_DECODER 1 +#define CONFIG_SHEERVIDEO_DECODER 1 +#define CONFIG_SMACKER_DECODER 1 +#define CONFIG_SMC_DECODER 1 +#define CONFIG_SMVJPEG_DECODER 1 +#define CONFIG_SNOW_DECODER 1 +#define CONFIG_SP5X_DECODER 1 +#define CONFIG_SPEEDHQ_DECODER 1 +#define CONFIG_SRGC_DECODER 1 +#define CONFIG_SUNRAST_DECODER 1 +#define CONFIG_SVQ1_DECODER 1 +#define CONFIG_SVQ3_DECODER 1 +#define CONFIG_TARGA_DECODER 1 +#define CONFIG_TARGA_Y216_DECODER 1 +#define CONFIG_TDSC_DECODER 1 +#define CONFIG_THEORA_DECODER 1 +#define CONFIG_THP_DECODER 1 +#define CONFIG_TIERTEXSEQVIDEO_DECODER 1 +#define CONFIG_TIFF_DECODER 1 +#define CONFIG_TMV_DECODER 1 +#define CONFIG_TRUEMOTION1_DECODER 1 +#define CONFIG_TRUEMOTION2_DECODER 1 +#define CONFIG_TRUEMOTION2RT_DECODER 1 +#define CONFIG_TSCC_DECODER 1 +#define CONFIG_TSCC2_DECODER 1 +#define CONFIG_TXD_DECODER 1 +#define CONFIG_ULTI_DECODER 1 +#define CONFIG_UTVIDEO_DECODER 1 +#define CONFIG_V210_DECODER 1 +#define CONFIG_V210X_DECODER 1 +#define CONFIG_V308_DECODER 1 +#define CONFIG_V408_DECODER 1 +#define CONFIG_V410_DECODER 1 +#define CONFIG_VB_DECODER 1 +#define CONFIG_VBLE_DECODER 1 +#define CONFIG_VC1_DECODER 1 +#define CONFIG_VC1_CRYSTALHD_DECODER 0 +#define CONFIG_VC1IMAGE_DECODER 1 +#define CONFIG_VC1_MMAL_DECODER 0 +#define CONFIG_VC1_QSV_DECODER 0 +#define CONFIG_VC1_V4L2M2M_DECODER 0 +#define CONFIG_VCR1_DECODER 1 +#define CONFIG_VMDVIDEO_DECODER 1 +#define CONFIG_VMNC_DECODER 1 +#define CONFIG_VP3_DECODER 1 +#define CONFIG_VP4_DECODER 1 +#define CONFIG_VP5_DECODER 1 +#define CONFIG_VP6_DECODER 1 +#define CONFIG_VP6A_DECODER 1 +#define CONFIG_VP6F_DECODER 1 +#define CONFIG_VP7_DECODER 1 +#define CONFIG_VP8_DECODER 1 +#define CONFIG_VP8_RKMPP_DECODER 0 +#define CONFIG_VP8_V4L2M2M_DECODER 0 +#define CONFIG_VP9_DECODER 1 +#define CONFIG_VP9_RKMPP_DECODER 0 +#define CONFIG_VP9_V4L2M2M_DECODER 0 +#define CONFIG_VQA_DECODER 1 +#define CONFIG_WEBP_DECODER 1 +#define CONFIG_WCMV_DECODER 1 +#define CONFIG_WRAPPED_AVFRAME_DECODER 1 +#define CONFIG_WMV1_DECODER 1 +#define CONFIG_WMV2_DECODER 1 +#define CONFIG_WMV3_DECODER 1 +#define CONFIG_WMV3_CRYSTALHD_DECODER 0 +#define CONFIG_WMV3IMAGE_DECODER 1 +#define CONFIG_WNV1_DECODER 1 +#define CONFIG_XAN_WC3_DECODER 1 +#define CONFIG_XAN_WC4_DECODER 1 +#define CONFIG_XBM_DECODER 1 +#define CONFIG_XFACE_DECODER 1 +#define CONFIG_XL_DECODER 1 +#define CONFIG_XPM_DECODER 1 +#define CONFIG_XWD_DECODER 1 +#define CONFIG_Y41P_DECODER 1 +#define CONFIG_YLC_DECODER 1 +#define CONFIG_YOP_DECODER 1 +#define CONFIG_YUV4_DECODER 1 +#define CONFIG_ZERO12V_DECODER 1 +#define CONFIG_ZEROCODEC_DECODER 1 +#define CONFIG_ZLIB_DECODER 1 +#define CONFIG_ZMBV_DECODER 1 +#define CONFIG_AAC_DECODER 1 +#define CONFIG_AAC_FIXED_DECODER 1 +#define CONFIG_AAC_LATM_DECODER 1 +#define CONFIG_AC3_DECODER 1 +#define CONFIG_AC3_FIXED_DECODER 1 +#define CONFIG_ACELP_KELVIN_DECODER 1 +#define CONFIG_ALAC_DECODER 1 +#define CONFIG_ALS_DECODER 1 +#define CONFIG_AMRNB_DECODER 1 +#define CONFIG_AMRWB_DECODER 1 +#define CONFIG_APE_DECODER 1 +#define CONFIG_APTX_DECODER 1 +#define CONFIG_APTX_HD_DECODER 1 +#define CONFIG_ATRAC1_DECODER 1 +#define CONFIG_ATRAC3_DECODER 1 +#define CONFIG_ATRAC3AL_DECODER 1 +#define CONFIG_ATRAC3P_DECODER 1 +#define CONFIG_ATRAC3PAL_DECODER 1 +#define CONFIG_ATRAC9_DECODER 1 +#define CONFIG_BINKAUDIO_DCT_DECODER 1 +#define CONFIG_BINKAUDIO_RDFT_DECODER 1 +#define CONFIG_BMV_AUDIO_DECODER 1 +#define CONFIG_COOK_DECODER 1 +#define CONFIG_DCA_DECODER 1 +#define CONFIG_DOLBY_E_DECODER 1 +#define CONFIG_DSD_LSBF_DECODER 1 +#define CONFIG_DSD_MSBF_DECODER 1 +#define CONFIG_DSD_LSBF_PLANAR_DECODER 1 +#define CONFIG_DSD_MSBF_PLANAR_DECODER 1 +#define CONFIG_DSICINAUDIO_DECODER 1 +#define CONFIG_DSS_SP_DECODER 1 +#define CONFIG_DST_DECODER 1 +#define CONFIG_EAC3_DECODER 1 +#define CONFIG_EVRC_DECODER 1 +#define CONFIG_FFWAVESYNTH_DECODER 1 +#define CONFIG_FLAC_DECODER 1 +#define CONFIG_G723_1_DECODER 1 +#define CONFIG_G729_DECODER 1 +#define CONFIG_GSM_DECODER 1 +#define CONFIG_GSM_MS_DECODER 1 +#define CONFIG_HCA_DECODER 1 +#define CONFIG_HCOM_DECODER 1 +#define CONFIG_IAC_DECODER 1 +#define CONFIG_ILBC_DECODER 1 +#define CONFIG_IMC_DECODER 1 +#define CONFIG_INTERPLAY_ACM_DECODER 1 +#define CONFIG_MACE3_DECODER 1 +#define CONFIG_MACE6_DECODER 1 +#define CONFIG_METASOUND_DECODER 1 +#define CONFIG_MLP_DECODER 1 +#define CONFIG_MP1_DECODER 1 +#define CONFIG_MP1FLOAT_DECODER 1 +#define CONFIG_MP2_DECODER 1 +#define CONFIG_MP2FLOAT_DECODER 1 +#define CONFIG_MP3FLOAT_DECODER 1 +#define CONFIG_MP3_DECODER 1 +#define CONFIG_MP3ADUFLOAT_DECODER 1 +#define CONFIG_MP3ADU_DECODER 1 +#define CONFIG_MP3ON4FLOAT_DECODER 1 +#define CONFIG_MP3ON4_DECODER 1 +#define CONFIG_MPC7_DECODER 1 +#define CONFIG_MPC8_DECODER 1 +#define CONFIG_NELLYMOSER_DECODER 1 +#define CONFIG_ON2AVC_DECODER 1 +#define CONFIG_OPUS_DECODER 1 +#define CONFIG_PAF_AUDIO_DECODER 1 +#define CONFIG_QCELP_DECODER 1 +#define CONFIG_QDM2_DECODER 1 +#define CONFIG_QDMC_DECODER 1 +#define CONFIG_RA_144_DECODER 1 +#define CONFIG_RA_288_DECODER 1 +#define CONFIG_RALF_DECODER 1 +#define CONFIG_SBC_DECODER 1 +#define CONFIG_SHORTEN_DECODER 1 +#define CONFIG_SIPR_DECODER 1 +#define CONFIG_SIREN_DECODER 1 +#define CONFIG_SMACKAUD_DECODER 1 +#define CONFIG_SONIC_DECODER 1 +#define CONFIG_TAK_DECODER 1 +#define CONFIG_TRUEHD_DECODER 1 +#define CONFIG_TRUESPEECH_DECODER 1 +#define CONFIG_TTA_DECODER 1 +#define CONFIG_TWINVQ_DECODER 1 +#define CONFIG_VMDAUDIO_DECODER 1 +#define CONFIG_VORBIS_DECODER 1 +#define CONFIG_WAVPACK_DECODER 1 +#define CONFIG_WMALOSSLESS_DECODER 1 +#define CONFIG_WMAPRO_DECODER 1 +#define CONFIG_WMAV1_DECODER 1 +#define CONFIG_WMAV2_DECODER 1 +#define CONFIG_WMAVOICE_DECODER 1 +#define CONFIG_WS_SND1_DECODER 1 +#define CONFIG_XMA1_DECODER 1 +#define CONFIG_XMA2_DECODER 1 +#define CONFIG_PCM_ALAW_DECODER 1 +#define CONFIG_PCM_BLURAY_DECODER 1 +#define CONFIG_PCM_DVD_DECODER 1 +#define CONFIG_PCM_F16LE_DECODER 1 +#define CONFIG_PCM_F24LE_DECODER 1 +#define CONFIG_PCM_F32BE_DECODER 1 +#define CONFIG_PCM_F32LE_DECODER 1 +#define CONFIG_PCM_F64BE_DECODER 1 +#define CONFIG_PCM_F64LE_DECODER 1 +#define CONFIG_PCM_LXF_DECODER 1 +#define CONFIG_PCM_MULAW_DECODER 1 +#define CONFIG_PCM_S8_DECODER 1 +#define CONFIG_PCM_S8_PLANAR_DECODER 1 +#define CONFIG_PCM_S16BE_DECODER 1 +#define CONFIG_PCM_S16BE_PLANAR_DECODER 1 +#define CONFIG_PCM_S16LE_DECODER 1 +#define CONFIG_PCM_S16LE_PLANAR_DECODER 1 +#define CONFIG_PCM_S24BE_DECODER 1 +#define CONFIG_PCM_S24DAUD_DECODER 1 +#define CONFIG_PCM_S24LE_DECODER 1 +#define CONFIG_PCM_S24LE_PLANAR_DECODER 1 +#define CONFIG_PCM_S32BE_DECODER 1 +#define CONFIG_PCM_S32LE_DECODER 1 +#define CONFIG_PCM_S32LE_PLANAR_DECODER 1 +#define CONFIG_PCM_S64BE_DECODER 1 +#define CONFIG_PCM_S64LE_DECODER 1 +#define CONFIG_PCM_U8_DECODER 1 +#define CONFIG_PCM_U16BE_DECODER 1 +#define CONFIG_PCM_U16LE_DECODER 1 +#define CONFIG_PCM_U24BE_DECODER 1 +#define CONFIG_PCM_U24LE_DECODER 1 +#define CONFIG_PCM_U32BE_DECODER 1 +#define CONFIG_PCM_U32LE_DECODER 1 +#define CONFIG_PCM_VIDC_DECODER 1 +#define CONFIG_DERF_DPCM_DECODER 1 +#define CONFIG_GREMLIN_DPCM_DECODER 1 +#define CONFIG_INTERPLAY_DPCM_DECODER 1 +#define CONFIG_ROQ_DPCM_DECODER 1 +#define CONFIG_SDX2_DPCM_DECODER 1 +#define CONFIG_SOL_DPCM_DECODER 1 +#define CONFIG_XAN_DPCM_DECODER 1 +#define CONFIG_ADPCM_4XM_DECODER 1 +#define CONFIG_ADPCM_ADX_DECODER 1 +#define CONFIG_ADPCM_AFC_DECODER 1 +#define CONFIG_ADPCM_AGM_DECODER 1 +#define CONFIG_ADPCM_AICA_DECODER 1 +#define CONFIG_ADPCM_ARGO_DECODER 1 +#define CONFIG_ADPCM_CT_DECODER 1 +#define CONFIG_ADPCM_DTK_DECODER 1 +#define CONFIG_ADPCM_EA_DECODER 1 +#define CONFIG_ADPCM_EA_MAXIS_XA_DECODER 1 +#define CONFIG_ADPCM_EA_R1_DECODER 1 +#define CONFIG_ADPCM_EA_R2_DECODER 1 +#define CONFIG_ADPCM_EA_R3_DECODER 1 +#define CONFIG_ADPCM_EA_XAS_DECODER 1 +#define CONFIG_ADPCM_G722_DECODER 1 +#define CONFIG_ADPCM_G726_DECODER 1 +#define CONFIG_ADPCM_G726LE_DECODER 1 +#define CONFIG_ADPCM_IMA_AMV_DECODER 1 +#define CONFIG_ADPCM_IMA_ALP_DECODER 1 +#define CONFIG_ADPCM_IMA_APC_DECODER 1 +#define CONFIG_ADPCM_IMA_APM_DECODER 1 +#define CONFIG_ADPCM_IMA_CUNNING_DECODER 1 +#define CONFIG_ADPCM_IMA_DAT4_DECODER 1 +#define CONFIG_ADPCM_IMA_DK3_DECODER 1 +#define CONFIG_ADPCM_IMA_DK4_DECODER 1 +#define CONFIG_ADPCM_IMA_EA_EACS_DECODER 1 +#define CONFIG_ADPCM_IMA_EA_SEAD_DECODER 1 +#define CONFIG_ADPCM_IMA_ISS_DECODER 1 +#define CONFIG_ADPCM_IMA_MTF_DECODER 1 +#define CONFIG_ADPCM_IMA_OKI_DECODER 1 +#define CONFIG_ADPCM_IMA_QT_DECODER 1 +#define CONFIG_ADPCM_IMA_RAD_DECODER 1 +#define CONFIG_ADPCM_IMA_SSI_DECODER 1 +#define CONFIG_ADPCM_IMA_SMJPEG_DECODER 1 +#define CONFIG_ADPCM_IMA_WAV_DECODER 1 +#define CONFIG_ADPCM_IMA_WS_DECODER 1 +#define CONFIG_ADPCM_MS_DECODER 1 +#define CONFIG_ADPCM_MTAF_DECODER 1 +#define CONFIG_ADPCM_PSX_DECODER 1 +#define CONFIG_ADPCM_SBPRO_2_DECODER 1 +#define CONFIG_ADPCM_SBPRO_3_DECODER 1 +#define CONFIG_ADPCM_SBPRO_4_DECODER 1 +#define CONFIG_ADPCM_SWF_DECODER 1 +#define CONFIG_ADPCM_THP_DECODER 1 +#define CONFIG_ADPCM_THP_LE_DECODER 1 +#define CONFIG_ADPCM_VIMA_DECODER 1 +#define CONFIG_ADPCM_XA_DECODER 1 +#define CONFIG_ADPCM_YAMAHA_DECODER 1 +#define CONFIG_ADPCM_ZORK_DECODER 1 +#define CONFIG_SSA_DECODER 1 +#define CONFIG_ASS_DECODER 1 +#define CONFIG_CCAPTION_DECODER 1 +#define CONFIG_DVBSUB_DECODER 1 +#define CONFIG_DVDSUB_DECODER 1 +#define CONFIG_JACOSUB_DECODER 1 +#define CONFIG_MICRODVD_DECODER 1 +#define CONFIG_MOVTEXT_DECODER 1 +#define CONFIG_MPL2_DECODER 1 +#define CONFIG_PGSSUB_DECODER 1 +#define CONFIG_PJS_DECODER 1 +#define CONFIG_REALTEXT_DECODER 1 +#define CONFIG_SAMI_DECODER 1 +#define CONFIG_SRT_DECODER 1 +#define CONFIG_STL_DECODER 1 +#define CONFIG_SUBRIP_DECODER 1 +#define CONFIG_SUBVIEWER_DECODER 1 +#define CONFIG_SUBVIEWER1_DECODER 1 +#define CONFIG_TEXT_DECODER 1 +#define CONFIG_VPLAYER_DECODER 1 +#define CONFIG_WEBVTT_DECODER 1 +#define CONFIG_XSUB_DECODER 1 +#define CONFIG_AAC_AT_DECODER 1 +#define CONFIG_AC3_AT_DECODER 1 +#define CONFIG_ADPCM_IMA_QT_AT_DECODER 1 +#define CONFIG_ALAC_AT_DECODER 1 +#define CONFIG_AMR_NB_AT_DECODER 1 +#define CONFIG_EAC3_AT_DECODER 1 +#define CONFIG_GSM_MS_AT_DECODER 1 +#define CONFIG_ILBC_AT_DECODER 1 +#define CONFIG_MP1_AT_DECODER 1 +#define CONFIG_MP2_AT_DECODER 1 +#define CONFIG_MP3_AT_DECODER 1 +#define CONFIG_PCM_ALAW_AT_DECODER 1 +#define CONFIG_PCM_MULAW_AT_DECODER 1 +#define CONFIG_QDMC_AT_DECODER 1 +#define CONFIG_QDM2_AT_DECODER 1 +#define CONFIG_LIBARIBB24_DECODER 0 +#define CONFIG_LIBCELT_DECODER 0 +#define CONFIG_LIBCODEC2_DECODER 0 +#define CONFIG_LIBDAV1D_DECODER 0 +#define CONFIG_LIBDAVS2_DECODER 0 +#define CONFIG_LIBFDK_AAC_DECODER 0 +#define CONFIG_LIBGSM_DECODER 0 +#define CONFIG_LIBGSM_MS_DECODER 0 +#define CONFIG_LIBILBC_DECODER 0 +#define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 +#define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 +#define CONFIG_LIBOPENJPEG_DECODER 0 +#define CONFIG_LIBOPUS_DECODER 0 +#define CONFIG_LIBRSVG_DECODER 0 +#define CONFIG_LIBSPEEX_DECODER 0 +#define CONFIG_LIBVORBIS_DECODER 0 +#define CONFIG_LIBVPX_VP8_DECODER 0 +#define CONFIG_LIBVPX_VP9_DECODER 0 +#define CONFIG_LIBZVBI_TELETEXT_DECODER 0 +#define CONFIG_BINTEXT_DECODER 1 +#define CONFIG_XBIN_DECODER 1 +#define CONFIG_IDF_DECODER 1 +#define CONFIG_LIBAOM_AV1_DECODER 0 +#define CONFIG_LIBOPENH264_DECODER 0 +#define CONFIG_H264_CUVID_DECODER 0 +#define CONFIG_HEVC_CUVID_DECODER 0 +#define CONFIG_HEVC_MEDIACODEC_DECODER 0 +#define CONFIG_MJPEG_CUVID_DECODER 0 +#define CONFIG_MJPEG_QSV_DECODER 0 +#define CONFIG_MPEG1_CUVID_DECODER 0 +#define CONFIG_MPEG2_CUVID_DECODER 0 +#define CONFIG_MPEG4_CUVID_DECODER 0 +#define CONFIG_MPEG4_MEDIACODEC_DECODER 0 +#define CONFIG_VC1_CUVID_DECODER 0 +#define CONFIG_VP8_CUVID_DECODER 0 +#define CONFIG_VP8_MEDIACODEC_DECODER 0 +#define CONFIG_VP8_QSV_DECODER 0 +#define CONFIG_VP9_CUVID_DECODER 0 +#define CONFIG_VP9_MEDIACODEC_DECODER 0 +#define CONFIG_VP9_QSV_DECODER 0 +#define CONFIG_A64MULTI_ENCODER 1 +#define CONFIG_A64MULTI5_ENCODER 1 +#define CONFIG_ALIAS_PIX_ENCODER 1 +#define CONFIG_AMV_ENCODER 1 +#define CONFIG_APNG_ENCODER 1 +#define CONFIG_ASV1_ENCODER 1 +#define CONFIG_ASV2_ENCODER 1 +#define CONFIG_AVRP_ENCODER 1 +#define CONFIG_AVUI_ENCODER 1 +#define CONFIG_AYUV_ENCODER 1 +#define CONFIG_BMP_ENCODER 1 +#define CONFIG_CINEPAK_ENCODER 1 +#define CONFIG_CLJR_ENCODER 1 +#define CONFIG_COMFORTNOISE_ENCODER 1 +#define CONFIG_DNXHD_ENCODER 1 +#define CONFIG_DPX_ENCODER 1 +#define CONFIG_DVVIDEO_ENCODER 1 +#define CONFIG_FFV1_ENCODER 1 +#define CONFIG_FFVHUFF_ENCODER 1 +#define CONFIG_FITS_ENCODER 1 +#define CONFIG_FLASHSV_ENCODER 1 +#define CONFIG_FLASHSV2_ENCODER 1 +#define CONFIG_FLV_ENCODER 1 +#define CONFIG_GIF_ENCODER 1 +#define CONFIG_H261_ENCODER 1 +#define CONFIG_H263_ENCODER 1 +#define CONFIG_H263P_ENCODER 1 +#define CONFIG_HAP_ENCODER 0 +#define CONFIG_HUFFYUV_ENCODER 1 +#define CONFIG_JPEG2000_ENCODER 1 +#define CONFIG_JPEGLS_ENCODER 1 +#define CONFIG_LJPEG_ENCODER 1 +#define CONFIG_MAGICYUV_ENCODER 1 +#define CONFIG_MJPEG_ENCODER 1 +#define CONFIG_MPEG1VIDEO_ENCODER 1 +#define CONFIG_MPEG2VIDEO_ENCODER 1 +#define CONFIG_MPEG4_ENCODER 1 +#define CONFIG_MSMPEG4V2_ENCODER 1 +#define CONFIG_MSMPEG4V3_ENCODER 1 +#define CONFIG_MSVIDEO1_ENCODER 1 +#define CONFIG_PAM_ENCODER 1 +#define CONFIG_PBM_ENCODER 1 +#define CONFIG_PCX_ENCODER 1 +#define CONFIG_PGM_ENCODER 1 +#define CONFIG_PGMYUV_ENCODER 1 +#define CONFIG_PNG_ENCODER 1 +#define CONFIG_PPM_ENCODER 1 +#define CONFIG_PRORES_ENCODER 1 +#define CONFIG_PRORES_AW_ENCODER 1 +#define CONFIG_PRORES_KS_ENCODER 1 +#define CONFIG_QTRLE_ENCODER 1 +#define CONFIG_R10K_ENCODER 1 +#define CONFIG_R210_ENCODER 1 +#define CONFIG_RAWVIDEO_ENCODER 1 +#define CONFIG_ROQ_ENCODER 1 +#define CONFIG_RV10_ENCODER 1 +#define CONFIG_RV20_ENCODER 1 +#define CONFIG_S302M_ENCODER 1 +#define CONFIG_SGI_ENCODER 1 +#define CONFIG_SNOW_ENCODER 1 +#define CONFIG_SUNRAST_ENCODER 1 +#define CONFIG_SVQ1_ENCODER 1 +#define CONFIG_TARGA_ENCODER 1 +#define CONFIG_TIFF_ENCODER 1 +#define CONFIG_UTVIDEO_ENCODER 1 +#define CONFIG_V210_ENCODER 1 +#define CONFIG_V308_ENCODER 1 +#define CONFIG_V408_ENCODER 1 +#define CONFIG_V410_ENCODER 1 +#define CONFIG_VC2_ENCODER 1 +#define CONFIG_WRAPPED_AVFRAME_ENCODER 1 +#define CONFIG_WMV1_ENCODER 1 +#define CONFIG_WMV2_ENCODER 1 +#define CONFIG_XBM_ENCODER 1 +#define CONFIG_XFACE_ENCODER 1 +#define CONFIG_XWD_ENCODER 1 +#define CONFIG_Y41P_ENCODER 1 +#define CONFIG_YUV4_ENCODER 1 +#define CONFIG_ZLIB_ENCODER 1 +#define CONFIG_ZMBV_ENCODER 1 +#define CONFIG_AAC_ENCODER 1 +#define CONFIG_AC3_ENCODER 1 +#define CONFIG_AC3_FIXED_ENCODER 1 +#define CONFIG_ALAC_ENCODER 1 +#define CONFIG_APTX_ENCODER 1 +#define CONFIG_APTX_HD_ENCODER 1 +#define CONFIG_DCA_ENCODER 1 +#define CONFIG_EAC3_ENCODER 1 +#define CONFIG_FLAC_ENCODER 1 +#define CONFIG_G723_1_ENCODER 1 +#define CONFIG_MLP_ENCODER 1 +#define CONFIG_MP2_ENCODER 1 +#define CONFIG_MP2FIXED_ENCODER 1 +#define CONFIG_NELLYMOSER_ENCODER 1 +#define CONFIG_OPUS_ENCODER 1 +#define CONFIG_RA_144_ENCODER 1 +#define CONFIG_SBC_ENCODER 1 +#define CONFIG_SONIC_ENCODER 1 +#define CONFIG_SONIC_LS_ENCODER 1 +#define CONFIG_TRUEHD_ENCODER 1 +#define CONFIG_TTA_ENCODER 1 +#define CONFIG_VORBIS_ENCODER 1 +#define CONFIG_WAVPACK_ENCODER 1 +#define CONFIG_WMAV1_ENCODER 1 +#define CONFIG_WMAV2_ENCODER 1 +#define CONFIG_PCM_ALAW_ENCODER 1 +#define CONFIG_PCM_DVD_ENCODER 1 +#define CONFIG_PCM_F32BE_ENCODER 1 +#define CONFIG_PCM_F32LE_ENCODER 1 +#define CONFIG_PCM_F64BE_ENCODER 1 +#define CONFIG_PCM_F64LE_ENCODER 1 +#define CONFIG_PCM_MULAW_ENCODER 1 +#define CONFIG_PCM_S8_ENCODER 1 +#define CONFIG_PCM_S8_PLANAR_ENCODER 1 +#define CONFIG_PCM_S16BE_ENCODER 1 +#define CONFIG_PCM_S16BE_PLANAR_ENCODER 1 +#define CONFIG_PCM_S16LE_ENCODER 1 +#define CONFIG_PCM_S16LE_PLANAR_ENCODER 1 +#define CONFIG_PCM_S24BE_ENCODER 1 +#define CONFIG_PCM_S24DAUD_ENCODER 1 +#define CONFIG_PCM_S24LE_ENCODER 1 +#define CONFIG_PCM_S24LE_PLANAR_ENCODER 1 +#define CONFIG_PCM_S32BE_ENCODER 1 +#define CONFIG_PCM_S32LE_ENCODER 1 +#define CONFIG_PCM_S32LE_PLANAR_ENCODER 1 +#define CONFIG_PCM_S64BE_ENCODER 1 +#define CONFIG_PCM_S64LE_ENCODER 1 +#define CONFIG_PCM_U8_ENCODER 1 +#define CONFIG_PCM_U16BE_ENCODER 1 +#define CONFIG_PCM_U16LE_ENCODER 1 +#define CONFIG_PCM_U24BE_ENCODER 1 +#define CONFIG_PCM_U24LE_ENCODER 1 +#define CONFIG_PCM_U32BE_ENCODER 1 +#define CONFIG_PCM_U32LE_ENCODER 1 +#define CONFIG_PCM_VIDC_ENCODER 1 +#define CONFIG_ROQ_DPCM_ENCODER 1 +#define CONFIG_ADPCM_ADX_ENCODER 1 +#define CONFIG_ADPCM_G722_ENCODER 1 +#define CONFIG_ADPCM_G726_ENCODER 1 +#define CONFIG_ADPCM_G726LE_ENCODER 1 +#define CONFIG_ADPCM_IMA_QT_ENCODER 1 +#define CONFIG_ADPCM_IMA_SSI_ENCODER 1 +#define CONFIG_ADPCM_IMA_WAV_ENCODER 1 +#define CONFIG_ADPCM_MS_ENCODER 1 +#define CONFIG_ADPCM_SWF_ENCODER 1 +#define CONFIG_ADPCM_YAMAHA_ENCODER 1 +#define CONFIG_SSA_ENCODER 1 +#define CONFIG_ASS_ENCODER 1 +#define CONFIG_DVBSUB_ENCODER 1 +#define CONFIG_DVDSUB_ENCODER 1 +#define CONFIG_MOVTEXT_ENCODER 1 +#define CONFIG_SRT_ENCODER 1 +#define CONFIG_SUBRIP_ENCODER 1 +#define CONFIG_TEXT_ENCODER 1 +#define CONFIG_WEBVTT_ENCODER 1 +#define CONFIG_XSUB_ENCODER 1 +#define CONFIG_AAC_AT_ENCODER 1 +#define CONFIG_AAC_MF_ENCODER 0 +#define CONFIG_AC3_MF_ENCODER 0 +#define CONFIG_ALAC_AT_ENCODER 1 +#define CONFIG_ILBC_AT_ENCODER 1 +#define CONFIG_MP3_MF_ENCODER 0 +#define CONFIG_PCM_ALAW_AT_ENCODER 1 +#define CONFIG_PCM_MULAW_AT_ENCODER 1 +#define CONFIG_LIBAOM_AV1_ENCODER 0 +#define CONFIG_LIBCODEC2_ENCODER 0 +#define CONFIG_LIBFDK_AAC_ENCODER 0 +#define CONFIG_LIBGSM_ENCODER 0 +#define CONFIG_LIBGSM_MS_ENCODER 0 +#define CONFIG_LIBILBC_ENCODER 0 +#define CONFIG_LIBMP3LAME_ENCODER 0 +#define CONFIG_LIBOPENCORE_AMRNB_ENCODER 0 +#define CONFIG_LIBOPENJPEG_ENCODER 0 +#define CONFIG_LIBOPUS_ENCODER 0 +#define CONFIG_LIBRAV1E_ENCODER 0 +#define CONFIG_LIBSHINE_ENCODER 0 +#define CONFIG_LIBSPEEX_ENCODER 0 +#define CONFIG_LIBTHEORA_ENCODER 0 +#define CONFIG_LIBTWOLAME_ENCODER 0 +#define CONFIG_LIBVO_AMRWBENC_ENCODER 0 +#define CONFIG_LIBVORBIS_ENCODER 0 +#define CONFIG_LIBVPX_VP8_ENCODER 0 +#define CONFIG_LIBVPX_VP9_ENCODER 0 +#define CONFIG_LIBWAVPACK_ENCODER 0 +#define CONFIG_LIBWEBP_ANIM_ENCODER 0 +#define CONFIG_LIBWEBP_ENCODER 0 +#define CONFIG_LIBX262_ENCODER 0 +#define CONFIG_LIBX264_ENCODER 0 +#define CONFIG_LIBX264RGB_ENCODER 0 +#define CONFIG_LIBX265_ENCODER 0 +#define CONFIG_LIBXAVS_ENCODER 0 +#define CONFIG_LIBXAVS2_ENCODER 0 +#define CONFIG_LIBXVID_ENCODER 0 +#define CONFIG_H263_V4L2M2M_ENCODER 0 +#define CONFIG_LIBOPENH264_ENCODER 0 +#define CONFIG_H264_AMF_ENCODER 0 +#define CONFIG_H264_MF_ENCODER 0 +#define CONFIG_H264_NVENC_ENCODER 0 +#define CONFIG_H264_OMX_ENCODER 0 +#define CONFIG_H264_QSV_ENCODER 0 +#define CONFIG_H264_V4L2M2M_ENCODER 0 +#define CONFIG_H264_VAAPI_ENCODER 0 +#define CONFIG_H264_VIDEOTOOLBOX_ENCODER 1 +#define CONFIG_NVENC_ENCODER 0 +#define CONFIG_NVENC_H264_ENCODER 0 +#define CONFIG_NVENC_HEVC_ENCODER 0 +#define CONFIG_HEVC_AMF_ENCODER 0 +#define CONFIG_HEVC_MF_ENCODER 0 +#define CONFIG_HEVC_NVENC_ENCODER 0 +#define CONFIG_HEVC_QSV_ENCODER 0 +#define CONFIG_HEVC_V4L2M2M_ENCODER 0 +#define CONFIG_HEVC_VAAPI_ENCODER 0 +#define CONFIG_HEVC_VIDEOTOOLBOX_ENCODER 1 +#define CONFIG_LIBKVAZAAR_ENCODER 0 +#define CONFIG_MJPEG_QSV_ENCODER 0 +#define CONFIG_MJPEG_VAAPI_ENCODER 0 +#define CONFIG_MPEG2_QSV_ENCODER 0 +#define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_OMX_ENCODER 0 +#define CONFIG_MPEG4_V4L2M2M_ENCODER 0 +#define CONFIG_VP8_V4L2M2M_ENCODER 0 +#define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_VAAPI_ENCODER 0 +#define CONFIG_VP9_QSV_ENCODER 0 +#define CONFIG_H263_VAAPI_HWACCEL 0 +#define CONFIG_H263_VIDEOTOOLBOX_HWACCEL 1 +#define CONFIG_H264_D3D11VA_HWACCEL 0 +#define CONFIG_H264_D3D11VA2_HWACCEL 0 +#define CONFIG_H264_DXVA2_HWACCEL 0 +#define CONFIG_H264_NVDEC_HWACCEL 0 +#define CONFIG_H264_VAAPI_HWACCEL 0 +#define CONFIG_H264_VDPAU_HWACCEL 0 +#define CONFIG_H264_VIDEOTOOLBOX_HWACCEL 1 +#define CONFIG_HEVC_D3D11VA_HWACCEL 0 +#define CONFIG_HEVC_D3D11VA2_HWACCEL 0 +#define CONFIG_HEVC_DXVA2_HWACCEL 0 +#define CONFIG_HEVC_NVDEC_HWACCEL 0 +#define CONFIG_HEVC_VAAPI_HWACCEL 0 +#define CONFIG_HEVC_VDPAU_HWACCEL 0 +#define CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL 1 +#define CONFIG_MJPEG_NVDEC_HWACCEL 0 +#define CONFIG_MJPEG_VAAPI_HWACCEL 0 +#define CONFIG_MPEG1_NVDEC_HWACCEL 0 +#define CONFIG_MPEG1_VDPAU_HWACCEL 0 +#define CONFIG_MPEG1_VIDEOTOOLBOX_HWACCEL 1 +#define CONFIG_MPEG1_XVMC_HWACCEL 0 +#define CONFIG_MPEG2_D3D11VA_HWACCEL 0 +#define CONFIG_MPEG2_D3D11VA2_HWACCEL 0 +#define CONFIG_MPEG2_NVDEC_HWACCEL 0 +#define CONFIG_MPEG2_DXVA2_HWACCEL 0 +#define CONFIG_MPEG2_VAAPI_HWACCEL 0 +#define CONFIG_MPEG2_VDPAU_HWACCEL 0 +#define CONFIG_MPEG2_VIDEOTOOLBOX_HWACCEL 1 +#define CONFIG_MPEG2_XVMC_HWACCEL 0 +#define CONFIG_MPEG4_NVDEC_HWACCEL 0 +#define CONFIG_MPEG4_VAAPI_HWACCEL 0 +#define CONFIG_MPEG4_VDPAU_HWACCEL 0 +#define CONFIG_MPEG4_VIDEOTOOLBOX_HWACCEL 1 +#define CONFIG_VC1_D3D11VA_HWACCEL 0 +#define CONFIG_VC1_D3D11VA2_HWACCEL 0 +#define CONFIG_VC1_DXVA2_HWACCEL 0 +#define CONFIG_VC1_NVDEC_HWACCEL 0 +#define CONFIG_VC1_VAAPI_HWACCEL 0 +#define CONFIG_VC1_VDPAU_HWACCEL 0 +#define CONFIG_VP8_NVDEC_HWACCEL 0 +#define CONFIG_VP8_VAAPI_HWACCEL 0 +#define CONFIG_VP9_D3D11VA_HWACCEL 0 +#define CONFIG_VP9_D3D11VA2_HWACCEL 0 +#define CONFIG_VP9_DXVA2_HWACCEL 0 +#define CONFIG_VP9_NVDEC_HWACCEL 0 +#define CONFIG_VP9_VAAPI_HWACCEL 0 +#define CONFIG_VP9_VDPAU_HWACCEL 0 +#define CONFIG_WMV3_D3D11VA_HWACCEL 0 +#define CONFIG_WMV3_D3D11VA2_HWACCEL 0 +#define CONFIG_WMV3_DXVA2_HWACCEL 0 +#define CONFIG_WMV3_NVDEC_HWACCEL 0 +#define CONFIG_WMV3_VAAPI_HWACCEL 0 +#define CONFIG_WMV3_VDPAU_HWACCEL 0 +#define CONFIG_AAC_PARSER 1 +#define CONFIG_AAC_LATM_PARSER 1 +#define CONFIG_AC3_PARSER 1 +#define CONFIG_ADX_PARSER 1 +#define CONFIG_AV1_PARSER 1 +#define CONFIG_AVS2_PARSER 1 +#define CONFIG_BMP_PARSER 1 +#define CONFIG_CAVSVIDEO_PARSER 1 +#define CONFIG_COOK_PARSER 1 +#define CONFIG_DCA_PARSER 1 +#define CONFIG_DIRAC_PARSER 1 +#define CONFIG_DNXHD_PARSER 1 +#define CONFIG_DPX_PARSER 1 +#define CONFIG_DVAUDIO_PARSER 1 +#define CONFIG_DVBSUB_PARSER 1 +#define CONFIG_DVDSUB_PARSER 1 +#define CONFIG_DVD_NAV_PARSER 1 +#define CONFIG_FLAC_PARSER 1 +#define CONFIG_G723_1_PARSER 1 +#define CONFIG_G729_PARSER 1 +#define CONFIG_GIF_PARSER 1 +#define CONFIG_GSM_PARSER 1 +#define CONFIG_H261_PARSER 1 +#define CONFIG_H263_PARSER 1 +#define CONFIG_H264_PARSER 1 +#define CONFIG_HEVC_PARSER 1 +#define CONFIG_JPEG2000_PARSER 1 +#define CONFIG_MJPEG_PARSER 1 +#define CONFIG_MLP_PARSER 1 +#define CONFIG_MPEG4VIDEO_PARSER 1 +#define CONFIG_MPEGAUDIO_PARSER 1 +#define CONFIG_MPEGVIDEO_PARSER 1 +#define CONFIG_OPUS_PARSER 1 +#define CONFIG_PNG_PARSER 1 +#define CONFIG_PNM_PARSER 1 +#define CONFIG_RV30_PARSER 1 +#define CONFIG_RV40_PARSER 1 +#define CONFIG_SBC_PARSER 1 +#define CONFIG_SIPR_PARSER 1 +#define CONFIG_TAK_PARSER 1 +#define CONFIG_VC1_PARSER 1 +#define CONFIG_VORBIS_PARSER 1 +#define CONFIG_VP3_PARSER 1 +#define CONFIG_VP8_PARSER 1 +#define CONFIG_VP9_PARSER 1 +#define CONFIG_WEBP_PARSER 1 +#define CONFIG_XMA_PARSER 1 +#define CONFIG_ALSA_INDEV 0 +#define CONFIG_ANDROID_CAMERA_INDEV 0 +#define CONFIG_AVFOUNDATION_INDEV 1 +#define CONFIG_BKTR_INDEV 0 +#define CONFIG_DECKLINK_INDEV 0 +#define CONFIG_DSHOW_INDEV 0 +#define CONFIG_FBDEV_INDEV 0 +#define CONFIG_GDIGRAB_INDEV 0 +#define CONFIG_IEC61883_INDEV 0 +#define CONFIG_JACK_INDEV 0 +#define CONFIG_KMSGRAB_INDEV 0 +#define CONFIG_LAVFI_INDEV 1 +#define CONFIG_OPENAL_INDEV 0 +#define CONFIG_OSS_INDEV 0 +#define CONFIG_PULSE_INDEV 0 +#define CONFIG_SNDIO_INDEV 0 +#define CONFIG_V4L2_INDEV 0 +#define CONFIG_VFWCAP_INDEV 0 +#define CONFIG_XCBGRAB_INDEV 0 +#define CONFIG_LIBCDIO_INDEV 0 +#define CONFIG_LIBDC1394_INDEV 0 +#define CONFIG_ALSA_OUTDEV 0 +#define CONFIG_CACA_OUTDEV 0 +#define CONFIG_DECKLINK_OUTDEV 0 +#define CONFIG_FBDEV_OUTDEV 0 +#define CONFIG_OPENGL_OUTDEV 0 +#define CONFIG_OSS_OUTDEV 0 +#define CONFIG_PULSE_OUTDEV 0 +#define CONFIG_SDL2_OUTDEV 0 +#define CONFIG_SNDIO_OUTDEV 0 +#define CONFIG_V4L2_OUTDEV 0 +#define CONFIG_XV_OUTDEV 0 +#define CONFIG_ABENCH_FILTER 1 +#define CONFIG_ACOMPRESSOR_FILTER 1 +#define CONFIG_ACONTRAST_FILTER 1 +#define CONFIG_ACOPY_FILTER 1 +#define CONFIG_ACUE_FILTER 1 +#define CONFIG_ACROSSFADE_FILTER 1 +#define CONFIG_ACROSSOVER_FILTER 1 +#define CONFIG_ACRUSHER_FILTER 1 +#define CONFIG_ADECLICK_FILTER 1 +#define CONFIG_ADECLIP_FILTER 1 +#define CONFIG_ADELAY_FILTER 1 +#define CONFIG_ADERIVATIVE_FILTER 1 +#define CONFIG_AECHO_FILTER 1 +#define CONFIG_AEMPHASIS_FILTER 1 +#define CONFIG_AEVAL_FILTER 1 +#define CONFIG_AFADE_FILTER 1 +#define CONFIG_AFFTDN_FILTER 1 +#define CONFIG_AFFTFILT_FILTER 1 +#define CONFIG_AFIR_FILTER 1 +#define CONFIG_AFORMAT_FILTER 1 +#define CONFIG_AGATE_FILTER 1 +#define CONFIG_AIIR_FILTER 1 +#define CONFIG_AINTEGRAL_FILTER 1 +#define CONFIG_AINTERLEAVE_FILTER 1 +#define CONFIG_ALIMITER_FILTER 1 +#define CONFIG_ALLPASS_FILTER 1 +#define CONFIG_ALOOP_FILTER 1 +#define CONFIG_AMERGE_FILTER 1 +#define CONFIG_AMETADATA_FILTER 1 +#define CONFIG_AMIX_FILTER 1 +#define CONFIG_AMULTIPLY_FILTER 1 +#define CONFIG_ANEQUALIZER_FILTER 1 +#define CONFIG_ANLMDN_FILTER 1 +#define CONFIG_ANLMS_FILTER 1 +#define CONFIG_ANULL_FILTER 1 +#define CONFIG_APAD_FILTER 1 +#define CONFIG_APERMS_FILTER 1 +#define CONFIG_APHASER_FILTER 1 +#define CONFIG_APULSATOR_FILTER 1 +#define CONFIG_AREALTIME_FILTER 1 +#define CONFIG_ARESAMPLE_FILTER 1 +#define CONFIG_AREVERSE_FILTER 1 +#define CONFIG_ARNNDN_FILTER 1 +#define CONFIG_ASELECT_FILTER 1 +#define CONFIG_ASENDCMD_FILTER 1 +#define CONFIG_ASETNSAMPLES_FILTER 1 +#define CONFIG_ASETPTS_FILTER 1 +#define CONFIG_ASETRATE_FILTER 1 +#define CONFIG_ASETTB_FILTER 1 +#define CONFIG_ASHOWINFO_FILTER 1 +#define CONFIG_ASIDEDATA_FILTER 1 +#define CONFIG_ASOFTCLIP_FILTER 1 +#define CONFIG_ASPLIT_FILTER 1 +#define CONFIG_ASR_FILTER 0 +#define CONFIG_ASTATS_FILTER 1 +#define CONFIG_ASTREAMSELECT_FILTER 1 +#define CONFIG_ASUBBOOST_FILTER 1 +#define CONFIG_ATEMPO_FILTER 1 +#define CONFIG_ATRIM_FILTER 1 +#define CONFIG_AXCORRELATE_FILTER 1 +#define CONFIG_AZMQ_FILTER 0 +#define CONFIG_BANDPASS_FILTER 1 +#define CONFIG_BANDREJECT_FILTER 1 +#define CONFIG_BASS_FILTER 1 +#define CONFIG_BIQUAD_FILTER 1 +#define CONFIG_BS2B_FILTER 0 +#define CONFIG_CHROMABER_VULKAN_FILTER 0 +#define CONFIG_CHANNELMAP_FILTER 1 +#define CONFIG_CHANNELSPLIT_FILTER 1 +#define CONFIG_CHORUS_FILTER 1 +#define CONFIG_COMPAND_FILTER 1 +#define CONFIG_COMPENSATIONDELAY_FILTER 1 +#define CONFIG_CROSSFEED_FILTER 1 +#define CONFIG_CRYSTALIZER_FILTER 1 +#define CONFIG_DCSHIFT_FILTER 1 +#define CONFIG_DEESSER_FILTER 1 +#define CONFIG_DRMETER_FILTER 1 +#define CONFIG_DYNAUDNORM_FILTER 1 +#define CONFIG_EARWAX_FILTER 1 +#define CONFIG_EBUR128_FILTER 1 +#define CONFIG_EQUALIZER_FILTER 1 +#define CONFIG_EXTRASTEREO_FILTER 1 +#define CONFIG_FIREQUALIZER_FILTER 1 +#define CONFIG_FLANGER_FILTER 1 +#define CONFIG_HAAS_FILTER 1 +#define CONFIG_HDCD_FILTER 1 +#define CONFIG_HEADPHONE_FILTER 1 +#define CONFIG_HIGHPASS_FILTER 1 +#define CONFIG_HIGHSHELF_FILTER 1 +#define CONFIG_JOIN_FILTER 1 +#define CONFIG_LADSPA_FILTER 0 +#define CONFIG_LOUDNORM_FILTER 1 +#define CONFIG_LOWPASS_FILTER 1 +#define CONFIG_LOWSHELF_FILTER 1 +#define CONFIG_LV2_FILTER 0 +#define CONFIG_MCOMPAND_FILTER 1 +#define CONFIG_PAN_FILTER 1 +#define CONFIG_REPLAYGAIN_FILTER 1 +#define CONFIG_RESAMPLE_FILTER 0 +#define CONFIG_RUBBERBAND_FILTER 0 +#define CONFIG_SIDECHAINCOMPRESS_FILTER 1 +#define CONFIG_SIDECHAINGATE_FILTER 1 +#define CONFIG_SILENCEDETECT_FILTER 1 +#define CONFIG_SILENCEREMOVE_FILTER 1 +#define CONFIG_SOFALIZER_FILTER 0 +#define CONFIG_STEREOTOOLS_FILTER 1 +#define CONFIG_STEREOWIDEN_FILTER 1 +#define CONFIG_SUPEREQUALIZER_FILTER 1 +#define CONFIG_SURROUND_FILTER 1 +#define CONFIG_TREBLE_FILTER 1 +#define CONFIG_TREMOLO_FILTER 1 +#define CONFIG_VIBRATO_FILTER 1 +#define CONFIG_VOLUME_FILTER 1 +#define CONFIG_VOLUMEDETECT_FILTER 1 +#define CONFIG_AEVALSRC_FILTER 1 +#define CONFIG_AFIRSRC_FILTER 1 +#define CONFIG_ANOISESRC_FILTER 1 +#define CONFIG_ANULLSRC_FILTER 1 +#define CONFIG_FLITE_FILTER 0 +#define CONFIG_HILBERT_FILTER 1 +#define CONFIG_SINC_FILTER 1 +#define CONFIG_SINE_FILTER 1 +#define CONFIG_ANULLSINK_FILTER 1 +#define CONFIG_ADDROI_FILTER 1 +#define CONFIG_ALPHAEXTRACT_FILTER 1 +#define CONFIG_ALPHAMERGE_FILTER 1 +#define CONFIG_AMPLIFY_FILTER 1 +#define CONFIG_ASS_FILTER 0 +#define CONFIG_ATADENOISE_FILTER 1 +#define CONFIG_AVGBLUR_FILTER 1 +#define CONFIG_AVGBLUR_OPENCL_FILTER 0 +#define CONFIG_AVGBLUR_VULKAN_FILTER 0 +#define CONFIG_BBOX_FILTER 1 +#define CONFIG_BENCH_FILTER 1 +#define CONFIG_BILATERAL_FILTER 1 +#define CONFIG_BITPLANENOISE_FILTER 1 +#define CONFIG_BLACKDETECT_FILTER 1 +#define CONFIG_BLACKFRAME_FILTER 0 +#define CONFIG_BLEND_FILTER 1 +#define CONFIG_BM3D_FILTER 1 +#define CONFIG_BOXBLUR_FILTER 0 +#define CONFIG_BOXBLUR_OPENCL_FILTER 0 +#define CONFIG_BWDIF_FILTER 1 +#define CONFIG_CAS_FILTER 1 +#define CONFIG_CHROMAHOLD_FILTER 1 +#define CONFIG_CHROMAKEY_FILTER 1 +#define CONFIG_CHROMASHIFT_FILTER 1 +#define CONFIG_CIESCOPE_FILTER 1 +#define CONFIG_CODECVIEW_FILTER 1 +#define CONFIG_COLORBALANCE_FILTER 1 +#define CONFIG_COLORCHANNELMIXER_FILTER 1 +#define CONFIG_COLORKEY_FILTER 1 +#define CONFIG_COLORKEY_OPENCL_FILTER 0 +#define CONFIG_COLORHOLD_FILTER 1 +#define CONFIG_COLORLEVELS_FILTER 1 +#define CONFIG_COLORMATRIX_FILTER 0 +#define CONFIG_COLORSPACE_FILTER 1 +#define CONFIG_CONVOLUTION_FILTER 1 +#define CONFIG_CONVOLUTION_OPENCL_FILTER 0 +#define CONFIG_CONVOLVE_FILTER 1 +#define CONFIG_COPY_FILTER 1 +#define CONFIG_COREIMAGE_FILTER 0 +#define CONFIG_COVER_RECT_FILTER 0 +#define CONFIG_CROP_FILTER 1 +#define CONFIG_CROPDETECT_FILTER 0 +#define CONFIG_CUE_FILTER 1 +#define CONFIG_CURVES_FILTER 1 +#define CONFIG_DATASCOPE_FILTER 1 +#define CONFIG_DBLUR_FILTER 1 +#define CONFIG_DCTDNOIZ_FILTER 1 +#define CONFIG_DEBAND_FILTER 1 +#define CONFIG_DEBLOCK_FILTER 1 +#define CONFIG_DECIMATE_FILTER 1 +#define CONFIG_DECONVOLVE_FILTER 1 +#define CONFIG_DEDOT_FILTER 1 +#define CONFIG_DEFLATE_FILTER 1 +#define CONFIG_DEFLICKER_FILTER 1 +#define CONFIG_DEINTERLACE_QSV_FILTER 0 +#define CONFIG_DEINTERLACE_VAAPI_FILTER 0 +#define CONFIG_DEJUDDER_FILTER 1 +#define CONFIG_DELOGO_FILTER 0 +#define CONFIG_DENOISE_VAAPI_FILTER 0 +#define CONFIG_DERAIN_FILTER 1 +#define CONFIG_DESHAKE_FILTER 1 +#define CONFIG_DESHAKE_OPENCL_FILTER 0 +#define CONFIG_DESPILL_FILTER 1 +#define CONFIG_DETELECINE_FILTER 1 +#define CONFIG_DILATION_FILTER 1 +#define CONFIG_DILATION_OPENCL_FILTER 0 +#define CONFIG_DISPLACE_FILTER 1 +#define CONFIG_DNN_PROCESSING_FILTER 1 +#define CONFIG_DOUBLEWEAVE_FILTER 1 +#define CONFIG_DRAWBOX_FILTER 1 +#define CONFIG_DRAWGRAPH_FILTER 1 +#define CONFIG_DRAWGRID_FILTER 1 +#define CONFIG_DRAWTEXT_FILTER 0 +#define CONFIG_EDGEDETECT_FILTER 1 +#define CONFIG_ELBG_FILTER 1 +#define CONFIG_ENTROPY_FILTER 1 +#define CONFIG_EQ_FILTER 0 +#define CONFIG_EROSION_FILTER 1 +#define CONFIG_EROSION_OPENCL_FILTER 0 +#define CONFIG_EXTRACTPLANES_FILTER 1 +#define CONFIG_FADE_FILTER 1 +#define CONFIG_FFTDNOIZ_FILTER 1 +#define CONFIG_FFTFILT_FILTER 1 +#define CONFIG_FIELD_FILTER 1 +#define CONFIG_FIELDHINT_FILTER 1 +#define CONFIG_FIELDMATCH_FILTER 1 +#define CONFIG_FIELDORDER_FILTER 1 +#define CONFIG_FILLBORDERS_FILTER 1 +#define CONFIG_FIND_RECT_FILTER 0 +#define CONFIG_FLOODFILL_FILTER 1 +#define CONFIG_FORMAT_FILTER 1 +#define CONFIG_FPS_FILTER 1 +#define CONFIG_FRAMEPACK_FILTER 1 +#define CONFIG_FRAMERATE_FILTER 1 +#define CONFIG_FRAMESTEP_FILTER 1 +#define CONFIG_FREEZEDETECT_FILTER 1 +#define CONFIG_FREEZEFRAMES_FILTER 1 +#define CONFIG_FREI0R_FILTER 0 +#define CONFIG_FSPP_FILTER 0 +#define CONFIG_GBLUR_FILTER 1 +#define CONFIG_GEQ_FILTER 1 +#define CONFIG_GRADFUN_FILTER 1 +#define CONFIG_GRAPHMONITOR_FILTER 1 +#define CONFIG_GREYEDGE_FILTER 1 +#define CONFIG_HALDCLUT_FILTER 1 +#define CONFIG_HFLIP_FILTER 1 +#define CONFIG_HISTEQ_FILTER 0 +#define CONFIG_HISTOGRAM_FILTER 1 +#define CONFIG_HQDN3D_FILTER 0 +#define CONFIG_HQX_FILTER 1 +#define CONFIG_HSTACK_FILTER 1 +#define CONFIG_HUE_FILTER 1 +#define CONFIG_HWDOWNLOAD_FILTER 1 +#define CONFIG_HWMAP_FILTER 1 +#define CONFIG_HWUPLOAD_FILTER 1 +#define CONFIG_HWUPLOAD_CUDA_FILTER 0 +#define CONFIG_HYSTERESIS_FILTER 1 +#define CONFIG_IDET_FILTER 1 +#define CONFIG_IL_FILTER 1 +#define CONFIG_INFLATE_FILTER 1 +#define CONFIG_INTERLACE_FILTER 0 +#define CONFIG_INTERLEAVE_FILTER 1 +#define CONFIG_KERNDEINT_FILTER 0 +#define CONFIG_LAGFUN_FILTER 1 +#define CONFIG_LENSCORRECTION_FILTER 1 +#define CONFIG_LENSFUN_FILTER 0 +#define CONFIG_LIBVMAF_FILTER 0 +#define CONFIG_LIMITER_FILTER 1 +#define CONFIG_LOOP_FILTER 1 +#define CONFIG_LUMAKEY_FILTER 1 +#define CONFIG_LUT_FILTER 1 +#define CONFIG_LUT1D_FILTER 1 +#define CONFIG_LUT2_FILTER 1 +#define CONFIG_LUT3D_FILTER 1 +#define CONFIG_LUTRGB_FILTER 1 +#define CONFIG_LUTYUV_FILTER 1 +#define CONFIG_MASKEDCLAMP_FILTER 1 +#define CONFIG_MASKEDMAX_FILTER 1 +#define CONFIG_MASKEDMERGE_FILTER 1 +#define CONFIG_MASKEDMIN_FILTER 1 +#define CONFIG_MASKEDTHRESHOLD_FILTER 1 +#define CONFIG_MASKFUN_FILTER 1 +#define CONFIG_MCDEINT_FILTER 0 +#define CONFIG_MEDIAN_FILTER 1 +#define CONFIG_MERGEPLANES_FILTER 1 +#define CONFIG_MESTIMATE_FILTER 1 +#define CONFIG_METADATA_FILTER 1 +#define CONFIG_MIDEQUALIZER_FILTER 1 +#define CONFIG_MINTERPOLATE_FILTER 1 +#define CONFIG_MIX_FILTER 1 +#define CONFIG_MPDECIMATE_FILTER 0 +#define CONFIG_NEGATE_FILTER 1 +#define CONFIG_NLMEANS_FILTER 1 +#define CONFIG_NLMEANS_OPENCL_FILTER 0 +#define CONFIG_NNEDI_FILTER 0 +#define CONFIG_NOFORMAT_FILTER 1 +#define CONFIG_NOISE_FILTER 1 +#define CONFIG_NORMALIZE_FILTER 1 +#define CONFIG_NULL_FILTER 1 +#define CONFIG_OCR_FILTER 0 +#define CONFIG_OCV_FILTER 0 +#define CONFIG_OSCILLOSCOPE_FILTER 1 +#define CONFIG_OVERLAY_FILTER 1 +#define CONFIG_OVERLAY_OPENCL_FILTER 0 +#define CONFIG_OVERLAY_QSV_FILTER 0 +#define CONFIG_OVERLAY_VULKAN_FILTER 0 +#define CONFIG_OVERLAY_CUDA_FILTER 0 +#define CONFIG_OWDENOISE_FILTER 0 +#define CONFIG_PAD_FILTER 1 +#define CONFIG_PAD_OPENCL_FILTER 0 +#define CONFIG_PALETTEGEN_FILTER 1 +#define CONFIG_PALETTEUSE_FILTER 1 +#define CONFIG_PERMS_FILTER 1 +#define CONFIG_PERSPECTIVE_FILTER 0 +#define CONFIG_PHASE_FILTER 0 +#define CONFIG_PHOTOSENSITIVITY_FILTER 1 +#define CONFIG_PIXDESCTEST_FILTER 1 +#define CONFIG_PIXSCOPE_FILTER 1 +#define CONFIG_PP_FILTER 0 +#define CONFIG_PP7_FILTER 0 +#define CONFIG_PREMULTIPLY_FILTER 1 +#define CONFIG_PREWITT_FILTER 1 +#define CONFIG_PREWITT_OPENCL_FILTER 0 +#define CONFIG_PROCAMP_VAAPI_FILTER 0 +#define CONFIG_PROGRAM_OPENCL_FILTER 0 +#define CONFIG_PSEUDOCOLOR_FILTER 1 +#define CONFIG_PSNR_FILTER 1 +#define CONFIG_PULLUP_FILTER 0 +#define CONFIG_QP_FILTER 1 +#define CONFIG_RANDOM_FILTER 1 +#define CONFIG_READEIA608_FILTER 1 +#define CONFIG_READVITC_FILTER 1 +#define CONFIG_REALTIME_FILTER 1 +#define CONFIG_REMAP_FILTER 1 +#define CONFIG_REMOVEGRAIN_FILTER 1 +#define CONFIG_REMOVELOGO_FILTER 1 +#define CONFIG_REPEATFIELDS_FILTER 0 +#define CONFIG_REVERSE_FILTER 1 +#define CONFIG_RGBASHIFT_FILTER 1 +#define CONFIG_ROBERTS_FILTER 1 +#define CONFIG_ROBERTS_OPENCL_FILTER 0 +#define CONFIG_ROTATE_FILTER 1 +#define CONFIG_SAB_FILTER 0 +#define CONFIG_SCALE_FILTER 1 +#define CONFIG_SCALE_CUDA_FILTER 0 +#define CONFIG_SCALE_NPP_FILTER 0 +#define CONFIG_SCALE_QSV_FILTER 0 +#define CONFIG_SCALE_VAAPI_FILTER 0 +#define CONFIG_SCALE_VULKAN_FILTER 0 +#define CONFIG_SCALE2REF_FILTER 1 +#define CONFIG_SCDET_FILTER 1 +#define CONFIG_SCROLL_FILTER 1 +#define CONFIG_SELECT_FILTER 1 +#define CONFIG_SELECTIVECOLOR_FILTER 1 +#define CONFIG_SENDCMD_FILTER 1 +#define CONFIG_SEPARATEFIELDS_FILTER 1 +#define CONFIG_SETDAR_FILTER 1 +#define CONFIG_SETFIELD_FILTER 1 +#define CONFIG_SETPARAMS_FILTER 1 +#define CONFIG_SETPTS_FILTER 1 +#define CONFIG_SETRANGE_FILTER 1 +#define CONFIG_SETSAR_FILTER 1 +#define CONFIG_SETTB_FILTER 1 +#define CONFIG_SHARPNESS_VAAPI_FILTER 0 +#define CONFIG_SHOWINFO_FILTER 1 +#define CONFIG_SHOWPALETTE_FILTER 1 +#define CONFIG_SHUFFLEFRAMES_FILTER 1 +#define CONFIG_SHUFFLEPLANES_FILTER 1 +#define CONFIG_SIDEDATA_FILTER 1 +#define CONFIG_SIGNALSTATS_FILTER 1 +#define CONFIG_SIGNATURE_FILTER 0 +#define CONFIG_SMARTBLUR_FILTER 0 +#define CONFIG_SOBEL_FILTER 1 +#define CONFIG_SOBEL_OPENCL_FILTER 0 +#define CONFIG_SPLIT_FILTER 1 +#define CONFIG_SPP_FILTER 0 +#define CONFIG_SR_FILTER 1 +#define CONFIG_SSIM_FILTER 1 +#define CONFIG_STEREO3D_FILTER 0 +#define CONFIG_STREAMSELECT_FILTER 1 +#define CONFIG_SUBTITLES_FILTER 0 +#define CONFIG_SUPER2XSAI_FILTER 0 +#define CONFIG_SWAPRECT_FILTER 1 +#define CONFIG_SWAPUV_FILTER 1 +#define CONFIG_TBLEND_FILTER 1 +#define CONFIG_TELECINE_FILTER 1 +#define CONFIG_THISTOGRAM_FILTER 1 +#define CONFIG_THRESHOLD_FILTER 1 +#define CONFIG_THUMBNAIL_FILTER 1 +#define CONFIG_THUMBNAIL_CUDA_FILTER 0 +#define CONFIG_TILE_FILTER 1 +#define CONFIG_TINTERLACE_FILTER 0 +#define CONFIG_TLUT2_FILTER 1 +#define CONFIG_TMEDIAN_FILTER 1 +#define CONFIG_TMIX_FILTER 1 +#define CONFIG_TONEMAP_FILTER 1 +#define CONFIG_TONEMAP_OPENCL_FILTER 0 +#define CONFIG_TONEMAP_VAAPI_FILTER 0 +#define CONFIG_TPAD_FILTER 1 +#define CONFIG_TRANSPOSE_FILTER 1 +#define CONFIG_TRANSPOSE_NPP_FILTER 0 +#define CONFIG_TRANSPOSE_OPENCL_FILTER 0 +#define CONFIG_TRANSPOSE_VAAPI_FILTER 0 +#define CONFIG_TRIM_FILTER 1 +#define CONFIG_UNPREMULTIPLY_FILTER 1 +#define CONFIG_UNSHARP_FILTER 1 +#define CONFIG_UNSHARP_OPENCL_FILTER 0 +#define CONFIG_UNTILE_FILTER 1 +#define CONFIG_USPP_FILTER 0 +#define CONFIG_V360_FILTER 1 +#define CONFIG_VAGUEDENOISER_FILTER 0 +#define CONFIG_VECTORSCOPE_FILTER 1 +#define CONFIG_VFLIP_FILTER 1 +#define CONFIG_VFRDET_FILTER 1 +#define CONFIG_VIBRANCE_FILTER 1 +#define CONFIG_VIDSTABDETECT_FILTER 0 +#define CONFIG_VIDSTABTRANSFORM_FILTER 0 +#define CONFIG_VIGNETTE_FILTER 1 +#define CONFIG_VMAFMOTION_FILTER 1 +#define CONFIG_VPP_QSV_FILTER 0 +#define CONFIG_VSTACK_FILTER 1 +#define CONFIG_W3FDIF_FILTER 1 +#define CONFIG_WAVEFORM_FILTER 1 +#define CONFIG_WEAVE_FILTER 1 +#define CONFIG_XBR_FILTER 1 +#define CONFIG_XFADE_FILTER 1 +#define CONFIG_XFADE_OPENCL_FILTER 0 +#define CONFIG_XMEDIAN_FILTER 1 +#define CONFIG_XSTACK_FILTER 1 +#define CONFIG_YADIF_FILTER 1 +#define CONFIG_YADIF_CUDA_FILTER 0 +#define CONFIG_YAEPBLUR_FILTER 1 +#define CONFIG_ZMQ_FILTER 0 +#define CONFIG_ZOOMPAN_FILTER 1 +#define CONFIG_ZSCALE_FILTER 0 +#define CONFIG_ALLRGB_FILTER 1 +#define CONFIG_ALLYUV_FILTER 1 +#define CONFIG_CELLAUTO_FILTER 1 +#define CONFIG_COLOR_FILTER 1 +#define CONFIG_COREIMAGESRC_FILTER 0 +#define CONFIG_FREI0R_SRC_FILTER 0 +#define CONFIG_GRADIENTS_FILTER 1 +#define CONFIG_HALDCLUTSRC_FILTER 1 +#define CONFIG_LIFE_FILTER 1 +#define CONFIG_MANDELBROT_FILTER 1 +#define CONFIG_MPTESTSRC_FILTER 0 +#define CONFIG_NULLSRC_FILTER 1 +#define CONFIG_OPENCLSRC_FILTER 0 +#define CONFIG_PAL75BARS_FILTER 1 +#define CONFIG_PAL100BARS_FILTER 1 +#define CONFIG_RGBTESTSRC_FILTER 1 +#define CONFIG_SIERPINSKI_FILTER 1 +#define CONFIG_SMPTEBARS_FILTER 1 +#define CONFIG_SMPTEHDBARS_FILTER 1 +#define CONFIG_TESTSRC_FILTER 1 +#define CONFIG_TESTSRC2_FILTER 1 +#define CONFIG_YUVTESTSRC_FILTER 1 +#define CONFIG_NULLSINK_FILTER 1 +#define CONFIG_ABITSCOPE_FILTER 1 +#define CONFIG_ADRAWGRAPH_FILTER 1 +#define CONFIG_AGRAPHMONITOR_FILTER 1 +#define CONFIG_AHISTOGRAM_FILTER 1 +#define CONFIG_APHASEMETER_FILTER 1 +#define CONFIG_AVECTORSCOPE_FILTER 1 +#define CONFIG_CONCAT_FILTER 1 +#define CONFIG_SHOWCQT_FILTER 1 +#define CONFIG_SHOWFREQS_FILTER 1 +#define CONFIG_SHOWSPATIAL_FILTER 1 +#define CONFIG_SHOWSPECTRUM_FILTER 1 +#define CONFIG_SHOWSPECTRUMPIC_FILTER 1 +#define CONFIG_SHOWVOLUME_FILTER 1 +#define CONFIG_SHOWWAVES_FILTER 1 +#define CONFIG_SHOWWAVESPIC_FILTER 1 +#define CONFIG_SPECTRUMSYNTH_FILTER 1 +#define CONFIG_AMOVIE_FILTER 1 +#define CONFIG_MOVIE_FILTER 1 +#define CONFIG_AFIFO_FILTER 1 +#define CONFIG_FIFO_FILTER 1 +#define CONFIG_AA_DEMUXER 1 +#define CONFIG_AAC_DEMUXER 1 +#define CONFIG_AC3_DEMUXER 1 +#define CONFIG_ACM_DEMUXER 1 +#define CONFIG_ACT_DEMUXER 1 +#define CONFIG_ADF_DEMUXER 1 +#define CONFIG_ADP_DEMUXER 1 +#define CONFIG_ADS_DEMUXER 1 +#define CONFIG_ADX_DEMUXER 1 +#define CONFIG_AEA_DEMUXER 1 +#define CONFIG_AFC_DEMUXER 1 +#define CONFIG_AIFF_DEMUXER 1 +#define CONFIG_AIX_DEMUXER 1 +#define CONFIG_ALP_DEMUXER 1 +#define CONFIG_AMR_DEMUXER 1 +#define CONFIG_AMRNB_DEMUXER 1 +#define CONFIG_AMRWB_DEMUXER 1 +#define CONFIG_ANM_DEMUXER 1 +#define CONFIG_APC_DEMUXER 1 +#define CONFIG_APE_DEMUXER 1 +#define CONFIG_APM_DEMUXER 1 +#define CONFIG_APNG_DEMUXER 1 +#define CONFIG_APTX_DEMUXER 1 +#define CONFIG_APTX_HD_DEMUXER 1 +#define CONFIG_AQTITLE_DEMUXER 1 +#define CONFIG_ARGO_ASF_DEMUXER 1 +#define CONFIG_ASF_DEMUXER 1 +#define CONFIG_ASF_O_DEMUXER 1 +#define CONFIG_ASS_DEMUXER 1 +#define CONFIG_AST_DEMUXER 1 +#define CONFIG_AU_DEMUXER 1 +#define CONFIG_AV1_DEMUXER 1 +#define CONFIG_AVI_DEMUXER 1 +#define CONFIG_AVISYNTH_DEMUXER 0 +#define CONFIG_AVR_DEMUXER 1 +#define CONFIG_AVS_DEMUXER 1 +#define CONFIG_AVS2_DEMUXER 1 +#define CONFIG_BETHSOFTVID_DEMUXER 1 +#define CONFIG_BFI_DEMUXER 1 +#define CONFIG_BINTEXT_DEMUXER 1 +#define CONFIG_BINK_DEMUXER 1 +#define CONFIG_BIT_DEMUXER 1 +#define CONFIG_BMV_DEMUXER 1 +#define CONFIG_BFSTM_DEMUXER 1 +#define CONFIG_BRSTM_DEMUXER 1 +#define CONFIG_BOA_DEMUXER 1 +#define CONFIG_C93_DEMUXER 1 +#define CONFIG_CAF_DEMUXER 1 +#define CONFIG_CAVSVIDEO_DEMUXER 1 +#define CONFIG_CDG_DEMUXER 1 +#define CONFIG_CDXL_DEMUXER 1 +#define CONFIG_CINE_DEMUXER 1 +#define CONFIG_CODEC2_DEMUXER 1 +#define CONFIG_CODEC2RAW_DEMUXER 1 +#define CONFIG_CONCAT_DEMUXER 1 +#define CONFIG_DASH_DEMUXER 0 +#define CONFIG_DATA_DEMUXER 1 +#define CONFIG_DAUD_DEMUXER 1 +#define CONFIG_DCSTR_DEMUXER 1 +#define CONFIG_DERF_DEMUXER 1 +#define CONFIG_DFA_DEMUXER 1 +#define CONFIG_DHAV_DEMUXER 1 +#define CONFIG_DIRAC_DEMUXER 1 +#define CONFIG_DNXHD_DEMUXER 1 +#define CONFIG_DSF_DEMUXER 1 +#define CONFIG_DSICIN_DEMUXER 1 +#define CONFIG_DSS_DEMUXER 1 +#define CONFIG_DTS_DEMUXER 1 +#define CONFIG_DTSHD_DEMUXER 1 +#define CONFIG_DV_DEMUXER 1 +#define CONFIG_DVBSUB_DEMUXER 1 +#define CONFIG_DVBTXT_DEMUXER 1 +#define CONFIG_DXA_DEMUXER 1 +#define CONFIG_EA_DEMUXER 1 +#define CONFIG_EA_CDATA_DEMUXER 1 +#define CONFIG_EAC3_DEMUXER 1 +#define CONFIG_EPAF_DEMUXER 1 +#define CONFIG_FFMETADATA_DEMUXER 1 +#define CONFIG_FILMSTRIP_DEMUXER 1 +#define CONFIG_FITS_DEMUXER 1 +#define CONFIG_FLAC_DEMUXER 1 +#define CONFIG_FLIC_DEMUXER 1 +#define CONFIG_FLV_DEMUXER 1 +#define CONFIG_LIVE_FLV_DEMUXER 1 +#define CONFIG_FOURXM_DEMUXER 1 +#define CONFIG_FRM_DEMUXER 1 +#define CONFIG_FSB_DEMUXER 1 +#define CONFIG_FWSE_DEMUXER 1 +#define CONFIG_G722_DEMUXER 1 +#define CONFIG_G723_1_DEMUXER 1 +#define CONFIG_G726_DEMUXER 1 +#define CONFIG_G726LE_DEMUXER 1 +#define CONFIG_G729_DEMUXER 1 +#define CONFIG_GDV_DEMUXER 1 +#define CONFIG_GENH_DEMUXER 1 +#define CONFIG_GIF_DEMUXER 1 +#define CONFIG_GSM_DEMUXER 1 +#define CONFIG_GXF_DEMUXER 1 +#define CONFIG_H261_DEMUXER 1 +#define CONFIG_H263_DEMUXER 1 +#define CONFIG_H264_DEMUXER 1 +#define CONFIG_HCA_DEMUXER 1 +#define CONFIG_HCOM_DEMUXER 1 +#define CONFIG_HEVC_DEMUXER 1 +#define CONFIG_HLS_DEMUXER 1 +#define CONFIG_HNM_DEMUXER 1 +#define CONFIG_ICO_DEMUXER 1 +#define CONFIG_IDCIN_DEMUXER 1 +#define CONFIG_IDF_DEMUXER 1 +#define CONFIG_IFF_DEMUXER 1 +#define CONFIG_IFV_DEMUXER 1 +#define CONFIG_ILBC_DEMUXER 1 +#define CONFIG_IMAGE2_DEMUXER 1 +#define CONFIG_IMAGE2PIPE_DEMUXER 1 +#define CONFIG_IMAGE2_ALIAS_PIX_DEMUXER 1 +#define CONFIG_IMAGE2_BRENDER_PIX_DEMUXER 1 +#define CONFIG_INGENIENT_DEMUXER 1 +#define CONFIG_IPMOVIE_DEMUXER 1 +#define CONFIG_IRCAM_DEMUXER 1 +#define CONFIG_ISS_DEMUXER 1 +#define CONFIG_IV8_DEMUXER 1 +#define CONFIG_IVF_DEMUXER 1 +#define CONFIG_IVR_DEMUXER 1 +#define CONFIG_JACOSUB_DEMUXER 1 +#define CONFIG_JV_DEMUXER 1 +#define CONFIG_KUX_DEMUXER 1 +#define CONFIG_KVAG_DEMUXER 1 +#define CONFIG_LMLM4_DEMUXER 1 +#define CONFIG_LOAS_DEMUXER 1 +#define CONFIG_LRC_DEMUXER 1 +#define CONFIG_LVF_DEMUXER 1 +#define CONFIG_LXF_DEMUXER 1 +#define CONFIG_M4V_DEMUXER 1 +#define CONFIG_MATROSKA_DEMUXER 1 +#define CONFIG_MGSTS_DEMUXER 1 +#define CONFIG_MICRODVD_DEMUXER 1 +#define CONFIG_MJPEG_DEMUXER 1 +#define CONFIG_MJPEG_2000_DEMUXER 1 +#define CONFIG_MLP_DEMUXER 1 +#define CONFIG_MLV_DEMUXER 1 +#define CONFIG_MM_DEMUXER 1 +#define CONFIG_MMF_DEMUXER 1 +#define CONFIG_MOV_DEMUXER 1 +#define CONFIG_MP3_DEMUXER 1 +#define CONFIG_MPC_DEMUXER 1 +#define CONFIG_MPC8_DEMUXER 1 +#define CONFIG_MPEGPS_DEMUXER 1 +#define CONFIG_MPEGTS_DEMUXER 1 +#define CONFIG_MPEGTSRAW_DEMUXER 1 +#define CONFIG_MPEGVIDEO_DEMUXER 1 +#define CONFIG_MPJPEG_DEMUXER 1 +#define CONFIG_MPL2_DEMUXER 1 +#define CONFIG_MPSUB_DEMUXER 1 +#define CONFIG_MSF_DEMUXER 1 +#define CONFIG_MSNWC_TCP_DEMUXER 1 +#define CONFIG_MTAF_DEMUXER 1 +#define CONFIG_MTV_DEMUXER 1 +#define CONFIG_MUSX_DEMUXER 1 +#define CONFIG_MV_DEMUXER 1 +#define CONFIG_MVI_DEMUXER 1 +#define CONFIG_MXF_DEMUXER 1 +#define CONFIG_MXG_DEMUXER 1 +#define CONFIG_NC_DEMUXER 1 +#define CONFIG_NISTSPHERE_DEMUXER 1 +#define CONFIG_NSP_DEMUXER 1 +#define CONFIG_NSV_DEMUXER 1 +#define CONFIG_NUT_DEMUXER 1 +#define CONFIG_NUV_DEMUXER 1 +#define CONFIG_OGG_DEMUXER 1 +#define CONFIG_OMA_DEMUXER 1 +#define CONFIG_PAF_DEMUXER 1 +#define CONFIG_PCM_ALAW_DEMUXER 1 +#define CONFIG_PCM_MULAW_DEMUXER 1 +#define CONFIG_PCM_VIDC_DEMUXER 1 +#define CONFIG_PCM_F64BE_DEMUXER 1 +#define CONFIG_PCM_F64LE_DEMUXER 1 +#define CONFIG_PCM_F32BE_DEMUXER 1 +#define CONFIG_PCM_F32LE_DEMUXER 1 +#define CONFIG_PCM_S32BE_DEMUXER 1 +#define CONFIG_PCM_S32LE_DEMUXER 1 +#define CONFIG_PCM_S24BE_DEMUXER 1 +#define CONFIG_PCM_S24LE_DEMUXER 1 +#define CONFIG_PCM_S16BE_DEMUXER 1 +#define CONFIG_PCM_S16LE_DEMUXER 1 +#define CONFIG_PCM_S8_DEMUXER 1 +#define CONFIG_PCM_U32BE_DEMUXER 1 +#define CONFIG_PCM_U32LE_DEMUXER 1 +#define CONFIG_PCM_U24BE_DEMUXER 1 +#define CONFIG_PCM_U24LE_DEMUXER 1 +#define CONFIG_PCM_U16BE_DEMUXER 1 +#define CONFIG_PCM_U16LE_DEMUXER 1 +#define CONFIG_PCM_U8_DEMUXER 1 +#define CONFIG_PJS_DEMUXER 1 +#define CONFIG_PMP_DEMUXER 1 +#define CONFIG_PP_BNK_DEMUXER 1 +#define CONFIG_PVA_DEMUXER 1 +#define CONFIG_PVF_DEMUXER 1 +#define CONFIG_QCP_DEMUXER 1 +#define CONFIG_R3D_DEMUXER 1 +#define CONFIG_RAWVIDEO_DEMUXER 1 +#define CONFIG_REALTEXT_DEMUXER 1 +#define CONFIG_REDSPARK_DEMUXER 1 +#define CONFIG_RL2_DEMUXER 1 +#define CONFIG_RM_DEMUXER 1 +#define CONFIG_ROQ_DEMUXER 1 +#define CONFIG_RPL_DEMUXER 1 +#define CONFIG_RSD_DEMUXER 1 +#define CONFIG_RSO_DEMUXER 1 +#define CONFIG_RTP_DEMUXER 1 +#define CONFIG_RTSP_DEMUXER 1 +#define CONFIG_S337M_DEMUXER 1 +#define CONFIG_SAMI_DEMUXER 1 +#define CONFIG_SAP_DEMUXER 1 +#define CONFIG_SBC_DEMUXER 1 +#define CONFIG_SBG_DEMUXER 1 +#define CONFIG_SCC_DEMUXER 1 +#define CONFIG_SDP_DEMUXER 1 +#define CONFIG_SDR2_DEMUXER 1 +#define CONFIG_SDS_DEMUXER 1 +#define CONFIG_SDX_DEMUXER 1 +#define CONFIG_SEGAFILM_DEMUXER 1 +#define CONFIG_SER_DEMUXER 1 +#define CONFIG_SHORTEN_DEMUXER 1 +#define CONFIG_SIFF_DEMUXER 1 +#define CONFIG_SLN_DEMUXER 1 +#define CONFIG_SMACKER_DEMUXER 1 +#define CONFIG_SMJPEG_DEMUXER 1 +#define CONFIG_SMUSH_DEMUXER 1 +#define CONFIG_SOL_DEMUXER 1 +#define CONFIG_SOX_DEMUXER 1 +#define CONFIG_SPDIF_DEMUXER 1 +#define CONFIG_SRT_DEMUXER 1 +#define CONFIG_STR_DEMUXER 1 +#define CONFIG_STL_DEMUXER 1 +#define CONFIG_SUBVIEWER1_DEMUXER 1 +#define CONFIG_SUBVIEWER_DEMUXER 1 +#define CONFIG_SUP_DEMUXER 1 +#define CONFIG_SVAG_DEMUXER 1 +#define CONFIG_SWF_DEMUXER 1 +#define CONFIG_TAK_DEMUXER 1 +#define CONFIG_TEDCAPTIONS_DEMUXER 1 +#define CONFIG_THP_DEMUXER 1 +#define CONFIG_THREEDOSTR_DEMUXER 1 +#define CONFIG_TIERTEXSEQ_DEMUXER 1 +#define CONFIG_TMV_DEMUXER 1 +#define CONFIG_TRUEHD_DEMUXER 1 +#define CONFIG_TTA_DEMUXER 1 +#define CONFIG_TXD_DEMUXER 1 +#define CONFIG_TTY_DEMUXER 1 +#define CONFIG_TY_DEMUXER 1 +#define CONFIG_V210_DEMUXER 1 +#define CONFIG_V210X_DEMUXER 1 +#define CONFIG_VAG_DEMUXER 1 +#define CONFIG_VC1_DEMUXER 1 +#define CONFIG_VC1T_DEMUXER 1 +#define CONFIG_VIVIDAS_DEMUXER 1 +#define CONFIG_VIVO_DEMUXER 1 +#define CONFIG_VMD_DEMUXER 1 +#define CONFIG_VOBSUB_DEMUXER 1 +#define CONFIG_VOC_DEMUXER 1 +#define CONFIG_VPK_DEMUXER 1 +#define CONFIG_VPLAYER_DEMUXER 1 +#define CONFIG_VQF_DEMUXER 1 +#define CONFIG_W64_DEMUXER 1 +#define CONFIG_WAV_DEMUXER 1 +#define CONFIG_WC3_DEMUXER 1 +#define CONFIG_WEBM_DASH_MANIFEST_DEMUXER 1 +#define CONFIG_WEBVTT_DEMUXER 1 +#define CONFIG_WSAUD_DEMUXER 1 +#define CONFIG_WSD_DEMUXER 1 +#define CONFIG_WSVQA_DEMUXER 1 +#define CONFIG_WTV_DEMUXER 1 +#define CONFIG_WVE_DEMUXER 1 +#define CONFIG_WV_DEMUXER 1 +#define CONFIG_XA_DEMUXER 1 +#define CONFIG_XBIN_DEMUXER 1 +#define CONFIG_XMV_DEMUXER 1 +#define CONFIG_XVAG_DEMUXER 1 +#define CONFIG_XWMA_DEMUXER 1 +#define CONFIG_YOP_DEMUXER 1 +#define CONFIG_YUV4MPEGPIPE_DEMUXER 1 +#define CONFIG_IMAGE_BMP_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_DDS_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_DPX_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_EXR_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_GIF_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_J2K_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_JPEG_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_JPEGLS_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PAM_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PBM_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PCX_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PGMYUV_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PGM_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PICTOR_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PNG_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PPM_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PSD_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_QDRAW_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_SGI_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_SVG_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 1 +#define CONFIG_LIBGME_DEMUXER 0 +#define CONFIG_LIBMODPLUG_DEMUXER 0 +#define CONFIG_LIBOPENMPT_DEMUXER 0 +#define CONFIG_VAPOURSYNTH_DEMUXER 0 +#define CONFIG_A64_MUXER 1 +#define CONFIG_AC3_MUXER 1 +#define CONFIG_ADTS_MUXER 1 +#define CONFIG_ADX_MUXER 1 +#define CONFIG_AIFF_MUXER 1 +#define CONFIG_AMR_MUXER 1 +#define CONFIG_APNG_MUXER 1 +#define CONFIG_APTX_MUXER 1 +#define CONFIG_APTX_HD_MUXER 1 +#define CONFIG_ASF_MUXER 1 +#define CONFIG_ASS_MUXER 1 +#define CONFIG_AST_MUXER 1 +#define CONFIG_ASF_STREAM_MUXER 1 +#define CONFIG_AU_MUXER 1 +#define CONFIG_AVI_MUXER 1 +#define CONFIG_AVM2_MUXER 1 +#define CONFIG_AVS2_MUXER 1 +#define CONFIG_BIT_MUXER 1 +#define CONFIG_CAF_MUXER 1 +#define CONFIG_CAVSVIDEO_MUXER 1 +#define CONFIG_CODEC2_MUXER 1 +#define CONFIG_CODEC2RAW_MUXER 1 +#define CONFIG_CRC_MUXER 1 +#define CONFIG_DASH_MUXER 1 +#define CONFIG_DATA_MUXER 1 +#define CONFIG_DAUD_MUXER 1 +#define CONFIG_DIRAC_MUXER 1 +#define CONFIG_DNXHD_MUXER 1 +#define CONFIG_DTS_MUXER 1 +#define CONFIG_DV_MUXER 1 +#define CONFIG_EAC3_MUXER 1 +#define CONFIG_F4V_MUXER 1 +#define CONFIG_FFMETADATA_MUXER 1 +#define CONFIG_FIFO_MUXER 1 +#define CONFIG_FIFO_TEST_MUXER 1 +#define CONFIG_FILMSTRIP_MUXER 1 +#define CONFIG_FITS_MUXER 1 +#define CONFIG_FLAC_MUXER 1 +#define CONFIG_FLV_MUXER 1 +#define CONFIG_FRAMECRC_MUXER 1 +#define CONFIG_FRAMEHASH_MUXER 1 +#define CONFIG_FRAMEMD5_MUXER 1 +#define CONFIG_G722_MUXER 1 +#define CONFIG_G723_1_MUXER 1 +#define CONFIG_G726_MUXER 1 +#define CONFIG_G726LE_MUXER 1 +#define CONFIG_GIF_MUXER 1 +#define CONFIG_GSM_MUXER 1 +#define CONFIG_GXF_MUXER 1 +#define CONFIG_H261_MUXER 1 +#define CONFIG_H263_MUXER 1 +#define CONFIG_H264_MUXER 1 +#define CONFIG_HASH_MUXER 1 +#define CONFIG_HDS_MUXER 1 +#define CONFIG_HEVC_MUXER 1 +#define CONFIG_HLS_MUXER 1 +#define CONFIG_ICO_MUXER 1 +#define CONFIG_ILBC_MUXER 1 +#define CONFIG_IMAGE2_MUXER 1 +#define CONFIG_IMAGE2PIPE_MUXER 1 +#define CONFIG_IPOD_MUXER 1 +#define CONFIG_IRCAM_MUXER 1 +#define CONFIG_ISMV_MUXER 1 +#define CONFIG_IVF_MUXER 1 +#define CONFIG_JACOSUB_MUXER 1 +#define CONFIG_KVAG_MUXER 1 +#define CONFIG_LATM_MUXER 1 +#define CONFIG_LRC_MUXER 1 +#define CONFIG_M4V_MUXER 1 +#define CONFIG_MD5_MUXER 1 +#define CONFIG_MATROSKA_MUXER 1 +#define CONFIG_MATROSKA_AUDIO_MUXER 1 +#define CONFIG_MICRODVD_MUXER 1 +#define CONFIG_MJPEG_MUXER 1 +#define CONFIG_MLP_MUXER 1 +#define CONFIG_MMF_MUXER 1 +#define CONFIG_MOV_MUXER 1 +#define CONFIG_MP2_MUXER 1 +#define CONFIG_MP3_MUXER 1 +#define CONFIG_MP4_MUXER 1 +#define CONFIG_MPEG1SYSTEM_MUXER 1 +#define CONFIG_MPEG1VCD_MUXER 1 +#define CONFIG_MPEG1VIDEO_MUXER 1 +#define CONFIG_MPEG2DVD_MUXER 1 +#define CONFIG_MPEG2SVCD_MUXER 1 +#define CONFIG_MPEG2VIDEO_MUXER 1 +#define CONFIG_MPEG2VOB_MUXER 1 +#define CONFIG_MPEGTS_MUXER 1 +#define CONFIG_MPJPEG_MUXER 1 +#define CONFIG_MXF_MUXER 1 +#define CONFIG_MXF_D10_MUXER 1 +#define CONFIG_MXF_OPATOM_MUXER 1 +#define CONFIG_NULL_MUXER 1 +#define CONFIG_NUT_MUXER 1 +#define CONFIG_OGA_MUXER 1 +#define CONFIG_OGG_MUXER 1 +#define CONFIG_OGV_MUXER 1 +#define CONFIG_OMA_MUXER 1 +#define CONFIG_OPUS_MUXER 1 +#define CONFIG_PCM_ALAW_MUXER 1 +#define CONFIG_PCM_MULAW_MUXER 1 +#define CONFIG_PCM_VIDC_MUXER 1 +#define CONFIG_PCM_F64BE_MUXER 1 +#define CONFIG_PCM_F64LE_MUXER 1 +#define CONFIG_PCM_F32BE_MUXER 1 +#define CONFIG_PCM_F32LE_MUXER 1 +#define CONFIG_PCM_S32BE_MUXER 1 +#define CONFIG_PCM_S32LE_MUXER 1 +#define CONFIG_PCM_S24BE_MUXER 1 +#define CONFIG_PCM_S24LE_MUXER 1 +#define CONFIG_PCM_S16BE_MUXER 1 +#define CONFIG_PCM_S16LE_MUXER 1 +#define CONFIG_PCM_S8_MUXER 1 +#define CONFIG_PCM_U32BE_MUXER 1 +#define CONFIG_PCM_U32LE_MUXER 1 +#define CONFIG_PCM_U24BE_MUXER 1 +#define CONFIG_PCM_U24LE_MUXER 1 +#define CONFIG_PCM_U16BE_MUXER 1 +#define CONFIG_PCM_U16LE_MUXER 1 +#define CONFIG_PCM_U8_MUXER 1 +#define CONFIG_PSP_MUXER 1 +#define CONFIG_RAWVIDEO_MUXER 1 +#define CONFIG_RM_MUXER 1 +#define CONFIG_ROQ_MUXER 1 +#define CONFIG_RSO_MUXER 1 +#define CONFIG_RTP_MUXER 1 +#define CONFIG_RTP_MPEGTS_MUXER 1 +#define CONFIG_RTSP_MUXER 1 +#define CONFIG_SAP_MUXER 1 +#define CONFIG_SBC_MUXER 1 +#define CONFIG_SCC_MUXER 1 +#define CONFIG_SEGAFILM_MUXER 1 +#define CONFIG_SEGMENT_MUXER 1 +#define CONFIG_STREAM_SEGMENT_MUXER 1 +#define CONFIG_SINGLEJPEG_MUXER 1 +#define CONFIG_SMJPEG_MUXER 1 +#define CONFIG_SMOOTHSTREAMING_MUXER 1 +#define CONFIG_SOX_MUXER 1 +#define CONFIG_SPX_MUXER 1 +#define CONFIG_SPDIF_MUXER 1 +#define CONFIG_SRT_MUXER 1 +#define CONFIG_STREAMHASH_MUXER 1 +#define CONFIG_SUP_MUXER 1 +#define CONFIG_SWF_MUXER 1 +#define CONFIG_TEE_MUXER 1 +#define CONFIG_TG2_MUXER 1 +#define CONFIG_TGP_MUXER 1 +#define CONFIG_MKVTIMESTAMP_V2_MUXER 1 +#define CONFIG_TRUEHD_MUXER 1 +#define CONFIG_TTA_MUXER 1 +#define CONFIG_UNCODEDFRAMECRC_MUXER 1 +#define CONFIG_VC1_MUXER 1 +#define CONFIG_VC1T_MUXER 1 +#define CONFIG_VOC_MUXER 1 +#define CONFIG_W64_MUXER 1 +#define CONFIG_WAV_MUXER 1 +#define CONFIG_WEBM_MUXER 1 +#define CONFIG_WEBM_DASH_MANIFEST_MUXER 1 +#define CONFIG_WEBM_CHUNK_MUXER 1 +#define CONFIG_WEBP_MUXER 1 +#define CONFIG_WEBVTT_MUXER 1 +#define CONFIG_WTV_MUXER 1 +#define CONFIG_WV_MUXER 1 +#define CONFIG_YUV4MPEGPIPE_MUXER 1 +#define CONFIG_CHROMAPRINT_MUXER 0 +#define CONFIG_ASYNC_PROTOCOL 1 +#define CONFIG_BLURAY_PROTOCOL 0 +#define CONFIG_CACHE_PROTOCOL 1 +#define CONFIG_CONCAT_PROTOCOL 1 +#define CONFIG_CRYPTO_PROTOCOL 1 +#define CONFIG_DATA_PROTOCOL 1 +#define CONFIG_FFRTMPCRYPT_PROTOCOL 0 +#define CONFIG_FFRTMPHTTP_PROTOCOL 1 +#define CONFIG_FILE_PROTOCOL 1 +#define CONFIG_FTP_PROTOCOL 1 +#define CONFIG_GOPHER_PROTOCOL 1 +#define CONFIG_HLS_PROTOCOL 1 +#define CONFIG_HTTP_PROTOCOL 1 +#define CONFIG_HTTPPROXY_PROTOCOL 1 +#define CONFIG_HTTPS_PROTOCOL 1 +#define CONFIG_ICECAST_PROTOCOL 1 +#define CONFIG_MMSH_PROTOCOL 1 +#define CONFIG_MMST_PROTOCOL 1 +#define CONFIG_MD5_PROTOCOL 1 +#define CONFIG_PIPE_PROTOCOL 1 +#define CONFIG_PROMPEG_PROTOCOL 1 +#define CONFIG_RTMP_PROTOCOL 1 +#define CONFIG_RTMPE_PROTOCOL 0 +#define CONFIG_RTMPS_PROTOCOL 1 +#define CONFIG_RTMPT_PROTOCOL 1 +#define CONFIG_RTMPTE_PROTOCOL 0 +#define CONFIG_RTMPTS_PROTOCOL 1 +#define CONFIG_RTP_PROTOCOL 1 +#define CONFIG_SCTP_PROTOCOL 0 +#define CONFIG_SRTP_PROTOCOL 1 +#define CONFIG_SUBFILE_PROTOCOL 1 +#define CONFIG_TEE_PROTOCOL 1 +#define CONFIG_TCP_PROTOCOL 1 +#define CONFIG_TLS_PROTOCOL 1 +#define CONFIG_UDP_PROTOCOL 1 +#define CONFIG_UDPLITE_PROTOCOL 1 +#define CONFIG_UNIX_PROTOCOL 1 +#define CONFIG_LIBAMQP_PROTOCOL 0 +#define CONFIG_LIBRTMP_PROTOCOL 0 +#define CONFIG_LIBRTMPE_PROTOCOL 0 +#define CONFIG_LIBRTMPS_PROTOCOL 0 +#define CONFIG_LIBRTMPT_PROTOCOL 0 +#define CONFIG_LIBRTMPTE_PROTOCOL 0 +#define CONFIG_LIBSRT_PROTOCOL 0 +#define CONFIG_LIBSSH_PROTOCOL 0 +#define CONFIG_LIBSMBCLIENT_PROTOCOL 0 +#define CONFIG_LIBZMQ_PROTOCOL 0 +#endif /* FFMPEG_CONFIG_H */ diff --git a/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/ffmpeg.c b/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/ffmpeg.c new file mode 100644 index 0000000..66855f4 --- /dev/null +++ b/Pods/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/fftools/ffmpeg.c @@ -0,0 +1,4896 @@ +/* + * Copyright (c) 2000-2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * multimedia converter based on the FFmpeg libraries + */ + +#include "config.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#if HAVE_IO_H +#include +#endif +#if HAVE_UNISTD_H +#include +#endif + +#include "avformat.h" +#include "avdevice.h" +#include "swresample.h" +#include "opt.h" +#include "channel_layout.h" +#include "parseutils.h" +#include "samplefmt.h" +#include "fifo.h" +#include "hwcontext.h" +//#include "internal.h" +#include "intreadwrite.h" +#include "dict.h" +#include "display.h" +#include "mathematics.h" +#include "pixdesc.h" +#include "avstring.h" +//#include "libm.h" +#include "imgutils.h" +#include "timestamp.h" +#include "bprint.h" +#include "fftime.h" +#include "thread.h" +#include "threadmessage.h" +//#include "mathops.h" +//#include "os_support.h" + +# include "avfilter.h" +# include "buffersrc.h" +# include "buffersink.h" + +#if HAVE_SYS_RESOURCE_H +#include +#include +#include +#elif HAVE_GETPROCESSTIMES +#include +#endif +#if HAVE_GETPROCESSMEMORYINFO +#include +#include +#endif +#if HAVE_SETCONSOLECTRLHANDLER +#include +#endif + + +#if HAVE_SYS_SELECT_H +#include +#endif + +#if HAVE_TERMIOS_H +#include +#include +#include +#include +#elif HAVE_KBHIT +#include +#endif + +#include + +#include "ffmpeg.h" +#include "cmdutils.h" + +#include "avassert.h" + +const char program_name[] = "ffmpeg"; +const int program_birth_year = 2000; + +static FILE *vstats_file; + +const char *const forced_keyframes_const_names[] = { + "n", + "n_forced", + "prev_forced_n", + "prev_forced_t", + "t", + NULL +}; + +typedef struct BenchmarkTimeStamps { + int64_t real_usec; + int64_t user_usec; + int64_t sys_usec; +} BenchmarkTimeStamps; + +static void do_video_stats(OutputStream *ost, int frame_size); +static BenchmarkTimeStamps get_benchmark_time_stamps(void); +static int64_t getmaxrss(void); +static int ifilter_has_all_input_formats(FilterGraph *fg); + +static int run_as_daemon = 0; +static int nb_frames_dup = 0; +static unsigned dup_warning = 1000; +static int nb_frames_drop = 0; +static int64_t decode_error_stat[2]; + +static int want_sdp = 1; + +static BenchmarkTimeStamps current_time; +AVIOContext *progress_avio = NULL; + +static uint8_t *subtitle_out; + +InputStream **input_streams = NULL; +int nb_input_streams = 0; +InputFile **input_files = NULL; +int nb_input_files = 0; + +OutputStream **output_streams = NULL; +int nb_output_streams = 0; +OutputFile **output_files = NULL; +int nb_output_files = 0; + +FilterGraph **filtergraphs; +int nb_filtergraphs; + +#if HAVE_TERMIOS_H + +/* init terminal so that we can grab keys */ +static struct termios oldtty; +static int restore_tty; +#endif + +#if HAVE_THREADS +static void free_input_threads(void); +#endif + +/* sub2video hack: + Convert subtitles to video with alpha to insert them in filter graphs. + This is a temporary solution until libavfilter gets real subtitles support. + */ + +static int sub2video_get_blank_frame(InputStream *ist) +{ + int ret; + AVFrame *frame = ist->sub2video.frame; + + av_frame_unref(frame); + ist->sub2video.frame->width = ist->dec_ctx->width ? ist->dec_ctx->width : ist->sub2video.w; + ist->sub2video.frame->height = ist->dec_ctx->height ? ist->dec_ctx->height : ist->sub2video.h; + ist->sub2video.frame->format = AV_PIX_FMT_RGB32; + if ((ret = av_frame_get_buffer(frame, 0)) < 0) + return ret; + memset(frame->data[0], 0, frame->height * frame->linesize[0]); + return 0; +} + +static void sub2video_copy_rect(uint8_t *dst, int dst_linesize, int w, int h, + AVSubtitleRect *r) +{ + uint32_t *pal, *dst2; + uint8_t *src, *src2; + int x, y; + + if (r->type != SUBTITLE_BITMAP) { + av_log(NULL, AV_LOG_WARNING, "sub2video: non-bitmap subtitle\n"); + return; + } + if (r->x < 0 || r->x + r->w > w || r->y < 0 || r->y + r->h > h) { + av_log(NULL, AV_LOG_WARNING, "sub2video: rectangle (%d %d %d %d) overflowing %d %d\n", + r->x, r->y, r->w, r->h, w, h + ); + return; + } + + dst += r->y * dst_linesize + r->x * 4; + src = r->data[0]; + pal = (uint32_t *)r->data[1]; + for (y = 0; y < r->h; y++) { + dst2 = (uint32_t *)dst; + src2 = src; + for (x = 0; x < r->w; x++) + *(dst2++) = pal[*(src2++)]; + dst += dst_linesize; + src += r->linesize[0]; + } +} + +static void sub2video_push_ref(InputStream *ist, int64_t pts) +{ + AVFrame *frame = ist->sub2video.frame; + int i; + int ret; + + av_assert1(frame->data[0]); + ist->sub2video.last_pts = frame->pts = pts; + for (i = 0; i < ist->nb_filters; i++) { + ret = av_buffersrc_add_frame_flags(ist->filters[i]->filter, frame, + AV_BUFFERSRC_FLAG_KEEP_REF | + AV_BUFFERSRC_FLAG_PUSH); + if (ret != AVERROR_EOF && ret < 0) + av_log(NULL, AV_LOG_WARNING, "Error while add the frame to buffer source(%s).\n", + av_err2str(ret)); + } +} + +void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub) +{ + AVFrame *frame = ist->sub2video.frame; + int8_t *dst; + int dst_linesize; + int num_rects, i; + int64_t pts, end_pts; + + if (!frame) + return; + if (sub) { + pts = av_rescale_q(sub->pts + sub->start_display_time * 1000LL, + AV_TIME_BASE_Q, ist->st->time_base); + end_pts = av_rescale_q(sub->pts + sub->end_display_time * 1000LL, + AV_TIME_BASE_Q, ist->st->time_base); + num_rects = sub->num_rects; + } else { + /* If we are initializing the system, utilize current heartbeat + PTS as the start time, and show until the following subpicture + is received. Otherwise, utilize the previous subpicture's end time + as the fall-back value. */ + pts = ist->sub2video.initialize ? + heartbeat_pts : ist->sub2video.end_pts; + end_pts = INT64_MAX; + num_rects = 0; + } + if (sub2video_get_blank_frame(ist) < 0) { + av_log(ist->dec_ctx, AV_LOG_ERROR, + "Impossible to get a blank canvas.\n"); + return; + } + dst = frame->data [0]; + dst_linesize = frame->linesize[0]; + for (i = 0; i < num_rects; i++) + sub2video_copy_rect(dst, dst_linesize, frame->width, frame->height, sub->rects[i]); + sub2video_push_ref(ist, pts); + ist->sub2video.end_pts = end_pts; + ist->sub2video.initialize = 0; +} + +static void sub2video_heartbeat(InputStream *ist, int64_t pts) +{ + InputFile *infile = input_files[ist->file_index]; + int i, j, nb_reqs; + int64_t pts2; + + /* When a frame is read from a file, examine all sub2video streams in + the same file and send the sub2video frame again. Otherwise, decoded + video frames could be accumulating in the filter graph while a filter + (possibly overlay) is desperately waiting for a subtitle frame. */ + for (i = 0; i < infile->nb_streams; i++) { + InputStream *ist2 = input_streams[infile->ist_index + i]; + if (!ist2->sub2video.frame) + continue; + /* subtitles seem to be usually muxed ahead of other streams; + if not, subtracting a larger time here is necessary */ + pts2 = av_rescale_q(pts, ist->st->time_base, ist2->st->time_base) - 1; + /* do not send the heartbeat frame if the subtitle is already ahead */ + if (pts2 <= ist2->sub2video.last_pts) + continue; + if (pts2 >= ist2->sub2video.end_pts || ist2->sub2video.initialize) + /* if we have hit the end of the current displayed subpicture, + or if we need to initialize the system, update the + overlayed subpicture and its start/end times */ + sub2video_update(ist2, pts2 + 1, NULL); + for (j = 0, nb_reqs = 0; j < ist2->nb_filters; j++) + nb_reqs += av_buffersrc_get_nb_failed_requests(ist2->filters[j]->filter); + if (nb_reqs) + sub2video_push_ref(ist2, pts2); + } +} + +static void sub2video_flush(InputStream *ist) +{ + int i; + int ret; + + if (ist->sub2video.end_pts < INT64_MAX) + sub2video_update(ist, INT64_MAX, NULL); + for (i = 0; i < ist->nb_filters; i++) { + ret = av_buffersrc_add_frame(ist->filters[i]->filter, NULL); + if (ret != AVERROR_EOF && ret < 0) + av_log(NULL, AV_LOG_WARNING, "Flush the frame error.\n"); + } +} + +/* end of sub2video hack */ + +static void term_exit_sigsafe(void) +{ +#if HAVE_TERMIOS_H + if(restore_tty) + tcsetattr (0, TCSANOW, &oldtty); +#endif +} + +void term_exit(void) +{ + av_log(NULL, AV_LOG_QUIET, "%s", ""); + term_exit_sigsafe(); +} + +static volatile int received_sigterm = 0; +static volatile int received_nb_signals = 0; +static atomic_int transcode_init_done = ATOMIC_VAR_INIT(0); +static volatile int ffmpeg_exited = 0; +static int main_return_code = 0; + +static void +sigterm_handler(int sig) +{ + int ret; + received_sigterm = sig; + received_nb_signals++; + term_exit_sigsafe(); + if(received_nb_signals > 3) { + ret = write(2/*STDERR_FILENO*/, "Received > 3 system signals, hard exiting\n", + strlen("Received > 3 system signals, hard exiting\n")); + if (ret < 0) { /* Do nothing */ }; + exit(123); + } +} + +#if HAVE_SETCONSOLECTRLHANDLER +static BOOL WINAPI CtrlHandler(DWORD fdwCtrlType) +{ + av_log(NULL, AV_LOG_DEBUG, "\nReceived windows signal %ld\n", fdwCtrlType); + + switch (fdwCtrlType) + { + case CTRL_C_EVENT: + case CTRL_BREAK_EVENT: + sigterm_handler(SIGINT); + return TRUE; + + case CTRL_CLOSE_EVENT: + case CTRL_LOGOFF_EVENT: + case CTRL_SHUTDOWN_EVENT: + sigterm_handler(SIGTERM); + /* Basically, with these 3 events, when we return from this method the + process is hard terminated, so stall as long as we need to + to try and let the main thread(s) clean up and gracefully terminate + (we have at most 5 seconds, but should be done far before that). */ + while (!ffmpeg_exited) { + Sleep(0); + } + return TRUE; + + default: + av_log(NULL, AV_LOG_ERROR, "Received unknown windows signal %ld\n", fdwCtrlType); + return FALSE; + } +} +#endif + +void term_init(void) +{ +#if HAVE_TERMIOS_H + if (!run_as_daemon && stdin_interaction) { + struct termios tty; + if (tcgetattr (0, &tty) == 0) { + oldtty = tty; + restore_tty = 1; + + tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP + |INLCR|IGNCR|ICRNL|IXON); + tty.c_oflag |= OPOST; + tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN); + tty.c_cflag &= ~(CSIZE|PARENB); + tty.c_cflag |= CS8; + tty.c_cc[VMIN] = 1; + tty.c_cc[VTIME] = 0; + + tcsetattr (0, TCSANOW, &tty); + } + signal(SIGQUIT, sigterm_handler); /* Quit (POSIX). */ + } +#endif + + signal(SIGINT , sigterm_handler); /* Interrupt (ANSI). */ + signal(SIGTERM, sigterm_handler); /* Termination (ANSI). */ +#ifdef SIGXCPU + signal(SIGXCPU, sigterm_handler); +#endif +#ifdef SIGPIPE + signal(SIGPIPE, SIG_IGN); /* Broken pipe (POSIX). */ +#endif +#if HAVE_SETCONSOLECTRLHANDLER + SetConsoleCtrlHandler((PHANDLER_ROUTINE) CtrlHandler, TRUE); +#endif +} + +/* read a key without blocking */ +static int read_key(void) +{ + unsigned char ch; +#if HAVE_TERMIOS_H + int n = 1; + struct timeval tv; + fd_set rfds; + + FD_ZERO(&rfds); + FD_SET(0, &rfds); + tv.tv_sec = 0; + tv.tv_usec = 0; + n = select(1, &rfds, NULL, NULL, &tv); + if (n > 0) { + n = read(0, &ch, 1); + if (n == 1) + return ch; + + return n; + } +#elif HAVE_KBHIT +# if HAVE_PEEKNAMEDPIPE + static int is_pipe; + static HANDLE input_handle; + DWORD dw, nchars; + if(!input_handle){ + input_handle = GetStdHandle(STD_INPUT_HANDLE); + is_pipe = !GetConsoleMode(input_handle, &dw); + } + + if (is_pipe) { + /* When running under a GUI, you will end here. */ + if (!PeekNamedPipe(input_handle, NULL, 0, NULL, &nchars, NULL)) { + // input pipe may have been closed by the program that ran ffmpeg + return -1; + } + //Read it + if(nchars != 0) { + read(0, &ch, 1); + return ch; + }else{ + return -1; + } + } +# endif + if(kbhit()) + return(getch()); +#endif + return -1; +} + +static int decode_interrupt_cb(void *ctx) +{ + return received_nb_signals > atomic_load(&transcode_init_done); +} + +const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL }; + +static void ffmpeg_cleanup(int ret) +{ + int i, j; + + if (do_benchmark) { + int maxrss = getmaxrss() / 1024; + av_log(NULL, AV_LOG_INFO, "bench: maxrss=%ikB\n", maxrss); + } + + for (i = 0; i < nb_filtergraphs; i++) { + FilterGraph *fg = filtergraphs[i]; + avfilter_graph_free(&fg->graph); + for (j = 0; j < fg->nb_inputs; j++) { + InputFilter *ifilter = fg->inputs[j]; + struct InputStream *ist = ifilter->ist; + + while (av_fifo_size(ifilter->frame_queue)) { + AVFrame *frame; + av_fifo_generic_read(ifilter->frame_queue, &frame, + sizeof(frame), NULL); + av_frame_free(&frame); + } + av_fifo_freep(&ifilter->frame_queue); + if (ist->sub2video.sub_queue) { + while (av_fifo_size(ist->sub2video.sub_queue)) { + AVSubtitle sub; + av_fifo_generic_read(ist->sub2video.sub_queue, + &sub, sizeof(sub), NULL); + avsubtitle_free(&sub); + } + av_fifo_freep(&ist->sub2video.sub_queue); + } + av_buffer_unref(&ifilter->hw_frames_ctx); + av_freep(&ifilter->name); + av_freep(&fg->inputs[j]); + } + av_freep(&fg->inputs); + for (j = 0; j < fg->nb_outputs; j++) { + OutputFilter *ofilter = fg->outputs[j]; + + av_freep(&ofilter->name); + av_freep(&ofilter->formats); + av_freep(&ofilter->channel_layouts); + av_freep(&ofilter->sample_rates); + av_freep(&fg->outputs[j]); + } + av_freep(&fg->outputs); + av_freep(&fg->graph_desc); + + av_freep(&filtergraphs[i]); + } + av_freep(&filtergraphs); + + av_freep(&subtitle_out); + + /* close files */ + for (i = 0; i < nb_output_files; i++) { + OutputFile *of = output_files[i]; + AVFormatContext *s; + if (!of) + continue; + s = of->ctx; + if (s && s->oformat && !(s->oformat->flags & AVFMT_NOFILE)) + avio_closep(&s->pb); + avformat_free_context(s); + av_dict_free(&of->opts); + + av_freep(&output_files[i]); + } + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = output_streams[i]; + + if (!ost) + continue; + + av_bsf_free(&ost->bsf_ctx); + + av_frame_free(&ost->filtered_frame); + av_frame_free(&ost->last_frame); + av_dict_free(&ost->encoder_opts); + + av_freep(&ost->forced_keyframes); + av_expr_free(ost->forced_keyframes_pexpr); + av_freep(&ost->avfilter); + av_freep(&ost->logfile_prefix); + + av_freep(&ost->audio_channels_map); + ost->audio_channels_mapped = 0; + + av_dict_free(&ost->sws_dict); + av_dict_free(&ost->swr_opts); + + avcodec_free_context(&ost->enc_ctx); + avcodec_parameters_free(&ost->ref_par); + + if (ost->muxing_queue) { + while (av_fifo_size(ost->muxing_queue)) { + AVPacket pkt; + av_fifo_generic_read(ost->muxing_queue, &pkt, sizeof(pkt), NULL); + av_packet_unref(&pkt); + } + av_fifo_freep(&ost->muxing_queue); + } + + av_freep(&output_streams[i]); + } +#if HAVE_THREADS + free_input_threads(); +#endif + for (i = 0; i < nb_input_files; i++) { + avformat_close_input(&input_files[i]->ctx); + av_freep(&input_files[i]); + } + for (i = 0; i < nb_input_streams; i++) { + InputStream *ist = input_streams[i]; + + av_frame_free(&ist->decoded_frame); + av_frame_free(&ist->filter_frame); + av_dict_free(&ist->decoder_opts); + avsubtitle_free(&ist->prev_sub.subtitle); + av_frame_free(&ist->sub2video.frame); + av_freep(&ist->filters); + av_freep(&ist->hwaccel_device); + av_freep(&ist->dts_buffer); + + avcodec_free_context(&ist->dec_ctx); + + av_freep(&input_streams[i]); + } + + if (vstats_file) { + if (fclose(vstats_file)) + av_log(NULL, AV_LOG_ERROR, + "Error closing vstats file, loss of information possible: %s\n", + av_err2str(AVERROR(errno))); + } + av_freep(&vstats_filename); + + av_freep(&input_streams); + av_freep(&input_files); + av_freep(&output_streams); + av_freep(&output_files); + + uninit_opts(); + + avformat_network_deinit(); + + if (received_sigterm) { + av_log(NULL, AV_LOG_INFO, "Exiting normally, received signal %d.\n", + (int) received_sigterm); + } else if (ret && atomic_load(&transcode_init_done)) { + av_log(NULL, AV_LOG_INFO, "Conversion failed!\n"); + } + + nb_filtergraphs=0; + nb_output_files=0; + nb_output_streams=0; + nb_input_files=0; + nb_input_streams=0; + + term_exit(); + ffmpeg_exited = 1; +} + +void remove_avoptions(AVDictionary **a, AVDictionary *b) +{ + AVDictionaryEntry *t = NULL; + + while ((t = av_dict_get(b, "", t, AV_DICT_IGNORE_SUFFIX))) { + av_dict_set(a, t->key, NULL, AV_DICT_MATCH_CASE); + } +} + +void assert_avoptions(AVDictionary *m) +{ + AVDictionaryEntry *t; + if ((t = av_dict_get(m, "", NULL, AV_DICT_IGNORE_SUFFIX))) { + av_log(NULL, AV_LOG_FATAL, "Option %s not found.\n", t->key); + exit_program(1); + } +} + +static void abort_codec_experimental(AVCodec *c, int encoder) +{ + exit_program(1); +} + +static void update_benchmark(const char *fmt, ...) +{ + if (do_benchmark_all) { + BenchmarkTimeStamps t = get_benchmark_time_stamps(); + va_list va; + char buf[1024]; + + if (fmt) { + va_start(va, fmt); + vsnprintf(buf, sizeof(buf), fmt, va); + va_end(va); + av_log(NULL, AV_LOG_INFO, + "bench: %8" PRIu64 " user %8" PRIu64 " sys %8" PRIu64 " real %s \n", + t.user_usec - current_time.user_usec, + t.sys_usec - current_time.sys_usec, + t.real_usec - current_time.real_usec, buf); + } + current_time = t; + } +} + +static void close_all_output_streams(OutputStream *ost, OSTFinished this_stream, OSTFinished others) +{ + int i; + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost2 = output_streams[i]; + ost2->finished |= ost == ost2 ? this_stream : others; + } +} + +static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue) +{ + AVFormatContext *s = of->ctx; + AVStream *st = ost->st; + int ret; + + /* + * Audio encoders may split the packets -- #frames in != #packets out. + * But there is no reordering, so we can limit the number of output packets + * by simply dropping them here. + * Counting encoded video frames needs to be done separately because of + * reordering, see do_video_out(). + * Do not count the packet when unqueued because it has been counted when queued. + */ + if (!(st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && ost->encoding_needed) && !unqueue) { + if (ost->frame_number >= ost->max_frames) { + av_packet_unref(pkt); + return; + } + ost->frame_number++; + } + + if (!of->header_written) { + AVPacket tmp_pkt = {0}; + /* the muxer is not initialized yet, buffer the packet */ + if (!av_fifo_space(ost->muxing_queue)) { + int new_size = FFMIN(2 * av_fifo_size(ost->muxing_queue), + ost->max_muxing_queue_size); + if (new_size <= av_fifo_size(ost->muxing_queue)) { + av_log(NULL, AV_LOG_ERROR, + "Too many packets buffered for output stream %d:%d.\n", + ost->file_index, ost->st->index); + exit_program(1); + } + ret = av_fifo_realloc2(ost->muxing_queue, new_size); + if (ret < 0) + exit_program(1); + } + ret = av_packet_make_refcounted(pkt); + if (ret < 0) + exit_program(1); + av_packet_move_ref(&tmp_pkt, pkt); + av_fifo_generic_write(ost->muxing_queue, &tmp_pkt, sizeof(tmp_pkt), NULL); + return; + } + + if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && video_sync_method == VSYNC_DROP) || + (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && audio_sync_method < 0)) + pkt->pts = pkt->dts = AV_NOPTS_VALUE; + + if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { + int i; + uint8_t *sd = av_packet_get_side_data(pkt, AV_PKT_DATA_QUALITY_STATS, + NULL); + ost->quality = sd ? AV_RL32(sd) : -1; + ost->pict_type = sd ? sd[4] : AV_PICTURE_TYPE_NONE; + + for (i = 0; ierror); i++) { + if (sd && i < sd[5]) + ost->error[i] = AV_RL64(sd + 8 + 8*i); + else + ost->error[i] = -1; + } + + if (ost->frame_rate.num && ost->is_cfr) { + if (pkt->duration > 0) + av_log(NULL, AV_LOG_WARNING, "Overriding packet duration by frame rate, this should not happen\n"); + pkt->duration = av_rescale_q(1, av_inv_q(ost->frame_rate), + ost->mux_timebase); + } + } + + av_packet_rescale_ts(pkt, ost->mux_timebase, ost->st->time_base); + + if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS)) { + if (pkt->dts != AV_NOPTS_VALUE && + pkt->pts != AV_NOPTS_VALUE && + pkt->dts > pkt->pts) { + av_log(s, AV_LOG_WARNING, "Invalid DTS: %"PRId64" PTS: %"PRId64" in output stream %d:%d, replacing by guess\n", + pkt->dts, pkt->pts, + ost->file_index, ost->st->index); + pkt->pts = + pkt->dts = pkt->pts + pkt->dts + ost->last_mux_dts + 1 + - FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1) + - FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1); + } + if ((st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO || st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) && + pkt->dts != AV_NOPTS_VALUE && + !(st->codecpar->codec_id == AV_CODEC_ID_VP9 && ost->stream_copy) && + ost->last_mux_dts != AV_NOPTS_VALUE) { + int64_t max = ost->last_mux_dts + !(s->oformat->flags & AVFMT_TS_NONSTRICT); + if (pkt->dts < max) { + int loglevel = max - pkt->dts > 2 || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ? AV_LOG_WARNING : AV_LOG_DEBUG; + if (exit_on_error) + loglevel = AV_LOG_ERROR; + av_log(s, loglevel, "Non-monotonous DTS in output stream " + "%d:%d; previous: %"PRId64", current: %"PRId64"; ", + ost->file_index, ost->st->index, ost->last_mux_dts, pkt->dts); + if (exit_on_error) { + av_log(NULL, AV_LOG_FATAL, "aborting.\n"); + exit_program(1); + } + av_log(s, loglevel, "changing to %"PRId64". This may result " + "in incorrect timestamps in the output file.\n", + max); + if (pkt->pts >= pkt->dts) + pkt->pts = FFMAX(pkt->pts, max); + pkt->dts = max; + } + } + } + ost->last_mux_dts = pkt->dts; + + ost->data_size += pkt->size; + ost->packets_written++; + + pkt->stream_index = ost->index; + + if (debug_ts) { + av_log(NULL, AV_LOG_INFO, "muxer <- type:%s " + "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s size:%d\n", + av_get_media_type_string(ost->enc_ctx->codec_type), + av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ost->st->time_base), + av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ost->st->time_base), + pkt->size + ); + } + + ret = av_interleaved_write_frame(s, pkt); + if (ret < 0) { + print_error("av_interleaved_write_frame()", ret); + main_return_code = 1; + close_all_output_streams(ost, MUXER_FINISHED | ENCODER_FINISHED, ENCODER_FINISHED); + } + av_packet_unref(pkt); +} + +static void close_output_stream(OutputStream *ost) +{ + OutputFile *of = output_files[ost->file_index]; + + ost->finished |= ENCODER_FINISHED; + if (of->shortest) { + int64_t end = av_rescale_q(ost->sync_opts - ost->first_pts, ost->enc_ctx->time_base, AV_TIME_BASE_Q); + of->recording_time = FFMIN(of->recording_time, end); + } +} + +/* + * Send a single packet to the output, applying any bitstream filters + * associated with the output stream. This may result in any number + * of packets actually being written, depending on what bitstream + * filters are applied. The supplied packet is consumed and will be + * blank (as if newly-allocated) when this function returns. + * + * If eof is set, instead indicate EOF to all bitstream filters and + * therefore flush any delayed packets to the output. A blank packet + * must be supplied in this case. + */ +static void output_packet(OutputFile *of, AVPacket *pkt, + OutputStream *ost, int eof) +{ + int ret = 0; + + /* apply the output bitstream filters */ + if (ost->bsf_ctx) { + ret = av_bsf_send_packet(ost->bsf_ctx, eof ? NULL : pkt); + if (ret < 0) + goto finish; + while ((ret = av_bsf_receive_packet(ost->bsf_ctx, pkt)) >= 0) + write_packet(of, pkt, ost, 0); + if (ret == AVERROR(EAGAIN)) + ret = 0; + } else if (!eof) + write_packet(of, pkt, ost, 0); + +finish: + if (ret < 0 && ret != AVERROR_EOF) { + av_log(NULL, AV_LOG_ERROR, "Error applying bitstream filters to an output " + "packet for stream #%d:%d.\n", ost->file_index, ost->index); + if(exit_on_error) + exit_program(1); + } +} + +static int check_recording_time(OutputStream *ost) +{ + OutputFile *of = output_files[ost->file_index]; + + if (of->recording_time != INT64_MAX && + av_compare_ts(ost->sync_opts - ost->first_pts, ost->enc_ctx->time_base, of->recording_time, + AV_TIME_BASE_Q) >= 0) { + close_output_stream(ost); + return 0; + } + return 1; +} + +static void do_audio_out(OutputFile *of, OutputStream *ost, + AVFrame *frame) +{ + AVCodecContext *enc = ost->enc_ctx; + AVPacket pkt; + int ret; + + av_init_packet(&pkt); + pkt.data = NULL; + pkt.size = 0; + + if (!check_recording_time(ost)) + return; + + if (frame->pts == AV_NOPTS_VALUE || audio_sync_method < 0) + frame->pts = ost->sync_opts; + ost->sync_opts = frame->pts + frame->nb_samples; + ost->samples_encoded += frame->nb_samples; + ost->frames_encoded++; + + av_assert0(pkt.size || !pkt.data); + update_benchmark(NULL); + if (debug_ts) { + av_log(NULL, AV_LOG_INFO, "encoder <- type:audio " + "frame_pts:%s frame_pts_time:%s time_base:%d/%d\n", + av_ts2str(frame->pts), av_ts2timestr(frame->pts, &enc->time_base), + enc->time_base.num, enc->time_base.den); + } + + ret = avcodec_send_frame(enc, frame); + if (ret < 0) + goto error; + + while (1) { + ret = avcodec_receive_packet(enc, &pkt); + if (ret == AVERROR(EAGAIN)) + break; + if (ret < 0) + goto error; + + update_benchmark("encode_audio %d.%d", ost->file_index, ost->index); + + av_packet_rescale_ts(&pkt, enc->time_base, ost->mux_timebase); + + if (debug_ts) { + av_log(NULL, AV_LOG_INFO, "encoder -> type:audio " + "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n", + av_ts2str(pkt.pts), av_ts2timestr(pkt.pts, &enc->time_base), + av_ts2str(pkt.dts), av_ts2timestr(pkt.dts, &enc->time_base)); + } + + output_packet(of, &pkt, ost, 0); + } + + return; +error: + av_log(NULL, AV_LOG_FATAL, "Audio encoding failed\n"); + exit_program(1); +} + +static void do_subtitle_out(OutputFile *of, + OutputStream *ost, + AVSubtitle *sub) +{ + int subtitle_out_max_size = 1024 * 1024; + int subtitle_out_size, nb, i; + AVCodecContext *enc; + AVPacket pkt; + int64_t pts; + + if (sub->pts == AV_NOPTS_VALUE) { + av_log(NULL, AV_LOG_ERROR, "Subtitle packets must have a pts\n"); + if (exit_on_error) + exit_program(1); + return; + } + + enc = ost->enc_ctx; + + if (!subtitle_out) { + subtitle_out = av_malloc(subtitle_out_max_size); + if (!subtitle_out) { + av_log(NULL, AV_LOG_FATAL, "Failed to allocate subtitle_out\n"); + exit_program(1); + } + } + + /* Note: DVB subtitle need one packet to draw them and one other + packet to clear them */ + /* XXX: signal it in the codec context ? */ + if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE) + nb = 2; + else + nb = 1; + + /* shift timestamp to honor -ss and make check_recording_time() work with -t */ + pts = sub->pts; + if (output_files[ost->file_index]->start_time != AV_NOPTS_VALUE) + pts -= output_files[ost->file_index]->start_time; + for (i = 0; i < nb; i++) { + unsigned save_num_rects = sub->num_rects; + + ost->sync_opts = av_rescale_q(pts, AV_TIME_BASE_Q, enc->time_base); + if (!check_recording_time(ost)) + return; + + sub->pts = pts; + // start_display_time is required to be 0 + sub->pts += av_rescale_q(sub->start_display_time, (AVRational){ 1, 1000 }, AV_TIME_BASE_Q); + sub->end_display_time -= sub->start_display_time; + sub->start_display_time = 0; + if (i == 1) + sub->num_rects = 0; + + ost->frames_encoded++; + + subtitle_out_size = avcodec_encode_subtitle(enc, subtitle_out, + subtitle_out_max_size, sub); + if (i == 1) + sub->num_rects = save_num_rects; + if (subtitle_out_size < 0) { + av_log(NULL, AV_LOG_FATAL, "Subtitle encoding failed\n"); + exit_program(1); + } + + av_init_packet(&pkt); + pkt.data = subtitle_out; + pkt.size = subtitle_out_size; + pkt.pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->mux_timebase); + pkt.duration = av_rescale_q(sub->end_display_time, (AVRational){ 1, 1000 }, ost->mux_timebase); + if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE) { + /* XXX: the pts correction is handled here. Maybe handling + it in the codec would be better */ + if (i == 0) + pkt.pts += av_rescale_q(sub->start_display_time, (AVRational){ 1, 1000 }, ost->mux_timebase); + else + pkt.pts += av_rescale_q(sub->end_display_time, (AVRational){ 1, 1000 }, ost->mux_timebase); + } + pkt.dts = pkt.pts; + output_packet(of, &pkt, ost, 0); + } +} + +static void do_video_out(OutputFile *of, + OutputStream *ost, + AVFrame *next_picture, + double sync_ipts) +{ + int ret, format_video_sync; + AVPacket pkt; + AVCodecContext *enc = ost->enc_ctx; + AVCodecParameters *mux_par = ost->st->codecpar; + AVRational frame_rate; + int nb_frames, nb0_frames, i; + double delta, delta0; + double duration = 0; + int frame_size = 0; + InputStream *ist = NULL; + AVFilterContext *filter = ost->filter->filter; + + if (ost->source_index >= 0) + ist = input_streams[ost->source_index]; + + frame_rate = av_buffersink_get_frame_rate(filter); + if (frame_rate.num > 0 && frame_rate.den > 0) + duration = 1/(av_q2d(frame_rate) * av_q2d(enc->time_base)); + + if(ist && ist->st->start_time != AV_NOPTS_VALUE && ist->st->first_dts != AV_NOPTS_VALUE && ost->frame_rate.num) + duration = FFMIN(duration, 1/(av_q2d(ost->frame_rate) * av_q2d(enc->time_base))); + + if (!ost->filters_script && + !ost->filters && + (nb_filtergraphs == 0 || !filtergraphs[0]->graph_desc) && + next_picture && + ist && + lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)) > 0) { + duration = lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)); + } + + if (!next_picture) { + //end, flushing +// nb0_frames = nb_frames = mid_pred(ost->last_nb0_frames[0], +// ost->last_nb0_frames[1], +// ost->last_nb0_frames[2]); + } else { + delta0 = sync_ipts - ost->sync_opts; // delta0 is the "drift" between the input frame (next_picture) and where it would fall in the output. + delta = delta0 + duration; + + /* by default, we output a single frame */ + nb0_frames = 0; // tracks the number of times the PREVIOUS frame should be duplicated, mostly for variable framerate (VFR) + nb_frames = 1; + + format_video_sync = video_sync_method; + if (format_video_sync == VSYNC_AUTO) { + if(!strcmp(of->ctx->oformat->name, "avi")) { + format_video_sync = VSYNC_VFR; + } else + format_video_sync = (of->ctx->oformat->flags & AVFMT_VARIABLE_FPS) ? ((of->ctx->oformat->flags & AVFMT_NOTIMESTAMPS) ? VSYNC_PASSTHROUGH : VSYNC_VFR) : VSYNC_CFR; + if ( ist + && format_video_sync == VSYNC_CFR + && input_files[ist->file_index]->ctx->nb_streams == 1 + && input_files[ist->file_index]->input_ts_offset == 0) { + format_video_sync = VSYNC_VSCFR; + } + if (format_video_sync == VSYNC_CFR && copy_ts) { + format_video_sync = VSYNC_VSCFR; + } + } + ost->is_cfr = (format_video_sync == VSYNC_CFR || format_video_sync == VSYNC_VSCFR); + + if (delta0 < 0 && + delta > 0 && + format_video_sync != VSYNC_PASSTHROUGH && + format_video_sync != VSYNC_DROP) { + if (delta0 < -0.6) { + av_log(NULL, AV_LOG_VERBOSE, "Past duration %f too large\n", -delta0); + } else + av_log(NULL, AV_LOG_DEBUG, "Clipping frame in rate conversion by %f\n", -delta0); + sync_ipts = ost->sync_opts; + duration += delta0; + delta0 = 0; + } + + switch (format_video_sync) { + case VSYNC_VSCFR: + if (ost->frame_number == 0 && delta0 >= 0.5) { + av_log(NULL, AV_LOG_DEBUG, "Not duplicating %d initial frames\n", (int)lrintf(delta0)); + delta = duration; + delta0 = 0; + ost->sync_opts = llrint(sync_ipts); + } + case VSYNC_CFR: + // FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c + if (frame_drop_threshold && delta < frame_drop_threshold && ost->frame_number) { + nb_frames = 0; + } else if (delta < -1.1) + nb_frames = 0; + else if (delta > 1.1) { + nb_frames = lrintf(delta); + if (delta0 > 1.1) + nb0_frames = llrintf(delta0 - 0.6); + } + break; + case VSYNC_VFR: + if (delta <= -0.6) + nb_frames = 0; + else if (delta > 0.6) + ost->sync_opts = llrint(sync_ipts); + break; + case VSYNC_DROP: + case VSYNC_PASSTHROUGH: + ost->sync_opts = llrint(sync_ipts); + break; + default: + av_assert0(0); + } + } + + nb_frames = FFMIN(nb_frames, ost->max_frames - ost->frame_number); + nb0_frames = FFMIN(nb0_frames, nb_frames); + + memmove(ost->last_nb0_frames + 1, + ost->last_nb0_frames, + sizeof(ost->last_nb0_frames[0]) * (FF_ARRAY_ELEMS(ost->last_nb0_frames) - 1)); + ost->last_nb0_frames[0] = nb0_frames; + + if (nb0_frames == 0 && ost->last_dropped) { + nb_frames_drop++; + av_log(NULL, AV_LOG_VERBOSE, + "*** dropping frame %d from stream %d at ts %"PRId64"\n", + ost->frame_number, ost->st->index, ost->last_frame->pts); + } + if (nb_frames > (nb0_frames && ost->last_dropped) + (nb_frames > nb0_frames)) { + if (nb_frames > dts_error_threshold * 30) { + av_log(NULL, AV_LOG_ERROR, "%d frame duplication too large, skipping\n", nb_frames - 1); + nb_frames_drop++; + return; + } + nb_frames_dup += nb_frames - (nb0_frames && ost->last_dropped) - (nb_frames > nb0_frames); + av_log(NULL, AV_LOG_VERBOSE, "*** %d dup!\n", nb_frames - 1); + if (nb_frames_dup > dup_warning) { + av_log(NULL, AV_LOG_WARNING, "More than %d frames duplicated\n", dup_warning); + dup_warning *= 10; + } + } + ost->last_dropped = nb_frames == nb0_frames && next_picture; + + /* duplicates frame if needed */ + for (i = 0; i < nb_frames; i++) { + AVFrame *in_picture; + int forced_keyframe = 0; + double pts_time; + av_init_packet(&pkt); + pkt.data = NULL; + pkt.size = 0; + + if (i < nb0_frames && ost->last_frame) { + in_picture = ost->last_frame; + } else + in_picture = next_picture; + + if (!in_picture) + return; + + in_picture->pts = ost->sync_opts; + + if (!check_recording_time(ost)) + return; + + if (enc->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME) && + ost->top_field_first >= 0) + in_picture->top_field_first = !!ost->top_field_first; + + if (in_picture->interlaced_frame) { + if (enc->codec->id == AV_CODEC_ID_MJPEG) + mux_par->field_order = in_picture->top_field_first ? AV_FIELD_TT:AV_FIELD_BB; + else + mux_par->field_order = in_picture->top_field_first ? AV_FIELD_TB:AV_FIELD_BT; + } else + mux_par->field_order = AV_FIELD_PROGRESSIVE; + + in_picture->quality = enc->global_quality; + in_picture->pict_type = 0; + + if (ost->forced_kf_ref_pts == AV_NOPTS_VALUE && + in_picture->pts != AV_NOPTS_VALUE) + ost->forced_kf_ref_pts = in_picture->pts; + + pts_time = in_picture->pts != AV_NOPTS_VALUE ? + (in_picture->pts - ost->forced_kf_ref_pts) * av_q2d(enc->time_base) : NAN; + if (ost->forced_kf_index < ost->forced_kf_count && + in_picture->pts >= ost->forced_kf_pts[ost->forced_kf_index]) { + ost->forced_kf_index++; + forced_keyframe = 1; + } else if (ost->forced_keyframes_pexpr) { + double res; + ost->forced_keyframes_expr_const_values[FKF_T] = pts_time; + res = av_expr_eval(ost->forced_keyframes_pexpr, + ost->forced_keyframes_expr_const_values, NULL); +// ff_dlog(NULL, "force_key_frame: n:%f n_forced:%f prev_forced_n:%f t:%f prev_forced_t:%f -> res:%f\n", +// ost->forced_keyframes_expr_const_values[FKF_N], +// ost->forced_keyframes_expr_const_values[FKF_N_FORCED], +// ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N], +// ost->forced_keyframes_expr_const_values[FKF_T], +// ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_T], +// res); + if (res) { + forced_keyframe = 1; + ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N] = + ost->forced_keyframes_expr_const_values[FKF_N]; + ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_T] = + ost->forced_keyframes_expr_const_values[FKF_T]; + ost->forced_keyframes_expr_const_values[FKF_N_FORCED] += 1; + } + + ost->forced_keyframes_expr_const_values[FKF_N] += 1; + } else if ( ost->forced_keyframes + && !strncmp(ost->forced_keyframes, "source", 6) + && in_picture->key_frame==1 + && !i) { + forced_keyframe = 1; + } + + if (forced_keyframe) { + in_picture->pict_type = AV_PICTURE_TYPE_I; + av_log(NULL, AV_LOG_DEBUG, "Forced keyframe at time %f\n", pts_time); + } + + update_benchmark(NULL); + if (debug_ts) { + av_log(NULL, AV_LOG_INFO, "encoder <- type:video " + "frame_pts:%s frame_pts_time:%s time_base:%d/%d\n", + av_ts2str(in_picture->pts), av_ts2timestr(in_picture->pts, &enc->time_base), + enc->time_base.num, enc->time_base.den); + } + + ost->frames_encoded++; + + ret = avcodec_send_frame(enc, in_picture); + if (ret < 0) + goto error; + // Make sure Closed Captions will not be duplicated + av_frame_remove_side_data(in_picture, AV_FRAME_DATA_A53_CC); + + while (1) { + ret = avcodec_receive_packet(enc, &pkt); + update_benchmark("encode_video %d.%d", ost->file_index, ost->index); + if (ret == AVERROR(EAGAIN)) + break; + if (ret < 0) + goto error; + + if (debug_ts) { + av_log(NULL, AV_LOG_INFO, "encoder -> type:video " + "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n", + av_ts2str(pkt.pts), av_ts2timestr(pkt.pts, &enc->time_base), + av_ts2str(pkt.dts), av_ts2timestr(pkt.dts, &enc->time_base)); + } + + if (pkt.pts == AV_NOPTS_VALUE && !(enc->codec->capabilities & AV_CODEC_CAP_DELAY)) + pkt.pts = ost->sync_opts; + + av_packet_rescale_ts(&pkt, enc->time_base, ost->mux_timebase); + + if (debug_ts) { + av_log(NULL, AV_LOG_INFO, "encoder -> type:video " + "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n", + av_ts2str(pkt.pts), av_ts2timestr(pkt.pts, &ost->mux_timebase), + av_ts2str(pkt.dts), av_ts2timestr(pkt.dts, &ost->mux_timebase)); + } + + frame_size = pkt.size; + output_packet(of, &pkt, ost, 0); + + /* if two pass, output log */ + if (ost->logfile && enc->stats_out) { + fprintf(ost->logfile, "%s", enc->stats_out); + } + } + ost->sync_opts++; + /* + * For video, number of frames in == number of packets out. + * But there may be reordering, so we can't throw away frames on encoder + * flush, we need to limit them here, before they go into encoder. + */ + ost->frame_number++; + + if (vstats_filename && frame_size) + do_video_stats(ost, frame_size); + } + + if (!ost->last_frame) + ost->last_frame = av_frame_alloc(); + av_frame_unref(ost->last_frame); + if (next_picture && ost->last_frame) + av_frame_ref(ost->last_frame, next_picture); + else + av_frame_free(&ost->last_frame); + + return; +error: + av_log(NULL, AV_LOG_FATAL, "Video encoding failed\n"); + exit_program(1); +} + +static double psnr(double d) +{ + return -10.0 * log10(d); +} + +static void do_video_stats(OutputStream *ost, int frame_size) +{ + AVCodecContext *enc; + int frame_number; + double ti1, bitrate, avg_bitrate; + + /* this is executed just the first time do_video_stats is called */ + if (!vstats_file) { + vstats_file = fopen(vstats_filename, "w"); + if (!vstats_file) { + perror("fopen"); + exit_program(1); + } + } + + enc = ost->enc_ctx; + if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { + frame_number = ost->st->nb_frames; + if (vstats_version <= 1) { + fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, + ost->quality / (float)FF_QP2LAMBDA); + } else { + fprintf(vstats_file, "out= %2d st= %2d frame= %5d q= %2.1f ", ost->file_index, ost->index, frame_number, + ost->quality / (float)FF_QP2LAMBDA); + } + + if (ost->error[0]>=0 && (enc->flags & AV_CODEC_FLAG_PSNR)) + fprintf(vstats_file, "PSNR= %6.2f ", psnr(ost->error[0] / (enc->width * enc->height * 255.0 * 255.0))); + + fprintf(vstats_file,"f_size= %6d ", frame_size); + /* compute pts value */ + ti1 = av_stream_get_end_pts(ost->st) * av_q2d(ost->st->time_base); + if (ti1 < 0.01) + ti1 = 0.01; + + bitrate = (frame_size * 8) / av_q2d(enc->time_base) / 1000.0; + avg_bitrate = (double)(ost->data_size * 8) / ti1 / 1000.0; + fprintf(vstats_file, "s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ", + (double)ost->data_size / 1024, ti1, bitrate, avg_bitrate); + fprintf(vstats_file, "type= %c\n", av_get_picture_type_char(ost->pict_type)); + } +} + +static int init_output_stream(OutputStream *ost, char *error, int error_len); + +static void finish_output_stream(OutputStream *ost) +{ + OutputFile *of = output_files[ost->file_index]; + int i; + + ost->finished = ENCODER_FINISHED | MUXER_FINISHED; + + if (of->shortest) { + for (i = 0; i < of->ctx->nb_streams; i++) + output_streams[of->ost_index + i]->finished = ENCODER_FINISHED | MUXER_FINISHED; + } +} + +/** + * Get and encode new output from any of the filtergraphs, without causing + * activity. + * + * @return 0 for success, <0 for severe errors + */ +static int reap_filters(int flush) +{ + AVFrame *filtered_frame = NULL; + int i; + + /* Reap all buffers present in the buffer sinks */ + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = output_streams[i]; + OutputFile *of = output_files[ost->file_index]; + AVFilterContext *filter; + AVCodecContext *enc = ost->enc_ctx; + int ret = 0; + + if (!ost->filter || !ost->filter->graph->graph) + continue; + filter = ost->filter->filter; + + if (!ost->initialized) { + char error[1024] = ""; + ret = init_output_stream(ost, error, sizeof(error)); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "Error initializing output stream %d:%d -- %s\n", + ost->file_index, ost->index, error); + exit_program(1); + } + } + + if (!ost->filtered_frame && !(ost->filtered_frame = av_frame_alloc())) { + return AVERROR(ENOMEM); + } + filtered_frame = ost->filtered_frame; + + while (1) { + double float_pts = AV_NOPTS_VALUE; // this is identical to filtered_frame.pts but with higher precision + ret = av_buffersink_get_frame_flags(filter, filtered_frame, + AV_BUFFERSINK_FLAG_NO_REQUEST); + if (ret < 0) { + if (ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) { + av_log(NULL, AV_LOG_WARNING, + "Error in av_buffersink_get_frame_flags(): %s\n", av_err2str(ret)); + } else if (flush && ret == AVERROR_EOF) { + if (av_buffersink_get_type(filter) == AVMEDIA_TYPE_VIDEO) + do_video_out(of, ost, NULL, AV_NOPTS_VALUE); + } + break; + } + if (ost->finished) { + av_frame_unref(filtered_frame); + continue; + } + if (filtered_frame->pts != AV_NOPTS_VALUE) { + int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time; + AVRational filter_tb = av_buffersink_get_time_base(filter); + AVRational tb = enc->time_base; + int extra_bits = av_clip(29 - av_log2(tb.den), 0, 16); + + tb.den <<= extra_bits; + float_pts = + av_rescale_q(filtered_frame->pts, filter_tb, tb) - + av_rescale_q(start_time, AV_TIME_BASE_Q, tb); + float_pts /= 1 << extra_bits; + // avoid exact midoints to reduce the chance of rounding differences, this can be removed in case the fps code is changed to work with integers + float_pts += FFSIGN(float_pts) * 1.0 / (1<<17); + + filtered_frame->pts = + av_rescale_q(filtered_frame->pts, filter_tb, enc->time_base) - + av_rescale_q(start_time, AV_TIME_BASE_Q, enc->time_base); + } + + switch (av_buffersink_get_type(filter)) { + case AVMEDIA_TYPE_VIDEO: + if (!ost->frame_aspect_ratio.num) + enc->sample_aspect_ratio = filtered_frame->sample_aspect_ratio; + + if (debug_ts) { + av_log(NULL, AV_LOG_INFO, "filter -> pts:%s pts_time:%s exact:%f time_base:%d/%d\n", + av_ts2str(filtered_frame->pts), av_ts2timestr(filtered_frame->pts, &enc->time_base), + float_pts, + enc->time_base.num, enc->time_base.den); + } + + do_video_out(of, ost, filtered_frame, float_pts); + break; + case AVMEDIA_TYPE_AUDIO: + if (!(enc->codec->capabilities & AV_CODEC_CAP_PARAM_CHANGE) && + enc->channels != filtered_frame->channels) { + av_log(NULL, AV_LOG_ERROR, + "Audio filter graph output is not normalized and encoder does not support parameter changes\n"); + break; + } + do_audio_out(of, ost, filtered_frame); + break; + default: + // TODO support subtitle filters + av_assert0(0); + } + + av_frame_unref(filtered_frame); + } + } + + return 0; +} + +static void print_final_stats(int64_t total_size) +{ + uint64_t video_size = 0, audio_size = 0, extra_size = 0, other_size = 0; + uint64_t subtitle_size = 0; + uint64_t data_size = 0; + float percent = -1.0; + int i, j; + int pass1_used = 1; + + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = output_streams[i]; + switch (ost->enc_ctx->codec_type) { + case AVMEDIA_TYPE_VIDEO: video_size += ost->data_size; break; + case AVMEDIA_TYPE_AUDIO: audio_size += ost->data_size; break; + case AVMEDIA_TYPE_SUBTITLE: subtitle_size += ost->data_size; break; + default: other_size += ost->data_size; break; + } + extra_size += ost->enc_ctx->extradata_size; + data_size += ost->data_size; + if ( (ost->enc_ctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) + != AV_CODEC_FLAG_PASS1) + pass1_used = 0; + } + + if (data_size && total_size>0 && total_size >= data_size) + percent = 100.0 * (total_size - data_size) / data_size; + + av_log(NULL, AV_LOG_INFO, "video:%1.0fkB audio:%1.0fkB subtitle:%1.0fkB other streams:%1.0fkB global headers:%1.0fkB muxing overhead: ", + video_size / 1024.0, + audio_size / 1024.0, + subtitle_size / 1024.0, + other_size / 1024.0, + extra_size / 1024.0); + if (percent >= 0.0) + av_log(NULL, AV_LOG_INFO, "%f%%", percent); + else + av_log(NULL, AV_LOG_INFO, "unknown"); + av_log(NULL, AV_LOG_INFO, "\n"); + + /* print verbose per-stream stats */ + for (i = 0; i < nb_input_files; i++) { + InputFile *f = input_files[i]; + uint64_t total_packets = 0, total_size = 0; + + av_log(NULL, AV_LOG_VERBOSE, "Input file #%d (%s):\n", + i, f->ctx->url); + + for (j = 0; j < f->nb_streams; j++) { + InputStream *ist = input_streams[f->ist_index + j]; + enum AVMediaType type = ist->dec_ctx->codec_type; + + total_size += ist->data_size; + total_packets += ist->nb_packets; + + av_log(NULL, AV_LOG_VERBOSE, " Input stream #%d:%d (%s): ", + i, j, media_type_string(type)); + av_log(NULL, AV_LOG_VERBOSE, "%"PRIu64" packets read (%"PRIu64" bytes); ", + ist->nb_packets, ist->data_size); + + if (ist->decoding_needed) { + av_log(NULL, AV_LOG_VERBOSE, "%"PRIu64" frames decoded", + ist->frames_decoded); + if (type == AVMEDIA_TYPE_AUDIO) + av_log(NULL, AV_LOG_VERBOSE, " (%"PRIu64" samples)", ist->samples_decoded); + av_log(NULL, AV_LOG_VERBOSE, "; "); + } + + av_log(NULL, AV_LOG_VERBOSE, "\n"); + } + + av_log(NULL, AV_LOG_VERBOSE, " Total: %"PRIu64" packets (%"PRIu64" bytes) demuxed\n", + total_packets, total_size); + } + + for (i = 0; i < nb_output_files; i++) { + OutputFile *of = output_files[i]; + uint64_t total_packets = 0, total_size = 0; + + av_log(NULL, AV_LOG_VERBOSE, "Output file #%d (%s):\n", + i, of->ctx->url); + + for (j = 0; j < of->ctx->nb_streams; j++) { + OutputStream *ost = output_streams[of->ost_index + j]; + enum AVMediaType type = ost->enc_ctx->codec_type; + + total_size += ost->data_size; + total_packets += ost->packets_written; + + av_log(NULL, AV_LOG_VERBOSE, " Output stream #%d:%d (%s): ", + i, j, media_type_string(type)); + if (ost->encoding_needed) { + av_log(NULL, AV_LOG_VERBOSE, "%"PRIu64" frames encoded", + ost->frames_encoded); + if (type == AVMEDIA_TYPE_AUDIO) + av_log(NULL, AV_LOG_VERBOSE, " (%"PRIu64" samples)", ost->samples_encoded); + av_log(NULL, AV_LOG_VERBOSE, "; "); + } + + av_log(NULL, AV_LOG_VERBOSE, "%"PRIu64" packets muxed (%"PRIu64" bytes); ", + ost->packets_written, ost->data_size); + + av_log(NULL, AV_LOG_VERBOSE, "\n"); + } + + av_log(NULL, AV_LOG_VERBOSE, " Total: %"PRIu64" packets (%"PRIu64" bytes) muxed\n", + total_packets, total_size); + } + if(video_size + data_size + audio_size + subtitle_size + extra_size == 0){ + av_log(NULL, AV_LOG_WARNING, "Output file is empty, nothing was encoded "); + if (pass1_used) { + av_log(NULL, AV_LOG_WARNING, "\n"); + } else { + av_log(NULL, AV_LOG_WARNING, "(check -ss / -t / -frames parameters if used)\n"); + } + } +} + +static void print_report(int is_last_report, int64_t timer_start, int64_t cur_time) +{ + AVBPrint buf, buf_script; + OutputStream *ost; + AVFormatContext *oc; + int64_t total_size; + AVCodecContext *enc; + int frame_number, vid, i; + double bitrate; + double speed; + int64_t pts = INT64_MIN + 1; + static int64_t last_time = -1; + static int qp_histogram[52]; + int hours, mins, secs, us; + const char *hours_sign; + int ret; + float t; + + if (!print_stats && !is_last_report && !progress_avio) + return; + + if (!is_last_report) { + if (last_time == -1) { + last_time = cur_time; + return; + } + if ((cur_time - last_time) < 500000) + return; + last_time = cur_time; + } + + t = (cur_time-timer_start) / 1000000.0; + + + oc = output_files[0]->ctx; + + total_size = avio_size(oc->pb); + if (total_size <= 0) // FIXME improve avio_size() so it works with non seekable output too + total_size = avio_tell(oc->pb); + + vid = 0; + av_bprint_init(&buf, 0, AV_BPRINT_SIZE_AUTOMATIC); + av_bprint_init(&buf_script, 0, AV_BPRINT_SIZE_AUTOMATIC); + for (i = 0; i < nb_output_streams; i++) { + float q = -1; + ost = output_streams[i]; + enc = ost->enc_ctx; + if (!ost->stream_copy) + q = ost->quality / (float) FF_QP2LAMBDA; + + if (vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { + av_bprintf(&buf, "q=%2.1f ", q); + av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n", + ost->file_index, ost->index, q); + } + if (!vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { + float fps; + + frame_number = ost->frame_number; + fps = t > 1 ? frame_number / t : 0; + av_bprintf(&buf, "frame=%5d fps=%3.*f q=%3.1f ", + frame_number, fps < 9.95, fps, q); + av_bprintf(&buf_script, "frame=%d\n", frame_number); + av_bprintf(&buf_script, "fps=%.2f\n", fps); + av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n", + ost->file_index, ost->index, q); + if (is_last_report) + av_bprintf(&buf, "L"); + if (qp_hist) { + int j; + int qp = lrintf(q); + if (qp >= 0 && qp < FF_ARRAY_ELEMS(qp_histogram)) + qp_histogram[qp]++; + for (j = 0; j < 32; j++) + av_bprintf(&buf, "%X", av_log2(qp_histogram[j] + 1)); + } + + if ((enc->flags & AV_CODEC_FLAG_PSNR) && (ost->pict_type != AV_PICTURE_TYPE_NONE || is_last_report)) { + int j; + double error, error_sum = 0; + double scale, scale_sum = 0; + double p; + char type[3] = { 'Y','U','V' }; + av_bprintf(&buf, "PSNR="); + for (j = 0; j < 3; j++) { + if (is_last_report) { + error = enc->error[j]; + scale = enc->width * enc->height * 255.0 * 255.0 * frame_number; + } else { + error = ost->error[j]; + scale = enc->width * enc->height * 255.0 * 255.0; + } + if (j) + scale /= 4; + error_sum += error; + scale_sum += scale; + p = psnr(error / scale); + av_bprintf(&buf, "%c:%2.2f ", type[j], p); + av_bprintf(&buf_script, "stream_%d_%d_psnr_%c=%2.2f\n", + ost->file_index, ost->index, type[j] | 32, p); + } + p = psnr(error_sum / scale_sum); + av_bprintf(&buf, "*:%2.2f ", psnr(error_sum / scale_sum)); + av_bprintf(&buf_script, "stream_%d_%d_psnr_all=%2.2f\n", + ost->file_index, ost->index, p); + } + vid = 1; + } + /* compute min output value */ + if (av_stream_get_end_pts(ost->st) != AV_NOPTS_VALUE) + pts = FFMAX(pts, av_rescale_q(av_stream_get_end_pts(ost->st), + ost->st->time_base, AV_TIME_BASE_Q)); + if (is_last_report) + nb_frames_drop += ost->last_dropped; + } + + secs = FFABS(pts) / AV_TIME_BASE; + us = FFABS(pts) % AV_TIME_BASE; + mins = secs / 60; + secs %= 60; + hours = mins / 60; + mins %= 60; + hours_sign = (pts < 0) ? "-" : ""; + + bitrate = pts && total_size >= 0 ? total_size * 8 / (pts / 1000.0) : -1; + speed = t != 0.0 ? (double)pts / AV_TIME_BASE / t : -1; + + if (total_size < 0) av_bprintf(&buf, "size=N/A time="); + else av_bprintf(&buf, "size=%8.0fkB time=", total_size / 1024.0); + if (pts == AV_NOPTS_VALUE) { + av_bprintf(&buf, "N/A "); + } else { + av_bprintf(&buf, "%s%02d:%02d:%02d.%02d ", + hours_sign, hours, mins, secs, (100 * us) / AV_TIME_BASE); + } + + if (bitrate < 0) { + av_bprintf(&buf, "bitrate=N/A"); + av_bprintf(&buf_script, "bitrate=N/A\n"); + }else{ + av_bprintf(&buf, "bitrate=%6.1fkbits/s", bitrate); + av_bprintf(&buf_script, "bitrate=%6.1fkbits/s\n", bitrate); + } + + if (total_size < 0) av_bprintf(&buf_script, "total_size=N/A\n"); + else av_bprintf(&buf_script, "total_size=%"PRId64"\n", total_size); + if (pts == AV_NOPTS_VALUE) { + av_bprintf(&buf_script, "out_time_us=N/A\n"); + av_bprintf(&buf_script, "out_time_ms=N/A\n"); + av_bprintf(&buf_script, "out_time=N/A\n"); + } else { + av_bprintf(&buf_script, "out_time_us=%"PRId64"\n", pts); + av_bprintf(&buf_script, "out_time_ms=%"PRId64"\n", pts); + av_bprintf(&buf_script, "out_time=%s%02d:%02d:%02d.%06d\n", + hours_sign, hours, mins, secs, us); + } + + if (nb_frames_dup || nb_frames_drop) + av_bprintf(&buf, " dup=%d drop=%d", nb_frames_dup, nb_frames_drop); + av_bprintf(&buf_script, "dup_frames=%d\n", nb_frames_dup); + av_bprintf(&buf_script, "drop_frames=%d\n", nb_frames_drop); + + if (speed < 0) { + av_bprintf(&buf, " speed=N/A"); + av_bprintf(&buf_script, "speed=N/A\n"); + } else { + av_bprintf(&buf, " speed=%4.3gx", speed); + av_bprintf(&buf_script, "speed=%4.3gx\n", speed); + } + + if (print_stats || is_last_report) { + const char end = is_last_report ? '\n' : '\r'; + if (print_stats==1 && AV_LOG_INFO > av_log_get_level()) { + fprintf(stderr, "%s %c", buf.str, end); + } else + av_log(NULL, AV_LOG_INFO, "%s %c", buf.str, end); + + fflush(stderr); + } + av_bprint_finalize(&buf, NULL); + + if (progress_avio) { + av_bprintf(&buf_script, "progress=%s\n", + is_last_report ? "end" : "continue"); + avio_write(progress_avio, buf_script.str, + FFMIN(buf_script.len, buf_script.size - 1)); + avio_flush(progress_avio); + av_bprint_finalize(&buf_script, NULL); + if (is_last_report) { + if ((ret = avio_closep(&progress_avio)) < 0) + av_log(NULL, AV_LOG_ERROR, + "Error closing progress log, loss of information possible: %s\n", av_err2str(ret)); + } + } + + if (is_last_report) + print_final_stats(total_size); +} + +static void ifilter_parameters_from_codecpar(InputFilter *ifilter, AVCodecParameters *par) +{ + // We never got any input. Set a fake format, which will + // come from libavformat. + ifilter->format = par->format; + ifilter->sample_rate = par->sample_rate; + ifilter->channels = par->channels; + ifilter->channel_layout = par->channel_layout; + ifilter->width = par->width; + ifilter->height = par->height; + ifilter->sample_aspect_ratio = par->sample_aspect_ratio; +} + +static void flush_encoders(void) +{ + int i, ret; + + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = output_streams[i]; + AVCodecContext *enc = ost->enc_ctx; + OutputFile *of = output_files[ost->file_index]; + + if (!ost->encoding_needed) + continue; + + // Try to enable encoding with no input frames. + // Maybe we should just let encoding fail instead. + if (!ost->initialized) { + FilterGraph *fg = ost->filter->graph; + char error[1024] = ""; + + av_log(NULL, AV_LOG_WARNING, + "Finishing stream %d:%d without any data written to it.\n", + ost->file_index, ost->st->index); + + if (ost->filter && !fg->graph) { + int x; + for (x = 0; x < fg->nb_inputs; x++) { + InputFilter *ifilter = fg->inputs[x]; + if (ifilter->format < 0) + ifilter_parameters_from_codecpar(ifilter, ifilter->ist->st->codecpar); + } + + if (!ifilter_has_all_input_formats(fg)) + continue; + + ret = configure_filtergraph(fg); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "Error configuring filter graph\n"); + exit_program(1); + } + + finish_output_stream(ost); + } + + ret = init_output_stream(ost, error, sizeof(error)); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "Error initializing output stream %d:%d -- %s\n", + ost->file_index, ost->index, error); + exit_program(1); + } + } + + if (enc->codec_type != AVMEDIA_TYPE_VIDEO && enc->codec_type != AVMEDIA_TYPE_AUDIO) + continue; + + for (;;) { + const char *desc = NULL; + AVPacket pkt; + int pkt_size; + + switch (enc->codec_type) { + case AVMEDIA_TYPE_AUDIO: + desc = "audio"; + break; + case AVMEDIA_TYPE_VIDEO: + desc = "video"; + break; + default: + av_assert0(0); + } + + av_init_packet(&pkt); + pkt.data = NULL; + pkt.size = 0; + + update_benchmark(NULL); + + while ((ret = avcodec_receive_packet(enc, &pkt)) == AVERROR(EAGAIN)) { + ret = avcodec_send_frame(enc, NULL); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, "%s encoding failed: %s\n", + desc, + av_err2str(ret)); + exit_program(1); + } + } + + update_benchmark("flush_%s %d.%d", desc, ost->file_index, ost->index); + if (ret < 0 && ret != AVERROR_EOF) { + av_log(NULL, AV_LOG_FATAL, "%s encoding failed: %s\n", + desc, + av_err2str(ret)); + exit_program(1); + } + if (ost->logfile && enc->stats_out) { + fprintf(ost->logfile, "%s", enc->stats_out); + } + if (ret == AVERROR_EOF) { + output_packet(of, &pkt, ost, 1); + break; + } + if (ost->finished & MUXER_FINISHED) { + av_packet_unref(&pkt); + continue; + } + av_packet_rescale_ts(&pkt, enc->time_base, ost->mux_timebase); + pkt_size = pkt.size; + output_packet(of, &pkt, ost, 0); + if (ost->enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO && vstats_filename) { + do_video_stats(ost, pkt_size); + } + } + } +} + +/* + * Check whether a packet from ist should be written into ost at this time + */ +static int check_output_constraints(InputStream *ist, OutputStream *ost) +{ + OutputFile *of = output_files[ost->file_index]; + int ist_index = input_files[ist->file_index]->ist_index + ist->st->index; + + if (ost->source_index != ist_index) + return 0; + + if (ost->finished) + return 0; + + if (of->start_time != AV_NOPTS_VALUE && ist->pts < of->start_time) + return 0; + + return 1; +} + +static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *pkt) +{ + OutputFile *of = output_files[ost->file_index]; + InputFile *f = input_files [ist->file_index]; + int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time; + int64_t ost_tb_start_time = av_rescale_q(start_time, AV_TIME_BASE_Q, ost->mux_timebase); + AVPacket opkt; + + // EOF: flush output bitstream filters. + if (!pkt) { + av_init_packet(&opkt); + opkt.data = NULL; + opkt.size = 0; + output_packet(of, &opkt, ost, 1); + return; + } + + if ((!ost->frame_number && !(pkt->flags & AV_PKT_FLAG_KEY)) && + !ost->copy_initial_nonkeyframes) + return; + + if (!ost->frame_number && !ost->copy_prior_start) { + int64_t comp_start = start_time; + if (copy_ts && f->start_time != AV_NOPTS_VALUE) + comp_start = FFMAX(start_time, f->start_time + f->ts_offset); + if (pkt->pts == AV_NOPTS_VALUE ? + ist->pts < comp_start : + pkt->pts < av_rescale_q(comp_start, AV_TIME_BASE_Q, ist->st->time_base)) + return; + } + + if (of->recording_time != INT64_MAX && + ist->pts >= of->recording_time + start_time) { + close_output_stream(ost); + return; + } + + if (f->recording_time != INT64_MAX) { + start_time = f->ctx->start_time; + if (f->start_time != AV_NOPTS_VALUE && copy_ts) + start_time += f->start_time; + if (ist->pts >= f->recording_time + start_time) { + close_output_stream(ost); + return; + } + } + + /* force the input stream PTS */ + if (ost->enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO) + ost->sync_opts++; + + if (av_packet_ref(&opkt, pkt) < 0) + exit_program(1); + + if (pkt->pts != AV_NOPTS_VALUE) + opkt.pts = av_rescale_q(pkt->pts, ist->st->time_base, ost->mux_timebase) - ost_tb_start_time; + + if (pkt->dts == AV_NOPTS_VALUE) { + opkt.dts = av_rescale_q(ist->dts, AV_TIME_BASE_Q, ost->mux_timebase); + } else if (ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { + int duration = av_get_audio_frame_duration(ist->dec_ctx, pkt->size); + if(!duration) + duration = ist->dec_ctx->frame_size; + opkt.dts = av_rescale_delta(ist->st->time_base, pkt->dts, + (AVRational){1, ist->dec_ctx->sample_rate}, duration, + &ist->filter_in_rescale_delta_last, ost->mux_timebase); + /* dts will be set immediately afterwards to what pts is now */ + opkt.pts = opkt.dts - ost_tb_start_time; + } else + opkt.dts = av_rescale_q(pkt->dts, ist->st->time_base, ost->mux_timebase); + opkt.dts -= ost_tb_start_time; + + opkt.duration = av_rescale_q(pkt->duration, ist->st->time_base, ost->mux_timebase); + + output_packet(of, &opkt, ost, 0); +} + +int guess_input_channel_layout(InputStream *ist) +{ + AVCodecContext *dec = ist->dec_ctx; + + if (!dec->channel_layout) { + char layout_name[256]; + + if (dec->channels > ist->guess_layout_max) + return 0; + dec->channel_layout = av_get_default_channel_layout(dec->channels); + if (!dec->channel_layout) + return 0; + av_get_channel_layout_string(layout_name, sizeof(layout_name), + dec->channels, dec->channel_layout); + av_log(NULL, AV_LOG_WARNING, "Guessed Channel Layout for Input Stream " + "#%d.%d : %s\n", ist->file_index, ist->st->index, layout_name); + } + return 1; +} + +static void check_decode_result(InputStream *ist, int *got_output, int ret) +{ + if (*got_output || ret<0) + decode_error_stat[ret<0] ++; + + if (ret < 0 && exit_on_error) + exit_program(1); + + if (*got_output && ist) { + if (ist->decoded_frame->decode_error_flags || (ist->decoded_frame->flags & AV_FRAME_FLAG_CORRUPT)) { + av_log(NULL, exit_on_error ? AV_LOG_FATAL : AV_LOG_WARNING, + "%s: corrupt decoded frame in stream %d\n", input_files[ist->file_index]->ctx->url, ist->st->index); + if (exit_on_error) + exit_program(1); + } + } +} + +// Filters can be configured only if the formats of all inputs are known. +static int ifilter_has_all_input_formats(FilterGraph *fg) +{ + int i; + for (i = 0; i < fg->nb_inputs; i++) { + if (fg->inputs[i]->format < 0 && (fg->inputs[i]->type == AVMEDIA_TYPE_AUDIO || + fg->inputs[i]->type == AVMEDIA_TYPE_VIDEO)) + return 0; + } + return 1; +} + +static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame) +{ + FilterGraph *fg = ifilter->graph; + int need_reinit, ret, i; + + /* determine if the parameters for this input changed */ + need_reinit = ifilter->format != frame->format; + + switch (ifilter->ist->st->codecpar->codec_type) { + case AVMEDIA_TYPE_AUDIO: + need_reinit |= ifilter->sample_rate != frame->sample_rate || + ifilter->channels != frame->channels || + ifilter->channel_layout != frame->channel_layout; + break; + case AVMEDIA_TYPE_VIDEO: + need_reinit |= ifilter->width != frame->width || + ifilter->height != frame->height; + break; + } + + if (!ifilter->ist->reinit_filters && fg->graph) + need_reinit = 0; + + if (!!ifilter->hw_frames_ctx != !!frame->hw_frames_ctx || + (ifilter->hw_frames_ctx && ifilter->hw_frames_ctx->data != frame->hw_frames_ctx->data)) + need_reinit = 1; + + if (need_reinit) { + ret = ifilter_parameters_from_frame(ifilter, frame); + if (ret < 0) + return ret; + } + + /* (re)init the graph if possible, otherwise buffer the frame and return */ + if (need_reinit || !fg->graph) { + for (i = 0; i < fg->nb_inputs; i++) { + if (!ifilter_has_all_input_formats(fg)) { + AVFrame *tmp = av_frame_clone(frame); + if (!tmp) + return AVERROR(ENOMEM); + av_frame_unref(frame); + + if (!av_fifo_space(ifilter->frame_queue)) { + ret = av_fifo_realloc2(ifilter->frame_queue, 2 * av_fifo_size(ifilter->frame_queue)); + if (ret < 0) { + av_frame_free(&tmp); + return ret; + } + } + av_fifo_generic_write(ifilter->frame_queue, &tmp, sizeof(tmp), NULL); + return 0; + } + } + + ret = reap_filters(1); + if (ret < 0 && ret != AVERROR_EOF) { + av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", av_err2str(ret)); + return ret; + } + + ret = configure_filtergraph(fg); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "Error reinitializing filters!\n"); + return ret; + } + } + + ret = av_buffersrc_add_frame_flags(ifilter->filter, frame, AV_BUFFERSRC_FLAG_PUSH); + if (ret < 0) { + if (ret != AVERROR_EOF) + av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", av_err2str(ret)); + return ret; + } + + return 0; +} + +static int ifilter_send_eof(InputFilter *ifilter, int64_t pts) +{ + int ret; + + ifilter->eof = 1; + + if (ifilter->filter) { + ret = av_buffersrc_close(ifilter->filter, pts, AV_BUFFERSRC_FLAG_PUSH); + if (ret < 0) + return ret; + } else { + // the filtergraph was never configured + if (ifilter->format < 0) + ifilter_parameters_from_codecpar(ifilter, ifilter->ist->st->codecpar); + if (ifilter->format < 0 && (ifilter->type == AVMEDIA_TYPE_AUDIO || ifilter->type == AVMEDIA_TYPE_VIDEO)) { + av_log(NULL, AV_LOG_ERROR, "Cannot determine format of input stream %d:%d after EOF\n", ifilter->ist->file_index, ifilter->ist->st->index); + return AVERROR_INVALIDDATA; + } + } + + return 0; +} + +// This does not quite work like avcodec_decode_audio4/avcodec_decode_video2. +// There is the following difference: if you got a frame, you must call +// it again with pkt=NULL. pkt==NULL is treated differently from pkt->size==0 +// (pkt==NULL means get more output, pkt->size==0 is a flush/drain packet) +static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt) +{ + int ret; + + *got_frame = 0; + + if (pkt) { + ret = avcodec_send_packet(avctx, pkt); + // In particular, we don't expect AVERROR(EAGAIN), because we read all + // decoded frames with avcodec_receive_frame() until done. + if (ret < 0 && ret != AVERROR_EOF) + return ret; + } + + ret = avcodec_receive_frame(avctx, frame); + if (ret < 0 && ret != AVERROR(EAGAIN)) + return ret; + if (ret >= 0) + *got_frame = 1; + + return 0; +} + +static int send_frame_to_filters(InputStream *ist, AVFrame *decoded_frame) +{ + int i, ret; + AVFrame *f; + + av_assert1(ist->nb_filters > 0); /* ensure ret is initialized */ + for (i = 0; i < ist->nb_filters; i++) { + if (i < ist->nb_filters - 1) { + f = ist->filter_frame; + ret = av_frame_ref(f, decoded_frame); + if (ret < 0) + break; + } else + f = decoded_frame; + ret = ifilter_send_frame(ist->filters[i], f); + if (ret == AVERROR_EOF) + ret = 0; /* ignore */ + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, + "Failed to inject frame into filter network: %s\n", av_err2str(ret)); + break; + } + } + return ret; +} + +static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output, + int *decode_failed) +{ + AVFrame *decoded_frame; + AVCodecContext *avctx = ist->dec_ctx; + int ret, err = 0; + AVRational decoded_frame_tb; + + if (!ist->decoded_frame && !(ist->decoded_frame = av_frame_alloc())) + return AVERROR(ENOMEM); + if (!ist->filter_frame && !(ist->filter_frame = av_frame_alloc())) + return AVERROR(ENOMEM); + decoded_frame = ist->decoded_frame; + + update_benchmark(NULL); + ret = decode(avctx, decoded_frame, got_output, pkt); + update_benchmark("decode_audio %d.%d", ist->file_index, ist->st->index); + if (ret < 0) + *decode_failed = 1; + + if (ret >= 0 && avctx->sample_rate <= 0) { + av_log(avctx, AV_LOG_ERROR, "Sample rate %d invalid\n", avctx->sample_rate); + ret = AVERROR_INVALIDDATA; + } + + if (ret != AVERROR_EOF) + check_decode_result(ist, got_output, ret); + + if (!*got_output || ret < 0) + return ret; + + ist->samples_decoded += decoded_frame->nb_samples; + ist->frames_decoded++; + + /* increment next_dts to use for the case where the input stream does not + have timestamps or there are multiple frames in the packet */ + ist->next_pts += ((int64_t)AV_TIME_BASE * decoded_frame->nb_samples) / + avctx->sample_rate; + ist->next_dts += ((int64_t)AV_TIME_BASE * decoded_frame->nb_samples) / + avctx->sample_rate; + + if (decoded_frame->pts != AV_NOPTS_VALUE) { + decoded_frame_tb = ist->st->time_base; + } else if (pkt && pkt->pts != AV_NOPTS_VALUE) { + decoded_frame->pts = pkt->pts; + decoded_frame_tb = ist->st->time_base; + }else { + decoded_frame->pts = ist->dts; + decoded_frame_tb = AV_TIME_BASE_Q; + } + if (decoded_frame->pts != AV_NOPTS_VALUE) + decoded_frame->pts = av_rescale_delta(decoded_frame_tb, decoded_frame->pts, + (AVRational){1, avctx->sample_rate}, decoded_frame->nb_samples, &ist->filter_in_rescale_delta_last, + (AVRational){1, avctx->sample_rate}); + ist->nb_samples = decoded_frame->nb_samples; + err = send_frame_to_filters(ist, decoded_frame); + + av_frame_unref(ist->filter_frame); + av_frame_unref(decoded_frame); + return err < 0 ? err : ret; +} + +static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_t *duration_pts, int eof, + int *decode_failed) +{ + AVFrame *decoded_frame; + int i, ret = 0, err = 0; + int64_t best_effort_timestamp; + int64_t dts = AV_NOPTS_VALUE; + AVPacket avpkt; + + // With fate-indeo3-2, we're getting 0-sized packets before EOF for some + // reason. This seems like a semi-critical bug. Don't trigger EOF, and + // skip the packet. + if (!eof && pkt && pkt->size == 0) + return 0; + + if (!ist->decoded_frame && !(ist->decoded_frame = av_frame_alloc())) + return AVERROR(ENOMEM); + if (!ist->filter_frame && !(ist->filter_frame = av_frame_alloc())) + return AVERROR(ENOMEM); + decoded_frame = ist->decoded_frame; + if (ist->dts != AV_NOPTS_VALUE) + dts = av_rescale_q(ist->dts, AV_TIME_BASE_Q, ist->st->time_base); + if (pkt) { + avpkt = *pkt; + avpkt.dts = dts; // ffmpeg.c probably shouldn't do this + } + + // The old code used to set dts on the drain packet, which does not work + // with the new API anymore. + if (eof) { + void *new = av_realloc_array(ist->dts_buffer, ist->nb_dts_buffer + 1, sizeof(ist->dts_buffer[0])); + if (!new) + return AVERROR(ENOMEM); + ist->dts_buffer = new; + ist->dts_buffer[ist->nb_dts_buffer++] = dts; + } + + update_benchmark(NULL); + ret = decode(ist->dec_ctx, decoded_frame, got_output, pkt ? &avpkt : NULL); + update_benchmark("decode_video %d.%d", ist->file_index, ist->st->index); + if (ret < 0) + *decode_failed = 1; + + // The following line may be required in some cases where there is no parser + // or the parser does not has_b_frames correctly + if (ist->st->codecpar->video_delay < ist->dec_ctx->has_b_frames) { + if (ist->dec_ctx->codec_id == AV_CODEC_ID_H264) { + ist->st->codecpar->video_delay = ist->dec_ctx->has_b_frames; + } else + av_log(ist->dec_ctx, AV_LOG_WARNING, + "video_delay is larger in decoder than demuxer %d > %d.\n" + "If you want to help, upload a sample " + "of this file to https://streams.videolan.org/upload/ " + "and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)\n", + ist->dec_ctx->has_b_frames, + ist->st->codecpar->video_delay); + } + + if (ret != AVERROR_EOF) + check_decode_result(ist, got_output, ret); + + if (*got_output && ret >= 0) { + if (ist->dec_ctx->width != decoded_frame->width || + ist->dec_ctx->height != decoded_frame->height || + ist->dec_ctx->pix_fmt != decoded_frame->format) { + av_log(NULL, AV_LOG_DEBUG, "Frame parameters mismatch context %d,%d,%d != %d,%d,%d\n", + decoded_frame->width, + decoded_frame->height, + decoded_frame->format, + ist->dec_ctx->width, + ist->dec_ctx->height, + ist->dec_ctx->pix_fmt); + } + } + + if (!*got_output || ret < 0) + return ret; + + if(ist->top_field_first>=0) + decoded_frame->top_field_first = ist->top_field_first; + + ist->frames_decoded++; + + if (ist->hwaccel_retrieve_data && decoded_frame->format == ist->hwaccel_pix_fmt) { + err = ist->hwaccel_retrieve_data(ist->dec_ctx, decoded_frame); + if (err < 0) + goto fail; + } + ist->hwaccel_retrieved_pix_fmt = decoded_frame->format; + + best_effort_timestamp= decoded_frame->best_effort_timestamp; + *duration_pts = decoded_frame->pkt_duration; + + if (ist->framerate.num) + best_effort_timestamp = ist->cfr_next_pts++; + + if (eof && best_effort_timestamp == AV_NOPTS_VALUE && ist->nb_dts_buffer > 0) { + best_effort_timestamp = ist->dts_buffer[0]; + + for (i = 0; i < ist->nb_dts_buffer - 1; i++) + ist->dts_buffer[i] = ist->dts_buffer[i + 1]; + ist->nb_dts_buffer--; + } + + if(best_effort_timestamp != AV_NOPTS_VALUE) { + int64_t ts = av_rescale_q(decoded_frame->pts = best_effort_timestamp, ist->st->time_base, AV_TIME_BASE_Q); + + if (ts != AV_NOPTS_VALUE) + ist->next_pts = ist->pts = ts; + } + + if (debug_ts) { + av_log(NULL, AV_LOG_INFO, "decoder -> ist_index:%d type:video " + "frame_pts:%s frame_pts_time:%s best_effort_ts:%"PRId64" best_effort_ts_time:%s keyframe:%d frame_type:%d time_base:%d/%d\n", + ist->st->index, av_ts2str(decoded_frame->pts), + av_ts2timestr(decoded_frame->pts, &ist->st->time_base), + best_effort_timestamp, + av_ts2timestr(best_effort_timestamp, &ist->st->time_base), + decoded_frame->key_frame, decoded_frame->pict_type, + ist->st->time_base.num, ist->st->time_base.den); + } + + if (ist->st->sample_aspect_ratio.num) + decoded_frame->sample_aspect_ratio = ist->st->sample_aspect_ratio; + + err = send_frame_to_filters(ist, decoded_frame); + +fail: + av_frame_unref(ist->filter_frame); + av_frame_unref(decoded_frame); + return err < 0 ? err : ret; +} + +static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output, + int *decode_failed) +{ + AVSubtitle subtitle; + int free_sub = 1; + int i, ret = avcodec_decode_subtitle2(ist->dec_ctx, + &subtitle, got_output, pkt); + + check_decode_result(NULL, got_output, ret); + + if (ret < 0 || !*got_output) { + *decode_failed = 1; + if (!pkt->size) + sub2video_flush(ist); + return ret; + } + + if (ist->fix_sub_duration) { + int end = 1; + if (ist->prev_sub.got_output) { + end = av_rescale(subtitle.pts - ist->prev_sub.subtitle.pts, + 1000, AV_TIME_BASE); + if (end < ist->prev_sub.subtitle.end_display_time) { + av_log(ist->dec_ctx, AV_LOG_DEBUG, + "Subtitle duration reduced from %"PRId32" to %d%s\n", + ist->prev_sub.subtitle.end_display_time, end, + end <= 0 ? ", dropping it" : ""); + ist->prev_sub.subtitle.end_display_time = end; + } + } + FFSWAP(int, *got_output, ist->prev_sub.got_output); + FFSWAP(int, ret, ist->prev_sub.ret); + FFSWAP(AVSubtitle, subtitle, ist->prev_sub.subtitle); + if (end <= 0) + goto out; + } + + if (!*got_output) + return ret; + + if (ist->sub2video.frame) { + sub2video_update(ist, INT64_MIN, &subtitle); + } else if (ist->nb_filters) { + if (!ist->sub2video.sub_queue) + ist->sub2video.sub_queue = av_fifo_alloc(8 * sizeof(AVSubtitle)); + if (!ist->sub2video.sub_queue) + exit_program(1); + if (!av_fifo_space(ist->sub2video.sub_queue)) { + ret = av_fifo_realloc2(ist->sub2video.sub_queue, 2 * av_fifo_size(ist->sub2video.sub_queue)); + if (ret < 0) + exit_program(1); + } + av_fifo_generic_write(ist->sub2video.sub_queue, &subtitle, sizeof(subtitle), NULL); + free_sub = 0; + } + + if (!subtitle.num_rects) + goto out; + + ist->frames_decoded++; + + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = output_streams[i]; + + if (!check_output_constraints(ist, ost) || !ost->encoding_needed + || ost->enc->type != AVMEDIA_TYPE_SUBTITLE) + continue; + + do_subtitle_out(output_files[ost->file_index], ost, &subtitle); + } + +out: + if (free_sub) + avsubtitle_free(&subtitle); + return ret; +} + +static int send_filter_eof(InputStream *ist) +{ + int i, ret; + /* TODO keep pts also in stream time base to avoid converting back */ + int64_t pts = av_rescale_q_rnd(ist->pts, AV_TIME_BASE_Q, ist->st->time_base, + AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX); + + for (i = 0; i < ist->nb_filters; i++) { + ret = ifilter_send_eof(ist->filters[i], pts); + if (ret < 0) + return ret; + } + return 0; +} + +/* pkt = NULL means EOF (needed to flush decoder buffers) */ +static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eof) +{ + int ret = 0, i; + int repeating = 0; + int eof_reached = 0; + + AVPacket avpkt; + if (!ist->saw_first_ts) { + ist->dts = ist->st->avg_frame_rate.num ? - ist->dec_ctx->has_b_frames * AV_TIME_BASE / av_q2d(ist->st->avg_frame_rate) : 0; + ist->pts = 0; + if (pkt && pkt->pts != AV_NOPTS_VALUE && !ist->decoding_needed) { + ist->dts += av_rescale_q(pkt->pts, ist->st->time_base, AV_TIME_BASE_Q); + ist->pts = ist->dts; //unused but better to set it to a value thats not totally wrong + } + ist->saw_first_ts = 1; + } + + if (ist->next_dts == AV_NOPTS_VALUE) + ist->next_dts = ist->dts; + if (ist->next_pts == AV_NOPTS_VALUE) + ist->next_pts = ist->pts; + + if (!pkt) { + /* EOF handling */ + av_init_packet(&avpkt); + avpkt.data = NULL; + avpkt.size = 0; + } else { + avpkt = *pkt; + } + + if (pkt && pkt->dts != AV_NOPTS_VALUE) { + ist->next_dts = ist->dts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q); + if (ist->dec_ctx->codec_type != AVMEDIA_TYPE_VIDEO || !ist->decoding_needed) + ist->next_pts = ist->pts = ist->dts; + } + + // while we have more to decode or while the decoder did output something on EOF + while (ist->decoding_needed) { + int64_t duration_dts = 0; + int64_t duration_pts = 0; + int got_output = 0; + int decode_failed = 0; + + ist->pts = ist->next_pts; + ist->dts = ist->next_dts; + + switch (ist->dec_ctx->codec_type) { + case AVMEDIA_TYPE_AUDIO: + ret = decode_audio (ist, repeating ? NULL : &avpkt, &got_output, + &decode_failed); + break; + case AVMEDIA_TYPE_VIDEO: + ret = decode_video (ist, repeating ? NULL : &avpkt, &got_output, &duration_pts, !pkt, + &decode_failed); + if (!repeating || !pkt || got_output) { + if (pkt && pkt->duration) { + duration_dts = av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q); + } else if(ist->dec_ctx->framerate.num != 0 && ist->dec_ctx->framerate.den != 0) { + int ticks= av_stream_get_parser(ist->st) ? av_stream_get_parser(ist->st)->repeat_pict+1 : ist->dec_ctx->ticks_per_frame; + duration_dts = ((int64_t)AV_TIME_BASE * + ist->dec_ctx->framerate.den * ticks) / + ist->dec_ctx->framerate.num / ist->dec_ctx->ticks_per_frame; + } + + if(ist->dts != AV_NOPTS_VALUE && duration_dts) { + ist->next_dts += duration_dts; + }else + ist->next_dts = AV_NOPTS_VALUE; + } + + if (got_output) { + if (duration_pts > 0) { + ist->next_pts += av_rescale_q(duration_pts, ist->st->time_base, AV_TIME_BASE_Q); + } else { + ist->next_pts += duration_dts; + } + } + break; + case AVMEDIA_TYPE_SUBTITLE: + if (repeating) + break; + ret = transcode_subtitles(ist, &avpkt, &got_output, &decode_failed); + if (!pkt && ret >= 0) + ret = AVERROR_EOF; + break; + default: + return -1; + } + + if (ret == AVERROR_EOF) { + eof_reached = 1; + break; + } + + if (ret < 0) { + if (decode_failed) { + av_log(NULL, AV_LOG_ERROR, "Error while decoding stream #%d:%d: %s\n", + ist->file_index, ist->st->index, av_err2str(ret)); + } else { + av_log(NULL, AV_LOG_FATAL, "Error while processing the decoded " + "data for stream #%d:%d\n", ist->file_index, ist->st->index); + } + if (!decode_failed || exit_on_error) + exit_program(1); + break; + } + + if (got_output) + ist->got_output = 1; + + if (!got_output) + break; + + // During draining, we might get multiple output frames in this loop. + // ffmpeg.c does not drain the filter chain on configuration changes, + // which means if we send multiple frames at once to the filters, and + // one of those frames changes configuration, the buffered frames will + // be lost. This can upset certain FATE tests. + // Decode only 1 frame per call on EOF to appease these FATE tests. + // The ideal solution would be to rewrite decoding to use the new + // decoding API in a better way. + if (!pkt) + break; + + repeating = 1; + } + + /* after flushing, send an EOF on all the filter inputs attached to the stream */ + /* except when looping we need to flush but not to send an EOF */ + if (!pkt && ist->decoding_needed && eof_reached && !no_eof) { + int ret = send_filter_eof(ist); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, "Error marking filters as finished\n"); + exit_program(1); + } + } + + /* handle stream copy */ + if (!ist->decoding_needed && pkt) { + ist->dts = ist->next_dts; + switch (ist->dec_ctx->codec_type) { + case AVMEDIA_TYPE_AUDIO: + av_assert1(pkt->duration >= 0); + if (ist->dec_ctx->sample_rate) { + ist->next_dts += ((int64_t)AV_TIME_BASE * ist->dec_ctx->frame_size) / + ist->dec_ctx->sample_rate; + } else { + ist->next_dts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q); + } + break; + case AVMEDIA_TYPE_VIDEO: + if (ist->framerate.num) { + // TODO: Remove work-around for c99-to-c89 issue 7 + AVRational time_base_q = AV_TIME_BASE_Q; + int64_t next_dts = av_rescale_q(ist->next_dts, time_base_q, av_inv_q(ist->framerate)); + ist->next_dts = av_rescale_q(next_dts + 1, av_inv_q(ist->framerate), time_base_q); + } else if (pkt->duration) { + ist->next_dts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q); + } else if(ist->dec_ctx->framerate.num != 0) { + int ticks= av_stream_get_parser(ist->st) ? av_stream_get_parser(ist->st)->repeat_pict + 1 : ist->dec_ctx->ticks_per_frame; + ist->next_dts += ((int64_t)AV_TIME_BASE * + ist->dec_ctx->framerate.den * ticks) / + ist->dec_ctx->framerate.num / ist->dec_ctx->ticks_per_frame; + } + break; + } + ist->pts = ist->dts; + ist->next_pts = ist->next_dts; + } + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = output_streams[i]; + + if (!check_output_constraints(ist, ost) || ost->encoding_needed) + continue; + + do_streamcopy(ist, ost, pkt); + } + + return !eof_reached; +} + +static void print_sdp(void) +{ + char sdp[16384]; + int i; + int j; + AVIOContext *sdp_pb; + AVFormatContext **avc; + + for (i = 0; i < nb_output_files; i++) { + if (!output_files[i]->header_written) + return; + } + + avc = av_malloc_array(nb_output_files, sizeof(*avc)); + if (!avc) + exit_program(1); + for (i = 0, j = 0; i < nb_output_files; i++) { + if (!strcmp(output_files[i]->ctx->oformat->name, "rtp")) { + avc[j] = output_files[i]->ctx; + j++; + } + } + + if (!j) + goto fail; + + av_sdp_create(avc, j, sdp, sizeof(sdp)); + + if (!sdp_filename) { + printf("SDP:\n%s\n", sdp); + fflush(stdout); + } else { + if (avio_open2(&sdp_pb, sdp_filename, AVIO_FLAG_WRITE, &int_cb, NULL) < 0) { + av_log(NULL, AV_LOG_ERROR, "Failed to open sdp file '%s'\n", sdp_filename); + } else { + avio_print(sdp_pb, sdp); + avio_closep(&sdp_pb); + av_freep(&sdp_filename); + } + } + +fail: + av_freep(&avc); +} + +static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat *pix_fmts) +{ + InputStream *ist = s->opaque; + const enum AVPixelFormat *p; + int ret; + + for (p = pix_fmts; *p != AV_PIX_FMT_NONE; p++) { + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(*p); + const AVCodecHWConfig *config = NULL; + int i; + + if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) + break; + + if (ist->hwaccel_id == HWACCEL_GENERIC || + ist->hwaccel_id == HWACCEL_AUTO) { + for (i = 0;; i++) { + config = avcodec_get_hw_config(s->codec, i); + if (!config) + break; + if (!(config->methods & + AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX)) + continue; + if (config->pix_fmt == *p) + break; + } + } + if (config) { + if (config->device_type != ist->hwaccel_device_type) { + // Different hwaccel offered, ignore. + continue; + } + + ret = hwaccel_decode_init(s); + if (ret < 0) { + if (ist->hwaccel_id == HWACCEL_GENERIC) { + av_log(NULL, AV_LOG_FATAL, + "%s hwaccel requested for input stream #%d:%d, " + "but cannot be initialized.\n", + av_hwdevice_get_type_name(config->device_type), + ist->file_index, ist->st->index); + return AV_PIX_FMT_NONE; + } + continue; + } + } else { + const HWAccel *hwaccel = NULL; + int i; + for (i = 0; hwaccels[i].name; i++) { + if (hwaccels[i].pix_fmt == *p) { + hwaccel = &hwaccels[i]; + break; + } + } + if (!hwaccel) { + // No hwaccel supporting this pixfmt. + continue; + } + if (hwaccel->id != ist->hwaccel_id) { + // Does not match requested hwaccel. + continue; + } + + ret = hwaccel->init(s); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, + "%s hwaccel requested for input stream #%d:%d, " + "but cannot be initialized.\n", hwaccel->name, + ist->file_index, ist->st->index); + return AV_PIX_FMT_NONE; + } + } + + if (ist->hw_frames_ctx) { + s->hw_frames_ctx = av_buffer_ref(ist->hw_frames_ctx); + if (!s->hw_frames_ctx) + return AV_PIX_FMT_NONE; + } + + ist->hwaccel_pix_fmt = *p; + break; + } + + return *p; +} + +static int get_buffer(AVCodecContext *s, AVFrame *frame, int flags) +{ + InputStream *ist = s->opaque; + + if (ist->hwaccel_get_buffer && frame->format == ist->hwaccel_pix_fmt) + return ist->hwaccel_get_buffer(s, frame, flags); + + return avcodec_default_get_buffer2(s, frame, flags); +} + +static int init_input_stream(int ist_index, char *error, int error_len) +{ + int ret; + InputStream *ist = input_streams[ist_index]; + + if (ist->decoding_needed) { + AVCodec *codec = ist->dec; + if (!codec) { + snprintf(error, error_len, "Decoder (codec %s) not found for input stream #%d:%d", + avcodec_get_name(ist->dec_ctx->codec_id), ist->file_index, ist->st->index); + return AVERROR(EINVAL); + } + + ist->dec_ctx->opaque = ist; + ist->dec_ctx->get_format = get_format; + ist->dec_ctx->get_buffer2 = get_buffer; + ist->dec_ctx->thread_safe_callbacks = 1; + + av_opt_set_int(ist->dec_ctx, "refcounted_frames", 1, 0); + if (ist->dec_ctx->codec_id == AV_CODEC_ID_DVB_SUBTITLE && + (ist->decoding_needed & DECODING_FOR_OST)) { + av_dict_set(&ist->decoder_opts, "compute_edt", "1", AV_DICT_DONT_OVERWRITE); + if (ist->decoding_needed & DECODING_FOR_FILTER) + av_log(NULL, AV_LOG_WARNING, "Warning using DVB subtitles for filtering and output at the same time is not fully supported, also see -compute_edt [0|1]\n"); + } + + av_dict_set(&ist->decoder_opts, "sub_text_format", "ass", AV_DICT_DONT_OVERWRITE); + + /* Useful for subtitles retiming by lavf (FIXME), skipping samples in + * audio, and video decoders such as cuvid or mediacodec */ + ist->dec_ctx->pkt_timebase = ist->st->time_base; + + if (!av_dict_get(ist->decoder_opts, "threads", NULL, 0)) + av_dict_set(&ist->decoder_opts, "threads", "auto", 0); + /* Attached pics are sparse, therefore we would not want to delay their decoding till EOF. */ + if (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC) + av_dict_set(&ist->decoder_opts, "threads", "1", 0); + + ret = hw_device_setup_for_decode(ist); + if (ret < 0) { + snprintf(error, error_len, "Device setup failed for " + "decoder on input stream #%d:%d : %s", + ist->file_index, ist->st->index, av_err2str(ret)); + return ret; + } + + if ((ret = avcodec_open2(ist->dec_ctx, codec, &ist->decoder_opts)) < 0) { + if (ret == AVERROR_EXPERIMENTAL) + abort_codec_experimental(codec, 0); + + snprintf(error, error_len, + "Error while opening decoder for input stream " + "#%d:%d : %s", + ist->file_index, ist->st->index, av_err2str(ret)); + return ret; + } + assert_avoptions(ist->decoder_opts); + } + + ist->next_pts = AV_NOPTS_VALUE; + ist->next_dts = AV_NOPTS_VALUE; + + return 0; +} + +static InputStream *get_input_stream(OutputStream *ost) +{ + if (ost->source_index >= 0) + return input_streams[ost->source_index]; + return NULL; +} + +static int compare_int64(const void *a, const void *b) +{ + return FFDIFFSIGN(*(const int64_t *)a, *(const int64_t *)b); +} + +/* open the muxer when all the streams are initialized */ +static int check_init_output_file(OutputFile *of, int file_index) +{ + int ret, i; + + for (i = 0; i < of->ctx->nb_streams; i++) { + OutputStream *ost = output_streams[of->ost_index + i]; + if (!ost->initialized) + return 0; + } + + of->ctx->interrupt_callback = int_cb; + + ret = avformat_write_header(of->ctx, &of->opts); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, + "Could not write header for output file #%d " + "(incorrect codec parameters ?): %s\n", + file_index, av_err2str(ret)); + return ret; + } + //assert_avoptions(of->opts); + of->header_written = 1; + + av_dump_format(of->ctx, file_index, of->ctx->url, 1); + + if (sdp_filename || want_sdp) + print_sdp(); + + /* flush the muxing queues */ + for (i = 0; i < of->ctx->nb_streams; i++) { + OutputStream *ost = output_streams[of->ost_index + i]; + + /* try to improve muxing time_base (only possible if nothing has been written yet) */ + if (!av_fifo_size(ost->muxing_queue)) + ost->mux_timebase = ost->st->time_base; + + while (av_fifo_size(ost->muxing_queue)) { + AVPacket pkt; + av_fifo_generic_read(ost->muxing_queue, &pkt, sizeof(pkt), NULL); + write_packet(of, &pkt, ost, 1); + } + } + + return 0; +} + +static int init_output_bsfs(OutputStream *ost) +{ + AVBSFContext *ctx = ost->bsf_ctx; + int ret; + + if (!ctx) + return 0; + + ret = avcodec_parameters_copy(ctx->par_in, ost->st->codecpar); + if (ret < 0) + return ret; + + ctx->time_base_in = ost->st->time_base; + + ret = av_bsf_init(ctx); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "Error initializing bitstream filter: %s\n", + ctx->filter->name); + return ret; + } + + ret = avcodec_parameters_copy(ost->st->codecpar, ctx->par_out); + if (ret < 0) + return ret; + ost->st->time_base = ctx->time_base_out; + + return 0; +} + +static int init_output_stream_streamcopy(OutputStream *ost) +{ + OutputFile *of = output_files[ost->file_index]; + InputStream *ist = get_input_stream(ost); + AVCodecParameters *par_dst = ost->st->codecpar; + AVCodecParameters *par_src = ost->ref_par; + AVRational sar; + int i, ret; + uint32_t codec_tag = par_dst->codec_tag; + + av_assert0(ist && !ost->filter); + + ret = avcodec_parameters_to_context(ost->enc_ctx, ist->st->codecpar); + if (ret >= 0) + ret = av_opt_set_dict(ost->enc_ctx, &ost->encoder_opts); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, + "Error setting up codec context options.\n"); + return ret; + } + + ret = avcodec_parameters_from_context(par_src, ost->enc_ctx); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, + "Error getting reference codec parameters.\n"); + return ret; + } + + if (!codec_tag) { + unsigned int codec_tag_tmp; + if (!of->ctx->oformat->codec_tag || + av_codec_get_id (of->ctx->oformat->codec_tag, par_src->codec_tag) == par_src->codec_id || + !av_codec_get_tag2(of->ctx->oformat->codec_tag, par_src->codec_id, &codec_tag_tmp)) + codec_tag = par_src->codec_tag; + } + + ret = avcodec_parameters_copy(par_dst, par_src); + if (ret < 0) + return ret; + + par_dst->codec_tag = codec_tag; + + if (!ost->frame_rate.num) + ost->frame_rate = ist->framerate; + ost->st->avg_frame_rate = ost->frame_rate; + + ret = avformat_transfer_internal_stream_timing_info(of->ctx->oformat, ost->st, ist->st, copy_tb); + if (ret < 0) + return ret; + + // copy timebase while removing common factors + if (ost->st->time_base.num <= 0 || ost->st->time_base.den <= 0) + ost->st->time_base = av_add_q(av_stream_get_codec_timebase(ost->st), (AVRational){0, 1}); + + // copy estimated duration as a hint to the muxer + if (ost->st->duration <= 0 && ist->st->duration > 0) + ost->st->duration = av_rescale_q(ist->st->duration, ist->st->time_base, ost->st->time_base); + + // copy disposition + ost->st->disposition = ist->st->disposition; + + if (ist->st->nb_side_data) { + for (i = 0; i < ist->st->nb_side_data; i++) { + const AVPacketSideData *sd_src = &ist->st->side_data[i]; + uint8_t *dst_data; + + dst_data = av_stream_new_side_data(ost->st, sd_src->type, sd_src->size); + if (!dst_data) + return AVERROR(ENOMEM); + memcpy(dst_data, sd_src->data, sd_src->size); + } + } + + if (ost->rotate_overridden) { + uint8_t *sd = av_stream_new_side_data(ost->st, AV_PKT_DATA_DISPLAYMATRIX, + sizeof(int32_t) * 9); + if (sd) + av_display_rotation_set((int32_t *)sd, -ost->rotate_override_value); + } + + switch (par_dst->codec_type) { + case AVMEDIA_TYPE_AUDIO: + if (audio_volume != 256) { + av_log(NULL, AV_LOG_FATAL, "-acodec copy and -vol are incompatible (frames are not decoded)\n"); + exit_program(1); + } + if((par_dst->block_align == 1 || par_dst->block_align == 1152 || par_dst->block_align == 576) && par_dst->codec_id == AV_CODEC_ID_MP3) + par_dst->block_align= 0; + if(par_dst->codec_id == AV_CODEC_ID_AC3) + par_dst->block_align= 0; + break; + case AVMEDIA_TYPE_VIDEO: + if (ost->frame_aspect_ratio.num) { // overridden by the -aspect cli option + sar = + av_mul_q(ost->frame_aspect_ratio, + (AVRational){ par_dst->height, par_dst->width }); + av_log(NULL, AV_LOG_WARNING, "Overriding aspect ratio " + "with stream copy may produce invalid files\n"); + } + else if (ist->st->sample_aspect_ratio.num) + sar = ist->st->sample_aspect_ratio; + else + sar = par_src->sample_aspect_ratio; + ost->st->sample_aspect_ratio = par_dst->sample_aspect_ratio = sar; + ost->st->avg_frame_rate = ist->st->avg_frame_rate; + ost->st->r_frame_rate = ist->st->r_frame_rate; + break; + } + + ost->mux_timebase = ist->st->time_base; + + return 0; +} + +static void set_encoder_id(OutputFile *of, OutputStream *ost) +{ + AVDictionaryEntry *e; + + uint8_t *encoder_string; + int encoder_string_len; + int format_flags = 0; + int codec_flags = ost->enc_ctx->flags; + + if (av_dict_get(ost->st->metadata, "encoder", NULL, 0)) + return; + + e = av_dict_get(of->opts, "fflags", NULL, 0); + if (e) { + const AVOption *o = av_opt_find(of->ctx, "fflags", NULL, 0, 0); + if (!o) + return; + av_opt_eval_flags(of->ctx, o, e->value, &format_flags); + } + e = av_dict_get(ost->encoder_opts, "flags", NULL, 0); + if (e) { + const AVOption *o = av_opt_find(ost->enc_ctx, "flags", NULL, 0, 0); + if (!o) + return; + av_opt_eval_flags(ost->enc_ctx, o, e->value, &codec_flags); + } + + encoder_string_len = sizeof(LIBAVCODEC_IDENT) + strlen(ost->enc->name) + 2; + encoder_string = av_mallocz(encoder_string_len); + if (!encoder_string) + exit_program(1); + + if (!(format_flags & AVFMT_FLAG_BITEXACT) && !(codec_flags & AV_CODEC_FLAG_BITEXACT)) + av_strlcpy(encoder_string, LIBAVCODEC_IDENT " ", encoder_string_len); + else + av_strlcpy(encoder_string, "Lavc ", encoder_string_len); + av_strlcat(encoder_string, ost->enc->name, encoder_string_len); + av_dict_set(&ost->st->metadata, "encoder", encoder_string, + AV_DICT_DONT_STRDUP_VAL | AV_DICT_DONT_OVERWRITE); +} + +static void parse_forced_key_frames(char *kf, OutputStream *ost, + AVCodecContext *avctx) +{ + char *p; + int n = 1, i, size, index = 0; + int64_t t, *pts; + + for (p = kf; *p; p++) + if (*p == ',') + n++; + size = n; + pts = av_malloc_array(size, sizeof(*pts)); + if (!pts) { + av_log(NULL, AV_LOG_FATAL, "Could not allocate forced key frames array.\n"); + exit_program(1); + } + + p = kf; + for (i = 0; i < n; i++) { + char *next = strchr(p, ','); + + if (next) + *next++ = 0; + + if (!memcmp(p, "chapters", 8)) { + + AVFormatContext *avf = output_files[ost->file_index]->ctx; + int j; + + if (avf->nb_chapters > INT_MAX - size || + !(pts = av_realloc_f(pts, size += avf->nb_chapters - 1, + sizeof(*pts)))) { + av_log(NULL, AV_LOG_FATAL, + "Could not allocate forced key frames array.\n"); + exit_program(1); + } + t = p[8] ? parse_time_or_die("force_key_frames", p + 8, 1) : 0; + t = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base); + + for (j = 0; j < avf->nb_chapters; j++) { + AVChapter *c = avf->chapters[j]; + av_assert1(index < size); + pts[index++] = av_rescale_q(c->start, c->time_base, + avctx->time_base) + t; + } + + } else { + + t = parse_time_or_die("force_key_frames", p, 1); + av_assert1(index < size); + pts[index++] = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base); + + } + + p = next; + } + + av_assert0(index == size); + qsort(pts, size, sizeof(*pts), compare_int64); + ost->forced_kf_count = size; + ost->forced_kf_pts = pts; +} + +static void init_encoder_time_base(OutputStream *ost, AVRational default_time_base) +{ + InputStream *ist = get_input_stream(ost); + AVCodecContext *enc_ctx = ost->enc_ctx; + AVFormatContext *oc; + + if (ost->enc_timebase.num > 0) { + enc_ctx->time_base = ost->enc_timebase; + return; + } + + if (ost->enc_timebase.num < 0) { + if (ist) { + enc_ctx->time_base = ist->st->time_base; + return; + } + + oc = output_files[ost->file_index]->ctx; + av_log(oc, AV_LOG_WARNING, "Input stream data not available, using default time base\n"); + } + + enc_ctx->time_base = default_time_base; +} + +static int init_output_stream_encode(OutputStream *ost) +{ + InputStream *ist = get_input_stream(ost); + AVCodecContext *enc_ctx = ost->enc_ctx; + AVCodecContext *dec_ctx = NULL; + AVFormatContext *oc = output_files[ost->file_index]->ctx; + int j, ret; + + set_encoder_id(output_files[ost->file_index], ost); + + // Muxers use AV_PKT_DATA_DISPLAYMATRIX to signal rotation. On the other + // hand, the legacy API makes demuxers set "rotate" metadata entries, + // which have to be filtered out to prevent leaking them to output files. + av_dict_set(&ost->st->metadata, "rotate", NULL, 0); + + if (ist) { + ost->st->disposition = ist->st->disposition; + + dec_ctx = ist->dec_ctx; + + enc_ctx->chroma_sample_location = dec_ctx->chroma_sample_location; + } else { + for (j = 0; j < oc->nb_streams; j++) { + AVStream *st = oc->streams[j]; + if (st != ost->st && st->codecpar->codec_type == ost->st->codecpar->codec_type) + break; + } + if (j == oc->nb_streams) + if (ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || + ost->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) + ost->st->disposition = AV_DISPOSITION_DEFAULT; + } + + if (enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO) { + if (!ost->frame_rate.num) + ost->frame_rate = av_buffersink_get_frame_rate(ost->filter->filter); + if (ist && !ost->frame_rate.num) + ost->frame_rate = ist->framerate; + if (ist && !ost->frame_rate.num) + ost->frame_rate = ist->st->r_frame_rate; + if (ist && !ost->frame_rate.num) { + ost->frame_rate = (AVRational){25, 1}; + av_log(NULL, AV_LOG_WARNING, + "No information " + "about the input framerate is available. Falling " + "back to a default value of 25fps for output stream #%d:%d. Use the -r option " + "if you want a different framerate.\n", + ost->file_index, ost->index); + } + + if (ost->enc->supported_framerates && !ost->force_fps) { + int idx = av_find_nearest_q_idx(ost->frame_rate, ost->enc->supported_framerates); + ost->frame_rate = ost->enc->supported_framerates[idx]; + } + // reduce frame rate for mpeg4 to be within the spec limits + if (enc_ctx->codec_id == AV_CODEC_ID_MPEG4) { + av_reduce(&ost->frame_rate.num, &ost->frame_rate.den, + ost->frame_rate.num, ost->frame_rate.den, 65535); + } + } + + switch (enc_ctx->codec_type) { + case AVMEDIA_TYPE_AUDIO: + enc_ctx->sample_fmt = av_buffersink_get_format(ost->filter->filter); + if (dec_ctx) + enc_ctx->bits_per_raw_sample = FFMIN(dec_ctx->bits_per_raw_sample, + av_get_bytes_per_sample(enc_ctx->sample_fmt) << 3); + enc_ctx->sample_rate = av_buffersink_get_sample_rate(ost->filter->filter); + enc_ctx->channel_layout = av_buffersink_get_channel_layout(ost->filter->filter); + enc_ctx->channels = av_buffersink_get_channels(ost->filter->filter); + + init_encoder_time_base(ost, av_make_q(1, enc_ctx->sample_rate)); + break; + + case AVMEDIA_TYPE_VIDEO: + init_encoder_time_base(ost, av_inv_q(ost->frame_rate)); + + if (!(enc_ctx->time_base.num && enc_ctx->time_base.den)) + enc_ctx->time_base = av_buffersink_get_time_base(ost->filter->filter); + if ( av_q2d(enc_ctx->time_base) < 0.001 && video_sync_method != VSYNC_PASSTHROUGH + && (video_sync_method == VSYNC_CFR || video_sync_method == VSYNC_VSCFR || (video_sync_method == VSYNC_AUTO && !(oc->oformat->flags & AVFMT_VARIABLE_FPS)))){ + av_log(oc, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n" + "Please consider specifying a lower framerate, a different muxer or -vsync 2\n"); + } + + enc_ctx->width = av_buffersink_get_w(ost->filter->filter); + enc_ctx->height = av_buffersink_get_h(ost->filter->filter); + enc_ctx->sample_aspect_ratio = ost->st->sample_aspect_ratio = + ost->frame_aspect_ratio.num ? // overridden by the -aspect cli option + av_mul_q(ost->frame_aspect_ratio, (AVRational){ enc_ctx->height, enc_ctx->width }) : + av_buffersink_get_sample_aspect_ratio(ost->filter->filter); + + enc_ctx->pix_fmt = av_buffersink_get_format(ost->filter->filter); + if (dec_ctx) + enc_ctx->bits_per_raw_sample = FFMIN(dec_ctx->bits_per_raw_sample, + av_pix_fmt_desc_get(enc_ctx->pix_fmt)->comp[0].depth); + + enc_ctx->framerate = ost->frame_rate; + + ost->st->avg_frame_rate = ost->frame_rate; + + if (!dec_ctx || + enc_ctx->width != dec_ctx->width || + enc_ctx->height != dec_ctx->height || + enc_ctx->pix_fmt != dec_ctx->pix_fmt) { + enc_ctx->bits_per_raw_sample = frame_bits_per_raw_sample; + } + + if (ost->top_field_first == 0) { + enc_ctx->field_order = AV_FIELD_BB; + } else if (ost->top_field_first == 1) { + enc_ctx->field_order = AV_FIELD_TT; + } + + if (ost->forced_keyframes) { + if (!strncmp(ost->forced_keyframes, "expr:", 5)) { + ret = av_expr_parse(&ost->forced_keyframes_pexpr, ost->forced_keyframes+5, + forced_keyframes_const_names, NULL, NULL, NULL, NULL, 0, NULL); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, + "Invalid force_key_frames expression '%s'\n", ost->forced_keyframes+5); + return ret; + } + ost->forced_keyframes_expr_const_values[FKF_N] = 0; + ost->forced_keyframes_expr_const_values[FKF_N_FORCED] = 0; + ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N] = NAN; + ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_T] = NAN; + + // Don't parse the 'forced_keyframes' in case of 'keep-source-keyframes', + // parse it only for static kf timings + } else if(strncmp(ost->forced_keyframes, "source", 6)) { + parse_forced_key_frames(ost->forced_keyframes, ost, ost->enc_ctx); + } + } + break; + case AVMEDIA_TYPE_SUBTITLE: + enc_ctx->time_base = AV_TIME_BASE_Q; + if (!enc_ctx->width) { + enc_ctx->width = input_streams[ost->source_index]->st->codecpar->width; + enc_ctx->height = input_streams[ost->source_index]->st->codecpar->height; + } + break; + case AVMEDIA_TYPE_DATA: + break; + default: + abort(); + break; + } + + ost->mux_timebase = enc_ctx->time_base; + + return 0; +} + +static int init_output_stream(OutputStream *ost, char *error, int error_len) +{ + int ret = 0; + + if (ost->encoding_needed) { + AVCodec *codec = ost->enc; + AVCodecContext *dec = NULL; + InputStream *ist; + + ret = init_output_stream_encode(ost); + if (ret < 0) + return ret; + + if ((ist = get_input_stream(ost))) + dec = ist->dec_ctx; + if (dec && dec->subtitle_header) { + /* ASS code assumes this buffer is null terminated so add extra byte. */ + ost->enc_ctx->subtitle_header = av_mallocz(dec->subtitle_header_size + 1); + if (!ost->enc_ctx->subtitle_header) + return AVERROR(ENOMEM); + memcpy(ost->enc_ctx->subtitle_header, dec->subtitle_header, dec->subtitle_header_size); + ost->enc_ctx->subtitle_header_size = dec->subtitle_header_size; + } + if (!av_dict_get(ost->encoder_opts, "threads", NULL, 0)) + av_dict_set(&ost->encoder_opts, "threads", "auto", 0); + if (ost->enc->type == AVMEDIA_TYPE_AUDIO && + !codec->defaults && + !av_dict_get(ost->encoder_opts, "b", NULL, 0) && + !av_dict_get(ost->encoder_opts, "ab", NULL, 0)) + av_dict_set(&ost->encoder_opts, "b", "128000", 0); + + ret = hw_device_setup_for_encode(ost); + if (ret < 0) { + snprintf(error, error_len, "Device setup failed for " + "encoder on output stream #%d:%d : %s", + ost->file_index, ost->index, av_err2str(ret)); + return ret; + } + + if (ist && ist->dec->type == AVMEDIA_TYPE_SUBTITLE && ost->enc->type == AVMEDIA_TYPE_SUBTITLE) { + int input_props = 0, output_props = 0; + AVCodecDescriptor const *input_descriptor = + avcodec_descriptor_get(dec->codec_id); + AVCodecDescriptor const *output_descriptor = + avcodec_descriptor_get(ost->enc_ctx->codec_id); + if (input_descriptor) + input_props = input_descriptor->props & (AV_CODEC_PROP_TEXT_SUB | AV_CODEC_PROP_BITMAP_SUB); + if (output_descriptor) + output_props = output_descriptor->props & (AV_CODEC_PROP_TEXT_SUB | AV_CODEC_PROP_BITMAP_SUB); + if (input_props && output_props && input_props != output_props) { + snprintf(error, error_len, + "Subtitle encoding currently only possible from text to text " + "or bitmap to bitmap"); + return AVERROR_INVALIDDATA; + } + } + + if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) < 0) { + if (ret == AVERROR_EXPERIMENTAL) + abort_codec_experimental(codec, 1); + snprintf(error, error_len, + "Error while opening encoder for output stream #%d:%d - " + "maybe incorrect parameters such as bit_rate, rate, width or height", + ost->file_index, ost->index); + return ret; + } + if (ost->enc->type == AVMEDIA_TYPE_AUDIO && + !(ost->enc->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE)) + av_buffersink_set_frame_size(ost->filter->filter, + ost->enc_ctx->frame_size); + assert_avoptions(ost->encoder_opts); + if (ost->enc_ctx->bit_rate && ost->enc_ctx->bit_rate < 1000 && + ost->enc_ctx->codec_id != AV_CODEC_ID_CODEC2 /* don't complain about 700 bit/s modes */) + av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low." + " It takes bits/s as argument, not kbits/s\n"); + + ret = avcodec_parameters_from_context(ost->st->codecpar, ost->enc_ctx); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, + "Error initializing the output stream codec context.\n"); + exit_program(1); + } + /* + * FIXME: ost->st->codec should't be needed here anymore. + */ + ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx); + if (ret < 0) + return ret; + + if (ost->enc_ctx->nb_coded_side_data) { + int i; + + for (i = 0; i < ost->enc_ctx->nb_coded_side_data; i++) { + const AVPacketSideData *sd_src = &ost->enc_ctx->coded_side_data[i]; + uint8_t *dst_data; + + dst_data = av_stream_new_side_data(ost->st, sd_src->type, sd_src->size); + if (!dst_data) + return AVERROR(ENOMEM); + memcpy(dst_data, sd_src->data, sd_src->size); + } + } + + /* + * Add global input side data. For now this is naive, and copies it + * from the input stream's global side data. All side data should + * really be funneled over AVFrame and libavfilter, then added back to + * packet side data, and then potentially using the first packet for + * global side data. + */ + if (ist) { + int i; + for (i = 0; i < ist->st->nb_side_data; i++) { + AVPacketSideData *sd = &ist->st->side_data[i]; + if (sd->type != AV_PKT_DATA_CPB_PROPERTIES) { + uint8_t *dst = av_stream_new_side_data(ost->st, sd->type, sd->size); + if (!dst) + return AVERROR(ENOMEM); + memcpy(dst, sd->data, sd->size); + if (ist->autorotate && sd->type == AV_PKT_DATA_DISPLAYMATRIX) + av_display_rotation_set((uint32_t *)dst, 0); + } + } + } + + // copy timebase while removing common factors + if (ost->st->time_base.num <= 0 || ost->st->time_base.den <= 0) + ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0, 1}); + + // copy estimated duration as a hint to the muxer + if (ost->st->duration <= 0 && ist && ist->st->duration > 0) + ost->st->duration = av_rescale_q(ist->st->duration, ist->st->time_base, ost->st->time_base); + + ost->st->codec->codec= ost->enc_ctx->codec; + } else if (ost->stream_copy) { + ret = init_output_stream_streamcopy(ost); + if (ret < 0) + return ret; + } + + // parse user provided disposition, and update stream values + if (ost->disposition) { + static const AVOption opts[] = { + { "disposition" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" }, + { "default" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEFAULT }, .unit = "flags" }, + { "dub" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DUB }, .unit = "flags" }, + { "original" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ORIGINAL }, .unit = "flags" }, + { "comment" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_COMMENT }, .unit = "flags" }, + { "lyrics" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_LYRICS }, .unit = "flags" }, + { "karaoke" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_KARAOKE }, .unit = "flags" }, + { "forced" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_FORCED }, .unit = "flags" }, + { "hearing_impaired" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_HEARING_IMPAIRED }, .unit = "flags" }, + { "visual_impaired" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_VISUAL_IMPAIRED }, .unit = "flags" }, + { "clean_effects" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CLEAN_EFFECTS }, .unit = "flags" }, + { "attached_pic" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ATTACHED_PIC }, .unit = "flags" }, + { "captions" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CAPTIONS }, .unit = "flags" }, + { "descriptions" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DESCRIPTIONS }, .unit = "flags" }, + { "dependent" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEPENDENT }, .unit = "flags" }, + { "metadata" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, .unit = "flags" }, + { NULL }, + }; + static const AVClass class = { + .class_name = "", + .item_name = av_default_item_name, + .option = opts, + .version = LIBAVUTIL_VERSION_INT, + }; + const AVClass *pclass = &class; + + ret = av_opt_eval_flags(&pclass, &opts[0], ost->disposition, &ost->st->disposition); + if (ret < 0) + return ret; + } + + /* initialize bitstream filters for the output stream + * needs to be done here, because the codec id for streamcopy is not + * known until now */ + ret = init_output_bsfs(ost); + if (ret < 0) + return ret; + + ost->initialized = 1; + + ret = check_init_output_file(output_files[ost->file_index], ost->file_index); + if (ret < 0) + return ret; + + return ret; +} + +static void report_new_stream(int input_index, AVPacket *pkt) +{ + InputFile *file = input_files[input_index]; + AVStream *st = file->ctx->streams[pkt->stream_index]; + + if (pkt->stream_index < file->nb_streams_warn) + return; + av_log(file->ctx, AV_LOG_WARNING, + "New %s stream %d:%d at pos:%"PRId64" and DTS:%ss\n", + av_get_media_type_string(st->codecpar->codec_type), + input_index, pkt->stream_index, + pkt->pos, av_ts2timestr(pkt->dts, &st->time_base)); + file->nb_streams_warn = pkt->stream_index + 1; +} + +static int transcode_init(void) +{ + int ret = 0, i, j, k; + AVFormatContext *oc; + OutputStream *ost; + InputStream *ist; + char error[1024] = {0}; + + for (i = 0; i < nb_filtergraphs; i++) { + FilterGraph *fg = filtergraphs[i]; + for (j = 0; j < fg->nb_outputs; j++) { + OutputFilter *ofilter = fg->outputs[j]; + if (!ofilter->ost || ofilter->ost->source_index >= 0) + continue; + if (fg->nb_inputs != 1) + continue; + for (k = nb_input_streams-1; k >= 0 ; k--) + if (fg->inputs[0]->ist == input_streams[k]) + break; + ofilter->ost->source_index = k; + } + } + + /* init framerate emulation */ + for (i = 0; i < nb_input_files; i++) { + InputFile *ifile = input_files[i]; + if (ifile->rate_emu) + for (j = 0; j < ifile->nb_streams; j++) + input_streams[j + ifile->ist_index]->start = av_gettime_relative(); + } + + /* init input streams */ + for (i = 0; i < nb_input_streams; i++) + if ((ret = init_input_stream(i, error, sizeof(error))) < 0) { + for (i = 0; i < nb_output_streams; i++) { + ost = output_streams[i]; + avcodec_close(ost->enc_ctx); + } + goto dump_format; + } + + /* open each encoder */ + for (i = 0; i < nb_output_streams; i++) { + // skip streams fed from filtergraphs until we have a frame for them + if (output_streams[i]->filter) + continue; + + ret = init_output_stream(output_streams[i], error, sizeof(error)); + if (ret < 0) + goto dump_format; + } + + /* discard unused programs */ + for (i = 0; i < nb_input_files; i++) { + InputFile *ifile = input_files[i]; + for (j = 0; j < ifile->ctx->nb_programs; j++) { + AVProgram *p = ifile->ctx->programs[j]; + int discard = AVDISCARD_ALL; + + for (k = 0; k < p->nb_stream_indexes; k++) + if (!input_streams[ifile->ist_index + p->stream_index[k]]->discard) { + discard = AVDISCARD_DEFAULT; + break; + } + p->discard = discard; + } + } + + /* write headers for files with no streams */ + for (i = 0; i < nb_output_files; i++) { + oc = output_files[i]->ctx; + if (oc->oformat->flags & AVFMT_NOSTREAMS && oc->nb_streams == 0) { + ret = check_init_output_file(output_files[i], i); + if (ret < 0) + goto dump_format; + } + } + + dump_format: + /* dump the stream mapping */ + av_log(NULL, AV_LOG_INFO, "Stream mapping:\n"); + for (i = 0; i < nb_input_streams; i++) { + ist = input_streams[i]; + + for (j = 0; j < ist->nb_filters; j++) { + if (!filtergraph_is_simple(ist->filters[j]->graph)) { + av_log(NULL, AV_LOG_INFO, " Stream #%d:%d (%s) -> %s", + ist->file_index, ist->st->index, ist->dec ? ist->dec->name : "?", + ist->filters[j]->name); + if (nb_filtergraphs > 1) + av_log(NULL, AV_LOG_INFO, " (graph %d)", ist->filters[j]->graph->index); + av_log(NULL, AV_LOG_INFO, "\n"); + } + } + } + + for (i = 0; i < nb_output_streams; i++) { + ost = output_streams[i]; + + if (ost->attachment_filename) { + /* an attached file */ + av_log(NULL, AV_LOG_INFO, " File %s -> Stream #%d:%d\n", + ost->attachment_filename, ost->file_index, ost->index); + continue; + } + + if (ost->filter && !filtergraph_is_simple(ost->filter->graph)) { + /* output from a complex graph */ + av_log(NULL, AV_LOG_INFO, " %s", ost->filter->name); + if (nb_filtergraphs > 1) + av_log(NULL, AV_LOG_INFO, " (graph %d)", ost->filter->graph->index); + + av_log(NULL, AV_LOG_INFO, " -> Stream #%d:%d (%s)\n", ost->file_index, + ost->index, ost->enc ? ost->enc->name : "?"); + continue; + } + + av_log(NULL, AV_LOG_INFO, " Stream #%d:%d -> #%d:%d", + input_streams[ost->source_index]->file_index, + input_streams[ost->source_index]->st->index, + ost->file_index, + ost->index); + if (ost->sync_ist != input_streams[ost->source_index]) + av_log(NULL, AV_LOG_INFO, " [sync #%d:%d]", + ost->sync_ist->file_index, + ost->sync_ist->st->index); + if (ost->stream_copy) + av_log(NULL, AV_LOG_INFO, " (copy)"); + else { + const AVCodec *in_codec = input_streams[ost->source_index]->dec; + const AVCodec *out_codec = ost->enc; + const char *decoder_name = "?"; + const char *in_codec_name = "?"; + const char *encoder_name = "?"; + const char *out_codec_name = "?"; + const AVCodecDescriptor *desc; + + if (in_codec) { + decoder_name = in_codec->name; + desc = avcodec_descriptor_get(in_codec->id); + if (desc) + in_codec_name = desc->name; + if (!strcmp(decoder_name, in_codec_name)) + decoder_name = "native"; + } + + if (out_codec) { + encoder_name = out_codec->name; + desc = avcodec_descriptor_get(out_codec->id); + if (desc) + out_codec_name = desc->name; + if (!strcmp(encoder_name, out_codec_name)) + encoder_name = "native"; + } + + av_log(NULL, AV_LOG_INFO, " (%s (%s) -> %s (%s))", + in_codec_name, decoder_name, + out_codec_name, encoder_name); + } + av_log(NULL, AV_LOG_INFO, "\n"); + } + + if (ret) { + av_log(NULL, AV_LOG_ERROR, "%s\n", error); + return ret; + } + + atomic_store(&transcode_init_done, 1); + + return 0; +} + +/* Return 1 if there remain streams where more output is wanted, 0 otherwise. */ +static int need_output(void) +{ + int i; + + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = output_streams[i]; + OutputFile *of = output_files[ost->file_index]; + AVFormatContext *os = output_files[ost->file_index]->ctx; + + if (ost->finished || + (os->pb && avio_tell(os->pb) >= of->limit_filesize)) + continue; + if (ost->frame_number >= ost->max_frames) { + int j; + for (j = 0; j < of->ctx->nb_streams; j++) + close_output_stream(output_streams[of->ost_index + j]); + continue; + } + + return 1; + } + + return 0; +} + +/** + * Select the output stream to process. + * + * @return selected output stream, or NULL if none available + */ +static OutputStream *choose_output(void) +{ + int i; + int64_t opts_min = INT64_MAX; + OutputStream *ost_min = NULL; + + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = output_streams[i]; + int64_t opts = ost->st->cur_dts == AV_NOPTS_VALUE ? INT64_MIN : + av_rescale_q(ost->st->cur_dts, ost->st->time_base, + AV_TIME_BASE_Q); + if (ost->st->cur_dts == AV_NOPTS_VALUE) + av_log(NULL, AV_LOG_DEBUG, + "cur_dts is invalid st:%d (%d) [init:%d i_done:%d finish:%d] (this is harmless if it occurs once at the start per stream)\n", + ost->st->index, ost->st->id, ost->initialized, ost->inputs_done, ost->finished); + + if (!ost->initialized && !ost->inputs_done) + return ost; + + if (!ost->finished && opts < opts_min) { + opts_min = opts; + ost_min = ost->unavailable ? NULL : ost; + } + } + return ost_min; +} + +static void set_tty_echo(int on) +{ +#if HAVE_TERMIOS_H + struct termios tty; + if (tcgetattr(0, &tty) == 0) { + if (on) tty.c_lflag |= ECHO; + else tty.c_lflag &= ~ECHO; + tcsetattr(0, TCSANOW, &tty); + } +#endif +} + +static int check_keyboard_interaction(int64_t cur_time) +{ + int i, ret, key; + static int64_t last_time; + if (received_nb_signals) + return AVERROR_EXIT; + /* read_key() returns 0 on EOF */ + if(cur_time - last_time >= 100000 && !run_as_daemon){ + key = read_key(); + last_time = cur_time; + }else + key = -1; + if (key == 'q') + return AVERROR_EXIT; + if (key == '+') av_log_set_level(av_log_get_level()+10); + if (key == '-') av_log_set_level(av_log_get_level()-10); + if (key == 's') qp_hist ^= 1; + if (key == 'h'){ + if (do_hex_dump){ + do_hex_dump = do_pkt_dump = 0; + } else if(do_pkt_dump){ + do_hex_dump = 1; + } else + do_pkt_dump = 1; + av_log_set_level(AV_LOG_DEBUG); + } + if (key == 'c' || key == 'C'){ + char buf[4096], target[64], command[256], arg[256] = {0}; + double time; + int k, n = 0; + fprintf(stderr, "\nEnter command: |all + License + MIT + Title + DDFFmpegKit_Private + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2023 DDIsFriend <DDIsFriend@163.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources-Debug-input-files.xcfilelist b/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources-Debug-input-files.xcfilelist index 47bc803..e962124 100644 --- a/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources-Debug-input-files.xcfilelist +++ b/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources-Debug-input-files.xcfilelist @@ -3,182 +3,6 @@ ${PODS_ROOT}/AMapNavi-NO-IDFA/AMapNaviKit.framework/AMapNavi.bundle ${PODS_ROOT}/AMapNavi-NO-IDFA/AMapNaviKit.framework/AMap.bundle ${PODS_ROOT}/BRPickerView/BRPickerView/AddressPickerView/BRAddressPickerView.bundle ${PODS_ROOT}/BRPickerView/BRPickerView/Base/BRPickerView.bundle -${PODS_ROOT}/CocoaDebug/Sources/Resources/App.storyboard -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_css.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_css@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_css@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_db.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_db@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_db@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_default.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_default@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_default@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_html.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_html@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_html@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_java.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_java@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_java@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_js.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_js@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_js@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_json.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_json@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_json@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_md.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_md@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_md@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_php.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_php@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_php@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_png.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_png@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_png@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip@3x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_app@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_bugs@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_close@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_down@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_logs@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_mail@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_network@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_sandbox@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_up@2x.png -${PODS_ROOT}/CocoaDebug/Sources/Resources/Logs.storyboard -${PODS_ROOT}/CocoaDebug/Sources/Resources/Manager.storyboard -${PODS_ROOT}/CocoaDebug/Sources/Resources/Network.storyboard -${PODS_ROOT}/CocoaDebug/Sources/Resources/NetworkCell.xib ${PODS_CONFIGURATION_BUILD_DIR}/DDBasicControlsKit_Private/DDBaseViewController.bundle ${PODS_CONFIGURATION_BUILD_DIR}/DDMAMapKit_Private/DDMAMapKit_Private.bundle ${PODS_ROOT}/DDZFPlayerKit_Private/DDZFPlayerKit_Private/Classes/ControlView/ZFPlayer.bundle diff --git a/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources-Debug-output-files.xcfilelist b/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources-Debug-output-files.xcfilelist index 99e3940..67d8924 100644 --- a/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources-Debug-output-files.xcfilelist +++ b/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources-Debug-output-files.xcfilelist @@ -2,182 +2,6 @@ ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AMapNavi.bundle ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AMap.bundle ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/BRAddressPickerView.bundle ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/BRPickerView.bundle -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/App.storyboardc -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_7z.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_7z@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_7z@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_aac.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_aac@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_aac@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_apk.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_apk@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_apk@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_avi.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_avi@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_avi@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_bin.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_bin@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_bin@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_bmp.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_bmp@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_bmp@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_css.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_css@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_css@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_dat.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_dat@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_dat@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_db.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_db@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_db@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_default.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_default@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_default@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_dll.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_dll@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_dll@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_dmg.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_dmg@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_dmg@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_doc.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_doc@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_doc@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_eps.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_eps@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_eps@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_fla.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_fla@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_fla@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_flv.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_flv@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_flv@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_folder_empty.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_folder_empty@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_folder_empty@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_folder_not_empty.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_folder_not_empty@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_folder_not_empty@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_gif.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_gif@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_gif@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_html.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_html@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_html@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ipa.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ipa@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ipa@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_jar.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_jar@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_jar@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_java.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_java@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_java@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_jpg.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_jpg@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_jpg@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_js.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_js@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_js@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_json.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_json@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_json@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_keynote.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_keynote@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_keynote@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_md.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_md@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_md@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_midi.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_midi@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_midi@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mov.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mov@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mov@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mp3.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mp3@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mp3@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mp4.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mp4@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mp4@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mpg.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mpg@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_mpg@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_numbers.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_numbers@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_numbers@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ogg.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ogg@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ogg@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_pages.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_pages@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_pages@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_pdf.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_pdf@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_pdf@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_php.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_php@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_php@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_plist.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_plist@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_plist@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_png.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_png@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_png@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ppt.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ppt@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ppt@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_psd.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_psd@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_psd@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_sql.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_sql@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_sql@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_svg.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_svg@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_svg@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_swift.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_swift@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_swift@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_tif.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_tif@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_tif@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_torrent.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_torrent@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_torrent@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ttf.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ttf@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_ttf@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_txt.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_txt@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_txt@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_wav.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_wav@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_wav@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_wmv.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_wmv@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_wmv@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_xls.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_xls@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_xls@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_xml.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_xml@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_xml@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_zip.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_zip@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/icon_file_type_zip@3x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/_icon_file_type_app@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/_icon_file_type_bugs@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/_icon_file_type_close@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/_icon_file_type_down@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/_icon_file_type_logs@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/_icon_file_type_mail@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/_icon_file_type_network@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/_icon_file_type_sandbox@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/_icon_file_type_up@2x.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Logs.storyboardc -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Manager.storyboardc -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Network.storyboardc -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/NetworkCell.nib ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DDBaseViewController.bundle ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DDMAMapKit_Private.bundle ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ZFPlayer.bundle diff --git a/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources.sh b/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources.sh index b3bbdb3..3283a81 100755 --- a/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources.sh +++ b/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling-resources.sh @@ -101,182 +101,6 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then install_resource "${PODS_ROOT}/AMapNavi-NO-IDFA/AMapNaviKit.framework/AMap.bundle" install_resource "${PODS_ROOT}/BRPickerView/BRPickerView/AddressPickerView/BRAddressPickerView.bundle" install_resource "${PODS_ROOT}/BRPickerView/BRPickerView/Base/BRPickerView.bundle" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/App.storyboard" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_7z@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_aac@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_apk@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_avi@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bin@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_bmp@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_css.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_css@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_css@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dat@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_db.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_db@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_db@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_default.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_default@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_default@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dll@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_dmg@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_doc@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_eps@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_fla@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_flv@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_empty@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_folder_not_empty@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_gif@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_html.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_html@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_html@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ipa@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jar@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_java.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_java@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_java@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_jpg@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_js.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_js@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_js@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_json.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_json@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_json@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_keynote@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_md.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_md@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_md@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_midi@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mov@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp3@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mp4@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_mpg@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_numbers@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ogg@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pages@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_pdf@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_php.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_php@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_php@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_plist@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_png.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_png@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_png@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ppt@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_psd@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_sql@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_svg@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_swift@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_tif@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_torrent@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_ttf@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_txt@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wav@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_wmv@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xls@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_xml@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/FileType/icon_file_type_zip@3x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_app@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_bugs@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_close@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_down@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_logs@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_mail@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_network@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_sandbox@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/images/_icon_file_type_up@2x.png" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/Logs.storyboard" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/Manager.storyboard" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/Network.storyboard" - install_resource "${PODS_ROOT}/CocoaDebug/Sources/Resources/NetworkCell.xib" install_resource "${PODS_CONFIGURATION_BUILD_DIR}/DDBasicControlsKit_Private/DDBaseViewController.bundle" install_resource "${PODS_CONFIGURATION_BUILD_DIR}/DDMAMapKit_Private/DDMAMapKit_Private.bundle" install_resource "${PODS_ROOT}/DDZFPlayerKit_Private/DDZFPlayerKit_Private/Classes/ControlView/ZFPlayer.bundle" diff --git a/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling.debug.xcconfig b/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling.debug.xcconfig index 6f2e86d..ded8379 100644 --- a/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling.debug.xcconfig +++ b/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling.debug.xcconfig @@ -4,15 +4,15 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64 FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AMapFoundation-NO-IDFA" "${PODS_ROOT}/AMapLocation-NO-IDFA" "${PODS_ROOT}/AMapNavi-NO-IDFA" "${PODS_ROOT}/AMapSearch-NO-IDFA" "${PODS_ROOT}/AMapTrack-NO-IDFA" "${PODS_ROOT}/DDZFPlayerKit_Private/DDZFPlayerKit_Private/Classes/ijkplayer" "${PODS_ROOT}/JCore" "${PODS_ROOT}/JPush" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/CocoaDebug" "${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private" "${PODS_ROOT}/Headers/Public/DDCategoryKit_Private" "${PODS_ROOT}/Headers/Public/DDLogKit_Private" "${PODS_ROOT}/Headers/Public/DDMAMapKit_Private" "${PODS_ROOT}/Headers/Public/DDProgressHUDKit_Private" "${PODS_ROOT}/Headers/Public/DDTimerKit_Private" "${PODS_ROOT}/Headers/Public/DDWebImageKit_Private" "${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private" "${PODS_ROOT}/Headers/Public/JXCategoryView" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RxCocoa" "${PODS_ROOT}/Headers/Public/ZLPhotoBrowser" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush/Headers" -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/BRPickerView" "${PODS_CONFIGURATION_BUILD_DIR}/CocoaDebug" "${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDBasicControlsKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDCategoryKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDMAMapKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDTimerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDWebImageKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDZFPlayerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/JXCategoryView" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit" "${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush" /usr/lib/swift $(SDKROOT)/usr/lib/swift -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CocoaDebug/CocoaDebug.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private/DDAutoUIKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private/DDColorKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private/DDControlsKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private/DDFontKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private/DDLogKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private/DDNetworkingOfAlamofireKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private/DDProgressHUDKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private/DDToastKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift/ESTabBarController_swift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/BRPickerView/BRPickerView.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private/DDBasicControlsKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDCategoryKit_Private/DDCategoryKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDMAMapKit_Private/DDMAMapKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDTimerKit_Private/DDTimerKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDWebImageKit_Private/DDWebImageKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private/DDZFPlayerKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/JXCategoryView/JXCategoryView.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/MJRefresh/MJRefresh.modulemap" -OTHER_LDFLAGS = $(inherited) -ObjC -l"Alamofire" -l"BRPickerView" -l"CocoaDebug" -l"DDAudioPlayerKit_Private" -l"DDAutoUIKit_Private" -l"DDBasicControlsKit_Private" -l"DDCategoryKit_Private" -l"DDColorKit_Private" -l"DDControlsKit_Private" -l"DDFontKit_Private" -l"DDLogKit_Private" -l"DDMAMapKit_Private" -l"DDNetworkingOfAlamofireKit_Private" -l"DDProgressHUDKit_Private" -l"DDTimerKit_Private" -l"DDToastKit_Private" -l"DDWebImageKit_Private" -l"DDZFPlayerKit_Private" -l"ESTabBarController-swift" -l"IQKeyboardManagerSwift" -l"JCore" -l"JPush" -l"JXCategoryView" -l"Kingfisher" -l"MJRefresh" -l"RxCocoa" -l"RxRelay" -l"RxSwift" -l"SnapKit" -l"SwiftEntryKit" -l"ZLPhotoBrowser" -l"bz2" -l"c++" -l"resolv" -l"sqlite3" -l"swiftCoreGraphics" -l"z" -framework "AMapFoundationKit" -framework "AMapLocationKit" -framework "AMapNaviKit" -framework "AMapSearchKit" -framework "AMapTrackKit" -framework "AVFoundation" -framework "Accelerate" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "ExternalAccessory" -framework "Foundation" -framework "GLKit" -framework "IJKMediaFramework" -framework "ImageIO" -framework "JavaScriptCore" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "OpenGLES" -framework "Photos" -framework "PhotosUI" -framework "QuartzCore" -framework "QuickLook" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "VideoToolbox" -framework "WebKit" -weak_framework "AppTrackingTransparency" -weak_framework "Combine" -weak_framework "SwiftUI" -weak_framework "UserNotifications" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/CocoaDebug/CocoaDebug.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private/DDAutoUIKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private/DDColorKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private/DDControlsKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private/DDFontKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private/DDLogKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private/DDNetworkingOfAlamofireKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private/DDProgressHUDKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private/DDToastKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift/ESTabBarController_swift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/BRPickerView/BRPickerView.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private/DDBasicControlsKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDCategoryKit_Private/DDCategoryKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDMAMapKit_Private/DDMAMapKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDTimerKit_Private/DDTimerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDWebImageKit_Private/DDWebImageKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private/DDZFPlayerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/JXCategoryView/JXCategoryView.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/MJRefresh/MJRefresh.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private" "${PODS_ROOT}/Headers/Public/DDCategoryKit_Private" "${PODS_ROOT}/Headers/Public/DDFFmpegKit_Private" "${PODS_ROOT}/Headers/Public/DDLogKit_Private" "${PODS_ROOT}/Headers/Public/DDMAMapKit_Private" "${PODS_ROOT}/Headers/Public/DDProgressHUDKit_Private" "${PODS_ROOT}/Headers/Public/DDTimerKit_Private" "${PODS_ROOT}/Headers/Public/DDWebImageKit_Private" "${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private" "${PODS_ROOT}/Headers/Public/JXCategoryView" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RxCocoa" "${PODS_ROOT}/Headers/Public/ZLPhotoBrowser" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush/Headers" +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/BRPickerView" "${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDBasicControlsKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDCategoryKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDFFmpegKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDMAMapKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDTimerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDWebImageKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDZFPlayerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/JXCategoryView" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit" "${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser" "${PODS_ROOT}/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/lib" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush" /usr/lib/swift $(SDKROOT)/usr/lib/swift +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private/DDAutoUIKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private/DDColorKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private/DDControlsKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private/DDFontKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private/DDLogKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private/DDNetworkingOfAlamofireKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private/DDProgressHUDKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private/DDToastKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift/ESTabBarController_swift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/BRPickerView/BRPickerView.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private/DDBasicControlsKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDCategoryKit_Private/DDCategoryKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDFFmpegKit_Private/DDFFmpegKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDMAMapKit_Private/DDMAMapKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDTimerKit_Private/DDTimerKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDWebImageKit_Private/DDWebImageKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private/DDZFPlayerKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/JXCategoryView/JXCategoryView.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/MJRefresh/MJRefresh.modulemap" +OTHER_LDFLAGS = $(inherited) -ObjC -l"Alamofire" -l"BRPickerView" -l"DDAudioPlayerKit_Private" -l"DDAutoUIKit_Private" -l"DDBasicControlsKit_Private" -l"DDCategoryKit_Private" -l"DDColorKit_Private" -l"DDControlsKit_Private" -l"DDFFmpegKit_Private" -l"DDFontKit_Private" -l"DDLogKit_Private" -l"DDMAMapKit_Private" -l"DDNetworkingOfAlamofireKit_Private" -l"DDProgressHUDKit_Private" -l"DDTimerKit_Private" -l"DDToastKit_Private" -l"DDWebImageKit_Private" -l"DDZFPlayerKit_Private" -l"ESTabBarController-swift" -l"IQKeyboardManagerSwift" -l"JCore" -l"JPush" -l"JXCategoryView" -l"Kingfisher" -l"MJRefresh" -l"RxCocoa" -l"RxRelay" -l"RxSwift" -l"SnapKit" -l"SwiftEntryKit" -l"ZLPhotoBrowser" -l"avcodec" -l"avdevice" -l"avfilter" -l"avformat" -l"avutil" -l"bz2" -l"c++" -l"iconv" -l"resolv" -l"sqlite3" -l"swiftCoreGraphics" -l"swresample" -l"swscale" -l"z" -framework "AMapFoundationKit" -framework "AMapLocationKit" -framework "AMapNaviKit" -framework "AMapSearchKit" -framework "AMapTrackKit" -framework "AVFoundation" -framework "Accelerate" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreAudio" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "ExternalAccessory" -framework "Foundation" -framework "GLKit" -framework "IJKMediaFramework" -framework "ImageIO" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "OpenGLES" -framework "Photos" -framework "PhotosUI" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "VideoToolbox" -framework "WebKit" -weak_framework "AppTrackingTransparency" -weak_framework "Combine" -weak_framework "SwiftUI" -weak_framework "UserNotifications" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private/DDAutoUIKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private/DDColorKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private/DDControlsKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private/DDFontKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private/DDLogKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private/DDNetworkingOfAlamofireKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private/DDProgressHUDKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private/DDToastKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift/ESTabBarController_swift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/BRPickerView/BRPickerView.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private/DDBasicControlsKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDCategoryKit_Private/DDCategoryKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDFFmpegKit_Private/DDFFmpegKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDMAMapKit_Private/DDMAMapKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDTimerKit_Private/DDTimerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDWebImageKit_Private/DDWebImageKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private/DDZFPlayerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/JXCategoryView/JXCategoryView.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/MJRefresh/MJRefresh.modulemap" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CocoaDebug" "${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit" "${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser" +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit" "${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser" USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling.release.xcconfig b/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling.release.xcconfig index b748e1c..ded8379 100644 --- a/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling.release.xcconfig +++ b/Pods/Target Support Files/Pods-OrderScheduling/Pods-OrderScheduling.release.xcconfig @@ -4,11 +4,11 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64 FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AMapFoundation-NO-IDFA" "${PODS_ROOT}/AMapLocation-NO-IDFA" "${PODS_ROOT}/AMapNavi-NO-IDFA" "${PODS_ROOT}/AMapSearch-NO-IDFA" "${PODS_ROOT}/AMapTrack-NO-IDFA" "${PODS_ROOT}/DDZFPlayerKit_Private/DDZFPlayerKit_Private/Classes/ijkplayer" "${PODS_ROOT}/JCore" "${PODS_ROOT}/JPush" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/CocoaDebug" "${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private" "${PODS_ROOT}/Headers/Public/DDCategoryKit_Private" "${PODS_ROOT}/Headers/Public/DDLogKit_Private" "${PODS_ROOT}/Headers/Public/DDMAMapKit_Private" "${PODS_ROOT}/Headers/Public/DDProgressHUDKit_Private" "${PODS_ROOT}/Headers/Public/DDTimerKit_Private" "${PODS_ROOT}/Headers/Public/DDWebImageKit_Private" "${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private" "${PODS_ROOT}/Headers/Public/JXCategoryView" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RxCocoa" "${PODS_ROOT}/Headers/Public/ZLPhotoBrowser" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush/Headers" -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/BRPickerView" "${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDBasicControlsKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDCategoryKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDMAMapKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDTimerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDWebImageKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDZFPlayerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/JXCategoryView" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit" "${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush" /usr/lib/swift $(SDKROOT)/usr/lib/swift -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private/DDAutoUIKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private/DDColorKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private/DDControlsKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private/DDFontKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private/DDLogKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private/DDNetworkingOfAlamofireKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private/DDProgressHUDKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private/DDToastKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift/ESTabBarController_swift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/BRPickerView/BRPickerView.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private/DDBasicControlsKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDCategoryKit_Private/DDCategoryKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDMAMapKit_Private/DDMAMapKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDTimerKit_Private/DDTimerKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDWebImageKit_Private/DDWebImageKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private/DDZFPlayerKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/JXCategoryView/JXCategoryView.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/MJRefresh/MJRefresh.modulemap" -OTHER_LDFLAGS = $(inherited) -ObjC -l"Alamofire" -l"BRPickerView" -l"DDAudioPlayerKit_Private" -l"DDAutoUIKit_Private" -l"DDBasicControlsKit_Private" -l"DDCategoryKit_Private" -l"DDColorKit_Private" -l"DDControlsKit_Private" -l"DDFontKit_Private" -l"DDLogKit_Private" -l"DDMAMapKit_Private" -l"DDNetworkingOfAlamofireKit_Private" -l"DDProgressHUDKit_Private" -l"DDTimerKit_Private" -l"DDToastKit_Private" -l"DDWebImageKit_Private" -l"DDZFPlayerKit_Private" -l"ESTabBarController-swift" -l"IQKeyboardManagerSwift" -l"JCore" -l"JPush" -l"JXCategoryView" -l"Kingfisher" -l"MJRefresh" -l"RxCocoa" -l"RxRelay" -l"RxSwift" -l"SnapKit" -l"SwiftEntryKit" -l"ZLPhotoBrowser" -l"bz2" -l"c++" -l"resolv" -l"sqlite3" -l"swiftCoreGraphics" -l"z" -framework "AMapFoundationKit" -framework "AMapLocationKit" -framework "AMapNaviKit" -framework "AMapSearchKit" -framework "AMapTrackKit" -framework "AVFoundation" -framework "Accelerate" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "ExternalAccessory" -framework "Foundation" -framework "GLKit" -framework "IJKMediaFramework" -framework "ImageIO" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "OpenGLES" -framework "Photos" -framework "PhotosUI" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "VideoToolbox" -framework "WebKit" -weak_framework "AppTrackingTransparency" -weak_framework "Combine" -weak_framework "SwiftUI" -weak_framework "UserNotifications" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private/DDAutoUIKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private/DDColorKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private/DDControlsKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private/DDFontKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private/DDLogKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private/DDNetworkingOfAlamofireKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private/DDProgressHUDKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private/DDToastKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift/ESTabBarController_swift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/BRPickerView/BRPickerView.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private/DDBasicControlsKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDCategoryKit_Private/DDCategoryKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDMAMapKit_Private/DDMAMapKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDTimerKit_Private/DDTimerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDWebImageKit_Private/DDWebImageKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private/DDZFPlayerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/JXCategoryView/JXCategoryView.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/MJRefresh/MJRefresh.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private" "${PODS_ROOT}/Headers/Public/DDCategoryKit_Private" "${PODS_ROOT}/Headers/Public/DDFFmpegKit_Private" "${PODS_ROOT}/Headers/Public/DDLogKit_Private" "${PODS_ROOT}/Headers/Public/DDMAMapKit_Private" "${PODS_ROOT}/Headers/Public/DDProgressHUDKit_Private" "${PODS_ROOT}/Headers/Public/DDTimerKit_Private" "${PODS_ROOT}/Headers/Public/DDWebImageKit_Private" "${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private" "${PODS_ROOT}/Headers/Public/JXCategoryView" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RxCocoa" "${PODS_ROOT}/Headers/Public/ZLPhotoBrowser" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush/Headers" +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/BRPickerView" "${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDBasicControlsKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDCategoryKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDFFmpegKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDMAMapKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDTimerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDWebImageKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/DDZFPlayerKit_Private" "${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/JXCategoryView" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit" "${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser" "${PODS_ROOT}/DDFFmpegKit_Private/DDFFmpegKit_Private/Classes/DDFFmpeg/DDFFmpegBase/lib" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush" /usr/lib/swift $(SDKROOT)/usr/lib/swift +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private/DDAutoUIKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private/DDColorKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private/DDControlsKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private/DDFontKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private/DDLogKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private/DDNetworkingOfAlamofireKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private/DDProgressHUDKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private/DDToastKit_Private.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift/ESTabBarController_swift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/BRPickerView/BRPickerView.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private/DDBasicControlsKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDCategoryKit_Private/DDCategoryKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDFFmpegKit_Private/DDFFmpegKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDMAMapKit_Private/DDMAMapKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDTimerKit_Private/DDTimerKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDWebImageKit_Private/DDWebImageKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private/DDZFPlayerKit_Private.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/JXCategoryView/JXCategoryView.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/MJRefresh/MJRefresh.modulemap" +OTHER_LDFLAGS = $(inherited) -ObjC -l"Alamofire" -l"BRPickerView" -l"DDAudioPlayerKit_Private" -l"DDAutoUIKit_Private" -l"DDBasicControlsKit_Private" -l"DDCategoryKit_Private" -l"DDColorKit_Private" -l"DDControlsKit_Private" -l"DDFFmpegKit_Private" -l"DDFontKit_Private" -l"DDLogKit_Private" -l"DDMAMapKit_Private" -l"DDNetworkingOfAlamofireKit_Private" -l"DDProgressHUDKit_Private" -l"DDTimerKit_Private" -l"DDToastKit_Private" -l"DDWebImageKit_Private" -l"DDZFPlayerKit_Private" -l"ESTabBarController-swift" -l"IQKeyboardManagerSwift" -l"JCore" -l"JPush" -l"JXCategoryView" -l"Kingfisher" -l"MJRefresh" -l"RxCocoa" -l"RxRelay" -l"RxSwift" -l"SnapKit" -l"SwiftEntryKit" -l"ZLPhotoBrowser" -l"avcodec" -l"avdevice" -l"avfilter" -l"avformat" -l"avutil" -l"bz2" -l"c++" -l"iconv" -l"resolv" -l"sqlite3" -l"swiftCoreGraphics" -l"swresample" -l"swscale" -l"z" -framework "AMapFoundationKit" -framework "AMapLocationKit" -framework "AMapNaviKit" -framework "AMapSearchKit" -framework "AMapTrackKit" -framework "AVFoundation" -framework "Accelerate" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreAudio" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "ExternalAccessory" -framework "Foundation" -framework "GLKit" -framework "IJKMediaFramework" -framework "ImageIO" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "OpenGLES" -framework "Photos" -framework "PhotosUI" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "VideoToolbox" -framework "WebKit" -weak_framework "AppTrackingTransparency" -weak_framework "Combine" -weak_framework "SwiftUI" -weak_framework "UserNotifications" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAutoUIKit_Private/DDAutoUIKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDColorKit_Private/DDColorKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDControlsKit_Private/DDControlsKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDFontKit_Private/DDFontKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDLogKit_Private/DDLogKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDNetworkingOfAlamofireKit_Private/DDNetworkingOfAlamofireKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDProgressHUDKit_Private/DDProgressHUDKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDToastKit_Private/DDToastKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ESTabBarController-swift/ESTabBarController_swift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/ZLPhotoBrowser/ZLPhotoBrowser.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/BRPickerView/BRPickerView.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private/DDBasicControlsKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDCategoryKit_Private/DDCategoryKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDFFmpegKit_Private/DDFFmpegKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDMAMapKit_Private/DDMAMapKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDTimerKit_Private/DDTimerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDWebImageKit_Private/DDWebImageKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private/DDZFPlayerKit_Private.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/JXCategoryView/JXCategoryView.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/MJRefresh/MJRefresh.modulemap" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService-acknowledgements.markdown b/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService-acknowledgements.markdown index 0d33f08..281c5e2 100644 --- a/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService-acknowledgements.markdown +++ b/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService-acknowledgements.markdown @@ -1,29 +1,6 @@ # Acknowledgements This application makes use of the following third party libraries: -## DDAudioPlayerKit_Private - -Copyright (c) 2023 DDIsFriend - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - ## JCore Copyright jpush.cn diff --git a/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService-acknowledgements.plist b/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService-acknowledgements.plist index cf04610..8fce2ac 100644 --- a/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService-acknowledgements.plist +++ b/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService-acknowledgements.plist @@ -12,35 +12,6 @@ Type PSGroupSpecifier - - FooterText - Copyright (c) 2023 DDIsFriend <DDIsFriend@163.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - License - MIT - Title - DDAudioPlayerKit_Private - Type - PSGroupSpecifier - FooterText Copyright jpush.cn diff --git a/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService.debug.xcconfig b/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService.debug.xcconfig index ee18d2d..cc9ba3f 100644 --- a/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService.debug.xcconfig +++ b/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService.debug.xcconfig @@ -1,15 +1,12 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/JCore" "${PODS_ROOT}/JPush" "${PODS_ROOT}/JPushExtension" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/CocoaDebug" "${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private" "${PODS_ROOT}/Headers/Public/DDCategoryKit_Private" "${PODS_ROOT}/Headers/Public/DDLogKit_Private" "${PODS_ROOT}/Headers/Public/DDMAMapKit_Private" "${PODS_ROOT}/Headers/Public/DDProgressHUDKit_Private" "${PODS_ROOT}/Headers/Public/DDTimerKit_Private" "${PODS_ROOT}/Headers/Public/DDWebImageKit_Private" "${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private" "${PODS_ROOT}/Headers/Public/JXCategoryView" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RxCocoa" "${PODS_ROOT}/Headers/Public/ZLPhotoBrowser" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPushExtension/Headers" -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPushExtension" /usr/lib/swift -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" -OTHER_LDFLAGS = $(inherited) -ObjC -l"DDAudioPlayerKit_Private" -l"JCore" -l"JPush" -l"JPushExtension" -l"resolv" -l"z" -framework "CFNetwork" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -weak_framework "AppTrackingTransparency" -weak_framework "UserNotifications" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private" "${PODS_ROOT}/Headers/Public/DDCategoryKit_Private" "${PODS_ROOT}/Headers/Public/DDFFmpegKit_Private" "${PODS_ROOT}/Headers/Public/DDLogKit_Private" "${PODS_ROOT}/Headers/Public/DDMAMapKit_Private" "${PODS_ROOT}/Headers/Public/DDProgressHUDKit_Private" "${PODS_ROOT}/Headers/Public/DDTimerKit_Private" "${PODS_ROOT}/Headers/Public/DDWebImageKit_Private" "${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private" "${PODS_ROOT}/Headers/Public/JXCategoryView" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RxCocoa" "${PODS_ROOT}/Headers/Public/ZLPhotoBrowser" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPushExtension/Headers" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPushExtension" +OTHER_LDFLAGS = $(inherited) -ObjC -l"JCore" -l"JPush" -l"JPushExtension" -l"resolv" -l"z" -framework "CFNetwork" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -weak_framework "AppTrackingTransparency" -weak_framework "UserNotifications" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private" USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService.release.xcconfig b/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService.release.xcconfig index ee18d2d..cc9ba3f 100644 --- a/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService.release.xcconfig +++ b/Pods/Target Support Files/Pods-OrderSchedulingNotificationService/Pods-OrderSchedulingNotificationService.release.xcconfig @@ -1,15 +1,12 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/JCore" "${PODS_ROOT}/JPush" "${PODS_ROOT}/JPushExtension" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/CocoaDebug" "${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private" "${PODS_ROOT}/Headers/Public/DDCategoryKit_Private" "${PODS_ROOT}/Headers/Public/DDLogKit_Private" "${PODS_ROOT}/Headers/Public/DDMAMapKit_Private" "${PODS_ROOT}/Headers/Public/DDProgressHUDKit_Private" "${PODS_ROOT}/Headers/Public/DDTimerKit_Private" "${PODS_ROOT}/Headers/Public/DDWebImageKit_Private" "${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private" "${PODS_ROOT}/Headers/Public/JXCategoryView" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RxCocoa" "${PODS_ROOT}/Headers/Public/ZLPhotoBrowser" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPushExtension/Headers" -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPushExtension" /usr/lib/swift -OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" -OTHER_LDFLAGS = $(inherited) -ObjC -l"DDAudioPlayerKit_Private" -l"JCore" -l"JPush" -l"JPushExtension" -l"resolv" -l"z" -framework "CFNetwork" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -weak_framework "AppTrackingTransparency" -weak_framework "UserNotifications" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private/DDAudioPlayerKit_Private.modulemap" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/DDBasicControlsKit_Private" "${PODS_ROOT}/Headers/Public/DDCategoryKit_Private" "${PODS_ROOT}/Headers/Public/DDFFmpegKit_Private" "${PODS_ROOT}/Headers/Public/DDLogKit_Private" "${PODS_ROOT}/Headers/Public/DDMAMapKit_Private" "${PODS_ROOT}/Headers/Public/DDProgressHUDKit_Private" "${PODS_ROOT}/Headers/Public/DDTimerKit_Private" "${PODS_ROOT}/Headers/Public/DDWebImageKit_Private" "${PODS_ROOT}/Headers/Public/DDZFPlayerKit_Private" "${PODS_ROOT}/Headers/Public/JXCategoryView" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/RxCocoa" "${PODS_ROOT}/Headers/Public/ZLPhotoBrowser" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPushExtension/Headers" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_XCFRAMEWORKS_BUILD_DIR}/JCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPush" "${PODS_XCFRAMEWORKS_BUILD_DIR}/JPushExtension" +OTHER_LDFLAGS = $(inherited) -ObjC -l"JCore" -l"JPush" -l"JPushExtension" -l"resolv" -l"z" -framework "CFNetwork" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -weak_framework "AppTrackingTransparency" -weak_framework "UserNotifications" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DDAudioPlayerKit_Private" USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/fastlane/report.xml b/fastlane/report.xml index 9e4b3af..e675509 100644 --- a/fastlane/report.xml +++ b/fastlane/report.xml @@ -5,17 +5,17 @@ - + - + - +