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