对assetreader的创建加了信号量
This commit is contained in:
parent
79a791b088
commit
b74d31cd85
@ -24,9 +24,9 @@ extension ZZHCustomPlayer {
|
|||||||
print("self 被销毁了.....")
|
print("self 被销毁了.....")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
CustomPlayerShareSemaphore.wait()
|
// CustomPlayerShareSemaphore.wait()
|
||||||
weakSelf.convertFrame(request:request)
|
weakSelf.convertFrame(request:request)
|
||||||
CustomPlayerShareSemaphore.signal()
|
// CustomPlayerShareSemaphore.signal()
|
||||||
|
|
||||||
} completionHandler: { ac, err in
|
} completionHandler: { ac, err in
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -171,8 +171,13 @@ extension ZZHCustomPlayer {
|
|||||||
|
|
||||||
//在播放器的slider 拖动播放时调用
|
//在播放器的slider 拖动播放时调用
|
||||||
func quickLoadAReaderWhenSeek(startCT:CMTime) {
|
func quickLoadAReaderWhenSeek(startCT:CMTime) {
|
||||||
|
print("wait thread:\(Thread.current)")
|
||||||
|
CustomPlayerShareSemaphore.wait()
|
||||||
|
print("wait inininin.....")
|
||||||
let timeRange = CMTimeRange(start: startCT, duration: .positiveInfinity)
|
let timeRange = CMTimeRange(start: startCT, duration: .positiveInfinity)
|
||||||
self.quickLoadAReader(timeRange: timeRange)
|
self.quickLoadAReader(timeRange: timeRange)
|
||||||
|
CustomPlayerShareSemaphore.signal()
|
||||||
|
print("signal thread:\(Thread.current)")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user