iOS PHAsset中获得AVAsset

PHAsset是来自相册的视频地址和相关信息,获得其中的AVAsset方法:
方法1:
https://segmentfault.com/q/1010000003992834

方法2: 直接抓取

PHAsset* phasset = unitData[@"data"][@"phasset"];
PHVideoRequestOptions *optionForCache = [[PHVideoRequestOptions alloc]init];
[[PHImageManager defaultManager] requestAVAssetForVideo:phasset options:optionForCache resultHandler:^(AVAsset * avasset, AVAudioMix * audioMix, NSDictionary * info) {
    [appDelegate.poolVideoSelectedAvasset addObject:avasset];
    ZSThreadWaitReduce(__cache);
}];

你可能感兴趣的:(iOS PHAsset中获得AVAsset)