一种莫名奇妙就对了的感觉
This commit is contained in:
parent
0993c911a4
commit
762273cf92
@ -283,7 +283,24 @@ class CCSpatialVideoDisplayController: BaseController, AVPlayerViewControllerDel
|
||||
let compositionTime = request.compositionTime
|
||||
let end:CMTime = CMTimeMake(value: Int64(compositionTime.value+1), timescale: compositionTime.timescale)
|
||||
let tr = CMTimeRange(start: compositionTime, end: end)
|
||||
self.quickLoadAReader(timeRange: tr)
|
||||
// self.quickLoadAReader(timeRange: tr)
|
||||
|
||||
|
||||
while let nextSampleBuffer = self.assetOutput!.copyNextSampleBuffer() {
|
||||
// print("compositon......copy samplebuffer")
|
||||
}
|
||||
// if(self.assetReader?.status == .completed){
|
||||
// print("okkkssss...")
|
||||
self.assetOutput?.reset(forReadingTimeRanges:[NSValue(timeRange: tr)])
|
||||
// }
|
||||
// else{
|
||||
//
|
||||
// print("status:\(self.assetReader?.error?.localizedDescription)")
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
var ciImg:CIImage? = nil
|
||||
switch self.selectedIndex {
|
||||
case .crossedEyes://交叉眼
|
||||
@ -321,7 +338,8 @@ class CCSpatialVideoDisplayController: BaseController, AVPlayerViewControllerDel
|
||||
if self.assetTrack == nil {
|
||||
assetTrack = try await self.videoOriginalAsset.loadTracks(withMediaType: .video).first!
|
||||
}
|
||||
let timeRange = CMTimeRange(start: .zero, duration: .positiveInfinity)
|
||||
// let timeRange = CMTimeRange(start: .zero, duration: .positiveInfinity)
|
||||
let timeRange = CMTimeRange(start: .zero, duration: CMTime(value: 1, timescale: 1))
|
||||
self.quickLoadAReader(timeRange: timeRange)
|
||||
|
||||
} catch {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user